Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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: 7314

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: 1250
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 File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us