DIGITAL TCP/IP Services for OpenVMS
User's Guide


Previous | Contents

You can copy files to and from DECnet nodes and get remote directory information, if your host and the DECnet node are connected through a host running DIGITAL TCP/IP Services for OpenVMS. Use the full file specification, including the node, device, directory, and file name.

The following example copies local file FAX.TXT to DECnet node CURTAIL, renaming the file to CURRENT.TXT:

FTP> PUT FAX.TXT CURTAIL::DISK$3:[GEARY.KEEPS]CURRENT.TXT 

The following GET command copies remote OpenVMS file HOUSING.TXT from DECnet node HABTAT and renames it to HOUSE.TXT:

FTP> GET HABTAT::DISK$2:[NATL.UTAH.SWEST]HOUSING.TXT HOUSE.TXT 

3.15 Printing

Using FTP, you can:

Follow these requirements:

Note that you can also use the DCL PRINT command to print files across the network. To determine the best service to use for your printing needs, see Section 1.1. For more information about the DCL PRINT command, see Chapter 7.

3.15.1 Print Form

FTP supports nonprint forms only. A SHOW STATUS command shows the form type as NON_PRINT.

3.15.2 Examples Using FTP to Print

The following example sends the file MEMO.TXT from the local host to the printer LNAX:, which is connected to the remote host:

FTP> PUT MEMO.TXT LNAX: 

This next example copies remote file q4earnings and sends it to local printer LPA0:.

FTP> GET Q4EARNINGS LPA0: 

3.16 Suspending FTP to Return to the Local DCL Prompt

While using FTP, you can use the SPAWN command to suspend your current session and create a subprocess at the local DCL prompt. At the DCL prompt, you can then enter any number of DCL commands. (You can also specify a DCL command in the SPAWN command line.) To return to your suspended FTP session (exiting the DCL subprocess), enter the LOGOUT command. In the following example, the user suspends the FTP session to list the files in the working directory on the local host and delete one of the files in that directory.

FTP> SPAWN
$ DIR
   .
   .
   .
$ DEL TR3.TXT:*
$ LOGOUT
   .
   .
   .
FTP>

3.17 Command Descriptions

To start FTP, issue the FTP command at the DCL prompt.

To use FTP commands, type them at the FTP> prompt.

This section provides complete descriptions of each FTP command, listed alphabetically. The related ENABLE and DISABLE commands are presented together (see the description for ENABLE).


APPEND

Appends a local file to a remote file. The remote file can reside on any system that supports FTP. To use this command, you must have an FTP session with a remote host.

DCL-Style Format

APPEND local_file [ remote_file ]


UNIX-Style Format

append local_file [ remote_file ]

restrictions

No wildcards.

PARAMETERS

local_file

Required.

Name of the local OpenVMS file.

remote_file

Optional.

Name of the remote file, either UNIX or OpenVMS.


Example

FTP> APPEND LARGE.TXT CHRONOS 
200 PORT command successful 
150 Opening data connection for chronos. (130.180.4.8,1108) 
226 Append transfer complete 
local:large.txt   remote:chronos 
15596 bytes sent in 00:00:00.10 seconds (152.30 Kbytes/s) 

Appends local file LARGE.TXT to UNIX file chronos.


CONNECT

Establishes an FTP connection to a remote host. The remote host can be any operating system that supports FTP.

DCL-Style Format

CONNECT remote_host [ port ]


UNIX-Style Format

open remote_host [ port ]


PARAMETERS

remote_host

Required.

Remote host to which you want to connect.

port

Optional. Default: 21.

FTP port on the remote host.


Example

FTP> CONNECT RETAIL [Return] 
220 retail.good_co.com FTP Server (DIGITAL UNIX Thur Jan 2 1997) Ready 
Connected to roc.bird.com. 
Name (retail:dave): [Return] 
331 Password required for dave 
Password:                  (not echoed)[Return]
230 User dave logged in 
FTP> 

User dave connects to UNIX host retail.


CREATE/DIRECTORY

Creates a directory on the remote host. The remote directory can be on any operating system that supports FTP. To use this command, you must have an FTP session with a remote host.

