I want to sort file using DFSORT in one step, not with more than one step , Please look into the rules.
Rules:
1. sum up based on fields grd-cd, mbank-cd,fee-id and fee-cd
2. sum up based on fields grd-cd, fee-id and fee-cd, low values
to be moved field mbank-cd.
3. sum up based on fields fee-id and fee-cd, low values
to be moved field grd-cd and mbank-cd.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Anand,
Shankar's job won't help because he assumes that every record has the key fields (grd-cd, mbank-cd,fee-id and fee-cd) whereas your example clearly shows some don't.
What is the RECFM and LRECL of the input file?
What is the starting position, length and format of the grd-cd, mbank-cd, fee-id, fee-cd and amount fields?
Please show a more extensive example of input records and expected output records, with multiple groups of fields having different key values (grd-cd, mbank-cd,fee-id and fee-cd) - for example, records with different grd-cd, fee-id and fee-cd values and with different fee-id and fee-cd values. It's difficult to get the full picture of what you want from just those few records you showed. Please don't attach a file, just show the relevant values inline using code tags, e.g.