for example 001 record in the input should be written to first file and 016 to second file and so on; I use only syncsort. the number files is fixed and need not be generated dynamically.Can any one help me please.
Joined: 29 Jun 2006 Posts: 1439 Location: Bangalore,India
Suresh,
You dint say all the i/p file keys are present in control file or ONLY subset is present.
Quote:
000311 01702
000312 02403
Though you have not given sufficient examples about ur requirement, I assume the value after your key (keys above 017 & 024) says in which o/p file (02 and 03 files respectively) to the i/p record should be written.
If this is your requirement, usign join keys (I believe- as I have not worked with syncsort much).... join the both the records and using simple outfil....include statement, get your job done (with little reformatting).
Assuming the key field is (6,3) in the input file, and (1,3) for the control file, and the control file output identifier field is (4,2)...
And also assuming that these are both 80 byte FB data sets, try the following:
Alissa,
That was gr8 and indeed helpful;But my client doesn't allow the use of join keys. Is there any performance issues with join keys; they rather go for a cobol pgm instead of using joinkeys when processing millions of records.But anyway you helped me to learn abt joinkeys. Thanks for your help.
Alissa,
I'm sorry and forgot to mention one more requirement. If the field from 6 to 3 in the input doesnt have a join with the control file record that records should be written to a default dataset. Is there any way to do it?
I'm sorry and forgot to mention one more requirement. If the field from 6 to 3 in the input doesnt have a join with the control file record that records should be written to a default dataset. Is there any way to do it?