DCL-Style Format

CREATE/DIRECTORY remote_directory


UNIX-Style Format

mkdir remote/path


PARAMETERS

remote_directory

remote/path

Required.

Name for the created directory.


Examples

#1
FTP> CREATE/DIRECTORY TERM 
257 MKD command successful. 

In this example:

#2
FTP> CREATE/DIRECTORY [.TRANSFERS] 
257 MKD command successful. 

In this example:


DELETE

Deletes either UNIX or OpenVMS remote files. To use this command, you must have an FTP session with a remote host.

Note

Use caution with the mdelete command. The FTP DIRECTORY command does not list hidden files (files that start with a period). Using the mdelete command with any wildcard deletes hidden files, which you might need.


DCL-Style Format

DELETE remote_file

DELETE/DIRECTORY remote_directory


UNIX-Style Formats

delete remote_file

mdelete remote_files

rmdir remote_directory


PARAMETERS

remote_file

remote_files

remote_directory

Required.

File, files, or directory to delete.


QUALIFIERS

/DIRECTORY

Optional. The /DIRECTORY qualifier must follow immediately after the DELETE command without a space.

Deletes an empty directory. To delete a directory that is not empty, you must first delete the contents of the directory.


Examples

#1
FTP> DELETE [MAIN.BRANCH]*.*;* 
250 DELE of [MAIN.BRANCH]*.*;* successful.

Deletes all files in the remote OpenVMS directory [MAIN.BRANCH].

#2
FTP> DELETE/DIRECTORY BRANCH.DIR;1
250 RMD command successful.

Deletes the directory [MAIN.BRANCH].

#3
FTP> DELETE "/USERS/VENTURE/CARTON" 
250 DELE command successful.

Deletes UNIX file with path name /users/venture/carton.

#4
FTP> mdelete "/BIDS/WEST/JANUARY97/"C* 
250 DELE command successful.
250 DELE command successful.
250 DELE command successful.
 

Deletes three UNIX files starting with the letter "c" from directory /bids/west/january97. Quotation marks are required because of the slashes in the UNIX file name. The asterisk (*) is not quoted to preserve its use as a wildcard. (Note that the messages generated depend on the server. For example, for an OpenVMS server, messages would specify the names of the files deleted.)


DIRECTORY

Lists the names of remote files and other information about them. The remote files can be on any FTP server. To use this command, you must have an FTP session with a remote host.

The DCL-style DIRECTORY command supports the redirecting of output to a file.


DCL-Style Format

DIRECTORY[ /BRIEF | /OUT=output_file ] [ remote_directory ]


UNIX-Style Format

ls [ /remote/path ]


PARAMETERS

remote_directory

/remote/path

Optional. Default: default directory.

Directory with the file names you want to list. Wildcards and multiple directories are valid.

For a directory listing of files on a DECnet node, use the full specification:

node::device:[directory]file

QUALIFIERS

/BRIEF

Optional. Default: full display.

Produces output similar to the UNIX ls command.

/OUT=output_file

Optional. Default: screen output.

Name of the file to hold the output.


Examples

#1
FTP> DIRECTORY 
200 PORT command successful
150 Opening data connection for /bin/ls (130.180.9.8,1150) 
total 76
-rwxr-x--x  1  geary    users  261 Nov  6  1996 .cshrc
-rw-r--r--  1  root      users 128 May 21 11:16 .mailrc
-rwxr-x--x  1  geary    users  182 Nov  6  1996 .profile
drwxr-x--x  2  geary    users  512 Nov  6  1996 bin
   .
   .
   .
226 Transfer complete.
911 bytes received in 00:00:00.07 seconds

Displays a full listing of file names in the current default UNIX directory.

#2
FTP> LS DISK3$:[BANKS.BRANCH.BILLS] 
200 PORT command successful
150 Opening data connection for DISK3$:[BANKS.BRANCH.BILLS]  (11.1.2.3.4)
LOCAL_ACCTS.DIS;1
GO_FIGURE.EXE;14
COMPARE.EXE;4
SUMTOTAL.COM;1
226 NLST Directory transfer complete.
428 bytes received in 00:00:00.41 seconds
FTP>
 

