IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort a file


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue Jan 13, 2015 2:15 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jan 13, 2015 3:54 am
Reply with quote

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
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue Jan 13, 2015 8:57 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jan 13, 2015 9:03 pm
Reply with quote

Paste the sysout from the step, in the Code tags, please.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue Jan 13, 2015 9:09 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Jan 13, 2015 9:21 pm
Reply with quote

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
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Tue Jan 13, 2015 9:28 pm
Reply with quote

Bill ,

Correcting the KEYS worked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top