Modify Library Search Order (ML)

Command title

Modify Library Search Order

Description

The ML command sets or changes the order in which tableBASE libraries are searched.

COBOL syntax

MOVE 'ML'                   TO xxxx-COMMAND.
CALL 'TBLBASE' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            LIB-LIST.

C syntax

memcpy( tbCommArea.tbCommand, "ML", 2 );
TBLBASE( &tbParm, &tbCommArea, &tbLibList );

Parameters

LIB-LIST

Explanation

ML causes tableBASE to set a library search list by logically concatenating libraries whose DDNAMEs are in LIB-LIST. This permits an automatic search through up to 10 libraries for a table when it is to be opened. The search sequence is specified by the order of the DDNAMEs in the LIB-LIST parameter. The end of the list is indicated by an entry consisting of blanks or low values.

During any program execution, until an ML command is issued to modify the library list, the library used for all tableBASE processing defaults to MAINLIB unless it is overridden with the TBOPT parameters LIB01, LIB02, etc., or by installation defaults.

The ML command can be used repeatedly to alter the order of library concatenation during the execution of a program to affect subsequent operations. The command generates no I/O operations.

A VTS-TSR may also be included in the search list by specifying the name of the VTS-TSR prefixed by “VTS:” in LIB-LIST, for example, VTS:DKL1, instead of a library DDNAME. If a table to be opened already resides in the VTS-TSR, the table will be linked directly to the open one in the VTS-TSR, and will not be opened in the local TSR. A linked table is read-only. If the table is to be opened into a VTS-TSR (e.g. using the VS command or TB-SUBSYSTEM field of the TB-PARM parameter), then any VTS-TSRs in the search list will be bypassed.

Return value

None

Notes

The primary purpose of the ML command is to control the source libraries where tables may be found at open time, not the target libraries where they are stored. Tables are normally stored in the same library from which they were originally opened. The only impact the ML command has on storing tables relates to storing a new table. A new table will be stored on the first library in the concatenated list, determined at the time the table is defined.

Exceptions

None

See also

Divert (Non-existing) Table (DV) and Divert (Existing) Table (DW)—for information on how to alter the target library into which a table is to be stored

Define Table (DT).