Edit CL Utility (EDTCLU)

The Edit Control Language Utility (EDTCLU) command allows you to create, change, display, or print a source file member. For source file members that contain control language source or command definition source, syntax checking is supported while editing the source file member.

Restrictions:

Parameters

Keyword Description Choices Notes
SRCFILE Source file Single values: *PRV
Other values: Qualified object name
Optional, Positional 1
Qualifier 1: Source file Name
Qualifier 2: Library Name, *LIBL, *CURLIB, *PRV
SRCMBR Source member Name, *PRV, *SELECT Optional, Positional 2
TYPE Source type Simple name, *SAME, CL, CLP, CLLE, TXT, CMD Optional, Positional 3
OPTION Option *BLANK, ' ', 2, 5, 6 Optional, Positional 4
TEXT Text 'description' Character value, *BLANK Optional

Source file (SRCFILE)

Specify the source physical file that contains the member to be edited or created.

Single values

*PRV
Use the name of the source file and library used in your last EDTCLU session.

Qualifier 1: Source file

name
Specify the name of an existing source file to be used.

Qualifier 2: Library

*LIBL
Search the libraries in the library list for the specified source file.
*CURLIB
The current library for the thread is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
*PRV
Use the name of the library used in your last EDTCLU session.
name
Specify the name of an existing library to be used.

Source member (SRCMBR)

Specifies the name of the source physical file member to be edited or created. The default value for this parameter depends on if you specify the SRCFILE parameter.

The possible values are:

*PRV
This is the default value if you do not specify the SRCFILE parameter. *PRV is the name of the previous source physical file member or the Work with Members display.
*SELECT
This is the default value if you specify the SRCFILE parameter. If you choose *SELECT, you will get lists of all members in the specified file and library. Select a member to edit, browse, print, or delete.
source-file-member-name
Type the name of the source physical file member you want to create or edit.

Source type (TYPE)

Specifies the type of source member to edit or create.

*SAME
The default value is the same type as that used when this member was last edited. For a new member, the default value is TXT.
CL
The source member contains CL commands that will be run in batch using the Start Database Reader (STRDBRDR) or Submit Database Job (SBMDBJOB) command.
CLP
The source member contains CL commands that will be compiled using the Create CL Program (CRTCLPGM) command.
CLLE
The source member contains CL commands that will be compiled using the Create CL Module (CRTCLMOD) or Create Bound CL Program (CRTBNDCL) command.
TXT
The source member contains generic text records.
CMD
The source member contains command definition source commands that will be compiled using the Create Command (CRTCMD) command.
type
Specify the member type to associate with the source file member.

Option (OPTION)

Specifies the function to perform on the selected member.

*BLANK or ' '
If you do not specify a member name, a Work with Members panel is displayed. If you specify a member name, an edit session for the specified member is started.
2
Edit the specified source file member.
5
Browse the specified source file member.
6
Print the specified source file member.

Text 'description' (TEXT)

Specify a character string that describes the member in the text field for the member.

*BLANK
Specifies that EDTCLU should enter blanks in the text field of a new member. If the specified source member already exists, the text field is not changed.
character-value
Specify a character string of up to 50 characters to describe a member. Enclose the string in apostrophes to use leading or trailing blanks.

Examples

Example 1: Browsing a Source File Member

EDTCLU   SRCFILE(QCLSRC)  SRCMBR(MBR1)  OPTION(5)

This command will locate source file QCLSRC using the library list and will display the records in member MBR1. Because 5 was specified for the OPTION parameter, the displayed source records cannot be changed. If the QCLSRC file exists, but the file does not contain a source member named MBR1, an error message is sent.

Example 2: Editing or Creating a Source File Member

EDTCLU   SRCFILE(QCMDSRC)  SRCMBR(MYCMD)  OPTION(2)
         TYPE(CMD)

This command will locate source file QCMDSRC using the library list and will display the records in member MYCMD. Because 2 was specified for the OPTION parameter, the displayed source records can be changed or deleted and new source records can be added. The source type will be set to command definition. If the QCMDSRC file exists, but the file does not contain a source member named MYCMD, the source member will be created and the Edit panel is displayed to allow source records to be added.

Example 3: Displaying a List of Source File Members

EDTCLU   SRCFILE(*CURLIB/QTXTSRC) SRCMBR(*SELECT)

This command will locate source file QTXTSRC using the current library. If the source file named QTXTSRC is found, all of the source members in the source file are displayed on the Work with Members panel. From this panel, new source members can be added and existing source members can be edited, deleted, browsed, or printed.

Error messages

*ESCAPE Messages

EDT9007
Error found on &1 command.