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

SYNCSORT: Join on matching keys


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Wed Feb 27, 2008 12:02 am
Reply with quote

I've browsed through the previous posts and can't find a solution that actually works for the situation I have. I also have read the SyncSort manual and the Join manual, but can't get their solutions to work either!

We use SYNCSORT FOR Z/OS 1.2.2.2R.

I have two files with a 7 number customer ID in them - although in different positions. I need to produce a 3rd file with ONLY the customer IDs from File 1 that are present in File 2.

File 1 has 965 records, key begins in column 3, length of 7.

File 2 has 974 records, key begins in column 17, length of 7.

File 3 should only have the matching customer IDs.

Here are my SyncSort statements:

Code:

//SORTJNF1 DD  DSN=MV603.TEMP.CUSTIDS,             
//             DISP=SHR                             
//SORTJNF2 DD  DSN=MVD.MV603.DLZZ.DISK.D55001.NLS, 
//             DISP=SHR                             
//SORTOUT  DD  DSN=MV603.TEMP.D55001,               
//             DISP=(NEW,CATLG,CATLG),             
//             DCB=(RECFM=FB,LRECL=080,BLKSIZE=0), 
//             UNIT=DISK,SPACE=(TRK,(05,05),RLSE)   
//SYSIN    DD  *                         
 JOINKEYS FILES=F1,FIELDS=(03,07,A)     
 JOINKEYS FILES=F2,FIELDS=(17,07,A)     
 REFORMAT FIELDS=(F1:03,07)             
 SORT FIELDS=COPY                       
/*



The resulting file contains all the customer ids from File 2.

What am I doing wrong?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Feb 27, 2008 12:33 am
Reply with quote

My small knowledge doesn't see anything wrong, how is it not working?
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Wed Feb 27, 2008 12:44 am
Reply with quote

Ah crap. Don't mind me - I'm wandering around with the little animals.

icon_redface.gif

Turns out that the systems programmers did a test environment refresh this weekend and wiped out all the Customer IDs with which I had been working - making the results of the job accurate: useless, but accurate. icon_lol.gif


Thanks for the feedback and patience!


I'll go hide in my corner now.......
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Feb 27, 2008 4:53 am
Reply with quote

socker_dad wrote:
I'll go hide in my corner now.......
'that' corner is visible to us.. icon_wink.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Rexx pattern matching on PS qualifer ... CLIST & REXX 1
Search our Forums:

Back to Top