Job - COMBTRAN, Step - STEP05R, Program - SORT
![Job flow](/media/postImages/original/IMK-41bR4-RjKqBORbLZnzbA)
The issue appears to be with the SORT utility. The first step in this job is supposed to read all the records from two GDGs, sort them, and write into a new GDG. In my case instead of reading all records, it is reading just one record from each input GDG. So I end up getting only 2 records in the output GDG.
The first input GDG has 262 records.
![](/media/postImages/original/IMBfIZmjg8RV6JijPxKQRziA)
The second input GDG has 50 records.
![](/media/postImages/original/IMo5d2dMC-R3-thmR5nyJazg)
The output GDG should get generated with 312 records, instead it has only 2 records. It appears as if the SORT program encounters end-of-file just after 1st record.
![](/media/postImages/original/IMwHszgHMgT722K-jtX-vBDw)
Investigation:
- I verified that the COMBTRAN.groovy script matches with the sample provided here -https://static.us-east-1.prod.workshops.aws/public/170db278-278e-4aeb-b1cf-a6597ff7c6ef/assets/scripts.zip. This means the changes that were done as part of the workshop are all correct.
- I created a new groovy script to just test whether the SORT is working on a different file or not and I kept only 1 input file. This time also the output file got generated with just 1 record. This only proves that the SORT is finding end-of-file somehow at the end of first record.
Input file -
Output file -
![](/media/postImages/original/IMDQAmdc6ATMiHugSanEN9LA)
Can you please help to identify what might be causing this?
Thank you!
Thanks for your response Alae.
When the issue occurred, the first thing I wondered was if I missed the recordSize attribute. However, you can see from the screenshot I have added where the attribute was coded. Still the issue occurred.