intrinsic function in cobol? compilation error



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

intrinsic function in cobol? compilation error

Postby G3NIU5 » Tue Aug 04, 2009 4:31 pm

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.
G3NIU5
 
Posts: 2
Joined: Wed Jul 15, 2009 3:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: intrinsic function in cobol? compilation error

Postby dick scherrer » Wed Aug 05, 2009 2:30 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: intrinsic function in cobol? compilation error

Postby G3NIU5 » Wed Aug 05, 2009 3:56 pm

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.
G3NIU5
 
Posts: 2
Joined: Wed Jul 15, 2009 3:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: intrinsic function in cobol? compilation error

Postby dick scherrer » Thu Aug 06, 2009 12:12 am

You're welcome :)

IBM VS COBOL II is before NUMVAL was implemented. I believe it was even before FUNCTIONs were implemented. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post