Send Network File (SNDNETF)

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

The Send Network File (SNDNETF) command sends a save file or a member of a physical database file to another user on the local system or on a remote system through the SNADS network. This command can be used to:

When the file arrives at its destination, a notification message is sent to both the recipient and sender of the file.

When a source physical file is sent, the source sequence number and change date in positions 1 through 12 of the record are sent with the file. These are kept if the file is received into a source physical file, and are truncated if the file is received into a nonsource physical file. When a file that was originally a nonsource physical file is received into a source physical file, the source sequence numbers are created and placed in front of the records.

Note: Save files created on the AS/400 system cannot be distributed to System/38. However, save files created on System/38 can be distributed to the AS/400 system.

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.
  2. The maximum size of a file that can be sent using the SNDNETF command is approximately 2 billion bytes.
Top

Parameters

Keyword Description Choices Notes
FILE File Qualified object name Required, Positional 1
Qualifier 1: File Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TOUSRID User ID Values (up to 50 repetitions): Element list Required, Positional 2
Element 1: User ID Character value
Element 2: Address Character value
MBR Member Name, *FIRST Optional, Positional 3
TOTYPE To file type *FROMFILE, *DATA 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
FORMAT Send format *V, *F, *U Optional
PTY Send priority *NORMAL, *HIGH Optional
Top

File (FILE)

Specifies the name and library of the file that is sent. The file being sent can be a physical file or a save file; logical files and device files are not allowed. Overrides to the specified file are ignored.

This is a required parameter.

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

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.

This is a required parameter.

You can enter multiple values for this parameter.

Top

Member (MBR)

Specifies the member that is sent from the file. A member name is not allowed if the file is a save file.

*FIRST
The first member (in order of creation) in the file is sent.
member-name
Specify the name of the file member that is sent.
Top

To file type (TOTYPE)

Specifies, when you send a source file, whether the sequence numbers and date fields are to be removed from the transmitted copy of the file. The source file is not changed. This parameter is not valid for non-source files.

The possible values are:

*FROMFILE
The file type of the source file is used when sending the file. The transmitted file does not change.
*DATA
The file is sent as a non-source file. The transmitted copy is sent without sequence numbers and date fields.
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 format (FORMAT)

Specifies the record format in which the network file is transmitted.

The possible values are:

*V
The file is sent using variable-length records with trailing blanks removed from each record.
*F
The file is sent as fixed-length records with no trailing blanks removed from the records. Specifying this value affects only network files sent to a System/370. This value is not recommended for sending files to another AS/400 system.
*U
If the file contains null capable fields, specifying this value causes SNDNETF to allow sending of the file and to send the mapping information which indicates which fields are null capable. This value for FORMAT will only produce the desired results when the file is sent to another AS/400 with OS/400 release VRM420 and later installed.

Note: Specifying FORMAT(*F) may increase the amount of storage and time required when transmitting the network file. Specifying FORMAT(*U) also requires that the receiving system must have a database file created with the identical field mappings as the file being sent, in order to receive the file correctly.

Top

Send priority (PTY)

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

The possible values are:

*NORMAL
The 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 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 Member

SNDNETF   TOUSRID((JONES SYSTEM1))  FILE(EMPLOYEE)  MBR(PGMR)

This command sends member PGMR of file EMPLOYEE to the user identified to the network with a user ID of (JONES SYSTEM1). The library list is used to locate the file.

Example 2: Sending a Nonsource File

SNDNETF   TOUSRID((JONES SYSTEM2))  FILE(EMPLOYEE)  MBR(PGMR)
          TOTYPE(*DATA)

This command sends member PGMR of file EMPLOYEE to the user identified to the network with a user ID of (JONES SYSTEM2). The library list is used to locate the file. The file is being sent as a nonsource file removing the sequence numbers and date fields.

Top

Error messages

*ESCAPE Messages

CPF8057
File &1 in &2 not a physical file or save file.
CPF8058
File &1 is a spooled file.
CPF8059
Member name not allowed for save file.
CPF8063
Cannot assign necessary resource.
CPF8064
File &1 in &2 member &3 not sent to any users.
CPF8066
One or more user identifiers on this command is not correct.
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.
CPF9803
Cannot allocate object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9812
File &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9822
Not authorized to file &1 in library &2.
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.
CPF9848
Cannot open file &1 in library &2 member &3.
CPF9849
Error while processing file &1 in library &2 member &3.
Top