Both input files(RTAX025 and TAX034) has 1 field in common i.e, order num ( and also both files has so many other fields (approx : 60 fields) which are not matching)
if the same order num is present in both RTAX025 and TAX034, only then the row from TAX034 should be written to RTAX034.
I have implemented this and it works fine for single flow. Codes are as below
PERFORM PROCESS-RT025-RECORD UNTIL RT025-EOF
PERFORM READ-RT025-FILE - To read the record from RTAX025 FILE
PERFORM PROCESS-T034 UNTIL T034-EOF
OR ( TAX034-ORDER-NUMBER > RTAX025-ORDER-NUMBER )
IF (RTAX025-ORDER-NUMBER = TAX034-ORDER-NUMBER )
PERFORM F3225-WRITE-RTAX034 - To write matching record to RTAX034
ADD 1 TO T034-DATA-WRITE-COUNT
PERFORM READ-TAX034-FILE - to read next record from TAX034 file
Note: for the order num in RTAX025, there are many records in TAX034. All the records present in TAX034 should be written to RTAX034 for that order num.
Problem arrives when i want to implement checkpoint restart logic for this.
example: When the program abends after reading 11th record of (READ-TAX034-FILE section) TAX034.(but before comparing and writing to RTAX034)
when the program is restarted, RTAX025 will start from 11th record( consider threshold is 10records).
TAX034-ORDER-NUMBER will be blank hence it goes to loop 'PROCESS-T034' section.
since the order numb is not equal to, it will skip 1 record and read next record.
Hence in output file(RTAX034), 1 record will be skipped.
I dont have an option to save record layouts, since i will be performing same logic for 27files(reading and writing).
Please let me know if any other option to solve this.
These are GSAM files.
Since I will be splitting 27 files into 54 files, i am asked to use checkpoint restart logic.
If its splitting of few files, then we are saving entire table layout to achieve this.
In my team, this is the 1st time we have got requirement of splitting 27 files hence nobody has idea how to do this.
Since its existing files, i cant change the file types.
Please let me know if there is any option to do this?
I think you can use a common working storage save area for all the files you use. When you read the file. you move the data to this area and take a check point using this area in CHKP call. When you restart after abend, you can use the details back from this common save area. _________________ Payilagam Chennai
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