|
|
This chapter describes Client FTP, the File Transfer Protocol (FTP) that supports file transfers among unlike hosts in diverse internetworking environments. It contains these sections:
| ABOR | ADD | ALLO | |
| BYE | CDUP | CONN | CWD |
| DELE | DO | END | EXPE |
| GET | ../../../../../../lib/help.htm | LIST | LOG |
| MKD | MODE | NLST | PUT |
| PWD | QUIT | QUOT | REN |
| REST | RMD | SEND | SITE |
| SNDS | STAT | STRU | TYPE |
| A=B | A?B |
The File Transfer Protocol (FTP) is an application protocol in the internet protocol suite. It supports file transfers among unlike hosts in diverse internetworking environments. Using FTP, you can move a file from one computer to another, even if each computer runs a different operating system and uses a different file storage format. Files can contain data, programs, text, or anything that can be stored online.
The objectives of the FTP protocol are to
The FTP is based on a model of files having a few attributes and a mechanism of commands and replies. The command - reply mechanism establishes the parameters for a file transfer and then performs the transfer. Like TELNET, FTP runs over TCP and assumes the service level provided by TCP.
These documents define FTP:
Two versions of Client FTP are provided with Cisco IOS for S/390: Client FTP and Client FTP2. This chapter describes Client FTP.
The Cisco IOS for S/390 Client FTP program uses a three-party model, or the server-to-server model. Client FTP requires the MVS TSO or batch user to sign on to two hosts that have Server FTP programs. After signing on to the two hosts, a user can transfer files between host A and host B.
Figure 4-1 shows the relationship between the Client FTP program and the two Server FTP programs in the three-party model.
Through FTP, the user opens connections to two FTP servers. Both servers may be remote, or one may be a local server and the other a remote server. FTP maintains two control connections: One for communication with the Cisco IOS for S/390 FTP server and the second with the remote FTP server. The user issues command sequences to direct both servers.
Client FTP gives the user access to files on both systems. Data transfer occurs directly between the local and remote servers. Data does not pass through the Client FTP application.
The Client FTP program runs as both a TSO command processor and as a regular batch program. This means that Client FTP can be used as a TSO command and can be called as a regular program with MVS JCL.
In a TSO environment, Client FTP can be accessed as a TSO command processor or can be called as a program with the TSO CALL command.
Since Client FTP does not use full-screen facilities, it can be used from any type of terminal that is supported by TSO including 3270 systems, 3767 systems, and asynchronous ASCII terminals supported through TCAM, NTO, or NPSI.
You can invoke Client FTP with the FTP TSO command as shown in the following example:
FTP [/ option1 option2 ...]Client FTP responds with this message:
Cisco IOS for S/390 Rn Client FTP - Enter command or '?'
Read Client FTP Invocation Options for a description of the options for the Client FTP commands.
Use the TSO CALL command in a TSO environment to invoke Client FTP.
CALL `T01TCP.LINK(FTP)' ['/option1 option2 ..']Options, when specified, must be enclosed in single quotes.
When invoked by CALL, Client FTP runs as a program and not as a TSO command processor. No data sets need be allocated before invoking FTP in this fashion.
Under TSO, any data set needed by the Client FTP program is dynamically allocated and freed.
The Client FTP program can be run in batch as either a regular program or as a TSO command processor by running it under a batch Terminal Monitor Program (TMP).
When run in batch, Client FTP sets a program condition code depending on the severity of Client FTP errors encountered; a return code of 0 indicates all commands entered processed successfully.
You can invoke Client FTP in batch in a manner similar to any other batch utility program.
The following example downloads the host names table from the Network Information Center (NIC) to an existing sequential data set on your host.
//jobname JOB job_stmt_parms //FTP EXEC PGM=FTP,PARM='/FIOS option1 option2 ..' //STEPLIB DD DSN=T01TCP.LINK, DISP=SHR //SYSPRINT DD SYSOUT=* //SYSPUT DD SYSOUT=*,DCB=BLKSIZE=133 //SYSGET DD *,DCB=BLKSIZE=80 CONN NIC CONN your_hostname A:LOG ANONYMOUS GUEST B:LOG your_userid your_password B:SITE BLKSIZE(4000) LRECL(260) RECFM(VB) SPACE(xx,y) PUT <NETINFO>HOSTS.TXT 'your_hoststxt_dsname' A:QUIT B:QUIT END /*
You can invoke Client FTP in batch as a TSO command processor by running it under a batch TMP.
In the following example, the batch TMP program is IKJEFT01, which is the normal TSO TMP. The following example downloads a Request For Comments (RFC) from the NIC into a member of an RFC partitioned data set on your host:
//jobname JOB job_stmt_parms //TMP EXEC PGM=IKJEFT01 //SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=133 //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * FTP / FIOS //* //SYSPUT DD SYSOUT=*,DCB=BLKSIZE=133 //SYSGET DD *,DCB=BLKSIZE=80 CONN NIC CONN your_hostname A:LOG ANONYMOUS GUEST B:LOG your_userid your_password TYPE AT PUT <RFC>RFCxxx.TXT 'your_rfctxt.dsname(RFCxxx)' A:QUIT B:QUIT END /*
This section describes the Client FTP invocation options and their requirements. These general notes apply to the Client FTP invocation options:
Client FTP uses general options and debugging options. They are described in the following sections.
This section describes the Client FTP general options.
The APP option (in the form APP=vtam_application_name) identifies the exact VTAM application name where the client will connect. vtam_application_name is a 1- to 8-character name.
If the APP option is used, the SYS invocation option is ignored.
Normally the FTP program interacts with the user through a terminal. The FIOS option lets the program read and execute a file containing commands and sends the results to a different file. Commands are read from a sequential file allocated to the SYSGET DD statement; execution results are written to a sequential file allocated to the SYSPUT DD statement.
Under TSO, the files can be allocated as shown here:
ALLOCATE FILE(SYSGET) DATASET(input_dataset) ALLOCATE FILE(SYSPUT) DATASET(output_dataset)
The input file should have all the necessary commands (such as, CONN, LOG) and should be unnumbered. The output file should have a blocksize of 133.
The LOGT option displays the current time before each line is sent to the terminal. This option is automatically set if either the TEST or FIOS option is specified.
The SYS option, in the form SYS=x, where x is an arbitrary character, identifies an alternate Cisco IOS for S/390 VTAM application to handle the TELNET connections established by the Client FTP program. This option is useful in cases where multiple copies of Cisco IOS for S/390 are running concurrently. You can specify SYS=x to access a network server called ACCESx instead of the usual ACCES.
The WAIT option causes the terminal keyboard to remain locked while a data transfer is in progress. Normally the keyboard remains unlocked, allowing additional commands to be entered during a data transfer.
This option is automatically set if the FIOS option is specified.
The Client FTP debugging options obtain debugging information on the internal operation of the Client FTP program and the interactions between the Client FTP program and the Server FTPs. Normally, the debugging information displays on the terminal, but if the FIOS option is in effect, the information is written to the data set represented by the SYSPUT DD statement.
Use the DISP option to display all requests sent and all responses received on the control connections to each Server FTP.
Requests sent from the Client FTP program to a Server FTP use the following format:
DISP - OUTPUT - text of User-to-Server requestResponses sent from a Server FTP to the Client FTP program have the following format:
DISP - text of Server-to-User responseUse the TEST option to obtain detailed status information from the various internal calls in the Client FTP program as well as the information provided by the DISP option. This option can be turned on or off while the program is running by issuing the DEBUG command.
Information logged by the TEST option has the following format:
TEST - TEST debugging information textUse the TESTI option to obtain local terminal input and output information, as well as to provide the TEST and DISP information.
Information logged by the TESTI option has the following format:
TESTI - TESTI debugging information textThe VLT option turns on tracing of the virtual line terminal sessions associated with the FTP session. This option is useful for debugging VTAM problems between the FTP session and the Cisco IOS for S/390 address space. The VLT option generates an enormous amount of output. When used interactively, this output comes to the terminal. When used in batch, the output is written to the SYSVLT DD. Thus, when running FTP in batch, you must add this DD statement to the JCL:
//SYSVLT DD SYSOUT=*,DCB=BLKSIZE=133
These steps outline the general procedure for using this Client FTP program:
A path name is a string that is provided to a file system to identify a file. A path name usually contains a device and/or directory name and a file name. The FTP specification does not specify a standard path name convention. You must follow the file naming conventions of the file systems involved in the transfer. Consult personnel at the host sites involved in the transfer for file naming conventions.
Many of the Client FTP commands take one or more path name arguments.
For information about the syntax for MVS path names supported by the Cisco IOS for S/390 Server FTP, read Data Set Names in Server FTP.
These general notes apply to the Client FTP commands:
Cisco IOS for S/390Rn Client FTP - Enter command or '?'conn mvsA:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter command or HELPconn unixB:220 unix FTP server (SunOS 4.1) ready.a:log myid331 Enter PASS command Password:b:log myid331 Enter PASS command Password:
Because the Client FTP program implements the three-party model in which the Client FTP program establishes control connections to two Server FTPs, you need a way to identify which connection is to be used for certain commands. For example, you might want to provide one set of site parameters with the SITE command to one Server FTP and provide a different set of parameters to the other Server FTP. This Client FTP program uses host prefixes to differentiate between the two Server FTPs.
A host prefix is one of the A: or B: character strings. When specified with a Client FTP command, the host prefix precedes the command, as in A:SITE. A host Server FTP initially is assigned to one prefix or the other when the connection is established with the CONN command. The A=B command can switch the host prefixes from A: to B: and B: to A: when necessary. The A?B command shows the host name associated with each host prefix in case you become confused.
Client FTP command host prefixes can be required, not allowed, ignored, or optional.
This section describes the Client FTP commands. Table 4-1 gives a brief description of each command and its function. The remainder of this chapter provides detailed descriptions of the commands.
| Command | Function | Host Prefix Requirement |
|---|---|---|
| ? | Get help on all commands or one command | Ignored |
| ABOR | Abort transfer data | Optional |
| ADD | Append a file from host A to a file at host B | Not allowed |
| ALLO | Set file size | Required |
| BYE | Terminate program (same as QUIT) | Required |
| CDUP | Change to parent of current working directory | Required |
| CONN | Control connection between Client FTP program and a Server FTP | Optional |
| CWD | Change current directory | Required |
| DELE | Delete a file on the remote host | Required |
| DO | Execute TSO command | Ignored |
| END | Terminate program | Not allowed |
| EXPE | Toggle experimental mode for directory commands | Ignored |
| GET | Copy file from remote host to local host (same as RECV) | Not allowed |
| HELP | Ask local host for command information | Optional |
| LIST | Provide current information for files in a specified path name | Not allowed |
| LOG | Login user | Required |
| MKD | Make a directory | Required |
| MODE | Set transmission mode | Optional |
| NLST | List filenames in specified directory | Not allowed |
| PUT | Copy file from local host to remote host (same as SEND) | Not allowed |
| PWD | Show name of current working directory (on the remote host) | Required |
| QUIT | Terminate program (same as BYE) | Optional |
| QUOT | Send an FTP command to the remote Server | Required |
| REN | Rename file from old name to new name (on the remote host) | Required |
| REST | Restart | Required |
| RMD | Send an FTP command to the remote Server | Required |
| SEND | Copy file from local host to remote host (same as PUT) | Not allowed |
| SITE | Send local host-dependent information | Required |
| SNDS | Re-send last SITE command to local host | Required |
| STAT | Ask local host for status | Optional |
| STRU | Set file structure | Optional |
| TYPE | Set data type | Optional |
| A=B | Switch host prefixes associated with each Server FTP connection | Ignored |
| A?B | Show current connections associated with the A and B host prefixes from the Client FTP program | Ignored |
The ? command obtains information about using the Client FTP program.
? [command_name]| command_name | Command for which information is requested. |
If no arguments are specified, a list of Client FTP commands is displayed.
Each command name is preceded by a special character that indicates the requirement for host prefixing for that particular command. A key is provided in the display to explain the prefix requirement indicated by each special character.
If a command name is specified as an argument on the ? command, a line of information appears, showing
the command syntax
a short description of the command function
host prefix requirements for that command
The ? command ignores a host prefix.
The following example shows a request for information about using the log command.
? log
LOG <USERID> <CURRENT_PASSWORD> </NEW_PASSWORD> - LOGIN USER
(PREFIX REQUIRED).
| ../../../../../../lib/help.htm | Requests help from a server FTP program. (By contrast, the ? command requests help from the Client FTP) |
The ABOR command instructs the Server FTP to abort the previous command and any associated transfer of data. No action is taken by the Server FTP if the previous command has been completed (including data transfer). The control connection to the Server FTP is not closed, but the data connection is closed.
ABORThis command has no arguments or keywords.
If no prefix is given, the ABOR request is directed to both Server FTPs.
A host prefix is optional with the ABOR command. If a host prefix is specified, the ABOR request is directed only to the specified Server FTP.
PUT 'scm.p015235.dump' tempdumpA:150-Data set open with attributes: A:Type A N Tabs 8 Stru F Mode S Path SCM.P015235.DUMP A:Volser SYSPK1 Unit SYSALLDA Dsorg PS Recfm VB Lrecl 138 A:Blksize 23476 Rlse A:150 B:150 ASCII data connection for tempdump (138.42.224.15,4127).ABORB:552 tempdump: Connection reset by peer.A:426-Data transfer aborted A: 57344 bytes sent in 13.3 seconds (4295 bytes/s) Path SCM.P015235.DUMP A:User MYID Data bytes sent 66334 A:Disk tracks read 1 A:426 B:225 ABOR command successful. A:226 Abort command completed.
The ADD command requests that a file from host A be appended to a file at host B. The file retrieved is always at host A and the target file is always at host B. You might need to use the A=B command to switch host prefixes so that the correct host is associated with the correct host prefix. See the section on A=B for details about the A=B command. See also the PUT Example and GET Example sections for examples of how the A=B command is used.
ADD [path_name_a] [path_name_b]| path_name_a | File name of the file to be retrieved from host A. |
| path_name_b | File name on host B to which that file from host A is to be appended. |
If either file name is omitted, you are prompted for the file name.
The syntax for each path name depends on the associated Server FTP.
A host prefix is not allowed with the ADD command.
ADD n.d tempdump
A:150-Data set open with attributes:
A:Type A N Tabs 8 Stru F Mode S Path MYID.N.D
A:Volser COLPK1 Unit SYSALLDA Dsorg PS Recfm FB Lrecl 80
A:Blksize 3120 Rlse
A:150
B:150 ASCII data connection for tempdump (138.42.224.15,4128).
A:226-Transfer Complete
A: 3439 bytes sent in 2.49 seconds (1381 bytes/s) Path MYID.N.D
A:User MYID Data bytes sent 6480
A:Disk tracks read 1
A:226
B:226 ASCII Transfer complete.
The ALLO (allocate) command provides a file size to those Server FTPs that require it. Refer to the documentation for your particular Server FTP to see if you need this command. The Cisco IOS for S/390 Server FTP does not require use of the ALLO command; it can be used optionally to cause records to be truncated or to allocate space.
ALLO integer1 [R integer2]| integer1 | Number of logical bytes of storage to be reserved for the file. |
| R integer2 | Optional; specifies the maximum record or page size. |
For files sent with record or page structure, a maximum record or page size (in logical bytes) can be required. This is indicated by the second integer argument.
The integer2 argument is optional, but if it is specified, it must be separated from the first by the three characters, " R " (space R space).
A host prefix is required with the ALLO command.
In the following example, the ALLO command truncates records to a length of 60 bytes during a file transfer between two Cisco IOS for S/390 systems.
STRU Rb:site lrecl(60) blk(6000) b:allo 12000 r 60PUTn.d allor.data A:150-Data set open with attributes: A:Type A N Tabs 8 Stru R Mode S Path MYID.N.D A: Volser COLPK1 Unit SYSALLDA Dsorg PS Recfm FB A: Lrecl 80 Blksize 3120 Rlse A:150 B:150-Data set open with attributes: B:Type A N Tabs 8 Stru R Mode S Recall 5 B:Path MYID.ALLOR.DATA B:Volser HAGCAT Unit SYSALLDA Dsorg PS Recfm FB B:Lrecl 60 Blksize 6000 Space 2 1 Tracks Rlse Maxr 60 B:150 A:226-Transfer Complete A: 3441 bytes sent in 0.32 seconds (10753 bytes/s) Path MYID.N.D A:User MYID Data bytes sent 6480 A:Disk tracks read 1 A:226 B:226-Transfer Complete B: 3441 bytes received in 0.44 seconds (7820 bytes/s) B:Path MYID.ALLOR.DATA User MYID Data bytes received 3277 B:Disk tracks written 1 Records truncated 21 B:Records padded 80 Records folded 20 B:226
The BYE command is the same as the QUIT command. Read QUIT for details on the BYE and QUIT commands.
BYEThis command has no arguments or keywords.
A host prefix is required with the BYE command.
A:BYE
A:221 Goodbye.
| END | Can be used instead of BYE; END does not require a host prefix. |
| QUIT | Can be used instead of BYE; QUIT requires a host prefix and takes no arguments. |
The CDUP command directs a Server FTP to change the current directory to the parent directory of the old current directory. The CDUP command is most useful when the Server FTP manipulates a hierarchical file system such as UNIX.
CDUPThis command has no arguments or keywords.
A host prefix is required with the CDUP command.
In the following example, a UNIX Server FTP in session with the Client FTP program has /u/user1/work as the current directory. If a CDUP command is issued by the Client FTP to that UNIX Server FTP, the resulting current directory is the parent of the old current directory (/u/user1).
B:CDUP
B:250 CWD command successful.
The CONN command sets up one control connection between the Client FTP program and a Server FTP. Since the Cisco IOS for S/390 Client FTP uses the third-party model, two such connections must be established, one to each Server FTP that participates in the file transfer. If the same Server FTP is used as both Server FTPs, two CONN commands are required. Since the CONN command sets up the control connections to the Server FTPs, issue the CONN commands first when using the Client FTP program.
CONN [hostname]| CONN | Command used to establish connections between client programs and Server FTP. |
| hostname | Provides the host name to which one FTP control connection is established. If you omit the host name, you are prompted to provide one. |
If the host prefix is omitted, the first available unused host prefix is assigned to that connection.
Host name strings must correspond to the syntax specified in Using Host Name Strings in Introduction to Cisco IOS for S/390.
A host prefix is optional with the CONN command. If a host prefix is specified, the connection is assigned to that host prefix.
CONN 10.1.1.99A:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter command or HELPCONN unixB:220 unix FTP server (SunOS 4.1) ready.
The CWD command requests that a Server FTP change the current directory being maintained for you by the Server to a new directory.
CWD [path_name ]| path_name | Indicates to the Server FTP the name of the directory to be made the current directory. |
If you omit path_name, the Client FTP program prompts for one.
The syntax for path_name depends on the associated Server FTP.
A host prefix is required with the CWD command.
In the following example, a UNIX Server FTP in session with the Client FTP program has /u/user1/work as the current directory. If a CWD junk command is issued by the Client FTP to that UNIX Server FTP, the resulting current directory is the junk subdirectory of the old current directory (/u/user1/work/junk). The same result is achieved by specifying CWD /u/user1/work/junk.
B:CWD /u/myid/acces
B:250 CWD command successful.
The DELE (delete) command directs a Server FTP to delete the specified file.
DELE [path_name]| path_name | Specifies the specific file to delete. |
If you omit path_name, you are prompted to provide one.
The syntax for path_name depends on the associated Server FTP.
A host prefix is required with the DELE command.
A:DELE t1.data
A:250 Deleted OK.
The DO (do TSO) command requests the Client FTP program to execute a TSO command for you.
DO tso_command parameters| tso_command | TSO command followed by any parameters to be passed to the TSO command. |
The DO command is handled by the Client FTP program.
A host prefix is not necessary and is ignored if included with the command.
A:DO listc l(myid)
IN CATALOG:CATALOG.MVSICF1.VMVSTSO
MYID.ACCES.ASM
MYID.LIB.LOAD
MYID.T.D
MYID.VBIG.D
MYID.VB.D.
The END command terminates the Client FTP program. This is typically the last command you enter. Any open control connections are closed before the program terminates.
ENDThis command has no arguments or keywords.
Any host prefix is ignored.
You can use the BYE and QUIT commands interchangeably with END. Both BYE and QUIT require a host prefix; END does not.
| BYE | Can be used instead of END; BYE requires a host prefix. |
| QUIT | Can be used instead of BYE; QUIT requires a host prefix and takes no arguments. |
The EXPE command toggles the use of experimental or regular directory commands. Since there is no consistent support for this command, it is recommended that you not use this command.
No operands are associated with the EXPE command, since it is a Client FTP command.
Any host prefix is ignored.
Table 4-2 shows the FTP command that is sent over the control connection for each directory command with an EXPE setting:
| Client FTP Command | Regular | Experimental |
|---|---|---|
| MKD | MKD | XMKD |
| RMD | RMD | XRMD |
| PWD | PWD | XPWD |
| CDUP | CDUP | XCUP |
The GET command requests that a file from host B be copied to a file on host A by the appropriate Server FTPs. The file to be retrieved is always at host B, and the file to be copied to is always at host A. You might need to use the A=B command to switch host prefixes to get the correct host. An alternative to switching host prefixes is to use the PUT command; read the PUT section.
GET [path_name_b] [path_name_a]| path_name_b | File name to be retrieved from host B. |
| path_name_a | File name at host A into which the file from host B is to be copied. |
If you omit either path name, you are prompted for one.
The syntax for each path name depends on the associated Server FTP.
A host prefix is not allowed with the GET command.
GET jclbr14 cntl(newbr14)
A:150-Data set open with attributes:
A:Type A N Tabs 8 Stru F Mode S Recall 5
A:Path MYID.CNTL(NEWBR14)
A:Volser COLPK1 Unit SYSALLDA Dsorg PS Recfm FB
A:Lrecl 80 Blksize 3120 Space 31 15 Tracks Rlse Dir 5
A:150
B:150 ASCII data connection for jclbr14 (138.42.128.13,4106) (810 bytes).
A:226-Transfer Complete
A: 820 bytes received in 3.24 seconds (253 bytes/s)
A:Path MYID.CNTL(NEWBR14) User MYID Data bytes received 800
A:Disk tracks written 1
A:226
B:226 ASCII Transfer complete.
The HELP command requests help information from one or both of the Server FTPs.
HELP [text]| text | Any command for which more information or usage guidelines are needed. |
If no host prefix is given, help is requested from each host with an open control connection.
HELP has no required arguments.
Any operands specified on the HELP command are passed to Server FTP unchanged and are interpreted by Server FTP. Different Server FTPs may interpret these operands differently.
A host prefix is optional with the HELP command. If a host prefix is specified, help information is requested only from that host.
A:HELP REST
--- HELP ---
*** HELP REST ***
FTPREST (Restart) Command:
Function: Specifies that the data transfer command which follows
(immediately) is to restart at a specified intermediate
point in the file.
Syntax: REST <marker>
Notes:
(1) After a REST command, STOR and APPE have identical meanings.
(2) Data transfer must be MODE B (block).
(3) A file RETRieved will normally include restart
markers approximately every 32767 bytes. The REST
parameter on the SITE command allows you to change
this interval or even entirely suppress restart markers.
See HELP SITE. The actual decision to send a marker
depends on a count of data bytes read from the disk
not including OS count/control bytes). When this count
reaches the limit, the marker is sent at the next end
of a complete logical record, segment of a spanned record
(if RECFM includes VS), or a physical disk block (if
RECFM is U, V, or F).
(4) FTP can accept (and send) restart markers in either
STRU F or STRU R.
(5) FTP restart markers consist of 10 characters, which
are the hex representation of five 8-bit bytes: TTRBB.
Here "TTR" forms a standard OS disk block address, and
BB is a byte offset within the block.
214 <end of HELP>
| ? command | Requests help from the Client FTP program. |
The LIST command requests a Server FTP to provide current information for files corresponding to a specified path name. This contrasts to the NLST command that provides only a list of file names without any other file information.
LIST [path_name_a] [path_name_b]| path_name_a | Path name to be listed from host A. |
| path_name_b | File name at host B into which the list from host is copied. |
If you omit either path name, you are prompted to provide one.
If the path name specifies a directory or other group of files, the Server FTP transfers current information for a list of files.
If the path name specifies a single file, the Server FTP transfers current information on that file.
The syntax for each path name depends on the associated Server FTP.
A host prefix is not allowed with the LIST command.
LIST acces ibmcatent
A:125 Transfer started
B:150 ASCII data connection for ibmcatent (138.42.128.13,4107).
A:226-Transfer Complete
A: 432 bytres sent in 1.03 seconds (419 bytes/s) Path MYID.ACCES
A:User MYID Data bytes sent 420
A:226
B:226 ASCII Transfer complete.
The LOG (login) command identifies the user by sending a user ID and password to a Server FTP.
You may change your password when logging into the Cisco IOS for S/390 server. You typically issue the LOG command immediately following the CONN command.
LOG [userid] [current_password] / [new_password]| userid | User name. |
| current_password | User's current password. |
| new_password | New password to be applied to the account. |
If you omit either the userid or current_password, the Client FTP program prompts you for them.
The /new_password parameter is a 1 to 8 character string password. The new password replaces the current password after the user ID and current password are validated. The new password option is valid only when in a session with a Cisco IOS for S/390 server. The slash (/) must follow the current password without any intervening blanks. The new password must follow the slash without any intervening blanks.
If the Server FTP requires additional accounting information during the user identification process, the Client FTP program prompts you to enter the accounting data.
A host prefix is required with the LOG command.
B:LOG myid
331 Enter PASS command
Password:
In the following example, user USER01 changes his current password from CJAY to MACDUFF:
A:LOG user01 cjay/macduff
230 User USER01 logged in.
The MKD (make directory) command directs a Server FTP to create the specified directory. The exact FTP command sent to the Server FTP program depends on the setting of the EXPE variable. For details regarding the EXPE variable, see the EXPE.section
MKD [path_name]| path_name | Directory to be created. |
If you omit path_name, you are prompted for it.
If the path name is relative, the specified subdirectory is created in the current working directory.
If the path name is absolute, the specified directory is created.
The syntax for path_name depends on the associated Server FTP.
A host prefix is required with the MKD command.
For an example of MKD operation, consider this case:
The current directory for a session between a UNIX Server FTP and a Client FTP program is /u/user1/work. If a MKD junk command is issued by the Client FTP to that UNIX Server FTP, the subdirectory junk is created as a subdirectory in the current directory (/u/user1/work/junk).
The same result can be achieved by specifying MKD /u/user1/work/junk.
B:MKD /u/myid/sampdir
B:257 MKD command successful.
The MODE command sets one of three transmission modes:
Block mode formats the data and allows for restart procedures.
Compressed mode compresses the data for efficient transfer.
Stream mode passes the data with little or no processing. It interacts with the structure attribute to determine the type of processing. Stream mode is the default if no MODE command was used.
The sending host translates its internal end-of-line or end-of-record representation into the representation required by the transfer mode and file structure; the receiving host performs the inverse translation to its internal representation. Because these transformations make extra work for some systems, identical systems transferring non-record structured text files might use binary representation and stream mode to simplify transfer.
MODE S | B | C| MODE | Directory to be created. |
| S | Stream mode. |
| B | Block mode. |
| C | Compress mode. |
If the prefix is omitted, the MODE command is directed to each Server FTP with an open connection.
One of the three codes is required as an argument on the MODE command.
A host prefix is optional with the MODE command. If a host prefix is specified, the MODE command is directed only to that Server FTP
Each of the possible transmission modes is discussed in the following sections. For a detailed description of the effect of various transmission modes, read the "Transmission Modes" section in RFC 959, File Transfer Protocol.
Not all Server FTPs support all transmission modes; review the documentation for the target Server FTP if you have questions concerning transmission mode support.
Set block mode with the character B. In block mode, the file is transmitted as a series of data blocks preceded by one or more header bytes. Record structures are allowed in this mode, and any representation type can be used. Restart markers are embedded in the data stream.
Set compressed mode with the character C. In compressed mode, filler bytes (space characters in ASCII or EBCDIC) and replicated data bytes are compressed when transmitted over the data connection. Compressed mode can increase bandwidth on very large network transmissions at little extra CPU cost. Additionally, compressed mode reduces the size of printer files.
Set the structure with the STRU command. In compressed mode, the representation type determines the filler byte. Set this with the TYPE command.
Set stream mode with the character S. This is the default if no MODE command has been used. In stream mode, the data is transmitted as a stream of bytes. There are no restrictions on the representation type used, and record structures are allowed. In a record structured file, End of Record (EOR) and End of File (EOF) are each indicated by a two-byte control code included with the data sent over the data connection. If the structure is a file structure, the EOF is indicated by the sending host closing the data connection, and all bytes sent over the data connection are data bytes.
The NLST command directs a Server FTP to provide a list of file names in a specified directory or file group. That is, the Server FTP returns a list of file names with no additional information. This contrasts to the LIST command, which provides the file names and other current information about the files.
NLST [path_name_a] [path_name_b]| path_name_a | Path name to be listed from host A. |
| path_name_b | File name at host B into which the name list from host A is copied. |
If you omit either path name, you are prompted for it.
If the path name specifies a directory or other group of files, the Server FTP transfers a corresponding list of file names.
If the path name specifies a single file, the Server FTP transfers the file name of that file.
The syntax of each path name depends on the associated Server FTP.
A host prefix is not allowed with the NLST command.
NLST acces ibmcatent2
A:125 Transfer Started
B:150 ASCII data connection for ibmcatent2 (138.42.224.15,4137).
B:226 Transfer complete.
A:226-Transfer Complete
A: 70 bytes sent in 0.54 seconds (129 bytes/s) Path MYID.ACCES
A:User MYID
A:Data bytes sent 58
A:226
The PUT command requests that the appropriate Server FTP copy a file from host A to a file on host B. The file to be copied is always at host A and the file destination is always at host B. You might need to use the A=B command to switch host prefixes and associate the correct host with the correct host prefix.
PUT [path_name_a] [path_name_b]| path_name_a | Name of the file to be copied from host A. |
| path_name_b | File name at host B into which the file from host A is copied. |
If you omit either path name, you are prompted for the file name.
The syntax for each path name depends on the associated Server FTP.
A host prefix is not allowed with the PUT or SEND commands.
PUT n.d put_example
A:150-Data set open with attributes:
A:Type A N Tabs 8 STRU F Mode S Path MYID.N.D
A:Volser COLPK1 Unit SYSALLDA Dsorg PS Recfm FB
A:Lrecl 80 Blksize 3120 Rlse
A:150
B:150 ASCII data connection for put_example (138.42.224.15,4138).
A:226-Transfer Complete
A: 3439 bytes sent in 2.12 seconds (1622 bytes/s) Path MYID.N.D
A:User MYID Data bytes sent 6480
A:Disk tracks read 1
A:226
B:226 ASCII Transfer complete.
| GET | An alternative to switching host prefixes; read GET for details |
| SEND | Can be used in place of PUT. There are no differences between PUT and SEND. |
The PWD command directs a Server FTP to return the path name of the current working directory.
PWDThis command has no arguments or keywords.
A host prefix is required.
B:PWD
B:257 "/u/myid" is current directory.
The QUIT command disconnects you from a host. It logs you out and terminates the connection between you and the Server FTPs. The BYE command is a synonym for the QUIT command. The QUIT command is the opposite of the CONN command.
QUITThis command has no arguments or keywords.
The QUIT command requires a prefix.
A:QUIT
A:221 Session Terminated.
| BYE | Can be used instead of QUIT. BYE works exactly as the QUIT command. |
| END | Can be used instead of QUIT; END does not require a host prefix. |
The QUOT (quote) command sends an uninterpreted, unaltered character string to the Server FTP over the control connection. This mechanism sends FTP commands to the Server that the Client FTP program might not be able to send.
QUOT [text]| text | Sent to the Server over the control connection exactly as you enter it. |
If the text is omitted, you are prompted to enter it.
A host prefix is required with the QUOT command.
A:QUOT site norlse
The REN (rename) command directs a Server FTP to rename a file.
REN [old_path_name] [new_path_name]| old_path_name | File name to be renamed. |
| new_path_name | New name to be assigned to that file. |
If you omit either argument, you are prompted to enter it.
The syntax of the path names depends on the associated Server FTP.
A host prefix is required with the REN command.
A:REN t2.data rename.data
A:350 Requested file action pending further information
A:250 Renamed OK
The REST (restart) command shows the Server FTP the restart marker where a file transfer is to be restarted.
This command does not cause a file transfer but instead causes the Server FTP to skip over the file to the specified data checkpoint. This command should be followed immediately by the Client FTP command that causes the file transfer to resume.
| marker | Server FTP marker point where the file transfer is to be restarted. |
The marker is required in the restart command.
The format of the restart marker is determined by the sending Server FTP and should be entered exactly as displayed during the interrupted file transfer.
A host prefix is required with the REST command.
The following is a restart marker message received by a user during a file transfer:
B:110 MARK 0100220040D82 = 0100220211C3
To restart the file transfer at the restart markers, issue the following commands to receive the following output:
TYPE iMODE ba:rest 010020040d82 b:rest 0100220211c3 a:site rest(100000) put 'scm.p016572.t01tcp' psr16572.job A:350 Requested file action pending further information B:350 Requested file action pending further information B:150-Data set open with attributes: B:Type I N Stru F Mode B Recall 5 Path MYID.PSR16572.JOB B:Volser HAGCAT Unit SYSALLDA Dsorg PS Recfm FB Lrecl 133 B:Blksize 6650 Space 3 1 Cyl Rlse Restart at 0100220211C3 B:150 A:Type I N Stru F Mode B Path SCM.P016572.T01TCP A:Volser HAGCAT Unit SYSALLDA Dsorg PS Recfm FB Lrecl 133 A:Blksize 6650 Rlse Bytes/Restart 100000 Restart at 010020040D82 A:150 A:226-Transfer Complete A: 326284 bytes sent in 3.39 seconds (96248 bytes/s) A:Path SCM.P016572.T01TCP User MYID Data bytes sent 318934 A:Disk tracks read 9 Restart markers sent 3 A:226 B:110 MARK 010023010E8C = 010024060D3F B:110 MARK 010025040F96 = 0100270408BB B:110 MARK 0100280110A0 = 01002A02043B B:226-Transfer complete B: 326284 bytes received in 3.40 seconds (95965 bytes/s) B:Path MYID.PSR16572.JOB User MYID Data bytes received 318934 B:Disk tracks written 9 Records folded 2472 B:Restart markers received 3 B:226
The RMD (remove directory) command directs a Server FTP to remove the specified directory.
RMD [path_name]| path_name | Directory to be removed. |
If you omit path_name, you are prompted for it.
Usage Guidelines
If the path name is relative, the specified subdirectory is removed from the current working directory. If the path name is absolute, the directory is removed.
The syntax of path_name depends on the associated Server FTP.
A host prefix is required with the RMD command. Many systems require the directory to be empty before it can be removed.
A UNIX Server FTP in session with the Client FTP program has /u/user1/work as the current directory. If an RMD junk command is issued by the Client FTP to that UNIX Server FTP, the junk subdirectory (/u/user1/work/junk) of the current directory is removed. The same result is achieved by specifying RMD /u/user1/work/junk.
B:RMD /u/myid/sampdir
B:250 RMD command successful.
The SEND command is the same as the PUT command.
SEND [path_name_a] [path_name_b]| path_name_a | File name of the file to be copied from host A. |
| path_name_a | File name at host B into which the file from host A is copied. |
If you omit either path name, you are prompted for the file name.
The syntax for each path name depends on the associated Server FTP.
A host prefix is not allowed with the PUT or SEND commands.
SEND n.d send_example
A:150-Data set open with attributes:
A:Type A N Tabs 8 Stru F Mode S Path MYID.N.D
A:Volser COLPK1 Unit SYSALLDA Dsorg PS Recfm FB Lrecl 80
A:BLKSIZE 3120 Rlse
A:150
B:150 ASCII data connection for send_example (138.42.224.15,4148).
B:226 ASCII Transfer complete.
A:226-Transfer Complete
A: 3439 bytes sent in 4.66 seconds (737 bytes/s) Path MYID.N.D
A:User MYID Data bytes sent 6480
A:Disk tracks read 1
A:226
| GET | An alternative to switching host prefixes; read GET |
| PUT | Can be used in place of SEND. There are no differences between SEND and PUT. |
The SITE (site parameters) command provides the Server FTP with specific information it requires. This information is essential to file transfers involving that Server FTP, but is not sufficiently universal to have been included specifically in the FTP. Typically, you use a HELP SITE Client FTP command to find the SITE requirements for a specific Server FTP. Otherwise, review the Server FTP documentation for the SITE requirements.
SITE text| text | Passed through unchanged to the specified server. |
Text is required in the SITE command syntax.
A host prefix is required with the SITE command.
Detailed documentation of this command is in the SITE section in Server FTP.
A:SITE vol(mvsts2)
The SNDS (re-send SITE parameters) command directs the Client FTP program to re-send the last SITE command to the specified Server FTP. Your SITE command is reissued without your having to retype it. Since most Server FTPs require that new site parameters be provided before each data transfer, the SNDS saves time if identical site parameters are to be used repeatedly.
SNDSThis command has no arguments or keywords.
A host prefix is required with the SNDS command.
A:SNDSsite vol(mvsts2) <SENT
The STAT (status) command requests a status response from a specified server.
STAT [path_name]| path_name | Optional; specifies path to server. |
If no path name is given, the indicated Server FTP sends status information relative to parameters and connection status.
When STAT is issued between data transfer operations, the path name argument can be given. When it is given, the command works the same as the LIST command: It displays current information about the referenced files.
When using the STAT command, the information is transferred over the control connection instead of the data connection.
The syntax of path_name depends on the associated Server FTP(s).
A host prefix is optional with the STAT command
If a host prefix is specified, the STAT command is sent only to the specified host.
If the prefix is omitted, the STAT command is sent to both hosts that have open connections.
The Cisco IOS for S/390 Server FTP program implements some additional parameters on the STAT command. Use a HELP STAT Client FTP command to find additional parameters.
In the following example, the status for the A host is requested.
A:STAT *A:211--- STATUS --- A: -- FTP Parameters -- A:Remote DT Host, Port 138.42.32.160, 0 A:Local DT Host, Port 138.42.224.15, 0 A:Type A N Tabs 8 Stru F Mode S Recall 5 Server is passive A: -- END -- A: -- Control -- A:User MYID Acct Accs E0000200 Unit SYSALLDA Host 138.42.224.15 A: -- End Control -- A: -- Path Data -- A:RlseA: -- End Path Data -- A: -- Transfer Information -- A:Data Transfer not in progress Data bytes sent 6480 A:Disk tracks read 1 Network bytes sent 3439 Elapsed time 00.00.04 A:Bytes/Second 737 A: -- END -- A:211 <End of Status>.
The STRU (file structure) command provides information on file structure to a Server FTP.
STRU F | R| F | Specifies the file structure. File structure is used for files with no internal structure, and the file is considered to be a contiguous sequence of data bytes. |
| R | Specifies the record structure. This is for files made up of sequential records. Record structure is accepted for text files (such as, files with type ASCII or EBCDIC) by all FTP implementations. |
If no STRU command has been used, the default file structure is F.
If no host prefix is specified, the command goes to both Server FTPs.
One argument is required on the STRU command to set the file structure.
A host prefix is optional with the STRU command. When a host prefix is given, the STRU command goes only to the specified Server FTP.
The TYPE command tells a Server FTP the data type to use.
TYPE I | L byte_size | {A | E [N | T | C]}For both ASCII and EBCDIC file types, vertical format control N is the default.
ASCII is the default argument for the TYPE command.
Non-print format is the default.
One of the four arguments (I, L byte_size, A, or E) is required.
If local type (L) is set, the integer byte size argument must also be set.
If ASCII (A) or EBCDIC (E) type is set, one of the three vertical format control arguments, N, T, or C, also can be set.
The A=B (switch prefixes) command directs the Client FTP program to switch the host prefixes associated with each Server FTP connection. This command gets the correct host associated with the correct host prefix before issuing a data transfer command such as ADD, NLST, or LIST.
A=BThis command has no arguments or keywords.
The A=B command is directed to the Client FTP program and any host prefix is ignored.
The A host is an MVS system and the B host is a UNIX system. You want to obtain a name list of the current directory on the UNIX system. If you issue the Client FTP NLST command to obtain a name list, the NLST command obtains the name list from the A host and copies it to a file on the B host. Since the UNIX host is the B host, issue the A=B command to make the UNIX host the A host before issuing the NLST command.
The A?B (show connections) command displays the current connections associated with the A and B host prefixes from the Client FTP program.
A?BThis command has no arguments or keywords. The following output is produced by the A?B command:
HOST - A:host_name_a HOST - B:host_name_b
The host names displayed are the host names in the CONN commands. If a connection is not established for a host prefix, the response is NOT CONNECTED.
The A?B command goes to the Client FTP program.
A host prefix is not necessary with the A?B command and is ignored.
A?B
HOST - A:MVS
HOST - B:UNIX
If a file transfer is interrupted, it can be restarted. However, restart support requires that MODE B be specified.
Use the SITE REST(XXXXX) FTP command to tell a Cisco IOS for S/390 FTP Server how often to send a restart marker. Send a restart marker after the sending of the record that exceeds or equals XXXXX number of bytes (varying between 1 and 500,000). Send the SITE command only to the RETR side of a data transfer. Other FTP Servers may initiate sending restart markers in a different way from Cisco IOS for S/390.
A 110 message is written once per output block if a restart marker is sent somewhere in the data written for the block.
For example, suppose during a data transfer this restart mark message is sent:
B:110 MARK 0100030212C0 = 010003020FA0
You can restart the transfer at this point by sending the first number to the RETR side and the second number to the STOR. If you receive this restart mark message during an aborted data transfer, you can restart the transfer at these disk locations with these Client FTP REST commands:
to the RETR side:REST 0100030212C0to the STOR side:REST 010003020FA0
Cisco IOS for S/390 supports restart markers (set at default value of every 32767 data bytes) if these conditions exist:
This section provides some examples of file transfers. These examples illustrate use of the more frequently used commands and FTP features. They include:
These examples follow the conventions described here.
A:SITE VOL(MVSTSO)
In this FTP session, the PUT command transfers a file from host MVS host UNIX.
Cisco IOS for S/390 Rn Client FTP - Enter command or '?'
conn mvs
A:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter command or HELP
a:log myid
331 Enter PASS command
Password:
conn unix
B:220 unix FTP Server (SunOS 4.1) ready.
b:log myid
331 Enter PASS command
Password:
put cntl(iefbr14) jclbr14
A:150-Data set open with attributes:
A:Type A N Tabs 8 Stru F Mode S Path MYID.CNTL(IEFBR14)
A:Volser COLPK1 Unit SYSALLDA Dsorg PO Recfm FB Lrecl 80
A:Blksize 3120 Rlse
A:150
B:150 ASCII data connection for jclbr14 (138.42.224.15,4151).
A:226-Transfer complete
A: 820 bytes sent in 0.50 seconds (1640 bytes/s) Path MYID.CNTL(IEFBR14)
A:User MYID Data bytes sent 800
A:Disk tracks read 1
A:226
B:226 ASCII Transfer Complete
end
In the following FTP session, the GET command transfers a file from host unix to host MVS.
Cisco IOS for S/390 Rn Client FTP - Enter command or '?' conn mvs A:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter Command or HELP a:log myid 331 Enter PASS command Password: conn unix B:220 unix FTP server (SunOS 4.1) ready. b:log myid 331 Enter PASS command Password: get jclbr14 cntl(newbr14) A:150-Data set open with attributes: A:Type A N Tabs 8 Stru F Mode S Recall 5 A:Path MYID.CNTL(NEWBR14) A:Volser COLPK1 Unit SYSALLDA Dsorg PO Recfm FB Lrecl 80 A:Blksize 3120 Space 31 15 Tracks Rlse A:150 B:150 ASCII data connection for jclbr14 (138.42.224.15,4098) (810 bytes). A:226-Transfer Complete A: 820 bytes received in 3.36 seconds (244 bytes/s) A:Path MYID.CNTL(NEWBR14) User MYID Data bytes received 800 A:Disk tracks written 1 A:226 B:226 ASCII Transfer complete. end
The following is an example of an FTP file transfer from a data set on host unix to an MVS internal reader on host MVS.
Cisco IOS for S/390 Rn Client FTP - Enter command or '?' conn unix A:220 unix FTP server (SunOS 4.1) ready. a:log myid 331 Enter PASS command Password: conn mvs B:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter command or HELP b:log myid 331 Enter PASS command Password: b:site submit put jclbr14 anyname.data B:150-Data set open with attributes: B:Type A N Tabs 8 Stru F Mode S Intrdr Recfm FB Lrecl 80 B:Blksize 20000 B:150 A:150 ASCII data connection for jclbr14 (138.42.224.15,20) (810 bytes). A:226 ASCII Transfer complete. B:226-Transfer complete B: 820 bytes received in 0.30 seconds (2733 bytes/s) User MYID B:Data bytes received 800 B:226 end
This is an example of a restart file transfer.
Cisco IOS for S/390 Rn Client FTP - Enter command or '?'
conn mvs
A:220 MVS.HQ.COMPANY.COM -- FTP Server, Enter Command or HELP
conn mvs2
B:220 MVS2.HQ.COMPANY.COM -- FTP Server, Enter Command or HELP
a:log myid
331 Enter PASS command
Password:
b:log myid
331 Enter PASS command
Password:
type i
mode b
a:site rest(100000)
b:site lrecl(133) recfm(vb) blksize(6650) space(3 1) CYL
put 'scm.p016572.t01tcp' psr16572.t01tcp
A:150-Data set open with attributes:
A:Type I N STru F Mode B Path SCM.P016572.T01TCP
A:Volser HAGCAT Unit SYSALLDA Dsorg PS Recfm FB Lrecl 133
A:Blksize 6650 Rlse Bytes/Restart 100000
A:150
B:150-Data set open with attributes:
B:Type I N Stru F Mode B Recall 5 Path MYID.PSR16572.T01TCP
B:Volser ICSPK3 Unit SYSALLDA Dsorg PS Recfm VB Lrecl 133
B:Blksize 6650 Space 3 1 Cyl Rlse
B:150
B:110 MARK 000204010A = 00020414F9
B:110 MARK 0005010214 = 0005021075
B:110 MARK 000704031E = 0007060BF1
B:110 MARK 000A010428 = 000A040771
B:110 MARK 000C040532 = 000D0202ED
B:110 MARK 000F01063C = 000F0517DE
B:110 MARK 0011040746 = 001203135E
B:110 MARK 0014010850 = 0015010EDA
B:110 MARK 001604095A = 0017050A56
B:110 MARK 0019010A64 = 001A0305D6
B:110 MARK 001B040B6E = 001D010152
B:110 MARK 001E010C78 = 001F041643
B:110 MARK 0020040D82 = 00220211C3
B:110 MARK 0023010E8C = 0024060D3F
B:110 MARK 0025040F96 = 00270408BB
B:110 MARK 00280110A0 = 002A02043B
A:226-Transfer Complete
A: 1656466 bytes sent in 52.1 seconds (31781 bytes/s)
A:Path SCM.P016572.T01TCP User MYID Data bytes sent 1619142
A:Dist tracks read 41 Restart markers sent 16
A:226
B:226-Transfer complete
B: 1656466 bytes received in 52.1 seconds (31775 bytes/s)
B:Path MYID.PSR16572.T01TCP User MYID Data bytes received 1619142
B:Disk tracks written 43 Records folded 12551
B:Restart markers received 16
B:226
end
These commands show how to manage directories on UNIX systems.
Cisco IOS for S/390 RnClient FTP - Enter command or '?' conn unix A:220 unix FTPserver (SunOS 4.1) ready. a:log demo ftptest a:pwd A:257 "/u/demo" is current directory. a:mkd tempdir A:257 MKD command successful. a:pwd A:257 "/u/demo" is current directory. a:cwd tempdir A:250 CWD command successful. a:pwd A:257 "/u/demo/tempdir" is current directory. a:cdup A:250 CWD command successful. a:pwd A:257 "/u/demo" is current directory. a:rmd tempdir A:250 RMD command successful. a:pwd A:257 "/u/demo" is current directory. end
|
|