() (****************************************************************) () (Copyright (c) 1992, Carnegie Mellon University) () (All Rights Reserved) () (Permission is hereby granted to use, copy, modify, and) (distribute this software provided that the above copyright) (notice appears in all copies and that any distribution be for) (noncommercial purposes.) () (Carnegie Mellon University disclaims all warranties with regard) (to this software. In no event shall Carnegie Mellon University) (be liable for any special, indirect, or consequential damages) (or any damages whatsoever resulting from loss of use, data, or) (profits arising out of or in connection with the use or) (performance of this software.) () (****************************************************************) () (This file processed with symbol generator: 27-MAY-1991 17:19:12.89.) (FTP\FTP_CHAPTER)

( "But the greatest Electrical Pioneer of them all was Thomas Edison, who was a brilliant inventor despite the fact that he had little formal education and lived in New Jersey. Edison's first major invention in 1877, was the phonograph, which could soon be found in thousands of American homes, where it basically sat until 1923, when the record was invented. But Edison's greatest achievement came in 1879, when he invented the electric company. Edison's design was a brilliant adaptation of the simple electrical circuit: the electric company sends electricity through a wire to a customer, then immediately gets the electricity back through another wire, then (this is the brilliant part) sends it right back to the customer again.

"This means that an electric company can sell a customer the same batch of electricity thousands of times a day and never get caught, since very few customers take the time to examine their electricity closely. In fact the last year any new electricity was generated in the United States was 1937; the electric companies have been merely re-selling it ever since, which is why they have so much free time to apply for rate increases."\ITALIC) (-- Dave Barry, "What is Electricity?"\BOLD) (Using FTP\\NEWPAGE) (FTP\\CMUIP_FTP_1) The FTP utility is used to transfer files between the local computer system and remote systems. (FTP) (host-name) (Command Qualifiers) (/CASE=value\/CASE=NORMAL) (/CONTROL_C=action\/CONTROL_C=NORMAL) (/ERROR=action\/ERROR=ABORT) (/[NO]HASH\/NOHASH) (/SEVERE=action\/SEVERE=ABORT) (/SEVERE=action\/WARNING=ABORT) (NONE) (NONE) (host-name)

Specifies the internet name of the host to wish you wish to exchange files with. An IP literal may be specified here in dotted-decimal form.

If an incomplete Domain Name System name is specified, the CMU-OpenVMS/IP domain name resolver will try to resolve the name by appending various suffixes to the end of the specified name. The system manager can choose which suffixes will be appended by modifying the NamRes.Config file.

The FTP utility is used to implement the File Transfer Protocol. This protocol is based on top of the IP and TCP protocols. The CMU-OpenVMS/IP software is used to implement these lower levels.

The File Transfer Protocol is the language spoken between the FTP utility and an FTP Server running on a remote machine. The local process is the master and the remote server is the slave.

Through a series of commands and replies the local FTP utility tries to send or receive files and other information.

Since the File Transfer Protocol is a negotiation language, not all requests that the FTP utility asks for can always be satisfied by the remote server. These requests that are unsatisfied will be signalled as errors to the FTP utility. (Command Qualifiers) (/CASE=value\ (CASE=)LOWER\ (CASE=)NORMAL (D)\ (CASE=)UPPER)

determines case folding of all command entered at the FTP command-line. (/CONTROL_C=action\ (CONTROL_C=)ABORT (D) [return to FTP> prompt]\ (CONTROL_C=)CONTINUE [ignore the event]\ (CONTROL_C=)EXIT [exit FTP])

Specifies what what action to take when the user types CONTROL-C. (/ERROR=action)

Specifies what what action to take when an error occures. Valid values for (action) are: (UNNUMBERED) (ABORT\BOLD): the FTP utility stops what it is doing and returns to the FTP> prompt. (CONTINUE\BOLD): the FTP utility ignores the event. (EXIT\BOLD): the FTP utility exits. (/[NO]HASH)

Sets (or clears) HASH for the FTP utility. If HASH is set, a hash character is displayed for each 1024 bytes of data shipped between the local host and remote host.

The default is /NOHASH. (/SEVERE=action)

Specifies what what action to take when a severe error occures. Valid values for (action) are: (UNNUMBERED) (ABORT\BOLD): the FTP utility stops what it is doing and returns to the FTP> prompt. (CONTINUE\BOLD): the FTP utility ignores the event. (EXIT\BOLD): the FTP utility exits. (/WARNING=action)

Specifies what what action to take when a FTP receives a warning. Valid values for (action) are: (UNNUMBERED) (ABORT\BOLD): the FTP utility stops what it is doing and returns to the FTP> prompt. (CONTINUE\BOLD): the FTP utility ignores the event. (EXIT\BOLD): the FTP utility exits.

To invoke the FTP utility from the CLI prompt, type FTP followed by a host name. Several examples of host name are SRI-NIC.ARPA, ATHENA.MIT.EDU and SPIFF.ANDREW.CMU.EDU. Say you wanted to get the latest CMU-OpenVMS/IP patches from the development machine at CMU. You could use FTP to retrieve them from NO1.ANDREW.CMU.EDU: ($) ( FTP NO1.ANDREW.CMU.EDU)

Here we attempt to connect to NO1. ($) ( FTP NO1.ANDREW.CMU.EDU) (%FTP-I-ATTEMPTING, Attempting to connect to host NO1.ANDREW.CMU.EDU) (220 Service ready for new user.) (FTP>)

If the FTP utility was able to connect to the remote host, you may see something like the above. ($) ( FTP HAL.CC.CMU.EDU) (%FTP-I-ATTEMPTING, Attempting to connect to host HAL.CC.CMU.EDU) (220 HAL.CC.CMU.EDU CMU-OpenVMS/IP FTP version V2.7-6 (26-jun-89) ready.) (FTP> )(user anonymous) (331 Guest login ok, send ident as password.) (Password: )([identify youself here]) (230 Guest login ok, access restrictions apply.) (FTP> )(dir) (200 Port 128,2,232,69,104,116 Okay.) (125 File status okay; about to open data connection.) (HAL$DUA1:[ANONYMOUS]AAA_README.TXT;7 5/8 24-AUG-1990 16:42) ([etc...]) (FTPanonymous)

The above is an example of an Anonymous FTP session. Instead of a password, send some form of identification (ie. user@node). (FTP Commands\CMUIP_FTP_2)

This chapter describes the commands available to FTP. To enter these commands invoke the FTP utility and enter the commands at the prompt FTP>. If you did not specify a host name on the command line to FTP, you will obtain the prompt "FTP Awaiting Host>". In this case not all of the commands covered in this chapter are available. The command format should be familiar to all users of VMS. (File and Directory naming conventions\CMUIP_FTP_3) (FTPfilenames)

Provided with VMS is a set of routines called CLI. These routines are used by FTP to parse the commands using information from a command table. These routines are used by many other VMS utilities such as MAIL, INSTALL, SYSGEN, PATCH, SHOW CLUSTER and others. Their general flavor and feel is very much a part of VMS. They are well tested, and hopefully well debugged. Some of the things to be aware of with these routines are: (UNNUMBERED) The case of the arguments, unless quoted, is sometimes lost. This has been fixed in version 2.8 of FTP (CMU-Tek release 6.5) but be on guard for instances where case may be getting folded. The format for switches is to start them with a "/". On some operating systems, a "/" is also used for file names. If you wish to specifiy a file name with a "/" in it, the file name must be quoted. (File Transfer Parameters\CMUIP_FTP_4) (FTPfile transfer parameters)

The view of file information by the FTP protocol is that all possible file information is contained in the contents of the data inside the file. The file system on VMS, Record Management System (RMS), has a different view. There is not only the contents of the file, but also information about: (UNNUMBERED) Whether records can be accessed arbitrarily. These are known as indexed and relative files. How we might want to access those records. What parts of the record constitute the key. Whether the records share common characteristics (length). The record characteristics. And How the data is to appear when printed. The Carriage Control record attribute.

