CL Command Reference - CHGLF

CL Command List > CHGLF Reference

Description:

The Change Logical File (CHGLF) command changes the attributes of a logical file and its members. The changed attributes are used for all members subsequently added to the file unless other values are specified or default for the add operation. To change the attributes of a specific member, use the Change Logical File Member (CHGLFM) command.


Examples:

Example 1: Changing the Format Selector Program

CHGLF FILE(QGPL/INV) FMTSLR(INVFMTS)

This command changes the logical file INV that is stored in the QGPL library, resulting in the new format selector program, INVFMTS, which is being used with the logical file. *LIBL is used to find the format selector program.



Example 2: Changing a File Located on the Remote System

CHGLF FILE(QGPL/DDMF) FMTSLR(INVFMTS) SYSTEM(*RMT)

This command changes the format selector program for file INV located in the QGPL library on the remote system. Prior to specifying this command, this user had created a DDMF file by specifying the command CRTDDMF FILE(QGPL/DDMF) RMTFILE(QGPL/INV) RMTLOCNAME(AS400).