JOINKEYS Different format keys



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

JOINKEYS Different format keys

Postby jself » Thu Apr 02, 2015 10:31 pm

Hi,
Does anyone know if syncsort can handle different key types.
for ex:
JNF1 - 4 byte packaged field comp
JNF2 - 9 byte zone decimail

000020 //**********************************************************
000021 //SORT03 EXEC PGM=SORT
000022 //SYSUDUMP DD SYSOUT=Y
000023 //SYSOUT DD SYSOUT=*
000024 //SORTJNF1 DD DSN=FILEA,
000025 // DISP=SHR
000026 //SORTJNF2 DD DSN=FILEB,
000027 // DISP=SHR
000028 //SORTOUT DD DSN=FILEC,
000029 // DISP=(NEW,CATLG,DELETE)
000031 //SYSIN DD *
000032 JOINKEYS FILES=F1,FIELDS=(5,4,A)
000033 JOINKEYS FILES=F2,FIELDS=(6,9,A)
000034 JOIN UNPAIRED,F1,F2,ONLY
000035 REFORMAT FIELDS=(F2:1,80)
000036 SORT FIELDS=COPY

output shows everything different.
Thanks for your time.
jself
 
Posts: 10
Joined: Thu Mar 19, 2015 7:18 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JOINKEYS Different format keys

Postby BillyBoyo » Thu Apr 02, 2015 11:17 pm

You need to "normalise" the keys, make them the same length and type.

Which version of SyncSORT do you have. It should tell you in the sysout of the step.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: JOINKEYS Different format keys

Postby jself » Thu Apr 02, 2015 11:50 pm

we are using
SYNCSORT FOR Z/OS 2.1.$.0R
jself
 
Posts: 10
Joined: Thu Mar 19, 2015 7:18 pm
Has thanked: 1 time
Been thanked: 0 time

Re: JOINKEYS Different format keys

Postby BillyBoyo » Fri Apr 03, 2015 12:21 am

Well, that's nice and up-to-date then :-)

You have JNFnCNTL files available to pre-process records before the join takes place:

//JNF1CNTL DD *
  INREC make your key normalised
//JNF2CNTL DD *
  INREC make your key normalised


You won't need to do both, you just need to make one the same format/length as the other.

I'm not sure, since you are using F1,F2,ONLY, that your REFORMAT statement is correct. That is only making a record from the F2 data. Perhaps you can explain. With that, you should get mismatches from F1 and mismatches from F2. Your REFORMAT is indicating you want F2,ONLY.

If that is the case, you can just use INREC BUILD=(sourcepos,sourclength,conversion) to get your keys only for F1.
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