Command reference / db
ADDLFM
Add Logical File Member
Adds a named member to an existing logical file. The maximum number of members is set by MAXMBRS on CRTLF or CHGLF, and each additional member needs its own ADDLFM. A member can use all or some of the data in the logical file's physical files, and has its own data and access path, which the system tries to share implicitly. The member gets the same attributes as the logical file. An *EXCLRD lock on the file is required, and the library must not be locked by another job.
Allowed environments: *ALL.
Positional parameters: 2.
Restrictions
- Adding a member to a keyed logical file requires *OBJOPR plus either *OBJMGT or *OBJALTER on each physical file the member is based on.
- For a non-keyed logical file, *OBJOPR authority on each physical file is required.
Parameters
FILE
Logical file
Specifies the logical file to which the member is added. This parameter is required. It is a qualified name: the file and its library.
*LIBL- Searches all libraries in the library list for the current thread until the first match is found.
*CURLIB- Uses the current library for the job, or QGPL if no current library is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Logical file
Logical file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MBR
Logical file member
Specifies the logical file member to add. The member name must be unique within the file. This parameter is required.
DTAMBRS
Physical file data members
Specifies the physical files and members that hold the data for the member being added. The member can be based on all of the logical file's physical files and members, or on a subset of them.
Suggested / special values:
*ALL
*ALL- The member is based on all physical files and members the logical file uses. At least one member must exist in one of them.
*CURRENT- Library qualifier: the job's current library is searched. If no library name is given, the current library from the logical file description is used.
*NONE- No member name is specified.
Elements in order
Physical file
Physical file
Qualified parts (object, then library; write LIBRARY/OBJECT)
Physical file
Physical file
Library
Library
Suggested / special values:
*CURRENT
Member
Member
Suggested / special values:
*NONE
TEXT
Text 'description'
Specifies up to 50 characters of text, in apostrophes, that briefly describes the object.
Suggested / special values:
*BLANK
*BLANK- No text is specified.
SHARE
Share open data path
Specifies whether the open data path is shared with other programs in the same routing step. A shared path shares facilities such as file status and buffers.
Allowed values:
*NO, *YES
*NO- The open data path is not shared. A new one is created each time a program opens the file.
*YES- The same open data path is shared with each program in the job that also specifies *YES when it opens the file.
Examples
ADDLFM FILE(INVENLIB/STOCKTXS) MBR(JANUARY) DTAMBRS((INVENTXS (JANUARY))) TEXT('JANUARY STOCK ACTIVITY BY LOCATION')
Adds member JANUARY to logical file STOCKTXS in INVENLIB. The member gets its data from member JANUARY of physical file INVENTXS.
Generated from os/cl/catalog/ADDLFM.json and os/cl/help/ADDLFM.json.