MIO_FILES
MIO_FILES provides the key to determine which modules are called for a given file when MIO_open64 is called.
first_file_name_list [ module list ] second_file_name_list [ module list] ...
When MIO_open64 is called MIO checks for the existence of the MIO_FILES environment variable. If the environment variable is present MIO parses its data to determine which modules to invoke for which files.
MIO_FILES is parsed from left to right. All characters preceding a left bracket ([) are taken as a file_name_list. A file_name_list is a list of file_name_template patterns that are separated by colons (:). File_name_template patterns are used to match the name of the file being opened by MIO and may use the following wildcard characters:
- An asterisk (*) matches zero or more characters of a directory or file name.
- A question mark (?) matches one character of a directory or file name.
- Two asterisks (**) match all remaining characters of a full path name.
If the file_name_template pattern does not contain a forward slash (/) then all path directory information in the file name passed to the MIO_open64 subroutine is ignored and matching is applied only to the leaf name of the file being opened.
If the name of the file that is listed in the file_name_list matches one of the file_name_template patterns in the file_name_list, the module list that is indicated in the brackets immediately following the file_name_list is called. If the name of the file that is listed in the file_name_list does not match any of the file_name_template patterns in the first file_name_list the parser moves on to the next file_name_list and attempts to match the name of the file there. If the file name matches two or more file_name_template patterns, the first pattern considered. If the name of the file that is being opened does not match any of the file_name_template patterns in any of the file_name_lists, the file is opened with a default invocation of the aix module. If there is a match, the modules from the associated module are listed in the MIO_FILES environment variable. The modules are called in left to right order, with the leftmost being closest to the user program and the rightmost module is the module closest to the operating system. If the module list does not start with the mio module, the default setting of the mio module adds a prefix to the environment variable. If the aix module is not specified, a default setting of the aix module is appended to the environment variable.
The following is a simple example of how the MIO_FILES is handled:
MIO_FILES= *.dat:*.scr [ trace ] *.f01:*.f02:*.f03 [ trace | pf | trace ]
The MIO_open64 subroutine opens the test.dat file and matches its name with the *.dat file_name_template pattern, resulting in the invocation of the mio, trace, and aix modules.
The MIO_open64 subroutine opens the test.f02 file and matches its name with *.f02, the second file_name_template pattern in the second file_name_list, resulting in the invocation of the mio, trace, pf, trace, and aix modules.
MIO_FILES= *.dat : *.scr [ trace/stats=my.stats ]
The
options for a module are delimited with a forward slash (/). Some
options require an associated integer value or a string value. For
options that require a string value, if the string includes a forward
slash (/), enclose the string in braces {}. For options that require
an integer value, you might append the integer value with a k, m,
g, or t to represent kilobytes, megabytes, gigabytes, or terabytes.
Integer values can also be entered in base 10, 8, or 16. If the integer
value uses a prefix with 0x, the integer is interpreted as base 16.
If the integer value uses a prefix with 0, the integer is interpreted
as base 8. If these two tests fail, the integer is interpreted as
base 10.