JOINKEYS output without SORT



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

JOINKEYS output without SORT

Postby ranga_subham » Fri Dec 07, 2012 6:36 pm

Hi,

I am using below given JCL to pull matching data from FILE2 but getting it in SORTED which I am not able to avoid :(
We use SYNCSORT FOR Z/OS 1.3.2.2R and it does not have NOSEQCK option :shock:

//SORT0001 EXEC PGM=SORT 
//SORTJNF1 DD *           
ABC123
BOL943
MEK035
//SORTJNF2 DD DSN=ANOTHER.MATCH.FILE,DISP=SHR
//SYSOUT   DD SYSOUT=*                                             
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  JOINKEYS FILE=F1,FIELDS=(1,6,A)                                   
  JOINKEYS FILE=F2,FIELDS=(6,6,A)                                   
  REFORMAT FIELDS=(F2:1,80)                                         


How can I get WITHOUT sorted? Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: JOINKEYS output without SORT

Postby BillyBoyo » Fri Dec 07, 2012 7:43 pm

You don't have NOSEQCK, but you still have SORTED which you can put on the JOINKEYS and the file will not be sorted.

  JOINKEYS FILE=F1,FIELDS=(1,6,A),SORTED
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: JOINKEYS output without SORT

Postby ranga_subham » Fri Dec 07, 2012 7:49 pm

I tried it but got U0016 abend !!

SYSIN :                                     
  OPTION COPY                               
  JOINKEYS FILE=F1,FIELDS=(1,6,A),SORTED     
  JOINKEYS FILE=F2,FIELDS=(6,6,A),SORTED     
  REFORMAT FIELDS=(F2:1,80)                 
.
.
WER486A  ERROR IN JNF2 PROCESSING
.
.
WER485A  SORTJNF2 OUT OF SEQUENCE, RECORD NUMBER = 3


Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: JOINKEYS output without SORT

Postby enrico-sorichetti » Fri Dec 07, 2012 8:00 pm

I am using below given JCL to pull matching data from FILE2 but getting it in SORTED which I am not able to avoid


a join process needs the files sorted on the join key .

if the original sequence is different the only way is to resort on the original
if the original is not sorted on <some> key You should add a sequence number as virtual sorting key
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: JOINKEYS output without SORT

Postby BillyBoyo » Fri Dec 07, 2012 8:15 pm

You show one file as sorted, the other you don't show, so it is unsorted.

To match on the keys you show, the second file needs to be in key order. If you then need the output in the original order, you are going to have to sort it again, either on a generated sequence number, or on anything on the file which will give you the original order (If you used EQUALS for any original sorting).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post