Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
First by ID, second by Phone and third by Name?
First by Phone, second by ID and third by Name?
First by ID, second by Name?
First by Phone, second by Name?
One file has two different records of different layouts,
Consider the Group AAAAA, has sort pos as :POS(6 to 15)[ID] and POS(16 to 25 )[PHONE].
Consider the Group BBBBB, has sort pos as : POS(11 to 20)[ID] and POS(21 to 30 ).[PHONE]
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Last I looked 6-15 and 16-25 would be 20 characters but you show 29 characters. At any rate, I think I understand what you want now and here's a DFSORT job that will do it. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes:
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
Nagendran,
Quote:
Consider the Group AAAAA, has sort pos as :POS(6 to 15)[ID] and POS(16 to 25 )[PHONE].
Consider the Group BBBBB, has sort pos as : POS(11 to 20)[ID] and POS(21 to 30 ).[PHONE]
I think you want to sort the file based on some fields which are in different positions for different group of records and the group of records can be identified by a particualr field(s). If this is the one you want, the following sort card will help you.
Assuming a file with length of 80 and group of records can be identified by field in position 1 and length 5.