Displays a listing of file names in the directory of the connected host, which is another OpenVMS system.


DISCONNECT

Terminates your FTP session with the remote host and returns to the FTP prompt.

DCL-Style Format

DISCONNECT


UNIX-Style Formats

close

disconnect


ENABLE (DISABLE) LOG

Enables or disables the display of all protocol commands sent to the remote host.

Default: DISABLE LOG.


DCL-Style Format

ENABLE LOG

DISABLE LOG


UNIX-Style Format

debug


Example

FTP> ENABLE LOG 
FTP> ENABLE REPLY 
FTP> PUT PRICES.TXT YEAR.PRICES
---> PORT 1,2,3,4,7,138
---> STOR PRICES.TXT
609 bytes sent in 00:00:00.02 seconds
FTP> GET LAKE.IBIS LAKE_IBIS.DAT 
---> PORT 1,2,3,4,7,138
200 PORT command successful
---> WRITER lake.ibis
150 Opening data connection for lake.ibis (1.2.3.4,193)
226 Transfer complete
local: LAKE_IBIS.DAT remote:lake.ibis
4 bytes received in 00:00:00.03 seconds (0.13 Kbytes/s)
FTP> 
 

Turns on the display of commands sent to the remote host. Shows all the commands sent to the remote host during the execution of PUT and GET.


ENABLE (DISABLE) PARSE

Enables or disables the expansion of remote file names during file transfers.

During GET operations, an expansion of a directory name might be different from the expansion of other file names. The result depends on the operating systems of the remote and local hosts.


DCL-Style Format

ENABLE PARSE

DISABLE PARSE


UNIX-Style Format

glob


Examples

#1
FTP> ENABLE PARSE 
FTP> PUT BIRDS*.TXT 

Enables parsing and the expansion of wildcards. Copies all the files starting with the letters BIRDS to the remote host.

#2
FTP> ENABLE PARSE 
FTP> GET *.DOC 
 
 

Because parsing is enabled, the remote host expands the wildcard. All remote files ending in ".doc" are copied to the local system.

The command is equivalent to:

FTP> ENABLE PARSE 
FTP> MGET *.DOC 

ENABLE (DISABLE) PORT_COMMAND

Enables or disables the sending of the FTP protocol PORT command to the remote host.

By default, FTP sends a PORT command when establishing a connection. If this command fails, FTP uses the default data port (20).

Disable the sending of the PORT command when you communicate with remote hosts that ignore PORT commands.

Default: ENABLE PORT_COMMAND.


DCL-Style Format

ENABLE PORT_COMMAND

DISABLE PORT_COMMAND


UNIX-Style Format

sendport


Example

FTP> ENABLE PORT_COMMAND 
FTP> PUT CODE.TXT 
200 PORT command successful
150 Opening data connection for CODE.TXT (130.180.10.8,1182)
226 Transfer complete
local: DISK$PROJECT6:[MANAGEMENT]CODE.TXT;9  remote: CODE.TXT
3634 bytes sent in 00:00:00.04 seconds (88.72 Kbytes/s)

FTP issues a PORT command before the file transfer.


ENABLE (DISABLE) REPLY

Enables or disables the display of all the responses from the remote host.

Default: ENABLE REPLY.


DCL-Style Format

ENABLE REPLY

DISABLE REPLY


UNIX-Style Format

debug


Example

FTP> DEBUG 
Debugging on (debug=1).
FTP> GET CONDOR CONDOR.DAT 
200 PORT command  successful
Opening data connection for CONDOR. (16.20.40.96,1094)
226 Transfer complete
local: CONDOR.DAT  remote: condor
24372 bytes received in 00:00:00.05 seconds (476.01 Kbytes/s)
FTP>
 

Enables the display of all the responses from the remote host. Copies CONDOR.DAT from the remote host, showing all the executed FTP commands in progress.


ENABLE (DISABLE) TRANSFER_VERIFICATION

Enables or disables the display of # for each 1000 bytes of transferred data.

