I was wondering if anyone would be able to help me.
I have the following input file
It basically gives a month of the year and a person for that month.
So i have some code that works out previous month and it seems to be working ok. But what i want to do next it get the persons name beside that month.
So for april - month 04, i want to get the name robert.
I have this code so far:
PERFORM UNTIL (INPUT-MONTH = WS-PREVIOUS-MONTH) OR EOF
AT END SET EOF TO TRUE
MOVE INPUT-NAME TO WS-SELECT-NAME.
When i display WS-PREVIOUS-MONTH is correctly displays the the previous month - 4.
However when i display the name is incorrectly displays the last name on the list.
Can any one see what is wrong with my code or suggest a way to fix this.