Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Receive Network File (RCVNETF) command receives a network file and copies the records into a physical database file or a save file. Once the file has been received, it is removed from the queue of network files.
If the original file is a save file, it must be received into a save file. Before a file can be received, the file specified by the TOFILE parameter must already exist.
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.
If the file is a physical file, the record length of the to-file must be at least as large as the record length of the original file. If the record length of the to-file is larger than that of the original file, the records are padded to the end with the default record value for the to-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 multinational character set 697/500 to the current job CCSID.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FROMFILE | From file | Character value | Required, Positional 1 |
TOFILE | To file | Qualified object name | Optional, Positional 2 |
Qualifier 1: To file | Name, *FROMFILE | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
FROMMBR | Member to be received | Character value, *ONLY | Optional, Positional 3 |
TOMBR | To member | Name, *FROMMBR, *FIRST | Optional, Positional 4 |
MBROPT | Replace or add records | *REPLACE, *ADD | Optional |
NBR | File number | Integer, *LAST, *ONLY, *FIRST | Optional |
USER | User | Name, *CURRENT | Optional |
FROMTYPE | From file type | *NETFILE, *SRC | Optional |
Top |
Specifies the name of the file that is received. This is the name of the file on the sending system.
This is a required parameter.
Top |
Specifies the name of the file into which the network file is received. Overrides to this file are ignored.
The possible values are:
The possible library values are:
Top |
Specifies the name of the file member that is received.
The possible values are:
Top |
Specifies the database file member that receives the data.
The possible values are:
Top |
Specifies whether the new records replace or are added to the existing records.
The possible values are:
Top |
Specifies the number of the file member that is received. This number is used to identify the member that is received when there is more than one member of the same name available for the file.
The possible values are:
Note: The file member that arrived last at the user's system may not have been the last one sent by the sending user. The network does not guarantee the arrival sequence of separately sent files.
Top |
Specifies the user to whom the file was sent.
The possible values are:
Top |
Specifies the type of file that is received. This option should be used mainly when the file is an AS/400 or System/38 source file which was sent by a System/370 VM or MVS user. Since VM or MVS cannot identify whether the file is a source file, you can indicate whether the file is a source file or a non-source file.
The possible values are:
If the file is a non-source file and is:
If the file is a source file and is:
Note: *SRC must not be specified if the network file does not contain sequence numbers and date fields in the first 12 bytes of each record.
Top |
Example 1: Receiving a Member
RCVNETF FROMFILE(FILEA) TOFILE(FILEB/FILEA) FROMMBR(PAYROLL)
This command receives member PAYROLL of file FILEA into member PAYROLL of file FILEA in library FILEB. If there is an existing member of that name, the records in the member are replaced. If multiple members of that name are available, the last one to arrive at the destination system is received.
Example 2: Receiving a Network File
RCVNETF FROMFILE(PERSONNEL) NBR(*LAST) USER(USR1)
This command receives a network file named PERSONNEL, which was sent to user USR1, into a file with the same name. Because the FROMMBR parameter is not specified, there must be only one member name available for this file. Because USR1 is specified, only someone with a user profile of USR1, someone with a group profile of USR1, or someone with security officer authority can use this command.
Example 3: Receiving a Source File
RCVNETF FROMFILE(FILEA) TOFILE(FILEB/FILEA) FROMMBR(PAYROLL) FROMTYPE(*SRC)
This command specifies that the file being received is a source file and the sequence numbers and date fields are not added to the file being received.
Top |
*ESCAPE Messages
Top |