This article addresses two runtime tunables with default values.
Problem:
Can you explain the default behaviour of the runtime system (how it finds objects to run) and whether the behavior could be modified?
Resolution:
There are two runtime tunables that can affect this, both which have default values.
The tunable program_search_order changes the order of locations in which the runtime system searches for program files. It can have the value 1 (the default), 2, 3 or 4. The values mean:
- The runtime system is checked to see if the program is loaded or statically linked. If it is, the search ends.
- If the COBPATH environment variable is set, the paths specified are searched in order. Otherwise, the current directory is searched.
- The path in which the calling program was loaded is searched.
- If the COBDIR environment variable is set, the $COBDIR/dynload path specified is searched. Otherwise, /usr/lpp/cobol/dynload (on AIX) or /opt/lib/cobol/dynload (on other systems) is searched.
- The runtime system is checked to see if the program is loaded or statically linked. If it is, the search ends.
- The path in which the calling program was loaded is searched.
- If the COBPATH environment variable is set, the paths specified are searched in order. Otherwise, the current directory is searched.
- If the COBDIR environment variable is set, the $COBDIR/dynload path specified is searched. Otherwise, /usr/lpp/cobol/dynload (on AIX) or /opt/lib/cobol/dynload (on other systems) is searched.
- The runtime system is checked to see if the program is loaded or statically linked. If it is, the search ends.
- The current directory is searched.
- If the COBPATH environment variable is set, the paths specified are searched in order.
- If the COBDIR environment variable is set, the $COBDIR/dynload path specified is searched. Otherwise, /usr/lpp/cobol/dynload (on AIX) or /opt/lib/cobol/dynload (on other systems) is searched.
- The runtime system is checked to see if the program is loaded or statically linked. If it is, the search ends.
- If the COBPATH environment variable is set, the paths specified are searched in order. Otherwise, the current directory is searched
- The path in which the calling program was loaded is searched.
- If the COBDIR environment variable is set, the $COBDIR/dynload path specified is searched. Otherwise, /usr/lpp/cobol/dynload (on AIX) or /opt/lib/cobol/dynload (on other systems) is searched.
- The current directory is searched.
The tunable program_search_intgnt is less commonly used. It changes the position of file extensions in the program search order in which the runtime system searches for program files. It can have the value TRUE or FALSE (the default). These signify the following:
TRUE The search order is .int, .gnt
FALSE The search order is .gnt, .int
As the default behaviour is normally what is used when testing and debugging, it is worth checking that this tunable has not been inadvertently set to TRUE if unexpected things occur.