Greetings,
As others have pointed out already, the solution is to add $CONTROL
POST85 to the source file.
Why? COBOL functions were added to the language in an ANSI addendum in
1989. In the 1985 COBOL standard, upon which COBOL II/iX was based,
FUNCTION was not a reserved word, and there were undoubtedly programs
that used FUNCTION as a data name. When you specify $CONTROL POST85,
you are telling the compiler to recognize the word FUNCTION as having a
special meaning, and it becomes a reserved word. This is explained on
page 10-3 of the manual.
To avoid having to add $CONTROL POST85 to all your programs that might
use COBOL functions, I recommend editing the file COBCNTL.PUB.SYS and
adding $CONTROL POST85 to it, making it a system-wide default. See page
B-33 of the manual.
Walter
Walter J. Murray
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Kim Borgman
Sent: Wednesday, September 15, 2010 12:47 PM
To: [log in to unmask]
Subject: [HP3000-L] RANDOM NUMBER..
The manual shows the format to be:
77 my-random pic v99999.
Compute my-random = function random (30).
My problem.. I keep getting a compile error on the word 'function'.
00604 011010 32 356 Q UNDEFINED DATA NAME FUNCTION.
I'm on the latest and greatest and LAST version of the operating system.
C.75.00.
I've tried taking the word 'function' out, along with various other
things.
From page 10-49/50 of the manual.
Mr Kim Borgman
IT mgr, RNDC of Indiana.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|