EDTF (Edit File)
Purpose
The Edit File (EDTF) command allows you to edit a stream file or a database file member.
Restriction: For database files, the record length of the file cannot exceed 4096.
Required Parameters
- STMF
- Specifies the name of the file to be edited. If the file specified is a directory instead of a file, a list of objects in the directory is shown. Either this parameter or the FILE parameter is required.
'stream-file-path-name': Specify the path name of the stream file or a pattern to match the name of the stream file to be edited.
The path name can be either a simple name or a name that is qualified with the name of the directory in which the file is located. A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes.
- FILE
- Specifies the name of the database file that contains the member to be edited. If no library qualifier is specified, the library list is used to locate the file. Either this parameter or the STMF parameter is required.
The name of the database file member can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file that contains the member to be edited.
Optional Parameters
- MBR
- Specifies the name of the database file member to be edited.
*FIRST: The first member in the database file is edited.
member-name: Specify the name of the file member to be edited.
Examples for EDTF
Example 1: Editing a Stream File
EDTF STMF('/mydir/myfile.txt')This command will start an edit session for file myfile.txt in directory mydir under the root directory.
Example 2: Editing a Database File Member
EDTF FILE(MYLIB/MYFILE) MBR(MYMBR1)This command will start an edit session for member MYMBR1 of file MYFILE in library MYLIB.