Hi,
I have defined a file in symnames like:-
A,1,2,CH
B,3,1,CH
C,4,6,CH
D_AMT,10,7,PD
Date,17,10,CH
CD,27,1,CH
CD1,27,5,CH
CD2,32,1,CH
R,33,1,CH
File looks like
050475111 Ø|2011-03-290 D
050475111 2011-03-2990000 D
050475110 2011-03-290 D
050475111 Ø(2011-03-2990000 D
i need to total the amount field D_AMT,10,7,PD in trailer3.
i tried making the sum card as:-
SORT FIELDS=(1,2,CH,A,4,6,CH,A,17,10,CH,A)
OUTFIL FNAMES=TEMP01,NODETAIL,REMOVECC,
INCLUDE=((A,EQ,C'05'),AND,
(R,EQ,C'D'),AND,
(CD,EQ,0)),
OUTREC=(132:X),
SECTIONS=(1,2,4,6,17,10,
TRAILER3=(3:C'Trailer ',30:C',',
31:4,6,37:C',',
38:17,10,48:C',',
49:TOT=(10,07,PD,M25,LENGTH=20),71:C',',
72:COUNT=(M25,LENGTH=9)))
OUTFIL FNAMES=TEMP01,NODETAIL,REMOVECC,
INCLUDE=((A,EQ,C'05'),AND,
(R,EQ,C'D'),AND,
(CD1,EQ,90000)),
OUTREC=(132:X),
SECTIONS=(1,2,4,6,17,10,
TRAILER3=(3:C'Trailer1 ',30:C',',
31:4,6,37:C',',
38:17,10,48:C',',
49:TOT=(10,07,PD,M25,LENGTH=20),71:C',',
72:COUNT=(M25,LENGTH=9)))
But its giving output as:-
Trailer ,475110,2011-03-29, 4040404040404 , 1
Trailer1 ,475111,2011-03-29, 4040404040804 , 1
4040404040804 is amount which is coming wrong. It should give correct amount in numeric form.
Can some on guide me to the correct sort card to be used.