WRKF (Work with Files)
Purpose
The Work with Files (WRKF) command allows you to copy, delete, display descriptions, save, and restore files that you have authority to use.
Restrictions
- Only the libraries to which you have USE authority will be searched.
- Only the files to which you have some authority will be shown on the display.
- To perform operations on the files, have USE authority to the command used by the operation, and the appropriate authority to the files on which the operation is to be performed.
Required Parameters
- FILE
- Specifies which files in the libraries are shown. If no library qualifier is specified, *LIBL is assumed and all libraries in the job's library list are searched for the files.
The name of the file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched. All objects in these libraries with the specified object name are shown.
*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.
*USRLIBL: Only the libraries in the user portion of the job's library list are searched.
*ALL: All libraries in the system, including QSYS, are searched.
library-name: Specify the name of the library to be searched.
*ALL: All files in the libraries identified in the library qualifier are shown.
generic*-file-name: Specify the generic name of the file name. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. If the complete object name is specified, and multiple libraries are searched, multiple objects can be worked with only if *ALL or *ALLUSR library values can be specified for the name. See generic names for additional information.
file-name: Specify the name of the file that is shown. If the library qualifier is *ALL, *ALLUSR, or a library name, all files of the specified types to which the user has some authority (for example, operational authority), and that are in the specified libraries, are shown.
Optional Parameters
- FILEATR
- Specifies the type of file of which the attributes are shown.
*ALL: The attributes of all files are shown.
BSCF38: The attributes of the binary synchronous communication file for a System/38 are shown.
CMNF38: A file that is used to read data from, or write data to a logical unit (LU1) or advanced program-to-program communications (APPC) device and that allows the user to define the format of the data on the logical unit or device. A communications (CMNF38) file is a device file that is either created in the System/38 environment or migrated from a System/38 to support a communications device.
DDMF: The attributes of the distributed data management (DDM) file are shown.
DFU: The attributes of a display file created by the iSeries 400 data file utility are shown.
DFUEXC: The attributes of a display file created by the System/38 data file utility (DFU), which can be run by using the System/38 data file utility, is shown.
DFUNOTEXC: A display file that is created by the System/38 data file utility (DFU), but cannot be run by using the System/38 data file utility is shown.
DKTF: The attributes of diskette files are shown.
DSPF: The attributes of display files are shown.
DSPF38: The attributes of display files for a System/38 are shown.
ICFF: The attributes of communications files are shown.
LF: The attributes of logical files are shown.
LF38: The attributes of logical files for a System/38 are shown.
MXDF38: The attributes of mixed files for a System/38 are shown.
PF: The attributes of physical files are shown.
PF38: The attributes of physical files for a System/38 are shown.
PRTF: The attributes of printer files are shown.
PRTF38: The attributes of printer files for a System/38 are shown.
SAVF: The attributes of save files are shown.
TAPF: The attributes of tape files are shown.
Example for WRKF
WRKF FILE(X/PAY)This command allows you to work with the file named PAY, for which the user has some authority, and is located in library X.
Error messages for WRKF
*ESCAPE Messages
- CPF9809
- Library &1 cannot be accessed.
- CPF9810
- Library &1 not found.
- CPF9820
- Not authorized to use library &1.