On Wed, 10 Jun 2015 09:32:38 -0700, Sri h Kolusu wrote:
>Minoru Massaki,
>
>Norbert had an excellent idea to overcome the issue of having spaces at
>the beginning or at the end. Converting to hex would overcome the issue of
>truncation with JFY.
>
>However you do NOT require 2 passes of data to insert the trailing
>character using VLTRAIL and then use Joinkeys.
>
>I have optimized the Job. The trick here is to use the same input file for
>Joinkeys. The subtask2 file is where we convert to hex and perform the
>JUSTIFY to RIGHT and pick of the last 16 bytes and then unhex that 16
>bytes back to 8 bytes.
>
>we are appending a 4 byte sequence number to match the 2 files. And since
>they are already in order, we also have SORTED and NOSEQCK so that we use
>a copy operation for Joinkeys.
>
Yet another version (the final): single pass, no join, all data (x'00-x'ff')
allowed:
//*
//STEP1 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=OLD,
// DSN=???
//SORTOUT DD DISP=(,CATLG,DELETE),
// SPACE=(TRK,(5,5),RLSE),
// LRECL=16380,RECFM=VB,
// DSN=???
//DISCARD DD DISP=(,CATLG,DELETE),
// SPACE=(TRK,(5,5),RLSE),
// DSN=???
//SYSIN DD *
OUTFIL INCLUDE=(1,2,BI,GE,12,&,1,2,BI,LE,max_lrecl),
IFTHEN=(WHEN=INIT,
BUILD=(1,4,5,HEX)),
IFTHEN=(WHEN=INIT,
OVERLAY=(5:hex_data,JFY=(SHIFT=RIGHT))),
IFTHEN=(WHEN=INIT,
BUILD=(1,4,key_start,16,C'40',hex_data,JFY=(SHIFT=LEFT))),
IFTHEN=(WHEN=INIT,
FINDREP=(IN=(C' '),OUT=C'')),
IFTHEN=(WHEN=INIT,
BUILD=(1,4,5,TRAN=UNHEX))
OUTFIL FNAMES=DISCARD,SAVE
OPTION COPY
/*
//SYMNAMES DD *
max_lrecl,16367 * INT((32756-4-18)/2)
hex_data,5,32734 * 2*max_lrecl
key_start,32723 * hex_data-16+5
/*
Norbert Friemel
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN