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

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.

Type
*QUAL
Required
Yes
Case
Uppercase
*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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

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.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

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.

Type
*ELEM
Required
No
Default
*ALL
List limit
32
Case
Uppercase

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

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Physical file Physical file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*CURRENT
Length
10
Case
Uppercase

Suggested / special values: *CURRENT

Member Member

Type
*NAME
Required
No
Length
10
List limit
32
Case
Uppercase

Suggested / special values: *NONE

TEXT Text 'description'

Specifies up to 50 characters of text, in apostrophes, that briefly describes the object.

Type
*CHAR
Required
No
Default
*BLANK
Length
50
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/ADDLFM.json and os/cl/help/ADDLFM.json.