I m reading seq file where data is in the below mentioned form:
aaa,20.1,050402
I read this data, into variable A pic X(100).
Then, unstring and put it into 3 diff variables.
w-1,w-2,w-3 -----> pic x(3), pic x(6), pic x(6).
Now, to convert this w-2 to numeric, i am using
the Numval function:
Compute w-c = function numval(w-2) where ws-c -->pic s9(3)v99.
While compiling i am getting a compilation error. saying :
IGYPS2121-S "FUNCTION" was not defined as a data-name.
Is there any option in the compilation jcl, that i am missing.. or any suggestions....
so my frnd in ur query i have two solution for u..
solution 1: y cant u define it as w-2 pic 9(6) like that directly instead of changing from alpha-numeric.
solution 2: use this alternative way.
Code:
05 w-2 PIC x(6).
05 w-21 REDEFINES w-2 PIC 9(6).
and one more thing is check whether u have used the function at the right place. if possible post the code let us also try.