An operation code and some number of additional parameters (depending on the operation called) are passed to the routine. The return code is set automatically after the call. The external variable F-ERRNO is set according to any errors found. F-ERRNO may not be reset on entry to I$IO, and should be checked only if I$IO returns an error condition.
CALL "I$IO" USING OP-CODE, parameters
Specifies the file handling routine to be performed. This table shows which operation corresponds to each operation code. The operations are detailed in the description below:
The remaining parameters vary depending on the operation selected. They provide information and hold results for the operations specified. All parameters are passed by reference. Parameters may be omitted from those operations that do not require them.
All parameters passed to I$IO are passed by reference. This applies even to parameters that are integer values in the corresponding file handling routines. All numeric parameters should be passed to I$IO as SIGNED-SHORT values. The I$IO routine provides any necessary addressing conversions. Note that a parameter must be in the correct format for its type. Parameters that are PIC X must be terminated by a LOW-VALUES character.
Except for the MAKE function, I$IO will automatically terminate any PIC X parameters with a LOW-VALUES byte for you. Also, you do not have to specify SYNC for level 01 or level 77 parameters because they are automatically synchronized by ACUCOBOL-GT.
The file filesys.def is a COBOL COPY file that contains many useful definitions for use with I$IO. It contains definitions for the I$IO codes along with the F-ERRNO error values and many useful pre-declared variables that are of the proper type and usage.
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.