Default: DISABLE TRANSFER_VERIFICATION.


DCL-Style Format

ENABLE TRANSFER_VERIFICATION

DISABLE TRANSFER_VERIFICATION


UNIX-Style Format

hash


Example

FTP> ENABLE TRANSFER_VERIFICATION 
FTP> GET FUTURES.DIS FUTURES_H2.DIS 
200 PORT command successful 
150 Opening data connection for futures.dis (11.20.99.100,26) 
############### 
226 Transfer complete. 
local: FUTURES_H2.DIS remote: futures.dis 
15596 bytes received in 00:00:00.11 seconds (138.45 Kbytes/s) 
FTP> 

Enables the display of # for each 1000 bytes of transferred data. Copies futures.dis to FUTURES_H2.DIS, showing when 1000 bytes are transferred.


ENABLE (DISABLE) VMS_PLUS

Enables or disables VMS Plus Mode. This lets you specify a transfer mode based on file type, for example, ASCII or image.

With VMS Plus Mode disabled, FTP does not send the FTP SITE command. (Older implementations of the FTP server do not support this command.) The FTP client uses the FTP SITE command to identify itself (its SITE type) to the remote host. The SITE type of an FTP client can be either:

Defaults:


Format

ENABLE VMS_PLUS

DISABLE VMS_PLUS


EXIT

Closes an open connection and exits FTP. Equivalent to Ctrl/Z.

DCL-Style Format

EXIT


UNIX-Style Format

quit


FTP

Starts an FTP session and does one of the following:

DCL-Style Format

FTP [host [ port ] ] [/USERNAME=remote_user_name | /PASSWORD=password | /INPUT=file]


UNIX-Style Format

ftp [ host [ port ] ] [ local_file ]


PARAMETERS

host

Optional.

Remote host to which you want to connect.

port

Optional. Default: 21.

FTP port on the remote host.


QUALIFIERS

/INPUT=file

Optional. Default: interactive input.

Runs a DCL command file with FTP commands.

/PASSWORD=password

Optional. Default: your password on the local system.

Password for the remote user account to which you want to connect.

/USERNAME=remote_user_name

Optional. Default: your user name on the local system.

Name of the remote user account to which you want to connect.


Examples

#1
$ FTP WKSITE [Return] 
220 wksite.texts.wrights.com FTP Server (DIGITAL UNIX 13:34:28 EDT) Ready 
Connected to wren.nest.willow.com. 
Name (wksite:parks) [Return] 
331 Username PARKS requires a password 
Password:            (not echoed) [Return] 
230 User logged in 
FTP> 

User PARKS starts an FTP session and connects to UNIX host wksite.

#2
$ FTP VIRTL /USERNAME=BENSON /PASSWORD=WMSWMS 
220 newy FTP Server (Version 4.2) Ready 
Connected to NEWY.LINK1.MOA.COM. 
230 User logged in 
FTP> 

Starts an FTP session and connects to remote OpenVMS host VIRTL, in user account BENSON.

#3
$ FTP 
FTP> 

Starts an FTP user session without establishing a connection.


GET

The GET command does the following:

To use this command, you must have an FTP session with a remote host.


DCL-Style Format

GET[/CONFIRM | /FDL] remote_file [local_file | printer]


UNIX-Style Formats

get remote_file [ local_file ]

mget remote_files


PARAMETERS

remote_file

Required.

Name of the remote file to copy.

local_file

Optional. Default: Same name (without any device or directory names).

New name for the copied file. You cannot specify a local file name if you specify:

printer

Optional.

Sends a remote file to a local printer.

Specify the actual name of the printer, not the queue name or logical name.


QUALIFIERS

/CONFIRM

Optional. Default: immediate execution. The /CONFIRM qualifier must follow immediately after the GET command without a space.

Asks you for confirmation before executing the copy operation.

/FDL

Optional. Default: no secondary file created. The /FDL qualifier must follow immediately after the GET command without a space.

Uses a secondary file with the copied file's OpenVMS RMS record attributes (if you previously issued a PUT/FDL command). The SET TYPE command determines the type of file:


