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
 

 

Syncsort for 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 11:45 am    Post subject: Syncsort for 2 files
Reply with quote

Hi ,


I have 2 files (FB) , FILE A (1161 record Length) has No Duplicate values and FILE B ( 181 record Lenght) has duplicates. The keys are from postion 2 - 10 for both the files. I need to compare both the files using syncsort and write the whole record of FILE B in the output file. Nothing is needed from FILE A.


Can you please help me in this.
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 02, 2011 11:58 am    Post subject:
Reply with quote

Hi,

are all duplicates from file B needed if there is a match with file B ?

Gerry
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 11:59 am    Post subject:
Reply with quote

yes all the duplicates are needed .
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 02, 2011 12:09 pm    Post subject:
Reply with quote

Hi,

try this
Code:
//STEP1  EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                             
//SORTJNF1 DD DSN=filea                           
//SORTJNF2 DD DSN=fileb                           
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                   
  JOINKEYS FILE=F1,FIELDS=(2,9,A)                 
  JOINKEYS FILE=F2,FIELDS=(2,9,A)                 
  REFORMAT FIELDS=(F2:1,181)                       
  SORT FIELDS=COPY                                 
/*


Gerry
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 1:48 pm    Post subject:
Reply with quote

hi the job ran fine ,

can you please explain me the following statistics

JNF1 STATISTICS
SORTJNF1 : RECFM=FB ; LRECL= 1161; BLKSIZE= 27864
SORTJNF1 : RCD IN= 1000,OMITTED= 0,PAIRED= 752,UNPAIRED= 248
FILESIZE 1,161,000 BYTES
JNF2 STATISTICS
SORTJNF2 : RECFM=FB ; LRECL= 181; BLKSIZE= 27874
SORTJNF2 : RCD IN= 1000,OMITTED= 0,PAIRED= 885,UNPAIRED= 115
FILESIZE 181,000 BYTES


especially the PARIED parameter . Coz i not able to understand the difference in the JNF1 and JNF2 values
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Nov 02, 2011 1:53 pm    Post subject: Reply to: Syncsort for 2 files
Reply with quote

You have duplicates on one file, so you'd not always see a direct relationship between paired on each file.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 1:54 pm    Post subject:
Reply with quote

thanks a lot icon_smile.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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