C$FILESYS

C$FILESYS performs one of three functions, depending on the operations code passed to it. It retrieves the names of file systems known to the runtime, determines whether a particular file system is known, or returns a count of all known file systems.

Usage

CALL "C$FILESYS" 
    USING OP-CODE, FILE-SYSTEM

Parameters

OP-CODE PIC 9 The value indicates the desired operation.
FILE-SYSTEM PIC X(5)    Passes or returns a file system name. The names that are recognized are up to five characters long and are listed in the program filetbl.c, which is linked into the runtime. (For example, use visio for Vision, infor for Informix, oracl for Oracle, and "sybas" for Sybase.)

Comments

This routine can determine which file systems are known to the runtime, and can give a count of known systems.

The file system names are up to five characters long, and are listed in filetbl.c, which must be linked into the runtime. The (activated) names listed in filetbl.c are the names that are returned by this routine, and the only names that the routine recognizes.

If OP_CODE is 0, both parameters are required. The routine returns the first file system known to the runtime and gets set up to return the rest. RETURN-CODE will be set to 1 if there was a file system to return, or 0 if not.

If op-code is 1, both parameters are required. The routine returns the next file system known to the runtime. RETURN-CODE is set to 1 if there was a file system to return, or 0 if not (there are no more). You can call the routine with this parameter repeatedly, until RETURN-CODE is set to 0.

If op-code is 2, both parameters are required. The routine checks to see if the passed file system is known to the runtime. You must pass one of the names used in the program filetbl.c. (The routine checks only the first five characters of the name you pass; the rest are ignored.) The case of the name does not matter. For example, SYBAS and sybas are equivalent. RETURN-CODE is set to 1 if yes, or 0 if no.

If op-code is 3, the second parameter is not required. RETURN-CODE is set to the number of known file systems.