Previous Topic Next topic Print topic


C$MYFILE

Returns the filename of the disk file containing the currently executing program.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

This is especially useful if the disk file is an object library.

Usage

CALL "C$MYFILE" 
    USING PROGRAM-NAME 
    GIVING CALL-STATUS

Parameters

PROGRAM-NAME PIC X(n) Indicates the name of the disk file containing the currently executing program, if known. The runtime will use as much space for the name of the file as the COBOL program allows. This parameter will contain the filename just as the runtime received it. For example, if an object library is loaded as ../ardir/myarlib.lib, and a program in myarlib.lib calls this routine, PROGRAM-NAME will have a value of ../ardir/myarlib.lib.
CALL-STATUS PIC S99. This parameter receives one of the following values:

1 - PROGRAM-NAME was filled successfully

-1 - Program name unknown

Compatibility Issues

None.

Previous Topic Next topic Print topic