|
Where allowed to run: All IBM i Environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Send File Using FTP (FTPSNDFILE) command allows you to send a single database member, a generic set of members or all members to a remote OS/400 file. Using this command avoids interactive FTP so users can submit their transfers to batch or run them interactively with less complexity.
Internally, FTPSNDFILE dynamically generates an FTP script and saves the FTP results log in source file members in QTEMP or a user-specified location.
Only the IP address, file name, user profile, and password are required.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| RMTSYS | Remote IP or FTP server | Character value | Required, Positional 1 |
| FILE | Local file | Qualified object name | Required, Positional 2 |
| Qualifier 1: Local file | Name | ||
| Qualifier 2: Library | Name, *LIBL | ||
| MBR | Local member | Generic name, name, *FILE, *FIRST, *LAST, *ALL | Optional, Positional 3 |
| TOFILE | Remote file | Qualified object name | Optional, Positional 4 |
| Qualifier 1: Remote file | Name, *FROMFILE | ||
| Qualifier 2: Library | Name, *FROMLIB | ||
| TOMBR | Remote member | Name, *FROMMBR, *TOFILE | Optional, Positional 5 |
| REPLACE | Replace data on remote system | *YES, *NO | Optional, Positional 6 |
| USER | Remote FTP User ID | Character value, *CURRENT | Optional, Positional 7 |
| PWD | Remote FTP Password | Character value, *USERID | Optional, Positional 8 |
| MODE | Transfer mode | *BINARY, *TEXT, BINARY, ASCII, TEXT | Optional, Positional 9 |
| SRCFILE | Src file to receive FTP script | Qualified object name | Optional, Positional 10 |
| Qualifier 1: Src file to receive FTP script | Name, QFTPSRC | ||
| Qualifier 2: Library | Name, QTEMP, *LIBL | ||
| SRCMBR | Script source member | Name, *FROMMBR, *GEN | Optional, Positional 11 |
| LOG | FTP log file |
Single values: *STDOUT, *STDIO, *SRCFILE, *NONE Other values: Qualified object name |
Optional, Positional 12 |
| Qualifier 1: FTP log file | Name, QFTPLOG | ||
| Qualifier 2: Library | Name, QTEMP, *LIBL | ||
| LOGMBR | Log member | Name, *FROMMBR, *SRCMBR, *SCRIPT | Optional, Positional 13 |
| DSPLOG | Display FTP transfer log | *YES, *NO | Optional, Positional 14 |
| Top |
Specify the IP address or domain name of the system that will receive the file you are sending.
| Top |
Specify the qualified name of the file that you want to send using FTP. A value of *LIBL may be specified for the file's library. However, the FTPSNDFILE command's processing program will convert *LIBL into the actual library name at runtime. It uses the QUSROBJD (Retrieve Object Description) API to accomplish this.
| Top |
Specify the name (generic*, full, or *ALL) of the member(s) you want to transfer.
The following special values are also supported:
| Top |
Specify the name of the file that receives the data from the local file. The file should already exist on the remote system so that the external definition is preserved. If the file does not exist, the FTP server will create the file for you, but you won't like the results as it will be a so called "flat file" (i.e., no external description will be associated with the new file). If it already exists, this issue does not apply.
| Top |
Specify the name of the member into which the data is stored. You may specify either a member name or one of the following special values:
| Top |
Replace remote member's data. This parameter controls whether data is added or replaced in the remote member.
| Top |
Specify the user profile name for the remote system. This user profile is used to sign on to the remote FTP server. You must also specify a password for this user program on the PWD parameter.
| Top |
Specify the password for the remote user. Note that this parameter's value is not recorded in the joblog and must be entered each time you run the FTPSNDFILE command from Command Entry.
From within a CL program, the password may be stored in a CL variable and passed on this parameter.
The following special value may also be specified:
| Top |
Specify the kind of transfer to be performed. The valid choices are as follows:
| Top |
The name of the source file that receives the generated FTP script. This source file should be as long as possible but at least 152 bytes in length (140 bytes for the source line and the usual 12 bytes for the source sequence and change-date area).
If this source file does not exist, it will be created with a record length of 152 bytes. The default source file name is as follows:
The default library name is QTEMP.
| Top |
The FTP script source member name. This is the name of the member into which the FTP script is generated. Specify any valid source member name, *FROMMBR, or *GEN. If the member exists, it is cleared; if it does not exist, it is added. The two special values for this parameter are as follows:
| Top |
FTP run log file. Specify the name of a source file that will receive the log from the FTP session. Optionally, specify that the messages are to be delivered as they normally are, via the STDOUT (standard output) device.
Unlike the SRCFILE parameter, the file specified on the LOG parameter must exist because the FTPSNDFILE command will not create it. You may, however, use the same file name as the SRCFILE parameter, in which case the file is created due to its being specified on the SRCFILE parameter.
This parameter has the following special values:
| Top |
The member name where the FTP log is saved. The following special value is also supported:
| Top |
Display the FTP log. If *YES is specified, the FTP log is displayed when the FTP transfer completes; if *NO, the FTP log is not displayed.
| Top |
| Top |
| Top |