Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: Sort a file
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Jan 13, 2015 3:54 am    Post subject: Reply to: Sort a file
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    Post subject: Reply to: Sort a file
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue Jan 13, 2015 9:03 pm    Post subject: Reply to: Sort a file
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    Post subject: Reply to: Sort a file
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: 1219
Location: Israel

PostPosted: Tue Jan 13, 2015 9:21 pm    Post subject:
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    Post subject: Reply to: Sort a file
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us