|
|
|
|
The following command is used to specify a particular user-defined transfer request:
sna400ft transfer [filename] [ general options] [transfer options] [transfer_request_string | -x transfer_request_filename [transfer_request_parameters ]]
This command can be used with the general options described in General File Transfer Command Options, or the transfer options described below. File transfer messages are described in File Transfer Messages.
Do not overwrite existing data in a member, or truncate lines. If this option is specified the file transfer program stops the transfer operation if the following conditions apply:
Data in an existing member is going to be overwritten by the transfer operation
Lines which are longer than a specified length are going to be truncated
Overwrite existing data in a member and truncate lines if necessary. If this option is specified, the file transfer program continues the transfer operation even if the following conditions apply:
Data in an existing member is going to be overwritten by the transfer operation
Lines which are longer than a specified length are going to be truncated
These options should be used if you are controlling file transfer from a script. If none of these options are specified, the file transfer program warns you if data in an existing member is going to be overwritten, or if lines will be truncated, and prompts you to specify whether they wish to continue with the file transfer.
Specifies the type of AS/400 transfer request (described in the section, AS/400 Transfer Requests). It can be one of the following:
Selects a particular field or fields from the records in a file according to various criteria, and transfers this data from the AS/400 to the local machine
Transfers data from a local machine to the AS/400. It can create files (in which case the file format has to be specified), members within files, or both. Alternatively the data transferred can replace existing members.
Lists the files contained in a particular library.
Lists the field definitions in a specified file.
Specifies particular options.
If the first word in the transfer request string is not
A detailed description of transfer requests and their syntax can be found in the PC Support/400 API Reference.
Specifies a file that contains the transfer request string. A transfer request file may contain substitution symbols %1, %2, and so on. Each word in the command line which follows the transfer request file name (the transfer_request_parameters) replaces a substitution symbol. The file contents, combined with the substitutions, make up the transfer request string.
Specifies values to replace the substitution symbols used in the transfer request file. If there are not enough words to satisfy the number of symbols, you will be prompted for them. The file contents, combined with the substitutions, make up the transfer request string.
The following example illustrates how a file could be used to provide the transfer request string for a transfer command.
A transfer file called selreq contains the following transfer request:
SELECT %1 FROM QGPL/%2
This transfer request asks the AS/400 to send data from the field named by the parameter %1 from the file named by the parameter %2 in subdirectory QGPL. Parameters %1 and %2 must be supplied at the command line.
The user types the following at the command line:
sna400ft transfer selreq flda filea(membera)
The first substitution symbol, %1, is replaced
by the word flda
, and the second substitution symbol,
%2, is replaced by the words filea(membera)
.
The file transfer program sends the following transfer request to the host:
SELECT flda FROM QGPL/filea(membera)
This transfer request asks the AS/400 to send data from the field flda in the member membera in a file called filea in the subdirectory QGPL.
If a description file is specified with the
option, and the first word of the transfer request string is
If a
|
|
|
|
|