Currently these are Sorted as SORT FIELDS=(3,23,CH,A,1,2,CH,A)
Basically i need to Sort these records based on record types, as when 01 or 03 then above sort should work and when 02 it should above sort plus 3 positions Highlighted.
To be more specific,
when first 2 positions = 01, 03 then sort as =(3,23,CH,A,1,2,CH,A)
when first 2 positions = 02 then sort as (3,23,CH,A,1,2,CH,A) & 3 positions.
Limitations:
1) Should be used only in Sort, can be easily done in program but client is not convinced.
2) we use SYNCSORT in out region.
am a beginner in SYNCSORT, so not aware of the advanced commands in Sort.
Please Advice me some Solution/Suggestion's for this specific requirement.
If i get you correctly, u want to sort a file on the basis of the contents of the file. What you can do is - Split the file into two on the basis of first two letter using SORT utility and then sort each files as per how you want it to be.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
when first 2 positions = 02 then sort as (3,23,CH,A,1,2,CH,A) & 3 positions
ashwinreddy,
For '02' records, the sort positions which you mentioned are not clear and even they overlap. The highlighted 3 characters in your sample data are already part of 3,23,CH. And you dont need to sort the first 2 positions here as it can have only one value viz. '02'