Get Next Table Name (NX)

Command title

Get Next Table Name

Description

This command places the name of the next table in the library directory into the TABLE field of xxxx-COMMAND-AREA.

COBOL syntax

MOVE 'NX'                   TO xxxx-COMMAND.
CALL 'TBLBASE' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            [DDNAME
                            [LIB-SPACE]].

C syntax

memcpy( tbCommArea.tbCommand, "NX", 2 );
TBLBASE( &tbParm, &tbCommArea, pDDName, &tbLibSpace );

Parameters

DDNAME (OPTIONAL)—the library to be examined. If the DDNAME parameter is not provided, the first library of the current library search list is used.

LIB-SPACE (optional)

Explanation

The setting of the TABLE field before the NX is executed identifies the last table retrieved, and tableBASE fetches the next table name from the directory. Library directory entries are stored in EBCDIC collating sequence. To retrieve the first table name in the directory, set TABLE to low values or blanks.

Return value

If no table in the directory exists with a name greater than the input TABLE value, FOUND is set to N, otherwise it is set to Y.

If the LIB-SPACE parameter is supplied, the number of blocks originally defined for the library and the number of blocks remaining will be returned.

ERROR 0040 subcode 1 occurs when the DDNAME does not exist.

Notes

None

Exceptions

None

See also

3. FOUND (1 byte)