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 ?
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Pratikshya,
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
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can do this kind of thing more easily with the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this: