Re: Adding leading Zero to output value
Posted: Wed Mar 02, 2011 11:32 pm
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'
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'