Examples

#1
FTP> GET "/SEASONS/STANDINGS/SPRING.DELIVERIES" SPORTS.TXT 
200 PORT command successful 
150 Opening data connection for spring.stats ... 
   .
   .
   .

Copies the UNIX file spring.deliveries to the OpenVMS host, where it is named SPORTS.TXT.

#2
FTP> GET SPRING.DELIVERIES SPORTS.TXT 

Copies the same file (spring.deliveries) when it is in your remote working directory.

#3
FTP> MGET *.DOC 
200 PORT command successful 
150 Opening data connection for cast.doc;1 (16.20.208.100,27) 
226 Transfer complete. 
local:cast.doc;1   remote: cast.doc;1 
1222 bytes received in 00:00:00.01 seconds (70.19 Kbytes/s) 
200 PORT command successful 
150 Opening data connection for director.doc;3 (16.20.208.100,28) 
226 Transfer complete. 
local: director.doc;1   remote: director.doc;3 
90 bytes received in 00:00:00.01 seconds (5.49 Kbytes/s) 
FTP>

Copies all the UNIX files ending with doc.

#4
FTP> GET/CONFIRM  *.*;* 
Get EDTINI.EDT ? [Y or N] [Y]: Y 
   .
   .
   .

Before executing the copy operation for every file in the remote default directory, FTP asks, one-by-one, to confirm that you want to copy each file.

#5
FTP> GET/FDL FEATHERS.DIS 

Copies and preserves the record attributes of feathers.dis. (A PUT/FDL command was previously issued.)

#6
FTP> GET Q4EARNINGS LPS40_1: 

Prints the remote file q4earnings on local printer LPS40_1.


HELP

Displays information about how to type FTP commands. Provides help for both DCL-style and UNIX-style commands, as follows:

For a list of available commands, type ?


DCL-Style Format

HELP [/REMOTE] [command ]


UNIX-Style Formats

help [ command ]

? [ command ]


PARAMETERS

command

Optional.

FTP command about which you would like information.


QUALIFIERS

/REMOTE

Optional. Default: local host.

The remote host displays the FTP help information. If the remote host is a UNIX host, the FTP help is all UNIX style. If you want to display information about a specific command, the /REMOTE qualifier must follow the HELP command and precede the name of any command for which you want information, as shown in the second example.


Examples

#1
FTP> HELP/REMOTE 
214-The following commands are recognized (* =>'s 
unimplemented). 
USER   PORT    RETR    MSND*    ALLO     DELE   SITE*    XMKD  CDUP 
PASS   PASV    STOR    MSOM*    REST*    CWD    STAT*    RMD   XCUP 
ACCT*  TYPE    APPE    MSAM*    RNFR     XCWD   HELP     XRMD  STOU 
REIN*  STRU    MLFL*   MRSQ*    RNTO     LIST   NOOP     PWD   QUIT 
MODE   MAIL*   MRCP*   ABOR     NLST     MKD    XPWD 
FTP> 

The remote host, a UNIX system, displays the FTP commands you can use in your FTP session with this system.

#2
FTP> HELP/REMOTE USER
214 Syntax: USER <sp> username 
FTP> 

The remote host displays information about the FTP USER command.


LOGIN

Initiates the login process and completes it if no password is required. If a password is required, enter it at the password prompt.

Use this command if the connection is alive but the login procedure fails when you request a connection.


DCL-Style Format

LOGIN user_name


UNIX-Style Format

user user_name


PARAMETERS

user_name

Required.

Your account on the connected remote host.


Example

FTP> CONNECT BYGNET [Return] 
220 bygnet.band2.stat.com FTP server (UNIX Thur April 24 1997) Ready 
Connected to CYGNET.band2.stat.com. 
Name (bygnet:UserGent): dom [Return] 
530 User dom access denied 
%UCX-E-FTP_LOGREJ, Login request rejected 
 
FTP> LOGIN "UserGent" 
331 Username UserGent requires a Password 
Password:        (not echoed)[Return] 
230 User logged in 
FTP>


Previous | Next | Contents