Now for any account number, a record with record-type 1 is mandatory.Other record-type may or maynot be present. All record-type
have different layout and have only account number and rec-type as the common fields.
My requirement is that I need to check the account number for record-type 1 is satisfying some condition or not.If is is then I need to get the other record-type records for that particular account.
For ex. Lets say we have a field in Record-type 1 layout called "Minimum".
Say I check whether for account number 001 the Minimum > 10 or not.
If the Minimum for account number 001 > 10 then I need the record-type 3 and record-type 12 for the account.
Is there any way we can use SORT to get such records ?
The following DFSORT/ICETOOL JCL will give you the desired results. I assumed that the input file FB recfm and 80 bytes in lrecl and record type starts in pos 5 and is byte in length and the MINIMUM field starts in pos 15 and also 2 bytes