Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
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:
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.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | Logical file | Qualified object name | Required, Positional 1 |
Qualifier 1: Logical file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
MBR | Logical file member | Name | Required, Positional 2 |
DTAMBRS | Physical file data members | Single values: *ALL Other values (up to 32 repetitions): Element list |
Optional |
Element 1: Physical file | Qualified object name | ||
Qualifier 1: Physical file | Name | ||
Qualifier 2: Library | Name, *CURRENT | ||
Element 2: Member |
Single values: *NONE Other values (up to 32 repetitions): Name |
||
TEXT | Text 'description' | Character value, *BLANK | Optional |
SHARE | Share open data path | *NO, *YES | Optional |
Top |
Specifies the logical file to which the member is to be added.
This is a required parameter.
Qualifier 1: Logical file
Qualifier 2: Library
Top |
Specifies the logical file member to be added. The member name must be unique in the file.
If the FILE parameter specifies a DDM file and a member name is specified as part of the remote file name in the DDM file, the member names must be the same.
This is a required parameter.
Top |
Specifies the physical files and members that contain the data associated with the logical file member being added by this command. A logical file member can be based on all (*ALL) of the physical files and members on which the logical file itself is based, or the member can be based on a subset of the total files and members.
Note: When adding a member to a logical file that is a DDM file, the physical file, if specified, must also be a DDM file with its library and member(s) specified explicitly. *CURRENT is not supported when the logical file is a DDM file.
When a logical file is created, the physical files specified for the PFILE or JFILE DDS keyword are used to create the logical file. If no library name is specified for the physical files on the PFILE or JFILE keyword, the library list (*LIBL) at file creation time is used to find the physical files; the physical files from the library list are used to create the logical file. The qualified physical files from the PFILE or JFILE keyword (regardless of whether a library name was specified or if the library list was used to find the files) are the physical files associated with the logical file. The names of the physical files associated with the logical file are saved in the description of the logical file. When a member is added to the logical file, the DTAMBRS parameter is used to specify the physical file members associated with the logical file member. Each physical file name specified on the DTAMBRS parameter must be the name of a physical file that is associated with the logical file (saved in the description of the logical file).
Single values
Element 1: Physical file
Qualifier 1: Physical file
The physical file names must match a name on the PFILE or JFILE keywords in the DDS and cannot be specified more often on the DTAMBRS parameter than on the PFILE or JFILE keywords in the DDS. For join logical files, all physical files specified for the JFILE keyword must be specified for the DTAMBRS parameter and each physical file must contain only one member. If a physical file name is not specified for a physical file that is on a PFILE or JFILE keyword in the DDS, the logical file member is not based on any member of that physical file.
Qualifier 2: Library
If a library name is not specified, the current library name (*CURRENT) from the logical file description is used. If the library name is specified, the physical file must be a physical file associated with the logical file. If the logical file is associated with more than one physical file of the same name, the library name must be specified.
Element 2: Member
Single values
Other values (up to 32 repetitions)
When the FILE parameter specifies a join logical file or an arrival sequence logical file, only one data member must be specified for the DTAMBRS parameter for each physical file that was specified for the PFILE or JFILE keyword in the DDS. *ALL is valid only if each based-on physical file has only one member. If any of the physical files has more than one member, the specific physical file member must be specified for the DTAMBRS parameter.
The same physical file name can be specified more than once on the JFILE keyword. In this case, each occurrence of the file name is treated as a different based-on physical file, and must be specified for the DTAMBRS parameter.
Up to 32 qualified physical file names and physical file member names can be specified. Also, the total number of member names cannot exceed 32. For example, one file can specify 32 members, two files can each have 16 members, or 32 files can each have one member specified.
For DDM file:
Top |
Specifies the text that briefly describes the object.
Top |
Specifies whether the open data path (ODP) is shared with other programs in the same routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.
Top |
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.
Top |
*ESCAPE Messages
Top |