ContentsIndexPreviousNext

C$FULLNAME Routine

C$FULLNAME locates a file by using the runtime's filename translation and search logic. The routine returns the full name of the corresponding file.

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 section 2.8 of the User's Guide . 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 that 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.

Also Note: The behavior of this library routine is affected by the setting of the FILENAME-SPACES configuration variable. See the documentation in Appendix H, Configuration File Entries, for information about the terminating character for path names.