If I understand it right, you have two separate records each time and you want to sort the file on information on the second record.
What you can do is read two recors at once in an inputprocedure of a sort. You fill a sortrecord with a prefix with the zipcode and a serialnumber followed by the contents of the original record. On the outputprocedure you can strip off that prefix and write the original record back in the new order you created by this action.
i am sorry,
i should have been more accurate. from info1 to info6 ,it is one record.and i have several records.
would it be easier to write a program or to use a syncsort utility (if it exists !) ?
thanks
claudeb
Using syncsort you can sort this at once giving the position of your sortfields. It depends on if your data is on the same place in every record.
Something like
sort fields=(20,6,,a)
which says something like starting from position 20 over a length of 6 no conversion ascending. But look the exact parm up in the manual or copy some existing example.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.