The Copy File Using RSF (CPYFRSF) command is used to copy database file members between machines
The prompted version of the CPYFRSF command is shown below. Click on the image to see parameter descriptions. Copy File Using RSF (CPYFRSF)
Type choices, press Enter.
Send or retrieve data . . . *RTV, *SND From file . . . Name
Server ID . . . Name, *CURRENT, *LIST
From member . . . *FIRST Name, generic*, *FIRST, *ALL To file . . . *FROMFILE Name, *FROMFILE
Library . . . Name, *FROMLIB To member . . . *FROMMBR Name, *FROMMBR Replace or add records . . . *REPLACE *REPLACE, *ADD
Optimize for . . . *CNNTYPE *DDM, *SAVRST, *SPACE... Run-time compression . . . *SERVER *NONE, *BASIC, *MAX, *SERVER Target release . . . *CURRENT *CURRENT, *TARGET, VxRyMz... Post-processing program . . . . *NONE Name, *DFT, *NONE
Library . . . Name, *LIBL Remote signon information:
User ID . . . *SERVER Name, *RSFDFT, *REQUESTER... Password . . . Name
End session after data rcvd . . *NO *YES, *NO Hang up after this transaction *YES *YES, *NO
Call-back phone number . . . *NONE Message for server . . . *SERVER
Location list . . . Name
Library . . . *LIBL Name, *LIBL, *CURLIB Member name . . . *FIRST Name, *FIRST
Reset location list . . . *YES *YES, *NO Relay distribution . . . *NO *YES, *NO Copy from record number . . . . *START Number, *START Copy to record number . . . *END Number, *END Number of records to copy . . . *END Number, *END Errors allowed . . . 0 Number, *NOMAX
Note: Error messages generated from this command that refer to file RSFCOPY actually refer to the remote file to/from which
you are copying. Error messages that refer to library QTEMP may actually refer to the remote library to/from which you are copying.
The parameters for the CPYFRSF command are described below.
Send or retrieve data
Specify whether you are sending or retrieving data. This is a required parameter. The possible values are:
*SND: Data is sent to the remote machine.
*RTV: Data is retrieved from the remote machine. From file
Enter the qualified name of the file to copy data from. This is a required parameter.
If *SND is specified for "Send or retrieve data", this file must be on the local machine. Otherwise, the file must be on the remote machine.
file-name: Enter the name of an existing file to copy data from.
The possible library values are:
*LIBL: Use the library list to locate the file *CURLIB: The file is in the current library.
library-name: Enter the name of the library containing the file. Server ID
The name of a server directory entry to be referenced. The entry must exist in the server directory on your machine. This is a required parameter. Click here for a complete description of this parameter.
From member
Enter the name or generic name of the member to copy from. The possible values are:
*FIRST: The first member in the file is copied. *ALL: All members in the file are copied.
member-name: Enter the name of the member to be copied. To specify a generic name, end your
specification with an asterisk (*).
To file
Enter the qualified name of the file to copy data to. If the file does not exist, it will be created.
If *SND is specified for "Send or retrieve data", this file will be on the remote machine. Otherwise, the file will be on the local machine.
The possible values are:
*FROMFILE: The data is copied to a file with the same name and library as specified in the "From file"
parameter.
file-name: Enter the name of the file to copy data to.
The possible library values are:
*FROMLIB: The "To file" is in the same library as the "From file". library-name: Enter the name of the library to contain the file. To member
Enter the name of the member to copy to. The possible values are:
*FROMMBR: Data is copied to a member in the "To file" that has the same name as the member copied
from.
*FIRST: Data is copied to the first member in the "To file". member-name: Enter the name of the member to copy to. Replace or add records
Specify whether to add to or replace an existing member when copying data. The possible values are:
*REPLACE: Copied data replaces the data in an existing member. *ADD: Copied data is added to the data in an existing member. Optimize for
Specify the method to use to transmit the data. When a TCP/IP connection is used, a value of *SPEED is assumed for this parameter, regardless of the value specified. .
The possible values are:
*SPACE: No work space is use to prepare or compress the data before it is transmitted. DDM is used to
transmit the data, so this option is not available for TCP/IP connections.
For large files, this method requires more transmission time because the data is not compressed.
*SPEED: The data is compressed before it is sent. Work spaces are used on the source and target
machines to pack/unpack the data. The temporary work space required may be equal in size to the data being transmitted. DDM is not used to transmit the data, so this option is always used with TCP/IP connections.
This method uses the system save/restore facilities, so data can only be transmitted between machines with compatible OS/400 release levels.
This method is faster for large files, where the transmission time saved more than makes up for the time spent packing and unpacking the data.
Note: In order to use this option, the server machine must be running RSF release 6.0 or
greater.
Run-Time Compression
Indicate whether to compress data as it is transmitted. Click here for a complete description of this parameter.
Target release
Specify the OS/400 release level of the remote machine, relative to your machine.
This parameter is ignored unless *SEND is specified for "Send or retrieve data", and *SPEED is specified (or assumed, as with TCP/IP connections) for the "Optimize for" parameter.
The possible values are:
*CURRENT: The remote server machine is at the same OS/400 release level as your machine: *PRV: The remote server machine is one OS/400 release level behind your machine.:
release-level: Enter the OS/400 release level of the remote machine, in the form VxRyMz, where x, y
and z are the version, release and mod level respectively. For example: V4R1M0.:
Post-Processing program
Enter the qualified name of a user program to call on the remote machine once the data has been copied to the target file.
The value you specify will be ignored by the server machine unless an entry referring to your machine exists in the requester directory of the server machine and specifies *YES or *PARTIAL for "Allow remote program calls". See
Adding Requester Directory Entries for more information. The possible values are:
*NONE: No program is called on the server machine after the file is copied. You must specify *NONE
for this parameter if you specified *RTV for "Send or retrieve data".
*DFT: The value specified for "Post-Processing program" in the requester directory of the server
machine is used. The server machine controls which program, if any is called.
program-name: Enter the name of a program to call on the server machine to process the received data..
See Post-Processing Programs for more information about how to write these programs. The possible library values are:
*LIBL: The job library list is used to locate the program. *CURLIB: The program is found in the current library.
library-name: Enter the name of the library containing the program. Remote sign-on information
Enter a user id and password to use on the remote system. The user id and password you specify will be used to determine your authority to files on the remote machine.
The possible single values are:
*RSFDFT: The default profile RSFSRV is used on the remote system.
*REQUESTER: The profile used to check authority on the remote machine is the same as the original
profile on that machine that was used to initiate the RSF request which connected to this machine. The job in which this command is run must be an RSF server job and *CURRENT must be specified for the "Server id" (SERVER) parameter.
For example, USER1 on SYSTEMA uses the STRPASRSF command to connect to SYSTEMB. User profile USER2 is used to sign on to SYSTEMB. Now the following command, executed in the target pass-through job on SYSTEMB, will copy files from SYSTEMA to SYSTEMB and will have USER1's
authority to the objects on SYSTEMA:
CPYFRSF ACTION(*RTV) FROMFILE(MYLIB/QCLSRC) SERVER(*CURRENT) FROMMBR(A*) USER(*REQUESTER)
The possible user id values are:
user-id: Enter a valid user id for the remote system.
The possible password values are:
password: Enter the appropriate password for the user id specified. End session after data received
Specify whether the communications session with the server should be ended before any post-processing program is called.
The possible values are:
*NO: If the you have specified that a user-written program be called to process the received RSF data,
and if the server has specified *NO for the DROP parameter on the requester directory entry, the session remains active while the post-processing program is called. Status messages reporting the progress of the post-processing program are returned to your machine.
*YES: The session with the server is ended after the data is received by the server. If the you have
specified that a user-written program be called to process the received data, the session is ended before the program is called. The post-processing program is executed asynchronously on the server machine.
Hang up after this transaction
Whether RSF should hang up the phone connection at the completion of the transaction. Click here for a complete description of this parameter.
Call-back phone number
The phone number to pass to the server machine when requesting that the server call your machine back. Click here
for a complete description of this parameter.
Message for server
An ad hoc message to be sent to the server along with the star pass-through request. Click here for a complete description of this parameter.
Contact name, etc.
When you prompt for command parameters with F4, default name, address and telephone information is filled in for you. These are the same defaults the system uses to send PTF orders via Electronic Customer Support.
The possible values are:
contact information: Enter the appropriate information for contact name, address, and phone. Related Commands:
The following commands are discussed elsewhere in this manual:
Retrieve Package (RTVRSFPKG)
Send Package (SNDRSFPKG)
Retrieve Objects (RTVOBJRSF)
Send Objects (SNDOBJRSF)
Retrieve Documents (RTVDOCRSF)
Send Documents (SNDDOCRSF)
Create Package (CRTRSFPKG)
For more information about the following commands, prompt the command and press F1 to view the on-line help text:
Change Package (CHGRSFPKG) Delete Package (DLTRSFPKG) Rename Package (RNMRSFPKG)