Puzzled with EDIT



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Puzzled with EDIT

Postby knv09 » Thu Nov 16, 2023 8:16 pm

Hi guys,
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?
Thanks,
knv09
knv09
 
Posts: 2
Joined: Fri Mar 04, 2011 5:09 pm
Location: Montreal, Canada
Has thanked: 0 time
Been thanked: 0 time

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post