gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] PROGRAM-ID, source name and entry points


From: Roger While
Subject: [open-cobol-list] PROGRAM-ID, source name and entry points
Date: Sun Jan 29 00:16:10 2006

When calling a program for the first time either
explicitly with "CALL" or implicitly with a driver
program (MF - cobrun, ACU - runcbl, OC - cobcrun),
the runtime system tries to locate a loadable module
with this name plus an extension (MF - .so, .int, .gnt;
ACU - .out; OC .so).
The runtime system then tries to locate an entry point
within this module with the respective name.
The default entry point of a program is the PROGRAM-ID
(After accounting for AS clause, numeric first character,
 non-printable characters, etc).

Let's consider an actual example from the Cobol85 test
suite - NC127A.CBL
This is a program that is all lower case except for
required literals. This includes the PROGRAM-ID
which is nc127A.
(Hmm, Why isn't the 'A' lower case ?)

What MF and ACU (per default options) do is to fold
the PROGRAM-ID to upper case.
(Which is not what the MF SE doc says!)
And therefore module name = entry point.

OC does not do this so that attempting a
"cobcrun NC127A" leads to "entry not found".

Question is what, if anything, should we be
doing here ?

One possibility would be to insert the module
name as an entry point if != P-ID and != ENTRY.
Another would be to (optionally) fold the P-ID.

Note we could have a completely different P-ID/ENTRY,
eg in the OC tests where we have a "callee" program with
P-ID "hello" and an ENTRY "bye".

Thoughts ?

Roger






reply via email to

[Prev in Thread] Current Thread [Next in Thread]