CL Command Reference - ADDLFM

CL Command List > ADDLFM Reference

Description:

The Add Logical File Member (ADDLFM) command adds a named file member to a logical file which must already exist on the system. The maximum number of members that can be added to the file is specified for the Maximum members (MAXMBRS) parameter on the Create Logical File (CRTLF) command or the Change Logical File (CHGLF) command. To add other members to the file, use the ADDLFM command to specify each one.

A logical file member can use the data from all, or a subset of, the physical files referenced by the logical file. Each member has its own set of data and can have its own access path that provides an organization to that data. The system attempts to implicitly share an access path already on the system.

Each added member has the same attributes as those defined in the logical file.

Restrictions:

. To add a member to a keyed logical file, you must have object operational (*OBJOPR) authority and either object management (*OBJMGT) or object alter (*OBJALTER) authority for each of the physical files on which the logical file member is based (specified explicitly by the DTAMBRS parameter or implicitly by the PFILE or JFILE keyword specified in DDS).

. For a member added to a non-keyed logical file, *OBJOPR authority for each of the physical files is required.

. This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA. This command is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETYPE) is specified.

Note: An *EXCLRD lock is required on the file to add a member. Because this command adds a member to a file in a library, the library must not be locked (*SHRNUP or *EXCLRD with the Allocate Object (ALCOBJ) command) in another job.


Examples:

ADDLFM FILE(INVENLIB/STOCKTXS) MBR(JANUARY)
DTAMBRS((INVENTXS (JANUARY)))
TEXT(¡¯JANUARY STOCK ACTIVITY BY LOCATION¡¯)

This command adds a member named JANUARY to the logical file named STOCKTXS in the INVENLIB library. The logical file has access to the data stored in the JANUARY member of the INVENTXS physical file.