[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] mvs cobol namespace
From: |
Keisuke Nishida |
Subject: |
Re: [open-cobol-list] mvs cobol namespace |
Date: |
Thu Feb 5 21:55:33 2004 |
User-agent: |
Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) |
At Thu, 5 Feb 2004 16:24:22 -0600,
William M. Klein wrote:
>
> Therefore, my STRONG recommendation is do *NO( conversion for CALL "literal"
> statements (or COPY "literal" statements). USE what the programmer enters.
> If they want something different, then they should change their source code.
OpenCOBOL uses program names for different two purposes: file name and
function name. If you write a statement CALL "address@hidden", then open-cobol
will try to find a file "address@hidden" and call a function address@hidden' in
it.
The function name can be anything in this case. What the programmer
wants is to call the module "address@hidden". The function name is not visible
to the programmer.
Now, we don't do any conversion with file names. What I am thinking
about is the function name, which is part of the internal call convention.
Since function names are restricted to C names, I just wanted to encode
them. (Yes, this might be confusing, but I think is acceptable.)
At Thu, 5 Feb 2004 16:47:14 -0600,
William M. Klein wrote:
>
> I am certain that SOME C compilers must support other "things" - because IBM
> C can call IBM COBOL programs with "@" "$" or "#" in the program-name.
With open-cobol you can do something like this:
int (*func)();
func = cob_resolve ("address@hidden");
if (func)
func (...);
else
/* error */
The run-time function `cob_resolve' does everything you need, including
function name encoding if necessary.
Keisuke