Send Network Spooled File (SNDNETSPLF)

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

The Send Network Spooled File (SNDNETSPLF) command sends a spooled file to another user on the local system or on a remote system on the SNADS network. The file is placed on the output queue that is specified in the user profile of the user to whom the spooled file was sent.

When the file arrives at the destination system, a message is sent to both the recipient and sending user notifying them of the arrival of the spooled file.

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 current job CCSID to the multinational character set 697/500.

Restrictions:

  1. The user must be enrolled in the system distribution directory to run this command. The sender must have read, add, and delete authority to the receiving output queue when sending to user on the same system.
  2. One of the following must be true:
    • The requester is the creator of the file.
    • The requester has *READ authority to the output queue on which the file resides, and DSPDTA(*YES) was specified on the CRTOUTQ command.
    • The requester has *SPLCTL special authority.
    • The requester has *JOBCTL special authority, and the output queue on which the file resides has OPRCTL(*YES) specified on the CRTOUTQ command.
    • The output queue has DSPDTA(*YES) specified on the CRTOUTQ command.
    • The requester has owner authority to the output queue on which the file resides and the queue had AUTCHK(*OWNER) and DSPDTA(*YES) or DSPDTA(*NO) specified on the CRTOUTQ command.
    • The requester has *READ, *ADD, and *DELETE authority to the output queue on which the file resides and the queue has AUTCHK(*DTAAUT) and DSPDTA(*YES) or DSPDTA(*NO) specified on the CRTOUTQ command.
  3. DTAFMT(*RCDDATA) must be used when sending a spooled file to a release prior to Version 1 Release 3 Modification 0 (V1R3).
Top

Parameters

Keyword Description Choices Notes
FILE Spooled file Name Required, Positional 1
TOUSRID User ID Values (up to 50 repetitions): Element list Required, Positional 2
Element 1: User ID Character value
Element 2: Address Character value
JOB Job name Single values: *
Other values: Qualified job name
Optional, Positional 3
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR Spooled file number 1-999999, *ONLY, *LAST, *ANY Optional, Positional 4
JOBSYSNAME Job system name Name, *ONLY, *CURRENT, *ANY Optional
CRTDATE Spooled file created Single values: *ONLY, *LAST
Other values: Element list
Optional
Element 1: Creation date Date
Element 2: Creation time Time, *ONLY, *LAST
DTAFMT Data format *RCDDATA, *ALLDATA Optional
CLASS VM/MVS class A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Optional
PTY Send priority *NORMAL, *HIGH Optional
Top

Spooled file (FILE)

Specifies the name of the spooled file that is sent to the specified user. The file name is the name of the device file that was used by the program to produce the spooled output file.

This is a required parameter.

Top

User ID (TOUSRID)

Specifies the two-part user ID of one or more users to whom the file is being sent, or the name of one or more distribution lists containing the user IDs of one or more users to whom the file is being sent. A combination of user IDs and distribution lists can be specified on the same command. Each user ID or distribution list is specified as a two-part name, and both parts are required. The users in the distribution list may be either remote or local.

Note: Depending on the type of work station being used, the internal value for a user identifier may differ from the characters shown by the DSPDIRE command. If the byte-string value specified for the TOUSRID parameter does not match the rules for an internal user identifier value, or if it does not match the internal value for any enrolled user, an error may be reported.

This is a required parameter.

You can enter multiple values for this parameter.

Top

Job name (JOB)

Specifies the name of the job that created the spooled output file whose data records are to be sent.

*
The job that issued this command is the job that created the spooled file.
qualified-job-name
Specify the qualified name of the job that created the spooled file. If no job qualifier is given, all jobs currently in the system are searched for the simple job name.
Top

Spooled file number (SPLNBR)

Specifies the number of the spooled output file from the job whose data records are to be sent.

*ONLY
Only one spooled file in the job has the specified file name; therefore, the number of the spooled file is not necessary.
*LAST
The spooled file with the highest number and the specified file name is used.
*ANY
The spooled file number is not used to determine which spooled file is used. Use this value when the job system name parameter or the spooled file create date and time parameter is to take precedence over the spooled file number when selecting a spooled file.
spooled-file-number
Specify the number of the spooled file having the specified file name whose data records are to be sent.
Top

Job system name (JOBSYSNAME)

Specifies the name of the system where the job that created the spooled file (JOB parameter) ran. This parameter is considered after the job name, user name, job number, spooled file name, and spooled file number parameter requirements have been met.

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and spooled file create date and time.
*CURRENT
The spooled file created on the current system with the specified job name, user name, job number, spooled file name, spooled file number, and create date and time is used.
*ANY
The job system name is not used to determine which spooled file is used. Use this value when the spooled file create date and time parameter is to take precedence over the job system name when selecting a spooled file.
name
Specify the name of the system where the job that created the spooled file ran.
Top

Spooled file created (CRTDATE)

Specifies the date and time the spooled file was created. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, and job system name parameter requirements have been met.

Single values

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and job system name.
*LAST
The spooled file with the latest create date and time of the specified job name, user name, job number, spooled file name, spooled file number, and job system name is used.

Element 1: Creation date

date
Specify the date the spooled file was created.

