#F0008802271737621656xxxx yyyyyyyyy #1212#?0089.96#10072#10277135854
#F0008804661726542806aaaaa bbbbbb #1006#?0068.68#10073#10277132437
#F0008808723752352124ccc dddddd #1311#?0041.64#10074#10277102041
#F0008801930376782118eeee ffffff #1201#?0023.43#10075#10277145440
#F0008804661726542806aaaaa bbbbbb #1006#?0068.68#10073#10277132437
#F0008808723752352124ccc dddddd #1311#?0041.64#10074#10277102041
#F0008801930376782118eeee ffffff #1201#?0023.43#10075#10277145440
column from 55 to 61 contains price
Column from 55 to 58 is dollar column
column from 60 to 61 is cent column
Here is my rexx code to get price value from the record
/* REXX */
"EXECIO * DISKR INFILE (STEM RECORDS. FINIS"
DO I = 1 TO RECORDS.0
NUMBER.I = SUBSTR(RIGHT(RECORDS.I,26),1,7)
END
TOTAL = 0
DO J = 1 TO RECORDS.0
/* NUMBER.J = C2D(NUMBER.J) */
/* NUMBER.J = C2X(NUMBER.J) */
TOTAL = TOTAL + NUMBER.J
END
SAY TOTAL
EXIT
"EXECIO * DISKR INFILE (STEM RECORDS. FINIS"
DO I = 1 TO RECORDS.0
NUMBER.I = SUBSTR(RIGHT(RECORDS.I,26),1,7)
END
TOTAL = 0
DO J = 1 TO RECORDS.0
/* NUMBER.J = C2D(NUMBER.J) */
/* NUMBER.J = C2X(NUMBER.J) */
TOTAL = TOTAL + NUMBER.J
END
SAY TOTAL
EXIT
Here I want to total all prices column.
I tried build in function such as C2D, C2X but most of the time I get error as listed below
EAGREX4000E Error 40 running compiled ?, line 9: Incorrect call to routine
EAGREX4010I Result not a whole number
EAGREX4010I Result not a whole number
Any suggestion how am i gonna successfully total all the price column?