Page 2 of 2

Re: Adding leading Zero to output value

PostPosted: Wed Mar 02, 2011 11:32 pm
by Frank Yaeger
Why are you overcomplicating this? If you want to add a '0' before the second column, just use these control statements:

  SORT FIELDS=COPY
  INREC PARSE=(%00=(ENDBEFR=X'6A',FIXLEN=02),
              %01=(ENDBEFR=X'6A',FIXLEN=04),     <------- use 4 instead of 5
              %02=(ENDBEFR=X'6A',FIXLEN=04),
              %03=(ENDBEFR=X'6A',FIXLEN=15),
              %04=(ENDBEFR=X'6A',FIXLEN=02)),
  BUILD=(%00,C'0',%01,%02,%03,%04)                <----- insert '0'

Re: Adding leading Zero to output value

PostPosted: Thu Mar 03, 2011 12:01 am
by rjambu
Thanks Frank,
Works fine O/p are as expected .