Element 2: Creation time

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date.
*LAST
The spooled file with the latest create time of the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date is used.
time
Specify the time the spooled file was created.
Top

Data format (DTAFMT)

Specifies the format in which to transmit the spooled file. This parameter is applicable only to spooled print files. It is ignored for diskette files.

Spooled files that contain special device requirements cannot be sent using this command if *RCDDATA is specified on the Data format prompt (DTAFMT parameter).

Note: The device requirements are listed as part of the attributes for the spooled file. To view the device requirements, use the WRKSPLFA command or the attributes option on the WRKSPLF command. If any of the device requirements are attributes of the file (if any of the device requirements on the display have a 'Y'), the spooled file cannot be sent. Either specify DTAFMT(*ALLDATA) or copy the spooled file to a database file using the Copy Spooled File (CPYSPLF) command and then use the Send Network File (SNDNETF) command to send the file as a data file.

If *RCDDATA is specified on the Data format prompt (DTAFMT parameter), the following attributes of the spooled file are kept:

The possible values are:

*RCDDATA
The spooled file is sent in the existing lower function format. Some functions will be removed from data that is sent in this format because the format does not support advanced functions. Use this format for sending spooled files to a System/36, System/38, or a System/370.
*ALLDATA
The spooled file is sent as it exists, without loss of attributes. All spooled file attributes required to reproduce the file on the receiving system are also sent. Use the *ALLDATA value to send spooled files to Version 1, Release 3, Modification level 0 or later releases of the AS/400 system.

NOTES:

  1. If a file will be printed on the receiving system, it must be printed on the same type of printer as it was intended to be printed on the source system.
  2. Spool files that require advanced function printing (AFP) resources may print differently on the receiving system. To assure that spool files are printed in the same manner, the following must occur:
    • Before using this command to send a file to a user on the same system, make sure that the libraries containing non-IBM supplied AFP resources are in the library list.
    • Before using this command to send a file to a different user or system, make sure that the libraries containing non-IBM supplied AFP resources are in the initial library list of the user receiving the spooled files.
  3. Use this format to send *LINE, *AFPDS, and *AFPDSLINE printer type device files to System 370.
Top

VM/MVS class (CLASS)

Specifies the VM/MVS SYSOUT class for distributions sent to a VM host system or to an MVS host system.

The possible values are:

A
The class is A.
B-Z, 0-9
Specify the distribution class. Valid values range from B through Z and 0 through 9.
Top

Send priority (PTY)

Specifies the queuing priority used for this spooled file when it is being routed through a SNADS network.

The possible values are:

*NORMAL
The spooled file is sent with a service level priority of data low, which is used for most data traffic. On an AS/400 system, data low distributions are placed on the normal distribution queue specified for the route.
*HIGH
The spooled file is sent with a service level priority of data high, which is used for high priority data traffic. On an AS/400 system, data high distributions are placed on the data high distribution queue specified for the route.
Top

Examples

Example 1: Sending a Spooled File

SNDNETSPLF   FILE(QPRINT)  TOUSRID((JDE SYS1))
             JOB(142857/PAPER/PRINT)
             SPLNBR(*LAST)  DTAFMT(*ALLDATA)

This command sends the last (most recently created) copy of spooled file QPRINT from job 142857/PAPER/PRINT to the user with a user ID of JDE SYS1. All spooled file functions will be sent.

Example 2: Sending Print Attributes

SNDNETSPLF   DTAFMT(*RCDDATA)

This command sends a limited set of print attributes.

Example 3: Sending All Print Attributes

SNDNETSPLF   DTAFMT(*ALLDATA)

This command sends all print attributes. *ALLDATA is only valid when it is sent from one iSeries system to another iSeries system.

Top

Error messages

*ESCAPE Messages

CPF2207
Not authorized to use object &1 in library &3 type *&2.
CPF3205
File not created.
CPF3207
Member not added. Errors occurred.
CPF3303
File &1 not found in job &5/&4/&3.
CPF3309
No files named &1 are active.
CPF3330
Necessary resource not available.
CPF3340
More than one file with specified name found in job &5/&4/&3.
CPF3342
Job &5/&4/&3 not found.
CPF3343
Duplicate job names found.
CPF3344
File &1 number &8 no longer in the system.
CPF3429
File &1 number &7 cannot be displayed, copied, or sent.
CPF3482
Copy request failed. Spool file &1 is open.
CPF3486
CHLVAL parameter value not valid.
CPF3492
Not authorized to spooled file.
CPF3493
CTLCHAR parameter not correct for file &1.
CPF3499
Records in file &1 preceded all assigned channel values.
CPF8055
Spooled file contains special device requirements. File not sent.
CPF8063
Cannot assign necessary resource.
CPF8066
One or more user identifiers on this command is not correct.
CPF8067
File &1 not sent to any users.
CPF8068
Error detected while processing file to be sent.
CPF8072
Object to be sent is greater than maximum size of 2GB.
CPF9005
System resource required to complete this request not available.
CPF9006
User not enrolled in system distribution directory.
CPF9820
Not authorized to use library &1.
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.
CPF9849
Error while processing file &1 in library &2 member &3.
Top