MAINFRAME - TIP OF THE DAY :
Sometimes it might be helpful to see only 1 or a few records in HEX (rather than the entire file w/ HEX ON).
When VIEWing or EDITing a file use the line command HX to show that line in HEX. To show 3 records, enter HX3. To turn the hex off enter HX (for 1) or HX3 (for 3). Or in the Command area, enter HEX OFF.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Sun Aug 27, 2017 2:00 am Post subject: Logic for month change
I am a beginner in COBOL. I have a file like below
Agent No Date Amount
xxx 07/17 100.00
xxx 07/17 200.00
xxx 07/17 10.00
xxx 07/17 105.00
xxx 08/17 100.00
I have a requirement like .....read the the file, as the long as the month does not change, accumulate the amount. As soon as the month changes write the total to output file(like for example above the month changes to 08/17)
Now, my question is how do i write logic for changing month in COBOL program? Any suggestions please
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum