I'm trying to figure out what is my problem, and this is my INPUT:
SORTIN (LRECL=80, FB)
2014909125540 042633000888}
2014909149960 040447000188I
2014909736072 040447002645L
2014909855906 040447000252L
2014909105142 040447005773O
2014909119404 042633000424O
2014909119404 040447000849K
2014909646623 042633000185J
As you may see, there is a ZD field (7 bytes) starting at 23 pos
as such, I'm trying to EDIT it, and these are my results:
a) when I use
OPTION COPY
OUTREC BUILD=(1,22,C';',
23,7,ZD,EDIT=(STTTTT,TT),SIGNS=(+,-),LENGTH=9,C';')
the output is as follows (not bad, by the way):
2014909125540 042633;-00088,80;
2014909149960 040447;+00018,89;
2014909736072 040447;-00264,53;
2014909855906 040447;-00025,23;
2014909105142 040447;-00577,36;
2014909119404 042633;-00042,46;
2014909119404 040447;-00084,92;
2014909646623 042633;-00018,51;
2014909646623 040447;-00277,65;
b) when I use
OPTION COPY
OUTREC BUILD=(1,22,C';',
23,7,ZD,M21,LENGTH=9,C';')
I get
2014909125540 042633; 88,80-;
2014909149960 040447; 18,89 ;
2014909736072 040447; 264,53-;
2014909855906 040447; 25,23-;
2014909105142 040447; 577,36-;
2014909119404 042633; 42,46-;
2014909119404 040447; 84,92-;
2014909646623 042633; 18,51-;
2014909646623 040447; 277,65-;
2014909841439 040447; 18,51-;
However, when I put in my SORT what I really want:
OUTREC BUILD=(1,22,C';',
23,7,ZD,EDIT=(TTTTT,TTS),SIGNS=(+,-),LENGTH=9,C';')
I'm getting this (SPACE in place of sign; and why?):
2014909125540 042633;00088,80 ;
2014909149960 040447;00018,89 ;
2014909736072 040447;00264,53 ;
2014909855906 040447;00025,23 ;
2014909105142 040447;00577,36 ;
2014909119404 042633;00042,46 ;
2014909119404 040447;00084,92 ;
2014909646623 042633;00018,51 ;
2014909646623 040447;00277,65 ;
2014909841439 040447;00018,51 ;
2014909846871 042633;00016,77 ;
So far I'm puzzled; any idea?