The Header Record always starts with HL1,I require the first header record and the below 3 records(basically upto next Header record) needs to be written to a new file and the second header record and the next 2 records(record-4,5) needs to be written into another file and finally the 3rd one also in the same way
The records after the Header record will be varying,the file is of fixed length....we can take that as 80.
I tried in many ways but I was not able to get as the record number is varying.
Can anyone please help me out doing this using sort.
The job posted above would have worked fine for you if you had the latest release of SyncSort - SyncSort for z/OS 1.3.2 which supports the WHEN=GROUP function.
Since it's throwing syntax error, I assume you are running an older version of SyncSort. Here's a SyncSort job which should work for SyncSort 1.2 or above.
Sorry Arun....The code is working fine & Thanks a lot for the HELP.
In the Forum I had mentioned the file length as 80 but actually it is of 400 and so in my real time environment there was a small mistake from my side(numbers in SYSIN card)...I had changed the same and everything is fine...