I've been struggling with this for two days. I will try to give all relevant information and be suscinct
I am constructing a report to sum error totals by day.
INCLUDE COND=(2,2,CH,EQ,C'50',AND,129,1,CH,NE,C'0')
OPTION COPY
OUTFIL FNAMES=REPT2,
SECTIONS=(1,8,SKIP=P,
HEADER3=(1:JOBNAME,27:'**********************',
73:RPTNAM1,1/,
1:STPNAME,29:RPTTITL,73:'PAGE ',PAGE=(EDIT=(TT)),1/,
1:DATE,' ',TIME=(12:),33:FREQNCY,' REPORT',2/,
1:'DATE ',25:'TOKEN',45:'ORDER',55:'AMOUNT',70:'CODE',
77:'MESSAGE'/,
1:'----',25:'--------',45:'-----',55:'----',70:'-----',
77:'-------'/),
TRAILER3=(2/,10:'SUMMARY OF ERRORS ',4/,
12:'NUMBER OF ERRORS IS ',
COUNT,/,
12:'TOTAL OF ERRORS IS ',
TOTAL=(30,06,PD,M2)))
INREC IFTHEN=(WHEN=INIT,
PARSE=(%00=(ABSPOS=11,ENDBEFR=C',',FIXLEN=16), TOKEN
* %01=(ABSPOS=30,FIXLEN=06), AMOUNT
%02=(ABSPOS=83,ENDBEFR=C',',FIXLEN=08), ORDER
%03=(ABSPOS=100,ENDBEFR=C',',FIXLEN=02), YEAR
%06=(ABSPOS=102,ENDBEFR=C',',FIXLEN=04), DATE
%04=(ABSPOS=217,ENDBEFR=C',',FIXLEN=05), CODE
%05=(ABSPOS=292,ENDBEFR=C'"',FIXLEN=100))), MESSAGE
IFTHEN=(WHEN=(129,4,CH,EQ,C'1026'),
BUILD=(1:%06,5:%03,25:%00,45:%02,
55:30,06,PD,M2,
70:%04,
77:136,66,150X)),
IFTHEN=(WHEN=NONE,
BUILD=(1:%06,5:%03,25:%00,45:%02,
55:30,06,PD,M2,
70:%04,
77:%05))
OUTREC BUILD=(1,6,Y2T,M9,9,133)
/*
OPTION COPY
OUTFIL FNAMES=REPT2,
SECTIONS=(1,8,SKIP=P,
HEADER3=(1:JOBNAME,27:'**********************',
73:RPTNAM1,1/,
1:STPNAME,29:RPTTITL,73:'PAGE ',PAGE=(EDIT=(TT)),1/,
1:DATE,' ',TIME=(12:),33:FREQNCY,' REPORT',2/,
1:'DATE ',25:'TOKEN',45:'ORDER',55:'AMOUNT',70:'CODE',
77:'MESSAGE'/,
1:'----',25:'--------',45:'-----',55:'----',70:'-----',
77:'-------'/),
TRAILER3=(2/,10:'SUMMARY OF ERRORS ',4/,
12:'NUMBER OF ERRORS IS ',
COUNT,/,
12:'TOTAL OF ERRORS IS ',
TOTAL=(30,06,PD,M2)))
INREC IFTHEN=(WHEN=INIT,
PARSE=(%00=(ABSPOS=11,ENDBEFR=C',',FIXLEN=16), TOKEN
* %01=(ABSPOS=30,FIXLEN=06), AMOUNT
%02=(ABSPOS=83,ENDBEFR=C',',FIXLEN=08), ORDER
%03=(ABSPOS=100,ENDBEFR=C',',FIXLEN=02), YEAR
%06=(ABSPOS=102,ENDBEFR=C',',FIXLEN=04), DATE
%04=(ABSPOS=217,ENDBEFR=C',',FIXLEN=05), CODE
%05=(ABSPOS=292,ENDBEFR=C'"',FIXLEN=100))), MESSAGE
IFTHEN=(WHEN=(129,4,CH,EQ,C'1026'),
BUILD=(1:%06,5:%03,25:%00,45:%02,
55:30,06,PD,M2,
70:%04,
77:136,66,150X)),
IFTHEN=(WHEN=NONE,
BUILD=(1:%06,5:%03,25:%00,45:%02,
55:30,06,PD,M2,
70:%04,
77:%05))
OUTREC BUILD=(1,6,Y2T,M9,9,133)
/*
When I run the code including the line
TOTAL=(30,06,PD,M2)))
I get a SOC7
However the following statements run just fine
55:30,06,PD,M2,
Which i use twice in the builds
This is the data segment I am referencing from the first two records on the file blown up into hex for you so you can see the values
....`.
000079
00009C
3----+
......
000019
00019C
3----+
000079
00009C
3----+
......
000019
00019C
3----+
My entire report works except for this line and I built it from a similar report that uses the same technique to sum packed fields for the total
I have also tried every other p,m,f i could think of
Any help would be greatly appreciated
Thanks
Dean