C$FULLNAME

This routine locates a file by using the runtime's filename translation and search logic, and returns the full name of the corresponding file.
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.

Usage

CALL "C$FULLNAME"
    USING FILE-NAME, FULL-NAME, FILE-INFO
    GIVING STATUS-CODE

Parameters

FILE-NAME PIC X(n) Specifies the name of the file to be located.
FULL-NAME PIC X(n) Data item to receive the full name of the file.
FILE-INFO Group item (optional)    Group item to receive information about the file located. Must have this structure:
01  FILE-INFO.
    02  FILE-SIZE    PIC X(8) COMP-X.
    02  FILE-DATE    PIC 9(8) COMP-X.
    02  FILE-TIME    PIC 9(8) COMP-X.

The FILE-SIZE field is the size of the file in bytes. The FILE-DATE and FILE-TIME fields indicate the time the file was last modified. FILE-DATE has the form YYYYMMDD (year/month/day, note the 4-digit year) and FILE-TIME has the form HHMMSShh (hours/minutes/seconds/hundredths--just like ACCEPT FROM TIME). On all current implementations, the hundredths field is always set to zero.

STATUS-CODE Any numeric data item. This receives the return status. It will be zero if successful, or 1 if FILE-NAME could not be found on disk or if FILE-NAME is not the name of a regular disk file.

Description

C$FULLNAME invokes the runtime's data file search logic on FILE-NAME. This involves using the configuration variables FILE_PREFIX, FILE_SUFFIX and FILE_CASE. The disk is searched using the rules described in File Name Interpretation . The first matching file is returned in FULL-NAME. Note that the returned name is not automatically a full path name. Instead, it is the name of the file as the runtime found it. This may be based on the current directory.

If FILE-INFO is specified, information about the file located is returned in it.

Note: The search techniques do not involve any file system specific techniques. For example, the Vision file system has a name mapping facility for its additional segments. This facility is not used when the runtime is searching for the file. Also note that remote file names are searched for when used in conjunction with AcuServer.

The behavior of this routine is affected by the FILENAME_SPACES configuration variable. The value of FILENAME_SPACES determines whether spaces are allowed in a file name. See the entry for FILENAME_SPACES in Appendix H for more information.

Compatibility Issues

The FILE_PREFIX, FILE_SUFFIX, FILE_CASE, and FILENAME_SPACES configuration variables are not supported in this COBOL system.