I have an input file which is an FB (1500 LRECL). My point of interest are two fields in them.
1. Reference number
2. Flag which needs to be set the same for the a given reference number.
As you can see the first 8 chars are the reference numbers which are sorted and the single byte char (which contains 'R' or 'X' or 'L' ) are the flags to be set. It would be required that all records of a specific reference number to be set with one single flag.
All records to be filled with 'R' if any one of the record contains 'R'
All records to be filled with 'X' if any one of the record contains 'X' and none of them have an 'R'
All records to be filled with 'L' if any one of the record contains 'L' and none of them have an 'R' or an 'X'.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.