There are several parameters that are negotiated between the local FTP utility and the remote server. They are Type, Mode and Structure. We use these parameters to help specify some of the above file information that is outside the contents of the data. (The Commands\CMUIP_FTP_5) (FTP Commands\\NEWPAGE) (ACCOUNT_COMMAND) (ACCOUNT\\CMUIP_FTP_6) Send an account string to the remote server. (ACCOUNT) (New_Account) (NONE) (New_Account) Specifies the name of an account on the remote system to which remote usage should be charged.

The Account command requests the remote FTP server to change the account in use at the remote system. It may be necessary to first login to remote system before the Account command can be issued.

The FTP server for VMS does not need or use an Account. Many FTP servers on Unix machines do not implement the account command.

The ACCOUNT command behaves the same as the SET ACCOUNT command. (FTP> )(account unknown) (530 Account not valid.) (%FTP-E-NOT_LOGGED_IN, Not logged In.) (FTP> )(account systems) (230 Account OK.) (FTP> ) This example tries first to set the account to UNKNOWN then to SYSTEMS. (APPEND\\CMUIP_FTP_7) (FTP commandsAPPEND) Adds the specified local file to a remote file if the remote file exists, or creates it if there is no such remote file. (APPEND) (local-file, [remote-file]) (Command Qualifiers) (/[NO]HASH\/NOHASH) (/MODE=mode\/MODE=STREAM) (/STRUCTURE=Structure\//STRUCTURE=DEFAULT) (/TYPE=Type\/TYPE=ASCII) (local-file) Specifies a file, on the local file system, which we want to append to the the end of the remote file. ([remote-file]) Specifies a file, on the remote file system, to which the local file should be appended. If no remote file is specified, a remote file with the same name as the local file will be created.

If the remote-file is specified, the local-file is appended to it if it exists, or created if it doesn't. If no remote file is specified, the same name as the local file is used as the remote-file spec. (Command Qualifiers) (/[NO]HASH)

Temporarily change the Hash setting to ON (or OFF).

When Hash is turned on, as the file data is transfered from one machine to another, a hash mark is displayed for each 1024 characters of data that is transfered.

The default is to not display anything as the data is being transfered. This default can be changed with the FTP command SET HASH ON. (/MODE=Mode)

/MODE=BLOCK (Currently Unsupported)

/MODE=COMPRESSED (Currently Unsupported)

/MODE=STREAM (Default)

Attempts to negotiate a different data transfer mode. Currently only STREAM MODE is supported. (/STRUCTURE=Structure) Attempts to negotiate a different file structure before the file contents are transfered.

Valid values for (Structure) are FILE, PAGE, VMS. The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system. (/TYPE=Type) Attempts to negotiate a new data type before the file data is transferred. Valid values for (Type) are ASCII, IMAGE, and EBCDIC. Currently only ASCII and IMAGE are supported by the FTP utility. The default is /TYPE=ASCII.

If the data type is ASCII the file is stored on VMS as a sequential file with variable length record format and carriage return carriage control for record attribute.

If the data type is IMAGE the file is stored on VMS as a sequential file with fixed length 512 byte records and no record attributes. (FTP> ) (append login.com read.me) (200 Port 24.44 at host 128.2.250.227 accepted.) (150 ASCII Append to (MOORE)READ.ME.1;P775252;ASYSTEMS started.) (226 Transfer completed. 1301 (8) bytes transferred.) (%FTP-I-DATA_RATE, Transfered 1301 bytes in 00:00:06.72 = 193 bytes/Second) (FTP>) In this example, the local file LOGIN.COM, is appended to a file on a TOPS-20 system called (MOORE)READ.ME.1. (CD\Change Directory\CMUIP_FTP_8) (FTP commandsCD) Change the remote default path or current directory. (CD) (directory) (NONE) (directory) Specifies the remote file system directory to which future command should be directed. This command behaves exactly the same as the FTP command SET REMOTE (directory)

For more information, hints and examples please see the documentation on the FTP command SET REMOTE. (CLOSE\Close the connect\CMUIP_FTP_9) (FTP commandsCLOSE) This command will cause the current connection to the remote host to be closed. The FTP utility will however not EXIT. (CLOSE) () (NONE) (NONE) ($ )(ftp vega.fac) (%FTP-I-ATTEMPTING, Attempting to connect to host VEGA.FAC) (220 VEGA.FAC.CS.CMU.EDU FTP server) (FTP> )(set case lower) (FTP> )(user moore) (331 Password required for moore.) (Password: ) (230 User moore logged in.) (FTP> )(show host) (Connection open to VEGA.FAC.CS.CMU.EDU) (FTP> close) (221 Goodbye.) (%FTP-I-CLOSING, Connection Closing) (-IPACP-E-CCAN, Connection cancelled by process abort) (FTP Awaiting Host> )(set host b.gp) (%FTP-I-ATTEMPTING, Attempting to connect to host b.gp) (220 B.GP.CS.CMU.EDU FTP server (Version 4.106 of 30-Aug-87 18:37) ready.) (FTP> )(show host) (Connection open to B.GP.CS.CMU.EDU) (FTP>) In the example below we are first connected to a machine called VEGA.FAC.CS.CMU.EDU. After we issue the close command we then connect to a machine called B.GP.CS.CMU.EDU. (CPATH\Change Path\CMUIP_FTP_10) (FTP commandsCPATH) Change the remote default path or current directory. (CPATH) (directory) (NONE) This command behaves exactly the same as the FTP command SET REMOTE (directory)

For more information, hints and examples please see the documentation on the FTP command SET REMOTE. (CWD\Change Working Directory\CMUIP_FTP_11) (FTP commandsCWD) Change the remote default path or current directory. (CWD) (directory) (NONE) This command behaves exactly the same as the FTP command SET REMOTE (directory)

For more information, hints and examples please see the documentation on the FTP command SET REMOTE. (DELETE\Delete File\CMUIP_FTP_12) (FTP commandsDELETE) Deletes a file on the remote system. (DELETE) (remote-file) (NONE) This command causes the file specified to be deleted at the server. If the file does not exist or is unable to be modified (because file protection or record locking) an appropriate error message should be returned. (FTP> ) (delete delete.me) (250 File deleted ok, file [MOORE]DELETE.ME.1.) (FTP> ) In this example, we delete a file called DELETE.ME on a remote TOPS-20 system. (FTP> )(delete /usr/moore/delete.me) (%CLI-W-NOQUAL, qualifiers not allowed - supply only verb and parameters) ( USR) (FTP> delete "/usr/moore/delete.me") (250 File /usr/moore/delete.me deleted.) FTP> If the remote file specification includes "/" it may be necessary to enclose the entire remote file specification in quotes. As the FTP command interpreter interprets "/" as the beginning of a switch specification. (DIRECTORY\\CMUIP_FTP_13) (FTP commandsDIRECTORY) Requests a directory listing from the remote host. (DIRECTORY) (remote-filespec) (Command Qualifiers) (/BRIEF\None.) (/OUTPUT=Local_File\/OUTPUT=SYS$OUTPUT) (remote-filespec) Specifies a file specification pattern to be interpreted at the remote site. FTP passes the (remote-filespec) to the remote host FTP which interprets it and returns a list of files that match it. (Command Qualifiers) (/BRIEF)

Only the file name will be returned. (/OUTPUT=Local_File) Sends the output to a specified file. The default is SYS$OUTPUT:. (FTP> )(set rem [moore.exp.ftp]) (250 Requested file action okay, completed.) (FTP> )(dir *.cld) (200 Command Okay.) (200 Port 128,2,250,227,25,20 Okay.) (125 File status okay; about to open data connection.) (SYS$USER:[MOORE.EXP.FTP]FTP.CLD;18) (SYS$USER:[MOORE.EXP.FTP]FTP_PARSE.CLD;70) (SYS$USER:[MOORE.EXP.FTP]FTP_PARSE_NO_HOST.CLD;28) (SYS$USER:[MOORE.EXP.FTP]FTP_TMP.CLD;1) (226 Closing data connection.) (%FTP-I-DATA_RATE, Transfered 167 bytes in 00:00:00.68 = 245 bytes/Second) (FTP> )(dir/brief *.cld) (200 Command Okay.) (200 Port 128,2,250,227,25,21 Okay.) (FTP.CLD;18) (FTP_PARSE.CLD;70) (FTP_PARSE_NO_HOST.CLD;28) (FTP_TMP.CLD;1) (125 File status okay; about to open data connection.) (226 Closing data connection.) (%FTP-I-DATA_RATE, Transfered 71 bytes in 00:00:00.53 = 133 bytes/Second) (FTP> ) In this example we see the difference /BRIEF can make. (ERASE\\CMUIP_FTP_14) (FTP commandsERASE) Deletes a file on the remote system. (ERASE) (remote-file) (NONE) The behaviour of the ERASE command is the same as the DELETE command. For more information, hints and examples please see the documentation on the FTP command DELETE. (EXIT\\CMUIP_FTP_15) (FTP commandsEXIT) Close the connection to the remote host and exit the FTP utility. (EXIT) () (NONE) This is the normal command for leaving the FTP utility. (FTP> )(exit) (221 Goodbye.) (%FTP-I-CLOSING, Connection Closing) (-IPACP-E-CCAN, Connection cancelled by process abort) ($ ) In the example, the exit command is used to exit the FTP utility. (GET\\CMUIP_FTP_16) (FTP commandsGET) Retrieves a specified file from the remote server. (GET) (remote-file [local-file]) (NONE) The GET command behaves exactly the same as the RECEIVE command. The GET command takes the same arguments and switches as the RECEIVE command. For more information, hints and examples please see the documentation on the FTP command RECEIVE. (HELP\\CMUIP_FTP_17) (FTP commandsHELP) Provide access to on-line help documents. (HELP) ([Topic [Sub-Topic]]) (NONE) The HELP command provides a standard interface to the VMS help system. Typing HELP at the FTP> prompt returns a list of commands available. For help with a particular topic, type HELP topic.

NOTE: Some commands are unavailable at the FTP Awating Host> prompt. (LOGIN\Validate Self\CMUIP_FTP_18) (FTP commandsLOGIN) Transfers user information to the remote server. (LOGIN) (username [account]) (NONE) FTP next prompts for password and, if necessary, account information. If the account is specified, it is transferred when asked for or after login, if not requested. ($ )(ftp c.cs.cmu.ed) (%FTP-I-ATTEMPTING, Attempting to connect to host C.CS.CMU.EDU) (220 C.CS.CMU.EDU FTP Server Process 5Z(50)-7 at Thu 15-Oct-87 13:56-EDT) (FTP> )(login moore) (331 User name ok. Password, please.) ( Password: ) (230 User MOORE logged in at Thu 15-Oct-87 13:57-EDT, job 37. ) In this example we connect to a TOPS-20 machine and use the login command to specify the remote user. ($ )(ftp c.cs.cmu.edu) (%FTP-I-ATTEMPTING, Attempting to connect to host C.CS.CMU.EDU) (220 C.CS.CMU.EDU FTP Server Process 5Z(50)-7 at Thu 15-Oct-87 13:57-EDT) (FTP> )(login moore systems) (331 User name ok. Password, please.) ( Password: ) (230 User MOORE logged in at Thu 15-Oct-87 13:57-EDT, job 37. ) (230 Account OK.) (FTP> ) In this example we also specify an account. (MGET\\CMUIP_FTP_19) (FTP commandsMGET) Retrieve a collection of files from a remote system. (MGET) (Remote_Files) (Command Qualifiers) (/BLOCKSIZE=n\/BLOCKSIZE=512) (/[NO]HASH\/NOHASH) (/MODE=mode\/MODE=STREAM) (/[NO]PROMPT\/NOPROMPT) (/STRUCTURE=Structure\/STRUCTURE=DEFAULT) (/TYPE=Type\/TYPE=ASCII) ([remote-file]) Specifies a group of files, on the remote file system, which should be transfered to the local file system. MGET is done by first getting the list of files from the remote machine, and then retrieving each of the files in the list. In this way, it is possible to specify wildcards such as `*'. (Command Qualifiers) (/BLOCKSIZE=n)

When transferring a file with /TYPE=IMAGE and /STRUCTURE=FILE, FTP will receive the binary file using the blocksize that you specify. The default, 512, can be used when receiving a VMS executable or another native file which should be stored using fixed-length 512 byte blocks. However, your application may require a customized record-length. (/[NO]HASH)

Temporarily change the Hash setting to ON (or OFF).

When Hash is turned on, as the file data is transfered from one machine to another, a hash mark is displayed for each 1024 characters of data that is transfered.

The default is to not display anything as the data is being transfered. This default can be changed with the FTP command SET HASH ON. (/MODE=Mode) /MODE=BLOCK (Currently Unsupported) /MODE=COMPRESSED (Currently Unsupported) /MODE=STREAM (Default)

Attempts to negotiate a different data transfer mode. Currently only STREAM MODE is supported. (/[NO]PROMPT) Prompt for the local file name before transfering the file. The default is to base the local file name on the remote file name. (/STRUCTURE=Structure) Attempts to negotiate a different file structure before the file contents are transfered.

Valid values for (Structure) are FILE, PAGE, VMS. The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system. (/TYPE=Type) Attempts to negotiate a new data type before the file data is transferred. Valid values for (Type) are ASCII, IMAGE, and EBCDIC. Currently only ASCII and IMAGE are supported by the FTP utility. The default is /TYPE=ASCII.

If the data type is ASCII the file is stored on VMS as a sequential file with variable length record format and carriage return carriage control for record attribute.

If the data type is IMAGE the file is stored on VMS as a sequential file with fixed length 512 byte records and no record attributes. (FTP> ) (set reply off) (FTP> ) (mget *.cld) (%FTP-I-GETTING_NAMES, Obtaining name list for '*.CLD' from remote host) (%FTP-I-RECEIVING_FILE, Retrieving file FTP.CLD;18 to FTP.CLD) (%FTP-I-DATA_RATE, Transfered 437 bytes in 00:00:00.66 = 662 bytes/Second) (%FTP-I-RECEIVING_FILE, Retrieving file FTP_PARSE.CLD;70 to FTP_PARSE.CLD) (%FTP-I-DATA_RATE, Transfered 25083 bytes in 00:00:04.91 = 5108 bytes/Second) (%FTP-I-RECEIVING_FILE, Retrieving file FTP_PARSE_NO_HOST.CLD;28 to FTP_PARSE_NO_HOST.CLD) (%FTP-I-DATA_RATE, Transfered 11689 bytes in 00:00:02.60 = 4495 bytes/Second) (%FTP-I-RECEIVING_FILE, Retrieving file FTP_TMP.CLD;1 to FTP_TMP.CLD) (%FTP-I-DATA_RATE, Transfered 1007 bytes in 00:00:00.64 = 1573 bytes/Second) (FTP> ) In this example we retrieve from a VMS machine all files with the file type CLD. (FTP> ) (set reply off) (FTP> mget /usr/moore/.lo*) (%CLI-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement) ( USR) (FTP> mget "/usr/moore/.lo*") (%FTP-I-GETTING_NAMES, Obtaining name list for '/usr/moore/.lo*' from remote host) (%FTP-I-RECEIVING_FILE, Retrieving file /usr/moore/.login to $login) (%FTP-I-DATA_RATE, Transfered 695 bytes in 00:00:00.49 = 1418 bytes/Second) (%FTP-I-RECEIVING_FILE, Retrieving file /usr/moore/.logout to $logout) (%FTP-I-DATA_RATE, Transfered 63 bytes in 00:00:00.42 = 150 bytes/Second) (FTP>) If the remote file specification includes "/" it may be necessary to enclose the entire remote file specification in quotes. As the FTP command interpreter interprets "/" as the beginning of a switch specification. (MPUT\\CMUIP_FTP_20) (FTP commandsMPUT) Send a file or group of files to a remote machine. (MPUT) (Local_Filespec) (Command Qualifiers) (/[NO]HASH\/NOHASH) (/MODE=mode\/MODE=STREAM) (/[NO]PROMPT\/NOPROMPT) (/STRUCTURE=Structure\/STRUCTURE=DEFAULT) (/TYPE=Type\/TYPE=ASCII) (Local_Filespec) Specifies a group of files, on the local file system, which should be transfered to the remote file system. The local_file_spec can have wild cards such as "*" and "%". (Command Qualifiers) (/[NO]HASH)

Temporarily change the Hash setting to ON (or OFF).

When Hash is turned on, as the file data is transfered from one machine to another, a hash mark is displayed for each 1024 characters of data that is transfered.

The default is to not display anything as the data is being transfered. This default can be changed with the FTP command SET HASH ON. (/MODE=Mode)

/MODE=BLOCK (Currently Unsupported)

/MODE=COMPRESSED (Currently Unsupported)

/MODE=STREAM (Default)

Attempts to negotiate a different data transfer mode. Currently only STREAM MODE is supported. (/[NO]PROMPT) Prompt for the local file name before transfering the file. The default is to base the local file name on the remote file name. (/STRUCTURE=Structure) Attempts to negotiate a different file structure before the file contents are transfered.

Valid values for (Structure) are FILE, PAGE, VMS. The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system. (/TYPE=Type) Attempts to negotiate a new data type before the file data is transferred. Valid values for (Type) are ASCII, IMAGE, and EBCDIC. Currently only ASCII and IMAGE are supported by the FTP utility. The default is /TYPE=ASCII.

If the data type is ASCII the file is stored on VMS as a sequential file with variable length record format and carriage return carriage control for record attribute.

If the data type is IMAGE the file is stored on VMS as a sequential file with fixed length 512 byte records and no record attributes. (FTP> ) (set reply off) (FTP> ) (mput *.cld) (%FTP-I-SENDING_FILE, Sending file SYS$USER:[MOORE.EXP.FTP]FTP.CLD;18 to FTP.CLD) (%FTP-I-DATA_RATE, Transfered 437 bytes in 00:00:00.53 = 824 bytes/Second) (%FTP-I-SENDING_FILE, Sending file SYS$USER:[MOORE.EXP.FTP]FTP_PARSE.CLD;70 to FTP_PARSE.) (CLD) (%FTP-I-DATA_RATE, Transfered 25083 bytes in 00:00:02.68 = 9359 bytes/Second) (%FTP-I-SENDING_FILE, Sending file SYS$USER:[MOORE.EXP.FTP]FTP_PARSE_NO_HOST.CLD;28 to ) (FTP_PARSE_NO_HOST.CLD) (%FTP-I-DATA_RATE, Transfered 11689 bytes in 00:00:01.51 = 7741 bytes/Second) (%FTP-I-SENDING_FILE, Sending file SYS$USER:[MOORE.EXP.FTP]FTP_TMP.CLD;1 to FTP_TMP.CLD) (%FTP-I-DATA_RATE, Transfered 1007 bytes in 00:00:00.51 = 1974 bytes/Second) The example above sends all files with extension ".CLD". (MSEND\\CMUIP_FTP_21) (FTP commandsMSEND) Send a file or group of files to a remote machine. (MSEND) (Local_Filespec) (NONE) The MSEND command takes the same arguements and parameters as the MPUT command. It behaves exactly the same as the MPUT command. For more information on MSEND, please see the documentation on the FTP command MPUT. (NOOP\\CMUIP_FTP_22) (FTP commandsNOOP) Send a NOOP command to the remote system. (NOOP)(None) (NONE) This command is useful for testing purposes. (ON CONTROL_C\\CMUIP_FTP_23) (FTP commandsON CONTROL_C) Change or modify the handling of CONTROL_C. (ON CONTROL_C) (action) (NONE)

The default setting is so that when the user types Control-C, any current commands are aborted and control is returned to the "FTP> " prompt.

If the setting is ABORT, the FTP utility stops what it is doing and returns to the FTP> prompt.

If the setting is CONTINUE, the Control-C is effectively ignored.

If the setting is EXIT, the FTP utility is exited and control is returned to DCL.

If you really want to exit the FTP utility, type Control-Y. Control-Y is not trapped by the FTP utility.

The current setting can be examined by issueing the FTP command SHOW CONDITION. (FTP>) ( on error abort) (FTP>) ( dir) (200 Type A N ok.) (200 Port 32.63 at host 128.2.250.227 accepted.) (*CANCEL*) (%FTP-E-CONTROL_C, Operation aborted due to Control-C.) (-SYSTEM-S-CONTROLC, operation completed under CTRL/C) (FTP> ) In this example, a directory command is interrupted with a Control-C. (ON ERROR\\CMUIP_FTP_24) (FTP commandsON ERROR) Change or modify the handling of errors. (ON ERROR) (action) (NONE) The default setting is so that when an error is encountered any current commands are aborted and control is returned to the "FTP> " prompt.

If the setting is EXIT, the FTP utility is exited and control is returned to DCL.

This command is useful when batch jobs should be aborted upon first unsucessful FTP command. The most common errors are (UNNUMBERED) The remote system is not available. This may be due to hardware or network failure. Login failure. Verify that the password is correct. Also check that username didn't get case folded. Remote file unavailable. This may be due to incorrectly specified file name.

The current setting can be examined by issueing the FTP command SHOW CONDITION. (FTP>)( on error abort) (FTP>)( get unknown.file) (200 Port 4.11 at host 128.2.250.227 accepted.) (550 File not accessable. ) (%FTP-E-NO_ACTION, Requested action not taken. File unavilable.) (FTP>)( on error exit) (FTP>)( get unknown.file) (200 Port 4.12 at host 128.2.250.227 accepted.) (550 File not accessable.) (%FTP-E-NO_ACTION, Requested action not taken. File unavilable.) ($ ) This example shows the difference in behaviour of the two settings for error handling. (ON SEVERE\\CMUIP_FTP_25) (FTP commandsON SEVERE) Change or modify the handling of SEVERE or FATAL errors (ON SEVERE) (action) (NONE) The default setting is so that when a severe error is encountered the FTP utility immediately exits.

If the setting is ABORT control is immediately returned to the FTP> prompt.

Usually Severe or Fatal errors indicate something wrong in the logic of the FTP utility. The setting should be left on EXIT.

The current setting can be examined by issuing the FTP command SHOW CONDITION. (ON WARNING\\CMUIP_FTP_26) (FTP commandsON WARNING) Change or modify the handling of warning signals (ON WARNING) (action) (NONE) The default setting is so that when a warning is encountered, the FTP utility immediately returns to the "FTP>" prompt.

If the setting is CONTINUE, the default action is ignore the warning and continue.

If the setting is EXIT, the FTP utility is exited and control is immediately returned to DCL.

The most common cause of warnings is incorrectly specfied commands. Like "FTP> DLEETE FOO.BAR" instead of "FTP> DELETE FOO.BAR".

The current setting can be examined by issueing the FTP command SHOW CONDITION. (FTP>) on warning abort (FTP>) logni moore (%CLI-W-IVVERB, unrecognized command verb - check validity and spelling) ( LOGNI) (FTP>) on warning exit (FTP>) logni moore (%CLI-W-IVVERB, unrecognized command verb - check validity and spelling) ( LOGNI) ($ ) This example shows two different settings for handling warnings. The FTP utility command "LOGIN" is mistyped "logni". (PASSWORD\\CMUIP_FTP_27) (FTP commandsPASSWORD) This command is obsolete. Use the Login command instead. (PASSWORD) (password) (NONE) The login command will prompt for the remote password if needed. (PUT\\CMUIP_FTP_28) (FTP commandsPUT) Transmits a local file to the remote host. (PUT) (local-file, [remote-file]) (NONE) (local-file) Specifies a file, on the local file system, which we want to copy to the remote system. ([remote-file]) Specifies a file, on the remote file system, to which the local file should be copied.

The PUT command behaves exactly the same as the SEND command. It takes the same arguements and switches.

For more information, examples and hints please see the documentation on the SEND command. (QUIT\\CMUIP_FTP_29) (FTP commandsQUIT) Close the connection to the remote host and exit the FTP utility. (QUIT)(None) (NONE) This command behaves exactly the same as the EXIT command. For more information, examples and hints please see the documentation on the FTP command exit. (QUOTE\Quote FTP command\CMUIP_FTP_30) (FTP commandsQUOTE) Send a string directly to the remote FTP_Server. (QUOTE) (command-line) (NONE) (command-line) Line of text to be sent to the remote FTP server. The entire command-line is directly transmitted to the remote host FTP Server. The command string is not verified for correctness or validity.

This command is useful only to wizards who understand the logic in the File Transfer Protocol. FTP> set command on FTP> show rem PWD 257 "/usr1/moore" is current directory. FTP> quote xpwd XPWD 257 "/usr1/moore" is current directory. FTP> In this example, it is obvious that PWD and XPWD perform the same thing. (RECEIVE\Receive a file\CMUIP_FTP_31) (FTP commandsRECEIVE) Gets a specified file from the remote server. (RECEIVE) (local-file, [remote-file]) (Command Qualifiers) (/BLOCKSIZE=n\//BLOCKSIZE=512) (/[NO]HASH\/NOHASH) (/MODE=mode\/MODE=STREAM) (/STRUCTURE=Structure\/STRUCTURE=DEFAULT) (/TYPE=Type\/TYPE=ASCII) (remote-file) Specifies a file, on the remote file system, to which the local file should be copied. ([local-file]) Specifies a file, on the local file system, which we want to copy to the remote system. (Command Qualifiers) (/BLOCKSIZE=n)

When transferring a file with /TYPE=IMAGE and /STRUCTURE=FILE, FTP will receive the binary file using the blocksize that you specify. The default, 512, can be used when receiving a VMS executable or another native file which should be stored using fixed-length 512 byte blocks. However, your application may require a customized record-length. (/[NO]HASH)

Temporarily change the Hash setting to ON (or OFF).

When Hash is turned on, as the file data is transfered from one machine to another, a hash mark is displayed for each 1024 characters of data that is transfered.

The default is to not display anything as the data is being transfered. This default can be changed with the FTP command SET HASH ON. (/MODE=Mode)

/MODE=BLOCK (Currently Unsupported)

/MODE=COMPRESSED (Currently Unsupported)

/MODE=STREAM (Default)

Attempts to negotiate a different data transfer mode. Currently only STREAM MODE is supported. (/STRUCTURE=Structure) Attempts to negotiate a different file structure before the file contents are transfered.

Valid values for (Structure) are FILE, PAGE, VMS. The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system. (/TYPE=Type) Attempts to negotiate a new data type before the file data is transferred. Valid values for (Type) are ASCII, IMAGE, and EBCDIC. Currently only ASCII and IMAGE are supported by the FTP utility. The default is /TYPE=ASCII.

If the data type is ASCII the file is stored on VMS as a sequential file with variable length record format and carriage return carriage control for record attribute.

If the data type is IMAGE the file is stored on VMS as a sequential file with fixed length 512 byte records and no record attributes. The specified remote-file will be transmitted to the local default directory. If local-file is present, that name will be used; otherwise the local name will be as close as possible to the remote name. (FTP>)( get /type=image sys$system:sys.exe delete.me) (200 Command Okay.) (200 Port 128,2,250,227,241,144 Okay.) (125 File status okay; about to open data connection.) (226 Closing data connection.) (%FTP-I-DATA_RATE, Transfered 243200 bytes in 00:00:08.66 = 28083 bytes/Second) (FTP> ) In the example below, the file SYS$SYSTEM:SYS.EXE on the remote system is copied to the local system as DELETE.ME. Since the file is an executable image, and not a text file, we use the /TYPE=IMAGE switch. FTP> get /usr/moore/.login delete.me %CLI-W-IVQUAL, unrecognized qualifier - check validity, spelling, and placement USR FTP> get "/usr/moore/.login" delete.me 200 PORT command successful. 150 Opening data connection for /usr/moore/.login (128.2.250.227,44011) (670 bytes). 226 Transfer complete. %FTP-I-DATA_RATE, Transfered 695 bytes in 00:00:00.54 = 1287 bytes/Second FTP> If the remote file specification includes "/" it may be necessary to enclose the entire remote file specification in quotes. As the FTP command interpreter interprets "/" as the beginning of a switch specification. Notice the difference in behaviour on some systems if the remote file specification is and is not quoted. (REMOTEHELP\\CMUIP_FTP_32) (FTP commandsREMOTEHELP) Asks the remote server for help. (REMOTEHELP) (command-line) (NONE) (command-line) Line of text to ask remote server for help on The remote host is sent the FTP help command, with a command-line, if specified. Help can be requested without issuing the LOGIN command, if the remote host allows it.

The list of commands that are returned are not commands available to the user of the FTP utility. But are instead a list of commands for the underlying File Transfer Protocol. See the entry for the QUOTE command for more information. FTP> remotehelp 214-The following commands are recognized (* =>'s unimplemented). 214- USER CDUP PORT RETR REST* RMD XPWD STAT* 214- PASS XCUP PASV* STOR RNFR XRMD LIST HELP 214- ACCT* SMNT* TYPE STOU* RNTO MKD NLST NOOP 214- CWD QUIT STRU APPE ABOR* XMKD SITE* 214- XCWD REIN* MODE ALLO DELE PWD SYST* 214 Mail comments to Gripe@@CS.CMU.EDU. FTP> The remote server will provide a list of commands annd features that are legal or implemented. (RENAME\Rename a remote file\CMUIP_FTP_33) (FTP commandsRENAME) Changes the name of file on the remote system. (RENAME) (old-file, new-file) (NONE) (old-file) Specifies a file, on the remote file system, to be renamed. (new-file) Specifies a new filename, on the remote file system, for the file. FTP> send sys$login:login.com delete.me 200 Port 241.102 at host 128.2.250.227 accepted. 150 ASCII Store of (MOORE)DELETE.ME.1;P775252;ASYSTEMS started. 226 Transfer completed. 1301 (8) bytes transferred. %FTP-I-DATA_RATE, Transfered 1301 bytes in 00:00:03.60 = 361 bytes/Second FTP> rename delete.me vmslogin.com 350 Rename-from name stored. 250 Old file renamed (MOORE)VMSLOGIN.COM.1. FTP> Here we first send our local file LOGIN.COM to the remote file DELETE.ME. After we've successfully done the transfer, we then rename DELETE.ME to VMSLOGIN.COM. (SEND\Send a file\CMUIP_FTP_34) (FTP commandsSEND) Transmits a single local file to the remote host. (SEND) (local-file, [remote-file]) (Command Qualifiers) (/[NO]HASH\/NOHASH) (/MODE=mode\/MODE=STREAM) (/STRUCTURE=Structure\/STRUCTURE=DEFAULT) (/UNIQUE\) (local-file) Specifies a file, on the local file system, which we want to copy to the remote system. ([remote-file]) Specifies a file, on the remote file system, to which the local file should be copied. The FTP utility will first look at the file and record characteristics of the local file. It will then attempt to negotiate the appropriate file transfer parameters (Mode, Structure and Type). Once the appropriate file transfer parameters have been negotiated, the file contents are sent. (Command Qualifiers) (/[NO]HASH) Temporarily change the Hash setting to ON (or OFF).

When Hash is turned on, as the file data is transfered from one machine to another, a hash mark is displayed for each 1024 characters of data that is transfered.

The default is to not display anything as the data is being transfered. This default can be changed with the FTP command SET HASH ON. (/MODE=Mode) /MODE=BLOCK (Currently Unsupported)

/MODE=COMPRESSED (Currently Unsupported)

/MODE=STREAM (Default)

Attempts to negotiate a different data transfer mode. Currently only STREAM MODE is supported. (/STRUCTURE=Structure) Attempts to negotiate a different file structure before the file contents are transfered.

Valid values for (Structure) are FILE, PAGE, VMS. The default is /STRUCTURE=FILE except when connecting with another system which supports the VMS structure. /STRUCTURE=VMS is negotiated automatically at the time you connect to the remote system. (/TYPE=Type) Attempts to negotiate a new data type before the file data is transferred. Valid values for (Type) are ASCII, IMAGE, and EBCDIC. Currently only ASCII and IMAGE are supported by the FTP utility. The default is /TYPE=ASCII.

If the data type is ASCII the file is stored on VMS as a sequential file with variable length record format and carriage return carriage control for record attribute.

If the data type is IMAGE the file is stored on VMS as a sequential file with fixed length 512 byte records and no record attributes. (/UNIQUE) The /UNIQUE switch tells the remote host to create a new name for the file if the file is already in the remote default directory. The name of the file is specified in the return. FTP> set command on FTP> send sys$system:sys.exe nla0:delete.me TYPE I 200 Command Okay. PORT 128,2,250,227,239,239 200 Port 128,2,250,227,239,239 Okay. STOR NLA0:DELETE.ME 125 File status okay; about to open data connection. 226 Closing data connection. %FTP-I-DATA_RATE, Transfered 243200 bytes in 00:00:07.97 = 30514 bytes/Second FTP> In this example, we transfer the contents of the executable file SYS.EXE to a remote system. Since the file characteristics of SYS.EXE were fixed length 512 byte records, the FTP utility decides that the best transfer Type parameter is Image. (SET ACCOUNT\\CMUIP_FTP_35) (FTP commandsSET ACCOUNT) Change the account usage for the remote host. (SET ACCOUNT) (account-name) (NONE) (account-name) Name of account on remote system. Specifies the account on the remote system to which resource usage is to be charged. Many servers, especially VMS servers, do not implement accounts. This command is superfluous at these sites. FTP> set account unknown 530 Account not valid. %FTP-E-NOT_LOGGED_IN, Not logged In. FTP> set account systems 230 Account OK. FTP> This example shows successful and unsuccessful use of the SET ACCOUNT command. (SET CASE\\CMUIP_FTP_36) (FTP commandsSET CASE) Modifies the capitalization of switches and parameters. (SET CASE) (value) (NONE) (value) One of: LOWER, NORMAL (Default), or UPPER The command interpreter used by the FTP utility is the CLI command interpreter. It is the same command interpreter that is used by many different VMS utilities (MAIL, INSTALL, MONITOR, SHOW CLUSTER). It is a well documented and well debugged command interpreter. Many VMS users and managers are familiar with its syntax and feel. (UNNUMBERED) (LOWER\BOLD): Lowercase all parameters. (NORMAL\BOLD): all parameters are to be left as provided by the CLI command line interpreter. The CLI command line interpreter uppercases all arguments that are not quoted. This value is the default. (UPPER\BOLD): all parameters are changed to uppercase. The current release of FTP preserves case sensitivity, so this command is now obselete. It is remains in the command set to maintain backwards compatability with earlier versions of FTP. (SET COMMAND\\CMUIP_FTP_37) (FTP commandsSET COMMAND) Specify whether the FTP utility displays the protocol commands. (SET COMMAND) (value) (NONE) (VALUE) A boolean value, either ON or OFF, which determines the state of the COMMAND option. The FTP utility negotiates with the remote host by sending commands and receiving replies. By setting COMMAND ON, the FTP utility will display the commands as they are sent the remote machine. FTP> set command off FTP> noop 200 Command Okay. FTP> set command on FTP> noop NOOP 200 Command Okay. FTP> In this example, the same command is performed twice. The first time with command off (the default) and the second time with command on. (SET DEFAULT\\CMUIP_FTP_38) (FTP commandsSET DEFAULT) Set the default or current directory on the local machine. (SET DEFAULT) (dir-spec) (NONE) (dir-spec) The name of the directory on the remote system which will be the default for file operations. This command is very similar to the DCL command SET DEFAULT. (SET HASH\\CMUIP_FTP_39) (FTP commandsSET HASH) Change the setting of HASH. (SET HASH) (state) (NONE) (STATE) Either ON or OFF, to control display of "hash marks" When HASH is set to on, a hash character '#' is displayed for every 1024 octets of data transfered. When HASH is set to off, no hash character is displayed.

Hash is a way to judge whether there is actually anything going on. If during a long transfer no hash marks are being printed, then we can be pretty sure that things are wedged. (SET HOST\\CMUIP_FTP_40) (FTP commandsSET HOST) Open the connection to a remote host. (SET HOST) (host-name) (NONE) (host-name) Name of host to initiate an FTP session with. If a connection is already open, the connection will be closed and a new connection will be opened to the specified host. FTP> show host Connection open to C.CS.CMU.EDU FTP> set host moore.fac 221 QUIT command received. Goodbye. %FTP-I-CLOSING, Connection Closing -IPACP-E-CCAN, Connection cancelled by process abort %FTP-I-ATTEMPTING, Attempting to connect to host MOORE.FAC 220 Service ready for new user. FTP> show host Connection open to MOORE.FAC.CS.CMU.EDU FTP> In this example, we use the SET HOST command to change which host we are connected to. (SET LOCAL_DEFAULT_DIRECTORY\\CMUIP_FTP_41) (FTP commandsSET LOCAL_DEFAULT_DIRECTORY) Change the default or current directory on the local system. (SET LOCAL_DEFAULT_DIRECTORY) (local-directory) (NONE) (local-directory) The name of a directory on the local system. This command is identical in form to the DCL command ``$ SET DEFAULT''. (SET MODE\\CMUIP_FTP_42) (FTP commandsSET MODE) Negotiate a new transfer mode parameter. (SET MODE) (mode) (NONE) (mode) One of: (UNNUMBERED) BLOCK (unsupported), COMPRESSED (unsupported), or STREAM (default) It should be obvious what setting is most likely to work. (SET REMOTE_DEFAULT_DIRECTORY\\CMUIP_FTP_43) (FTP commandsSET REMOTE_DEFAULT_DIRECTORY) Change the remote default or current directory. (SET REMOTE_DEFAULT_DIRECTORY) (remote-directory) (NONE) Similar to the Unix "cd" command, and the VMS "SET DEF" command. FTP> show remote 257 "SYS$USER:[MOORE]" is current directory. FTP> set remote sys$system: 250 Requested file action okay, completed. FTP> show remote 257 "SYS$SYSROOT:[SYSEXE]" is current directory. FTP> In this example, we are connected to a VMS machine. By issueing the set remote command we've changed what the default or current directory is on the remote machine. (SET REPLY\\CMUIP_FTP_44) (FTP commandsSET REPLY) Change whether the FTP utility displays the reply lines being sent back from the remote server. (SET REPLY) (state) (NONE) (STATE) Either ON or OFF, to control display of remote FTP replies. FTP> set reply on FTP> noop 200 Command Okay. FTP> set reply off FTP> noop FTP> Here, the NOOP command is issued twice. But in second case, the reply from the remote machine is not displayed. (SET STRUCTURE\\CMUIP_FTP_45) (FTP commandsSET STRUCTURE) Negotiate a new file structure transfer parameter. (SET STRUCTURE) (mode) (NONE) (mode) One of: (UNNUMBERED) FILE (default), PAGE, VMS, or COMPRESSED (unsupported). The normal transfer structure is file. The file structure provides a way to transfer the file contents from one machine to another.

VMS however has much extra information in its file system about a file that lies outside the contents of a file.

When PAGE structure is used, the file organization, file attributes, record format and record attributes are sent over the data connection in addition to the data. In this way, indexed and relative files with multiple keys and areas can be sent from one VMS machine to another.

(FTPSTRU O VMS) (FTPVMS structure) The VMS structure is an extension to the PAGE structure which has been defined to be compatible with other VMS implementations of FTP. It is the default structure when connecting to a system which supports it. To see if the remote system handles the VMS structure, use the (STATUS\BOLD) command. (FTP> )(STATUS) (211-Status FTP Server Process) (211-Status The current data transfer parameters are:) (211-Status MODE S) (211-Status STRU O VMS) (211 Status TYPE AN)

The ``STRU O VMS'' indicates that the remote system is capable of handling the VMS file structure for file transfers. (SET TYPE\\CMUIP_FTP_46) (FTP commandsSET TYPE) Negotiate a new file type transfer parameter. (SET TYPE ASCII) (asci-type) (SET TYPE IMAGE) () (SET TYPE EBCDIC) () (SET TYPE LOCAL) (byte-size) (NONE) (ascii-type) One of: (UNNUMBERED) CONTROL (unsupported), NON_PRINT (default), or TELNET (unsupported). (byte-size) Size of a byte on the local host, measured in bits. Using the ASCII type, Files are transfered as lines of text. Each line is seperated by a carriage-return line-feed. If you would send or receive a VMS text file with CR-LF embedded in a record, upon retrieving the file, the record would be split into two at the CR-LF. A file that has the RMS Record Format of Stream, Stream Carriage Return or Stream Line Feed will be sent by default with Type ASCII. However upon retrieving an ASCII file, the record format is always variable length, and the record attribut is Carriage Return.

Setting the file transfer type to EBCDIC causes FTP to transfer data in the EBCDIC format. This type is currently unsupported. (and can you blame us?)

The IMAGE type is used to transfer binary data, basically anything that's not straight text. VMS images and savesets should be transferred using this type.

Set the current transfer type to LOCAL allows the user to control the byte-size of data transferred. This command is used when tranferring files to/from a system with a different word size. FTP> set type local 8 200 Command Okay. FTP> In this example, we negotiate the a byte size of 8 bits. (SHOW CASE\\CMUIP_FTP_47) (FTP commandsSHOW CASE) Display the current setting of any character munging. (SHOW CASE) () (NONE) FTP> show case CASE Normal FTP> set case lower FTP> show case CASE Lower FTP> In the example, we first examing the current setting. Then change it so the FTP utility deals a differantly with those wacky Unix machines. (SHOW COMMAND\\CMUIP_FTP_48) (FTP commandsSHOW COMMAND) Examine the current state of whether we are displaying the lower level FTP commands. (SHOW COMMAND) (None) (NONE) This is mostly useful as a debugging tool. With commands turned on, the users password will be displayed. For more information see the documentation on the FTP Command SET COMMAND. FTP> show command Show Command OFF FTP> set command on FTP> show command Show Command ON FTP> quote noop NOOP 200 Command Okay. FTP> set command off FTP> show command Show Command OFF FTP> noop 200 Command Okay. FTP> In this example we show the different behaviour of when command is off and when it is on. (SHOW CONDITION\\CMUIP_FTP_49) (FTP commandsSHOW CONDITION) Show the current setting of the condition handlers. (SHOW CONDITION) (None) (NONE) For more information see the documentation for ON ERROR, ON CONTROL_C, ON WARNING, and ON SEVERE. FTP> show condition ON Control_C Abort ON Error Abort ON Severe Exit ON Warning Continue FTP> on control_c exit FTP> show cond ON Control_C Exit ON Error Abort ON Severe Exit ON Warning Continue FTP> *CANCEL* %FTP-E-CONTROL_C, Operation aborted due to Control-C. -SYSTEM-S-CONTROLC, operation completed under CTRL/C $ In this example the SHOW CONDITION command is used twice to examine the current state of the condition handlers. (SHOW FILE_STATUS\\CMUIP_FTP_50) (FTP commandsSHOW FILE_STATUS) Requests information about the specified file. Note that some hosts allow wildcarding of the file-spec. (SHOW FILE_STATUS) (file-spec) (NONE) (file-spec) Specifies a file at the remote site. Requests information about the specified file in the remote site's file system. Note that some hosts allow wildcarding of the file-spec. FTP> show file_status login.cmd 213 PS:(MOORE)LOGIN.CMD.13;P775252;ASTAFF,1,15-Aug-83 16:57:11-EDT,15-Aug-83 16:57:11-EDT,12-Oct-87 16:41:07-EDT,MOORE,MOORE FTP> show file_status unknown.file 550 ? Not found. %FTP-E-NO_ACTION, Requested action not taken. File unavilable. FTP> In this example, we show the file status of two files. The first file exists, the second does not. (SHOW HASH\\CMUIP_FTP_51) (FTP commandsSHOW HASH) Display the current setting of HASH. (SHOW HASH) (None) (NONE) If hash is on, a hash mark is displayed for every 1024 bytes data that is sent or received. FTP> show hash Hash Display is OFF FTP> set hash on %FTP-I-HASH_SET, Hash display ON FTP> show hash Hash Display is ON FTP> put sys$system:sys.exe nla0:delete.me 200 Command Okay. 200 Port 128,2,250,227,69,193 Okay. 125 File status okay; about to open data connection. ################################################################ ################################################################ ################################################################ ############################################# 226 Closing data connection. %FTP-I-DATA_RATE, Transfered 243200 bytes in 00:00:15.35 = 15843 bytes/Second FTP> In this example, we set the hash on and then transfer a file. (SHOW HOST\\CMUIP_FTP_52) (FTP commandsSHOW HOST) Returns the name of the remote host that you are currently connected to. (SHOW HOST) (None) (NONE) FTP> show host Connection open to MOORE.FAC.CS.CMU.EDU FTP> set host c.cs 221 Service closing control connection. %FTP-I-CLOSING, Connection Closing -IPACP-E-CC, Connection is closing - operation invalid %FTP-I-ATTEMPTING, Attempting to connect to host C.CS 220 C.CS.CMU.EDU FTP Server Process 5Z(50)-7 at Tue 20-Oct-87 08:52-EDT FTP> show host Connection open to C.CS.CMU.EDU FTP> In this example, we change the host that we are connected to from MOORE.FAC.CS.CMU.EDU to C.CS.CMU.EDU. (SHOW LOCAL_DEFAULT_DIRECTORY\\CMUIP_FTP_53) (FTP commandsSHOW LOCAL_DEFAULT_DIRECTORY) Prints the current working directory for the local machine. (SHOW LOCAL_DEFAULT_DIRECTORY) (None) (NONE) This command is similar to the DCL command "$ SHOW DEFAULT". FTP> show local SYS$USER:[MOORE] FTP> set local sys$system: FTP> show local SYS$SYSROOT:[SYSEXE] FTP> Here we use the SHOW LOCAL command to verify that the SET LOCAL command performed as expected. (SHOW MODE\\CMUIP_FTP_54) (FTP commandsSHOW MODE) Display the current Mode function transfer parameter. (SHOW MODE) (None) (NONE) Currently only Stream mode is supported. Block Mode and Compressed mode are not supported. FTP> show mode MODE is STREAM FTP> Here is a typical response from the SHOW MODE command. (SHOW PARAMETERS\\CMUIP_FTP_55) (FTP commandsSHOW PARAMETERS) Display all three transfer parameters: Mode, Structure and Type. (SHOW PARAMETERS) (None) (NONE) FTP> show param TYPE is ASCII NONPRINT MODE is STREAM STRU is FILE FTP> Here is a typical result from the SHOW PARAMETERS command. (SHOW REMOTE_DEFAULT_DIRECTORY\\CMUIP_FTP_56) (FTP commandsSHOW REMOTE_DEFAULT_DIRECTORY) Display the current or default directory on the remote machine. (SHOW REMOTE_DEFAULT_DIRECTORY) (None) (NONE) FTP> show remote 257 "/usr1/moore" is current directory. FTP> set remote "/etc" 250 Directory path set to /etc. FTP> show remote 257 "/etc" is current directory. FTP> In this example, we use the SHOW REMOTE command to verify that the SET REMOTE command performed as expected. (SHOW REPLY\\CMUIP_FTP_57) (FTP commandsSHOW REPLY) Display the current setting of reply. (SHOW REPLY) (None) (NONE) For more information please see the documentation on the FTP command SET REPLY. FTP> show reply Show Reply ON FTP> noop 200 Command Okay. FTP> set reply off FTP> show reply Show Reply OFF FTP> noop FTP> The example shows the different behaviour with REPLY set on and with it set off. (SHOW STATUS\\CMUIP_FTP_58) (FTP commandsSHOW STATUS) Ask the remote server to display the status of the FTP connection. (SHOW STATUS) (None) (NONE) The reply differs from host to host, but generally the information returned includes the current transfer parameter values. FTP> show status 211-C.CS.CMU.EDU FTP Server Process 5Z(50)-7 211-The current data transfer parameters are: 211- MODE S 211- STRU F 211- TYPE A N 211-A connection is open to host MOORE.FAC.CS.CMU.EDU 211 The data connection is CLOSED. FTP> This is a typical response from a remote host for the SHOW STATUS command. (SHOW STRUCTURE\\CMUIP_FTP_59) (FTP commandsSHOW STRUCTURE) Display the current STRUCTURE file transfer parameter. (SHOW STRUCTURE) (None) (NONE) The possible values for STRUCTURE are FILE, PAGE and VMS. FTP> show structure STRU is FILE FTP> set structure page 200 Command Okay. FTP> show structure STRU is PAGE FTP> In this example, we use the SHOW STRUCTURE command to verify that the SET STRUCTURE command behaves as expected. (SHOW TYPE\\CMUIP_FTP_60) (FTP commandsSHOW TYPE) Display the current TYPE file transfer parameter. (SHOW TYPE) (None) (NONE) FTP> show type TYPE is ASCII NONPRINT FTP> set type image 200 Type I ok. FTP> show type TYPE is IMAGE FTP> set type ebcdic %FTP-W-UNSUPPORTED_TYP, Can't handle TYPE EBCDIC FTP> show type TYPE is IMAGE FTP> In this example, we use the SHOW TYPE command to verify that the SET TYPE command works as expected. (SPAWN\\CMUIP_FTP_61) (FTP commandsSPAWN) Create a DCL subprocess. (SPAWN) ([command-line]) (Command Qualifiers) (/[NO]CARRIAGE_CONTROL\/CARRIAGE_CONTROL) (/CLI=cli\default specified in SYSUAF) (/INPUT=file_spec\no default) (/[NO]KEYPAD\/KEYPAD) (/[NO]LOGICAL_NAMES\/LOGICAL_NAMES) (/OUTPUT=file_spec\no default) (/PROCESS=subprocess-name\no default) (/PROMPT=string\"$ ") (/[NO]SYMBOLS\/SYMBOLS) (/TABLE=command-table\no default) (/[NO]WAIT\/WAIT) If present, [command-line] will be exeuted and control returned to FTP. If absent, a DCL subprocess will be created until the DCL command LOGOUT is issued. (Command Qualifiers) (/[NO]/CARRIAGE_CONTROL) Determines whether carriage return/line feed characters are prefixed to the subprocess's prompt string. By default, SPAWN copies the current setting of the parent process. (/CLI=cli) Specifies the name of an alternate command language interpreter (CLI) to be used by the subprocess. If the /CLI qualifier is not specified, the CLI used will be the same as the parent process.

The default is the CLI specified in SYSUAF.

The CLI you specify must be located in SYS$SYSTEM and have the file type EXE. (/INPUT=file-spec) Specifies an input file containing one or more DCL commands to be executed by the spawned subprocess. If you specify a command string with the SPAWN command and an input file with the /INPUT qualifier, the command string is processed before the input file. Once processing of the input file is complete, the subprocess is terminated. (/[NO]KEYPAD) Determines whether keypad symbols and the current keypad state are copied from the parent process to the subprocess. By default, if you have established key definitions and/or states with the DEFINE/KEY and/or SET KEY commands, these settings are copied to the subprocess. Use the /NOKEYPAD qualifier if you do not want the key settings to be copied. (/[NO]LOGICAL_NAMES) Determines whether the system passes process logical names and logical name tables to the subprocess. By default, all process logical names and logical name tables are copied to the subprocess except those explicitly marked CONFINE or created in executive or kernel mode. (/[NO]NOTIFY) Controls whether a message is broadcast to the terminal at which you are logged in, notifying you that your subprocess has been completed or aborted. This qualifier should not be used unless you specify the /NOWAIT qualifier. /NOTIFY also cannot be specified when the SPAWN command is executed from within a non-interactive process. he default is /NONOTIFY.

Note that messages broadcast as a result of specifying the /NOTIFY qualifer are considered to be DCL messages. Therefore, if SET BROADCAST=NODCL is in effect, all such notification messages will be suppressed. (/OUTPUT=file-spec) Requests that the output from the SPAWN operation be written to the specified file.

Note that if both the /OUTPUT and /NOWAIT qualifiers are used interactively, and if SYS$COMMAND is specified as the /OUTPUT file specification, the output from both your parent process and your subprocesses will be displayed simultaneously at your terminal. (/PROCESS=subprocess-name) Specifies the name of the subprocess to be created. If you specify a process name that already exists, an error message is displayed. By default, if you omit the /PROCESS qualifier, a unique process name is assigned with the same base name as the parent process and a unique number. The default subprocess name format is username_n. (/[NO]PROMPT) Specifies the prompt string for DCL to use in the subprocess. By default, SPAWN copies the current prompt from the parent process.

The string can consist of more than one character. All valid ASCII characters can be used in the string. In order to include spaces, lowercase letters or non-alphanumeric characters in your string, you must enclose the string in quotation marks. Otherwise, letters are automatically converted to uppercase, and leading and trailing spaces are removed.

If no string is specified, the DCL default prompt string "$ " is restored. (/[NO]SYMBOLS) Determines whether the system passes DCL global and local symbols to the subprocess. Note that the $RESTART, $SEVERITY, and $STATUS symbols are never passed to the subprocess. The default is /SYMBOLS. (/[NO]TABLE) Specifies the name of an alternate command table to be used by the subprocess. (/[NO]WAIT) Controls whether the system waits until the current subprocess is completed before allowing more commands to be issued in the parent process. The /NOWAIT qualifier allows you to issue new commands while the specified subprocess is running. When you use the /NOWAIT qualifier interactively, be sure to use the /OUTPUT qualifier as well so that output from the subprocess is directed to a file rather than to your terminal. Otherwise, your terminal will be used by more than one process at the same time.

By default, you must wait for the subprocess to terminate before you can issue another command.

Note that specifying the /NOWAIT qualifier will cause both input and output to be shared with the parent process. If the input device is a terminal, control characters, such as CTRL/T or CTRL/Y, will also affect all subprocesses sharing the input device. CTRL/Y, for example, will interrupt all such subprocesses.

This problem may be avoided by specifying /INPUT=NL:. (STATUS\\CMUIP_FTP_62) (FTP commandsSTATUS) Ask the remote server to display the status of the FTP connection. (STATUS) (None) (NONE) The reply differs from host to host, but generally the information returned includes the current transfer parameter values. FTP> status 211-C.CS.CMU.EDU FTP Server Process 5Z(50)-7 211-The current data transfer parameters are: 211- MODE S 211- STRU F 211- TYPE A N 211-A connection is open to host MOORE.FAC.CS.CMU.EDU 211 The data connection is CLOSED. FTP> This is a typical response from a remote host for the STATUS command. (TYPE\\CMUIP_FTP_63) (FTP commandsTYPE) Display a remote file on the local terminal. (TYPE) (remote-file) (NONE) FTP> type plan. 200 Port 128,2,250,227,4,0 Okay. 125 File status okay; about to open data connection. Home: 842 Oranmore Pgh PA 15201 (412)784-8211 Stanton Heights Work: CMU CSD Pgh PA 15213 (412)268-7685 Wean 5119 226 Closing data connection. %FTP-I-DATA_RATE, Transfered 120 bytes in 00:00:01.11 = 108 bytes/Second FTP> In this example, we type the remote file plan. on the local terminal. (USER\\CMUIP_FTP_64) (FTP commandsUSER) Transfers user information to the remote server. (USER) (username, [account]) (NONE) This command behaves exactly the same as the LOGIN command. For more information, examples and hints please see the documentation on the FTP command LOGIN.