Page 2 of 2

Re: How to add information to the end of each record

PostPosted: Thu Apr 25, 2013 1:03 pm
by ottoelflaco
Hi Kolusu,

If I have been not correct with some used word, excuse me please. not my intention... I think here there is a confusion...I am trying to improve my english -_-.

thank you for your solution and your suggestion about joinkey. I m trying to understand this part of your code:

//SORTIN   DD DISP=SHR,DSN=Your Input FB 26 byte file
//SORTOUT  DD DSN=&&S,DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//SYSIN    DD *                                           
  OPTION COPY,STOPAFT=1,NULLOUT=RC4                       
  INREC BUILD=(C'TSTMP,C''',1,26,C'''',80:X)             
//*


I will look in forum

Thank you all

Re: How to add information to the end of each record

PostPosted: Thu Apr 25, 2013 3:06 pm
by BillyBoyo
OPTION COPY, specifies a COPY operation, rather than a SORT or MERGE

OPTION STOPAFT=1, means whatever operation has been specified, it will be stopped after one records has been processed for output.

OPTION NULLOUT=RC4, means if SORTOUT contains no records at the end of processed, the step will complete with CC/RC equal to 4.

For the single record which will be processed for output, the first 26 bytes will be used. They will be preceded by a constant with a value of TSTMP,C' and succeeded by a "closing" '. The 80th column will be set to space (the X) and intervening characters between the ' and the 80th column will be created and padded with space.

The step is generating a "symbol", a way to give a name to something, for a succeeding step, where it will be specified on a SYMNAMES DD statement. This generation of a symbol will allow the value from a file to be used in the processing of another file in a way using the least resources.