SYNSORT JCL Required



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Re: SYNSORT JCL Required

Postby bharmf » Thu Jun 15, 2017 7:41 am

Thank you NicC..!! This is how it was looks.
bharmf
 
Posts: 6
Joined: Tue Jun 13, 2017 10:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: SYNSORT JCL Required

 

Re: SYNSORT JCL Required

Postby Aki88 » Thu Jun 15, 2017 11:12 am

Hello,

There are a few errors in the SORT card you've shared.

1. The spaces between 'FIELDS = COPY', is incorrect; correct syntax is: 'SORT FIELDS=COPY'
bharmf wrote:...
SORT FIELDS = COPY
 
...


2. The JOINKEYS statements can use DDNAMES only when you use 'F1=' or 'F2=', under all other cases it uses default *SORT keywords. If you have SYNCSORT manual then please refer that, else you can use the DFSORT manual for JOINKEYS keywords, SYNCSORT keywords use the same structure - at least for the JOINKEYS statements.

bharmf wrote:...

JOINKEYS FILES=FILE1,FIELDS=(5,13,A)
JOINKEYS FILES=FILE2,FIELDS=(5,13,A)
 
...


3. This is not an error, but more of a good to know and apply; JOINKEYS by default outputs PAIRED records. Basically if you drop the JOIN statement then *SORT will automatically JOIN the keys and output paired records.

4. You've mentioned 13 bytes of key, whereas your input shows 9 bytes of data only; do you want to revisit that?

Aside, here is a simple solution; I've used RECFM=FB, LRECL=80 input, you can tweak it further to fit your need; NOTE, this SORT card can be tweaked further and made cleaner. I'll leave it to you to tweak around it:


//FILE1    DD *                  
111111111 AAAAAA BBBBBBBB        
222222222 BBBBBB CCCCCCCC        
333333333 CCCCCCC AAAAAAAA      
444444444 CCCCCCC AAAAAAAA      
/*                              
//FILE2    DD *                  
111111111 AAAAAA BBBBBBBB        
222222222 BBBBBB CCCCCCCC        
444444444 CCCCCCC AAAAAAAA      
/*                              
//SORTOUT  DD SYSOUT=*          
//SYSIN    DD *                  
 JOINKEYS F1=FILE1,FIELDS=(1,9,A)
 JOINKEYS F2=FILE2,FIELDS=(1,9,A)
 REFORMAT FIELDS=(F1:1,9,F2:1,9)
 SORT FIELDS=COPY                
 OUTFIL BUILD=(1,9)              
/*                              
 


Output:


111111111
222222222
444444444
 


Hope this helps.

Just an afterthought:
a. If both the datasets already have SORTed and in sequence records, then add 'SORTED,NOSEQCK' to avoid resorting of data
b. Both the datasets appear to be superset/subset of each-other, which would mean that the source generating them 'can' be same; if so, why do you want to run the match on them?
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Previous

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post