Joined: 12 May 2006 Posts: 41 Topics: 16 Location: Mumbai
Posted: Tue Oct 02, 2007 9:56 am Post subject: Handling a varible length field in SORT
I have two files FILE1 and FILE2. I have to compare both the files on a specific key. Both the files have got some common fields in them.
FILE1:
Client1
Client2
Client3
Client4
Client5
FILE2:
Client1
Client2
Client3
Client4
Client5
Primary Key in FILE1 and FILE2:
MI ID, CLENT CODE, PATIENT ID, DOB, FST NAME
Constraint: PATIENT ID is variable
Requirement: Some of the Clients may use the PATIENT ID as sub-set or Full-key of Patient ID. The info as to what would be the length to be used for a Client will be stored in one of the DB tables. So before comarision of the records in FILE1 and FILE2, we have to first refer the table for the Patient ID length to be used for comparision.
I don't see any issues from the program perpective, but the only problem is with handling the Patient ID in the SORT cards. We have to SORT all the records of all the clinets as per their desired lengths of the Patient IDs registered in the DB2 table.
Can somebody suggest me handling the Patient ID in the SORT cards which may vary in length from one Client to the other. _________________ Thanks,
-Srini
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
Posted: Tue Oct 02, 2007 12:16 pm Post subject:
If the field is the same for all recs in a run, Sort has SYMBOLIC NAMES so you could generate a card defining the ID field to be fed into the SORT step. This example shows a simple sort but the symbolic name can probably be used for matching, etc.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum