The FTP command runs the FTP
client program that enables you to transfer data sets and files between your
local host and another host running an FTP server.
To access FTP we can use any
of the following techniques
1)Code PGM=FTP in a batch job
and pass parameters using the PARM keyword. This technique is mainly used on
the Mainframe systems.
2)Enter the FTP command from
TSO.(mainframe)
3)Enter the FTP command from
Unix shell or from windows command prompt.
FTP syntax:
Following is the FTP syntax.
Not all the options will be
explained here.
The ones that will be
generally used are highlighted.
.----------------------------.
V
|
>>-ftp----+------------------------+-+-------------------------->
+- -a-+- NEVER--+--------+
|
+- GSSAPI-+ |
|
'- TLS----' |
+- -d--------------------+
+- -e--------------------+
+- -f-- ftpdata_filename-+
+- -g--------------------+
+- -i--------------------+
+- -n--------------------+
+- -p-- tcpip------------+
+- -r-+- NEVER--+--------+
|
+- GSSAPI-+ |
|
'- TLS----' |
+- -s-- srcip------------+
+- -t-- data_set_name----+
+- -v--------------------+
+- -w-- nn---------------+
'- -x--------------------'
>--+---------------------------------+-------------------------->
| .-21-----------.
|
'- foreign_host--+--------------+-'
'- port_number-'
>--+----------------------------------------------------------------------+-->
'-(--+--------------+--+--------+--+---------------+--+--------------+-'
+- Exit--------+ '- TRACe-' '- TImeout-- nn-' '- TCP-- tcpip-'
'- Exit--=--nn-'
>--+----------------------------+------------------------------><
'- TRANslate-- data_set_name-'
Following is the meaning of
parameters we pass:
-d
|
Starts the generation of
tracing output. Equivalent to TRACE.
|
-e
|
Terminates FTP for certain FTP errors with a nonzero
MVS™ return code. Equivalent to EXIT.
|
-f ftpdata_filename
|
Specifies the client file
containing the ftp parameters to be used.
|
-i
|
Turns off interactive prompting for MDELETE, MGET, and
MPUT subcommands. Equivalent to the PROMPT subcommand.Normally when using
mget,mput we get a prompt for every file being transferred.
|
-p tcpip
|
Indicates the name of the
TCP on the local host to which the FTP client should connect. This parameter
is ignored if your system is not configured for multiple instances of TCP/IP.
This is equivalent to TCP tcpip.
|
-t data_set_name
|
Specifies the name of a
nonstandard translation table. Equivalent to TRANSLATE data_set_name.
|
-v
|
Enables verbose mode. This parameter gives you extra
information.
|
foreign_host
|
Specifies the name of the host to which you are
connecting. Specify the host by its host name or its IP address. Note that its not
compulsory to provide the foreign_host in the ftp command. We can just invoke
FTP by typing FTP and then connecting to the server using the OPEN command
|
port_number
|
Specifies the port number
of the FTP server on the remote host. The default is well-known port 21. The maximum port number that
can be specified is 65 534. This parameter should not be used unless you are sure
there is a server listening on a port other than the well-known port 21 at
the destination.
|
Exit
|
Terminates FTP, for certain FTP errors, with a nonzero
MVS return code.
|
Exit=nn
|
Terminates FTP with a nonzero return code of your
choice when an FTP error occurs. Valid values are in the range 0 - 4095.
|
TRACe
|
Starts the generation of
tracing output. TRACe is used in debugging.
|
TImeout nn
|
Specifies the number of seconds (nn) to be used for the
following TImeout parameters:
MYOPENTIME
DCONNTIME
CCONNTIME
INACTTIME
DATACTTIME
|
TRANslate data_set_name
|
Specifies the data set name
of a nonstandard translation table.
|
NOte : All the information about FTP and the syntax diagrams are taken from the site http://publib.boulder.ibm.com.
Things are put here in simplified words and Many commands that are not used normally are omitted.
Refer the website http://publib.boulder.ibm.com. in case you need more details.
No comments:
Post a Comment