Kolusu,
I have around 100,000 records in FILE-A. FILE-B has around a million records.
The length of the sort key(for the above example) is 4. In practice this will be 13 bytes in char format.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Thu Nov 06, 2003 12:25 pm Post subject:
Puru,
100,000 records are too much for generating the include/omit cards. I can't think of any way to do it using syncsort built-in features. I Don't know INSYNC, so I cannot speak about that.
I guess you are better off coding a cobol program. You can use the logic in this topic
Kolusu,
Incase FILE-A has around 100 records and FILE-B has a million records and the sort length is still 13 bytes, how do I generate INCLUDE/OMIT cards??
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Nov 07, 2003 9:06 am Post subject:
Puru,
The following JCL will give you the desired results. I assumed that the key in both the files starts in position 1 for a length of 13. The first copy will generate the include condition keys.The second copy will extract the keys in the include condition from file-b.
SORT FIELDS=COPY
INCLUDE COND=(1,13,CH,EQ,C'HEADERDUMMY11',OR,
MY.TLR.FILE, contains the following
INCLUDE COND=(1,13,CH,EQ,C'TRAILERDUMMY1')
However I was unable to understand the second sort card in your JCL. Could you please explain the same?? Or atleast direct me to any link which will shed more light??
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Nov 07, 2003 10:11 am Post subject:
Puru,
Did you job actually run without any syntax error? you cannot have 2 include cond parms in your JCL. Your trailer file should only have
Code:
1,13,CH,EQ,C'TRAILERDUMMY1')
Quote:
However I was unable to understand the second sort card in your JCL. Could you please explain the same?? Or atleast direct me to any link which will shed more light??
I am doing the same thing as you are doing.
Code:
INCLUDE COND=(1,13,CH,EQ,C'TRUE COND ',OR,
That is equivalent to your Header file record. I just used a true and false condition.you put this in a file and I just coded in instream.
And I am concating the generated include cond from the first copy operation.
Code:
// DD DSN=&T1,DISP=OLD,VOL=REF=*.T1
And finally I am closing the include cond with a false cond which is similar to your trailer file.
Code:
1,13,CH,EQ,C'FALSE COND ')
Basically the CTL2CNTL at the time of execuetion will be as follows
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