Page 1 of 1

intrinsic function in cobol? compilation error

PostPosted: Tue Aug 04, 2009 4:31 pm
by G3NIU5
While using cobol intrinsic function i have been getting compilation error for the code written below.

COMPUTE VAR1 = FUNCTION NUMVAL(VAR2)

var1 is pic S9(5).99 and var2 is X(7).

IGYPS0086-I "FUNCTION" was specified as an informational word in the current reserved word table. The reserved word table used may be different from the IBM-supplied default. Refer to VS COBOL II Application Programming Language Reference for information on reserved words.

IGYPS2121-S "FUNCTION" was not defined as a data-name. The statement was discarded.

IGYPS2072-S "NUMVAL" was invalid.

Re: intrinsic function in cobol? compilation error

PostPosted: Wed Aug 05, 2009 2:30 am
by dick scherrer
Hello and welcome to the forum,

Which version of the compiler is being used? This is shown at/near the top of the compile output.

Suggest you change var1 to pic s(5)v99 as an experiment.

Re: intrinsic function in cobol? compilation error

PostPosted: Wed Aug 05, 2009 3:56 pm
by G3NIU5
Thnx for the reply and suggestion.
I have got the alphanumeric to numeric issue resolved(pretty much the way u suggested ;) ). but my concern is I am not being able to use the intrinsic functions.

the COMPILER VERSION AND RELEASE DATE

IBM VS COBOL II Release 4.0 09/15/92.

I really appreciate ur help.

Re: intrinsic function in cobol? compilation error

PostPosted: Thu Aug 06, 2009 12:12 am
by dick scherrer
You're welcome :)

IBM VS COBOL II is before NUMVAL was implemented. I believe it was even before FUNCTIONs were implemented. . .