Work with Network Files (WRKNETF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Work with Network Files (WRKNETF) command displays or prints a list of files that have arrived for a user, or creates an output file containing a list of the files. When the list is shown, you can:

This command does not perform any CCSID translation on the contents of the file. However,the user ID and address of both the recipient and the originator are translated from the multinational character set 697/500 to the current job CCSID.

Restrictions:

  1. A user with security officer authority can display the network files for any user. Users other than the security officer can show only those files that were sent to them or to their group profile.

  2. To perform any of the options from this display, be authorized to the command corresponding to that option. For example, be authorized to the Display Physical File Member (DSPPFM) command for the browse function, and the Submit Database Jobs (SBMDBJOB) command for the submit job function.

  3. To perform WRKNETF in debug mode, update of production files must be allowed by specifying UPDPROD(*YES) on the STRDBG command.

Top


 

Parameters

Keyword Description Choices Notes
USER User Name, *CURRENT, *ALL Optional, Positional 1
OUTPUT Output *, *PRINT, *OUTFILE Optional, Positional 2
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD

Top

 

User (USER)

Specifies the user for whom the files are shown.

*CURRENT

The network files for the current user are shown.

*ALL

The network files for all users are shown.

user-name

Specify the name of the specified user whose files are shown.

Top

 

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

The possible values are:

*

The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).

*PRINT

The output is printed with the job's spooled output.

*OUTFILE

The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Top

 

File to receive output (OUTFILE)

Specifies the name and library of the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library.

The possible library values are:

*LIBL

The library list is used to locate the file.

*CURLIB

The current library for the job is used to locate the file. If no library is specified as the current library for the job, QGPL is used.

library-name

Specify the library where the file is located.

Top

 

Member to receive output (OUTMBR)

Specifies the name of the database file member that receives the output of the command.

The possible name values are:

*FIRST

The first member in the file receives the output. If it does not exist, the system creates a member with the name of the file specified on the File to receive output prompt (OUTFILE parameter).

member-name

Specify the name of the file member that receives the output. If it does not exist, the system creates it.

The possible values for how information is stored are:

*REPLACE

The system clears the existing member and adds the new records.

*ADD

The system adds the new records to the end of the existing records.

Top


 

Examples

Example 1: Working with User's Network Files

 WRKNETF 

This command allows you to work with all network files for the user running this command. If the command is issued as an interactive job, the list of files is shown at the requesting work station. If the command is issued as a batch job, the list of files is printed with the job's spooled output.

Example 2: Printing Output

 WRKNETF   USER(USR1)  OUTPUT(*PRINT)

This command allows you to work with the network files for USR1 and prints the output with the job's spooled output. This command can only be issued by USR1, a member of the USR1 group, or a user with security officer authority.

Example 3: Working with Network Files for All Users

 WRKNETF   USER(*ALL)  OUTPUT(*OUTFILE)  OUTFILE(NETFILES)

This command allows you to work with the network files for all users and is written to the first member of a database named NETFILES. If the file exists in a library on the library list, the existing file is used; otherwise, the file is created in the QGPL library. If the file did not exist, or did not contain any members, a member with the same name as the file is added to the file; otherwise, the first member of the file is cleared and used. This command can be issued only by a user with security officer rights.

Top


 

Error messages

*ESCAPE Messages

CPF2204

User profile &1 not found.

CPF8070

Not allowed to process files for user &1.

CPF9005

System resource required to complete this request not available.

CPF9006

User not enrolled in system distribution directory.

CPF9830

Cannot assign library &1.

CPF9845

Error occurred while opening file &1.

CPF9846

Error while processing file &1 in library &2.

CPF9847

Error occurred while closing file &1 in library &2.

CPF9860

Error occurred during output file processing.

Top