Page 1 of 1

JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 7:46 pm
by Yifat Oren
Hello everyone,

I'm trying to compare 2 text files, line by line, using Syncsort JOINKEYS with SEQNUM.

//SORT     EXEC PGM=SORT                                           
//SYSOUT   DD  SYSOUT=*                                           
//SORTJNF1 DD  DISP=SHR,DSN=TEMP.JOINTEST.F1.FB80   
//JNF1CNTL DD  *                                                   
  RECORD TYPE=FB,LENGTH=89                                         
  INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)                             
//SORTJNF2 DD  DISP=SHR,DSN=TEMP.JOINTEST.F2.FB80   
//JNF2CNTL DD  *                                                   
  INREC FIELDS=(SEQNUM,8,ZD,C' ',1,80)                             
//SORTOUT  DD  SYSOUT=*                                           
//SYSIN    DD  *                                                   
  JOINKEYS FILES=F1,FIELDS=(1,89,A),SORTED                         
  JOINKEYS FILES=F2,FIELDS=(1,89,A),SORTED                         
  JOIN UNPAIRED,ONLY                                               
  REFORMAT FIELDS=(F1:1,89,F2:1,89),FILL=C' '                     
  SORT FIELDS=COPY                                                 
  OUTFIL FNAMES=SORTOUT,                                           
   IFTHEN=(WHEN=(1,1,CH,NE,C' '),BUILD=(C'F1-',01,89)),           
   IFTHEN=(WHEN=(1,1,CH,EQ,C' '),BUILD=(C'F2-',90,89))             
//                                                                 


Problem is, Syncsort does not seem to accept the JNF1/2 LRECL change due to the JNFxCNTL INREC statements.

SYNCSORT FOR Z/OS  1.4.0.1N   
...
WER486A  ERROR IN JNF1 PROCESSING                                   
WER482I  JNF1 STATISTICS                                             
WER483B  6,920K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
WER483B     0 BYTES RESERVE REQUESTED, 1,020K BYTES USED             
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=  80; BLKSIZE= 27920       
WER073I  SORTJNF1 : DSNAME=TEMP.JOINTEST.F1.FB80       
WER027A  CONTROL FIELD BEYOND RECORD                                 


So, how do I convince Syncsort the input records are 89 bytes?

Best Regards,
Yifat

Re: JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 7:50 pm
by dick scherrer
Hello,

Suggest you post a bit of sample data from both input files and the output you want when this sample data is processed.

You do not need full-width records, only enough to demonstrate what you have and what you want.

Re: JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 7:57 pm
by BillyBoyo
My first suggestion was going to be "get up to date" with your product, but you have 1.4.

Earlier releases of SyncSort did not support the JNFnCNTL files as standard. However, I thought I saw someone point out that 1.4 does. Have you checked in your SyncSort manual for 1.4 on JOINKEYS for confirmation that they are supported?

To "get it going" for definite now, if necessary, you'd need an extra pass of the files to put the sequence number on to a physical record.

If the manual says it should work, then you have some investigation/testing to do. Perhaps have a look at the SyncSort website and see what support might be available through that.

Please let us know how it goes.

Re: JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 8:05 pm
by MrSpock
The latest product manual shows these as the supported DD names:

//$ORTPARM DD
//SORTIN DD
//SORTINnn DD
//SORTINn DD
//SORTJNF1 DD
//SORTJNF2 DD
//SORTWKxx DD
//SORTWKn DD
//SORTOUT DD
or
//SORTOFxx DD
or
//SORTOFx DD
//SORTXDUP DD
//SORTXSUM DD
//SYSOUT DD

Table 45. DD Statements for Invoked Sort/Merge

so I don't know why someone would make up ones that aren't documented.

Re: JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 8:07 pm
by Yifat Oren
Thanks for the quick replies.

The JNFxCNTL works. I know that because when I treat the input records as LRECL=80 (truncating the last 9 bytes), I get the correct output.

Input looks something like this (LRECL=80):

LINE 1
LINE 2


LINE 1
LINE 1


Output should be:
F2-00000002 LINE 1
F1-00000002 LINE 2


Regards,
Yifat

Re: JOINKEYS - Record length change with INREC

PostPosted: Tue Oct 02, 2012 8:16 pm
by BillyBoyo
OK.

  RECORD TYPE=FB,LENGTH=89


I'd get rid of that. SyncSort is going to get the original details from the JCL and work out everything else from the Control Cards.