View previous topic :: View next topic
|
Author |
Message |
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Hi All ,
I have a requirement .
I have 2 files , File A and File B .
File A has Emploee Number , emplyee name , address .
File B has employee number and department.
File A has around 1.3 M records. File B has around 1.8 M records.
In file A , i have employee number that can have employee names as spaces also.
I want to extract all the employee numbers that has name as blank.
I was able to do this via INCLUDE condn in the SORT .
Now i want to eliminate the extracted employee numbers from FILE B.
I am using currently the OMIT cond. But i am able to give only a max of 1000 records per SYSIN DD * .
I have around 15,000 employee numbers that i want to eliminate from FILE B . Each time i am using 15 or 16 separate STEPS in a single JCL to execute the omit condn.
How can i do it all a time ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Sounds like a simple JOINKEYS. Take your extract from File A, match it to File B, take the mismatches for your new File B.
Code: |
JOIN UNPAIRED,Fn,ONLY |
Where Fn is the File B. If File B has duplicates, probably best as F1. |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Hi Bill ,
I tried the below .
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,9,A)
JOINKYES FILE=F2,FIELDS=(1,9,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,511)
SORT FIELDS=COPY
/*
But it says
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
Also , i want to extract only those records which are not paired. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Paste the sysout from the step, in the Code tags, please. |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
SYSIN :
JOINKEYS FILE=F1,FIELDS=(1,9,A)
JOINKYES FILE=F2,FIELDS=(1,9,A)
*
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,511)
SORT FIELDS=COPY
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
I run your query and got 2 messages:
Code: |
SYSIN :
JOINKEYS FILE=F1,FIELDS=(1,9,A)
JOINKYES FILE=F2,FIELDS=(1,9,A)
*
*
*
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,511)
SORT FIELDS=COPY
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000 |
The 1st one because of your typo (JOINKYES instead of JOINKEYS)
The 2nd because "Identify a comment card image by placing an asterisk (*) in column 1."
But, most important, SYNCSORT places an asterisk under the word in error.
It may not be obvious because it placed an asterisk under the asterisk, but it is there.
In the code I show above, there are 3 lines with asterisk. One under JOINKYES and one under the erraneous comment line |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
Bill ,
Correcting the KEYS worked. |
|
Back to top |
|
|
|