ContentsIndexPreviousNext

CALL

When a CALL occurs, runcbl performs these steps:

1. runcbl attempts to call any C or assembly language subprograms that have been linked into the runtime system. This process is detailed in Appendix C in Book 4, "Appendices."

2. If the CODE-CASE configuration variable has been specified, the change to upper case or lower case is applied if appropriate.

3. Next, the list of loaded but inactive programs is searched for a matching call name. If one is found, it is made active and the CALL is complete.

4. Next, all loaded programs (both active and inactive) are searched to see if any are part of an object library (see Chapter 3, section 3.2). For each object library found, the call name is searched for in the list of modules contained in the library. If found, then that module is loaded out of the library and made active.

5. Next, any libraries specified with the "-y" runtime command are searched for a matching call name. Note that programs in a library are searched for by their PROGRAM-IDs.

6. If the program has not yet been found, the disk is searched for the object module.

The name is examined to see if it is a full path name.

The configuration variable CODE-PREFIX (see Runtime Configuration above) consists of a series of prefixes to apply to the call name. These prefixes are applied, in order, until a matching file has been found or all the prefixes have been tried.

For example, to search for object files in both the "/usr/obj/ar" and "/usr/obj/ap" directories, you could set CODE-PREFIX as follows:

CODE-PREFIX    /usr/obj/ar  /usr/obj/ap

When each file name is being formed, the configuration variable CODE-SUFFIX is checked to see if it has been defined. If it has, and the call name does not have an explicit extension specified, then the current value of CODE-SUFFIX is appended to the file name with an intervening period. An extension is zero to three characters following a period at the end of the name.


Note, as with all file names, upper and lower case are significant on UNIX machines but are not significant on MS-DOS, OS/2, VMS, and Windows and Windows NT.