Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)

258 Chapter 10
Technical Articles
FTP Enhancements
The Implementation of CI Environment Variables
for Additional FTP/iX Status Information
The following status information will be provided through these CI
environment variables:
FTPXFERFILES number of files successfully transferred during the last
FTP/iX execution.
FTPREQFILES total number of files requested for transfer during the
last FTP/iX execution.
FTPREPLACE reflects the state of the file placement policy of FTP/iX:
either unconditionally (TRUE) or conditionally
(FALSE) replace the target file(s) specified in the user
commands GET, PUT, MPUT, and MGET (see the
REPLACE option for additional details).
The following environment variables are currently supplied with
FTP/iX:
FTPLASTERR identifies the last FTP error encountered.
FTPLASTREPLY identifies the last FTP protocol reply message string.
The addition of the aforementioned environment variables will provide
the interactive and batch FTP/iX environments with additional status
information for control of processes outside the FTP/iX subsystem.
Example Use of Environment Variables
:showvar FTP@
FTPLASTERR = 0
FTPLASTREPLY = 221 Server is closing command connection
FTPXFERFILES = 0
FTPREQFILES = 0
FTPREPLACE = TRUE
.
.
.
ftp>mget *
200 PORT command ok.
150 File: LISTFILE @,6 opened; data connection will be opened
226 Transfer complete.
20 bytes received in 0.07 seconds (0.29 Kbytes/sec)
mget abc? y
200 PORT command ok.
150 File: ABC opened; data connection will be opened
226 Transfer complete.
100 bytes received in 0.03 seconds (3.49 Kbytes/sec)
mget def? y
200 PORT command ok.
150 File: DEF opened; data connection will be opened
226 Transfer complete.
100 bytes received in 0.04 seconds (2.57 Kbytes/sec)
mget ghi? n
mget klm? n
ftp>quit
:
:showvar FTP@
FTPLASTERR = 0
FTPLASTREPLY = 221 Server is closing command connection
FTPXFERFILES = 2