I want to sort ths i/p file with the bytes (2-4) but I need to interpret the values of those fields with someother values and sort it. For example, a values in bytes 2-4 should be interpreted to the following:
Code:
413 - 280
774 - 280
885 - 096
So my i/p is sorted with interpreted values in the above table, but in the o/p my orginal values should come.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
bharath,
Gerry's "solution" works for the data given but will not work for other variations of the data because there's no IFTHEN NONE clause. For example, if the input included this record:
0285....NEW......1.
It would be sorted as the first record instead of after the "280" records.
Here's a DFSORT job that will work for all variations of the data:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Why did you choose 81 position to write to output file..
Since the OP didn't originally give the LRECL of the input file, I assumed for the example that it was LRECL=80. The job would need to be changed appropriately for a different LRECL.