TCPware V5.7 User's Guide

Previous PageTOCIndexNext Page



Chapter 3

FTP: Transferring Files

Introduction

The File Transfer Protocol (FTP) transfers files to and from a remote host. FTP-OpenVMS controls the method by which FTP transfers the files.

The Client-FTP utility is your interface to FTP-OpenVMS. You can run Client-FTP interactively or through a startup command procedure.

For FTP-OpenVMS to operate between two hosts, the remote host must provide a compliant client or server. You can run FTP directly (interactively) or indirectly from a command procedure. Client-FTP supports multiline recall of up to 20 lines.

Before Using FTP

Before you can transfer files, you need:

To make sure that the FTP-OpenVMS software is installed, configured, and started on your system.

The name or internet address of the remote host to which you want to connect.

The username and password of the account on the remote host. If the remote host does not support multiuser protection features, you might not need a username and password. If you are using TCPware's Token Authentication, the password is the PASSCODE generated on your SecurIDW token.

The filenaming conventions on the remote host.

FTP Session

A typical FTP session consists of the following steps:

1 Open the FTP connection.

2 Determine the format of the files you want transferred.

3 Transfer files using the GET (MGET), PUT (MPUT), or COPY commands or selections on the graphical user interface windows. The default file format is formatted ASCII.

4 Close or exit the FTP connection.

Features

FTP-OpenVMS includes the following features:

Choice of command line execution or graphical user interface execution (for DECwindows Motif Version 1.1 or later).

Informational and error status messages.

Support of wildcards in source filespecs.

Table 3-1 describes some of the features of Client-FTP.

Table 3-1 Client-FTP Features (Continued)

This feature...

Means that...

Command Line or Graphical User Interface Command Execution

Client-FTP allows you to execute FTP commands either at the FTP> prompt or through a DECwindows graphical user interface environment. The user interface is provided with DECwindows Motif Version 1.1 and later.

You can use either DCL-style syntax or UNIX-style syntax at the FTP> prompt.

DCL-syntax can include qualifiers:

FTP> DIRECTORY *.DIR /BRIEF

You usually enter UNIX-style commands in lowercase:

FTP> ls *.dir

Case Conversion

Client-FTP no longer converts the user name, password, and account to lowercase if they were not supplied on the OPEN and USER command line and thus prompted for. If you are prompted for these parameters you must enter them in the proper case, since quotes are no longer needed to maintain case.

Status Messages

Client-FTP issues informational and error messages. These messages are self-explanatory and conform to the standard OpenVMS message format.

The numeric codes that prefix these messages conform to the RFC 959 standard for FTP.

Wildcards

Client-FTP supports wildcards for the COPY, GET, PUT, DELETE, and DIRECTORY commands. The acceptable wildcard characters are:

Percent sign (%) or question mark (?) to represent individual characters.

Asterisk (*) to represent multiple characters.

If you include the asterisk wildcard to represent multiple files to FTP, use the MGET, MPUT, or MDELETE commands, or specify the/MULTIPLE qualifier with the GET, PUT, COPY, or DELETE command. These two examples produce identical results:

FTP> MGET *.TXTFTP> COPY *.TXT/MULTIPLE/REMOTE *

Note! You do not require the asterisk for the destination with MGET, but you do require it with COPY.

If enclosed in a quoted string, wildcard symbols no longer act as wildcards.

Note! You can customize the appearance of your graphical user interface by using Motif resources in a resource file. This file is called DECW_FTP.DAT and is in your login directory.

The most important resource is the one that sets your application window to fit the screen. If you run your application from a PC with a small, 14-inch monitor, for example, you might want to use the following resource:

*DXmfitToScreenPolicy: AS_NEEDED

If the window size is bigger than the screen can handle, scroll bars appear in the windows so that you can scroll to parts of the window.

Other examples of using resources include:

DECW_FTP*background: gray

DECW_FTP*foreground: black

These set the screen background color to gray and the foreground color to black. See your Motif documentation for other possible resource settings.

Note! Wherever possible, the procedural descriptions that follow cover the command line and graphical user interface execution methods. If you prefer the graphical user interface method, you can execute most file transfer and manipulation functions from the TCPware FTP-OpenVMS File Transfers window shown in Figure 3-3 and Figure 3-4. Many of the functions in this window have command line equivalents.
If you need further information on performing a particular function in the TCPware FTP-OpenVMS File Transfers window, see its command equivalent in the Command Reference.

Note! TCPware provides secure FTP-OpenVMS logins through its Token Authentication feature, if installed and enabled. For more information, see Chapter 14, Token Authentication: Protecting Logins.

Opening a Connection

Only one FTP connection can be open at a time. Once open, all file transfers and other remote operations use that connection.

You can open an FTP connection by using either the command line user interface, or the graphical user interface if you have a DECwindows system.

Command line method. Use this method if you want to issue commands from the DCL prompt (see Figure 3-1).

1 Enter one of the following at the DCL prompt:

$ FTP
FTP> OPEN host

in combination:

host is the name of the host to which you want to connect. Respond to the login prompts, if any, of the remote host. After a successful login, the FTP> prompt appears where you enter the FTP commands described in the following sections. This is the option shown in Figure 3-1.

$ FTP host

host is the name of the host to which you want to connect. Respond to the login prompts, if any, of the remote host. After a successful login, the FTP> prompt appears where you enter the FTP commands described in the following sections.

$ FTP host username password

Enter the host to which you want to connect, the username of the account on the remote host, and the password (PASSCODE if using Token Authentication) of the account on the remote host as part of the command. After a successful login, the FTP> prompt appears where you enter the FTP commands described in the following sections.

See the OPEN command if you are using a SecureID card for password authentication.

2 At the end of your FTP session, use the CLOSE command to close the connection and exit FTP. (See Closing and Exiting for the different close options.)

Graphical user interface method. You can use the graphical user interface method if you have a DECwindows host running DECwindows with Motif Version 1.1 or later (see Figure 3-2):

1 At the DCL prompt, enter:

$ SET DISPLAY/CREATE/NODE=display-node/TRANSPORT=TCPIP
$ DECW_FTP

2 When the TCPware FTP-OpenVMS Connections window appears, enter at the Remote Host: field, tab to the Username: field and enter at it, and tab to the Password: field and enter at it. Then click the OPEN button.

A TCPware FTP-OpenVMS Message Window shows all the actions FTP-OpenVMS takes from this point on. Figure 3-3 and Figure 3-4 on the following pages show an example of the two parts to the TCPware FTP-OpenVMS File Transfers window that appears when you open a connection from the TCPware FTP-OpenVMS Connections window.

Figure 3-1 Opening an FTP Connection Using the Command Line Method see graphic

Figure 3-2 Opening an FTP Connection Using the Graphical User see graphic

Note! For the graphical user interface, FTP-OpenVMS stores the connection information in the DECW_FTP_PROFILE.DAT file in your login directory to set up the next connection. See the note in the previous section first.

Figure 3-3 "Local" and "Remote" Part of the File Transfers Window see graphic

Graphical User Interface

The graphical user interface method offers a number of options from the TCPware FTP-OpenVMS File Transfers screen.

You can set various options by clicking Options on the menu bar on the TCPware OpenVMS File Transfers screen (see Figure 3-3). These options are:

Settings (see the top screen in Figure 3-4)

Viewer Preferences (see the bottom screen in Figure 3-4)

Here is the process to use:

1 Click Options followed by Settings... to get the TCPware FTP-OpenVMS Settings window. This window presents the following options:

FTP Logs

You can select to log Commands, Replies, or Both. Your password appears on the screen if you use the Commands or Both setting.

Confirm on Delete

Click the box to confirm file or directory deletion.

Beep After Copy

Click the box to enable a beep when copying is complete.

Timeout (secs)

Set the FTP session timeout, in seconds.

PASV Mode

Click the box to set passive mode transfers (see the SET [NO]PASSIVE command).

To accept the settings you make on this screen, click OK; to cancel the window, click Cancel.

2 Click Options followed by View... to get the TCPware FTP-OpenVMS File Viewer Preferences window, with the following options:

File Type

Enter a file extension to indicate the type of file you would like to view; for example, enter c for files with the .C extension, ps for files with the .PS extension, or * for any file type.

Viewer

Enter the type of viewer to use for the file type; these should be DCL commands or foreign commands you define before invoking the application; for example, enter the DCL command view/interface=decwindows/format=ps to use the CDA Viewer with .PS files.

 

Click Add to add the File Type and Viewer combination entered; the results appear in the scrollable list to the left of the File Type and Viewer fields.

 

Click a list item and click the Modify or Delete button to modify or delete the item.

 

To cancel the window, click Cancel.

Note! Changes you make to settings and viewer preferences are stored in DECW_FTP_SETTINGS.DAT and DECW_FTP_VIEWERS.DAT files, respectively, in your login directory.

Figure 3-4 FTP-OpenVMS Window Options see graphic

Closing and Exiting

An FTP connection remains open until you quit or exit FTP, close the connection, or open a new connection.

Command line method. See Figure 3-6:

1 To close an FTP connection, use one of the following commands:

FTP> CLOSE

Closes the current connection and continues the FTP session for the next command.

FTP> OPEN host
FTP> CONNECT host

Both OPEN and CONNECT close the current connection and open another one.

2 To exit an FTP session:

FTP> EXIT (or Ctrl/Z)

See the CLOSE, OPEN, and EXIT commands in the Command Reference.

Graphical user interface method. See Figure 3-7:

1 To close an FTP connection from the TCPware FTP-OpenVMS File Transfers window, click the Connections option on the menu bar and click the Close... option. The information in the "Remote" part of the screen disappears.

To reopen a connection, click the Connection option on the menu bar and click the Open... option. (Open is initially greyed-out.)

2 To exit from FTP entirely from any of the DECwindows screens, click the File option on the menu bar and click the Exit option.

Figure 3-5 Closing from the Command Line see graphic

Checking Directories

After you establish an FTP connection, you can check the directories on the remote or local host to locate the file(s) you want.

To check remote directories and determine the file format type when in FTP (see Figure 3-7):

1 Open the FTP connection and enter: FTP> DIRECTORY

Use the CD or SET DEFAULT /REMOTE command to move to other directories on the remote host.

If you use the menu-driven method, see the "Remote" part of the FTP for TCPware for OpenVMS screen (see Figure 3-3). You can double-click any of the listed directories, change the pathname in the Current Remote Directory field, or use the Go Up button in the middle of the screen.

2 Check file extensions to determine file types. You might need to enter special qualifiers when you transfer certain types of files.

See Table 3-2 in the next section for a description of the file transfer formats.

3 Check the local directory when in FTP: FTP> LDIR

If you use the menu-driven method, see the "Local" part of the FTP for TCPware for OpenVMS screen (see Figure 3-2).

4 Use the LCD or SET DEFAULT /LOCAL command to move to other directories on the local host.

See the DIRECTORY, LDIR, and SET DEFAULT commands in the Command Reference for checking directories.

Figure 3-6 Checking Remote and Local Directories

Checking File Transfer Formats

You can determine what file format to use during file transfers. Client-FTP lets you transfer files in formatted ASCII, formatted binary, image, block, FORTRAN carriage control, and VMS formats. On OpenVMS systems, the filename extension can indicate the file type. Formatted ASCII is the default transfer file type and is usually sufficient for most files.

FTP converts the various file formats to formatted ASCII or IMAGE. (Executable and zip/compressed files are popular files in this category.) The formats are similar to the formats that the OpenVMS EXCHANGE utility provides to transfer between OpenVMS and DOS-11 or RT-11 file systems. You either specify the file transfer format when you use the GET, PUT, or COPY command, or Client-FTP determines the format from the source filename's extension.

See Figure 3-8 for an explanation of the file transfer formats.

Check file extensions to determine file types. You might need to enter special qualifiers when you transfer certain types of files.

When you use the COPY, GET, or PUT commands to transfer files, you can use the /ASCII,
/BINARY, /BLOCK, /FORTRAN, /IMAGE, or /VMS qualifiers to set the file transfer format. You can also set default file transfer formats using these qualifiers with the SET DEFAULT command, or specifying these keywords with the TYPE command. (See the SET DEFAULT and TYPE commands in the Command Reference for equivalent usage.)

If you use the menu-driven method, you can make the file type selections in the middle part of the TCPware FTP-OpenVMS File Transfers screen (see Figure 3-4).

Table 3-2 Client-FTP File Transfer Formats (Continued)

This file format...

With extension...

Means...

Formatted ASCII

 

ASCII records terminated with a CR and LF and transferred as ASCII. Use for all except formatted binary and image files. maximum formatted ASCII record size is 8192 bytes. In OpenVMS-to-"FTP ASCII" conversion, CR/LF pairs are added to the end of records. In "FTP ASCII"-to-OpenVMS conversion, CR/LF pairs are removed from the end of records.

Formatted Binary

.OBJ

.STB

.BIN

.LDA

Binary records transferred as IMAGE. In OpenVMS-to-"FTP IMAGE" conversion, record header and checksum are added to all records. In "FTP IMAGE"-to-OpenVMS conversion, record header and checksum are removed from each record.

Remote hosts might not be able to distinguish between formatted binary and image files because both file types are transferred using "FTP IMAGE" format. In this case, the formatted binary files are stored as image files (and if properly transferred back, are formatted binary files again). This is typically not a problem because formatted binary files are system-dependent files.

BLOCK

 

File blocks transferred as IMAGE. Use for STREAM, STREAM_CR, STREAM_LF, and UNDEFINED record formats. Provides the highest transfer rates since it involves minimal processing.

Very similar to image mode. In OpenVMS-to-"FTP IMAGE" conversion, and OpenVMS file is read using block-I/O mode without regard to record structure. In "FTP IMAGE"-to-OpenVMS conversion, an OpenVMS file is created with the STREAM_LF recordformat and is written using block-I/O mode.

Note! No padding of the last block of data occurs.

Block mode is particularly useful for files with a STREAM, STREAM_CR, STREAM_LF, or UNDEFINED record format.

FORTRAN

 

Like formatted ASCII except that first character of each line controls how to display each line. Conversions are the same as for formatted ASCII.

Attributes for the output file reflect that the file has a FORTRAN carriage control format. Some hosts do not distinguish between FORTRAN carriage control and ASCII files and might not support this transfer format.

IMAGE

.EXE.

.TSK

.OLB

.MLB

.SYS

.SML

.ULB

Fixed-length binary records transferred as IMAGE. In OpenVMS-to-"FTP IMAGE" conversion, records are read as is. In "FTP IMAGE"-to-OpenVMS conversion, records are written as fixed length. If the last record is too short (less than 512 bytes), it is padded with binary zeros.

VMS

 

Use for RMS file transfers between OpenVMS systems. Systems that support this structure negotiate it automatically.

The VMS file structure types are richer than those of UNIX for which FTP is designed. Thus VMS and VMS-Plus modes were added to help in transferring OpenVMS files.

Using GET, PUT, and COPY

Use the GET, PUT, or COPY commands to transfer files.

GET

"Gets" a copy of a file from the remote host and places it in the current local directory.

PUT

"Puts" a copy of a local file in the current directory on the remote host.

COPY

"Gets" or "puts" a copy of a file, depending on use of the /LOCAL or /REMOTE qualifier after the source or destination parameter. COPY requires the destination parameter.

Command line method. Figure 3-9 shows the format and filename syntax of the GET, PUT, and COPY commands. Follow the examples and observe the following conventions when you transfer files between remote and local hosts (the sequence is not important):

If using GET or PUT, omit destination if you want to use the source filename (and extension if it exists), unless source is a quoted string. COPY requires the destination parameter. If using COPY, use a wildcard (asterisk) for destination when you want to use the source filename as the destination filename.

If copying to or from a non-OpenVMS filespec, enclose it in double quotes (" ").

Separate multiple filespecs with commas.

If using wildcarded source filespecs (with an asterisk), use the /MULTIPLE qualifier. Alternatively, use the MGET or MPUT command to copy wildcarded source files. (Note that this requires setting the remote default directory first.)

Including an asterisk (*) after the semicolon (;) in a destination parameter preserves the file version when copying to a remote host.

Note! If the file version in the source parameter already exists at the destination, that version is overwritten at the destination. Also, you do not get a warning if a higher numbered destination version already exists.

If a DECnet file, use the full OpenVMS filespec.

At this point, the file transfer format you determined is important.

See the GET, PUT, and COPY commands in the Command Reference. The RCP command is also available at the DCL prompt for remote file copies (see Chapter 7, RCP: Copying Files, for details on its use).

Note! FTP-OpenVMS does fast transfers between two OpenVMS systems using VMS file structure or VMS Plus Mode (for HP TCP/IP Services for OpenVMS (UCX) servers). When FTP-OpenVMS identifies file transfers between two OpenVMS hosts running TCPware, it automatically transfers files in large blocks rather than small records. These VMS modes greatly increase the transfer speed and preserve all Record Management Services (RMS) file attributes. The VMS modes are disabled with non-OpenVMS systems. See Table 3-2 on the previous page for the file transfer format descriptions.

Graphical user interface method. To transfer files:

From local to remote

click one or more files on the "Local" part of the File Transfers screen (see Figure3-3) and click Copy-->. To give the file a specific name on the remote host, enter a filename in the New Remote File/Dir Name field.

From remote to local

click one or more files on the "Remote" part of the File Transfers screen (see Figure3-4) and click <--Copy. To give the file a specific name on the local host, enter a filename in the New Local Name field.

See the following information on symbolically linked UNIX systems.

Figure 3-7 GET, PUT, and COPY Command Format see graphic

Symbolic links in UNIX systems. UNIX systems can have files or directories pointing to other files or directories, known as symbolic links. TCPware treats symbolic links as directories, which appear in the Remote Directories field on the menu screens. Once you click and perform an operation on a symbolic link, the directory name disappears from the Remote Directories field and the file to which it points appears in the Remote Files field. You can then treat the file like a regular UNIX file.

Anonymous Users

You can access some remote resources as an ANONYMOUS user instead of with your usual username and password. This is especially useful for access to sites such as the U.S. Library of Congress (LOCIS.LOC.GOV) that allow anonymous user access to some of their files.

Anonymous access depends on your use of the /ANONYMOUS qualifier with the FTP commands that require a file or directory specification using the node name syntax.

You can access some remote resources as an ANONYMOUS user in one of the following ways (see Figure 3-9):

1 By default, use the node name file syntax (as described below) with any FTP command that requires a file or directory specification (such as COPY, DIRECTORY, RENAME, and SET DEFAULT). This file syntax sends the ANONYMOUS username and your e-mail address as a password.

Thus, the following file or directory specification: node::path

is equivalent to: node"ANONYMOUS your-email-address"::path

With OpenVMS Alpha V6.1 and later, and all OpenVMS I64 systems, node can be a domain name or IP address.

2 Use the filespec syntax described in Figure 3-8 and (optionally) add the /ANONYMOUS qualifier, or deny remote anonymous access using the /NOANONYMOUS qualifier.

Using the node name file syntax (and the /ANONYMOUS or /NOANONYMOUS qualifier) affects the following FTP commands:

COPY

CREATE/DIRECTORY

DELETE

DIRECTORY

DISPLAY

GET

LS

MDELETE

MGET

MKDIR

MPUT

PUT

RENAME

RMDIR

SET DEFAULT

Figure 3-8 shows examples of how to allow or deny anonymous user access to remote resources.

Figure 3-8 Anonymous User Access see graphic

Startup Command File

You can have a startup file execute FTP commands each time you invoke FTP. The startup file contains commands you want your system to perform at the beginning of each FTP session. Your system manager might already have defined a system-wide FTP startup file. Creating an FTP startup file is optional.

The startup command file in Figure 3-9 opens a remote connection, sends the password, and initiates a SHOW STATUS command.

You can set up an FTP startup command file or override one established by the system manager at the system level using the following procedure:

1 Create an FTP_STARTUP.COM file in your directory.

2 In the file, include the FTP commands you want executed each time you start an FTP session. If you include a password, make sure to use quotation marks to preserve case.

3 Edit your LOGIN.COM file and define the FTP_STARTUP logical to point to the startup file:

$ DEFINE/PROCESS FTP_STARTUP "SYS$LOGIN:FTP_STARTUP.COM"

Using the DEFINE/PROCESS FTP_STARTUP entry in the user's LOGIN.COM file causes that file to override any FTP startup command file at the system level.

4 Run FTP.

Whenever you run Client-FTP, it looks for the file to which the FTP_STARTUP logical points, and processes all the commands in that file.

If the EXIT or QUIT command appears in the startup file, Client-FTP:

– Ignores all commands following the EXIT or QUIT command.

– Continues with FTP operations after the startup command file.

Note! VERBOSE mode is set ON by default so that you can read replies from the FTP server when you connect or change server directories. This means that you do not need to include the SET DEBUG /CLASS=REPLIES (or its equivalent VERBOSE) command in the startup command file. Although an existing SET DEBUG /CLASS=REPLIES command in the file does not change the mode, a VERBOSE command toggles VERBOSE mode OFF. (See the SET DEBUG /CLASS command description in the Command Reference.) If you are an ANONYMOUS user, VERBOSE mode might help in reading any informational messages the FTP server creates.

Figure 3-9 Setting Up a Startup Command File see graphic

Site-Specific Commands

The FTP-OpenVMS Server supports the SITE SPAWN and SITE SHOW TIME site-specific commands. The Client-FTP can issue these commands at any time.

Site-specific commands can vary depending on the remote FTP server; some servers do not support any.

Issue the FTP-OpenVMS site-specific commands in one of the following ways at the FTP> prompt (see Figure 3-10):

1 SITE SHOW TIME

This command returns the current date and the time of day for the OpenVMS system in the reply message.

2 SITE SPAWN dcl-command

This command allows you to execute any DCL command as a subprocess. You typically use this command to print files, submit batch jobs, execute command procedures, or issue other commands.

The screen does not display the output the subprocess generates. The system returns status from the subprocess as the status for the SITE SPAWN command.

Note! Spawning is not allowed for CAPTIVE accounts.

See the SITE and SPAWN commands in the Command Reference.

Figure 3-10 Issuing Site-Specific Commands

Sample Session

This section describes a sample FTP-OpenVMS session.

See Figure 3-11 for the corresponding numbered steps. In this example, a user on local host BETA:

1 Starts Client-FTP, opens a connection to remote host THETA, and logs in as user SMITH (the display does not echo the password at the prompt). (If you are using Token Authentication, enter your PASSCODE in place of the password here.)

2 Using PUT, copies the local SYS.EXE file to THETA.

3 Using GET, copies the SYS.EXE file on THETA back to BETA.

4 Obtains a remote directory listing. There is a SYS.EXE file.

5 Deletes the SYS.EXE file.

6 Obtains another remote directory listing. SYS.EXE is now gone.

7 Obtains a local directory listing. Note that SYS.EXE;1 still exists locally.

8 Opens a connection to host ALPHA (running OpenVMS and FTP-OpenVMS) and logs in as USER. This closes the connection to THETA.

9 Obtains a remote directory listing on ALPHA.

10 Using GET, copies the ASCII file SCREEN_FTP.TXT on ALPHA to BETA.

11 Changes the default for transferring files from formatted ASCII to IMAGE.

12 Using GET, copies the SEND-NORM.BIN, SEND-NORM.OBJ and SEND.OBJ files from ALPHA as image files on the local host.

13 Obtains a local directory listing. SCREEN-FTP.TXT, SEND-NORM.BIN, SEND-NORM.OBJ, and SEND.OBJ are now present.

14 Exits FTP.

Figure 3-11 Sample FTP-OpenVMS Session see graphic

Command Reference

The following pages describe the FTP-OpenVMS commands. Table 3-3 contains command synonyms you can use interchangeably with FTP-OpenVMS commands. Table 3-4 shows commands you can use to do various tasks. Each command includes the graphical user interface equivalent, if available.

Enter FTP commands at the FTP> prompt. Client-FTP supports the following commands:

ACCOUNT

ERROR_EXIT

REMOTEHELP

SET STATUS

CLOSE

EXIT

RENAME

SITE

COPY

GET

SET BELL

SPAWN

CREATE/DIR

HELP

SET DEBUG

STRUCTURE

DEFINE/KEY

LDIR

SET DEFAULT

TYPE

DELETE

OPEN

SET HASH

USER

DIRECTORY

PUT

SET LOWERCASE

 

DISPLAY

PWD

SET PASSIVE

 

ENABLE VMS_PL

QUOTE

SET VMS

 

Table 3-3 FTP Command Synonyms (Continued)

This command...

Is a synonym for the FTP command...

ASCII

TYPE ASCII

BELL

Toggles between SET BELL and SET NOBELL

BINARY or IMAGE

TYPE IMAGE

BYE or QUIT

EXIT

CD

SET DEFAULT /REMOTE

CONNECT

OPEN

DEBUG

Toggles SET DEBUG/CLASS=COMMANDS

DISCONNECT

CLOSE

H

HELP

HASH

Toggles between SET HASH and SETNOHASH

LCD

SET DEFAULT/LOCAL

LIST or LS

DIRECTORY/NAME_LIST

LOGIN

USER

MDELETE

DELETE/MULTIPLE

MGET

GET/MULTIPLE

MKDIR

CREATE/DIRECTCORY

MPUT

PUT/MULTIPLE

PASSIVE

Toggles between SET PASSIVE and SET NOPASSIVE

RECV

GET

RM

DELETE

RMDIR

DLETE/DIRECTORY

SEND

PUT

STATUS

HOW STATUS

VERBOSE

Toggles SET DEBUG/CLASS=REPLIES

Z

SPAWN

Table 3-4 Commands to Use to Perform Various Tasks on the Local System (Continued)

DEFINE/KEY

Associate an equivalence string and set of attributes with a keyboard key

HELP

Bring up the Client-FTP online help facility

LCD

Set your local default directory

LDIR

List files in your local directory

SET BELL

Ring terminal bell after completing a file transfer

SET DEBUG

Display of debugging information

SET HASH

Enable hash marks during a file transfer

SET LOWERCASE

Convert unquoted fileneames to lowercase in a file transfer request

SET PASSIVE

Sets passive mode

SET VMS

FTP-Client negotiates with the server for VMS file structure when opening a connection

SHOW STATUS

Show the status of the current connection and local default directory

SPAWN

Executive DCL commands without exiting FTP

STRUCTURE

Change the default file structure for a transfer (FILE, RECORD, or VMS)

TYPE

Change the default file transfer format (ASCII, BINARY, IMAGE, FORTRAN, BLOCK, VARIABLE, or DEFAULT)

Table 3-5 Commands to Use to Perform various Tasks on the Remote System

CD

Change the remote default directory

DELETE

Delete a file or directory on the remote host

DIR, LIST, or Is

List files on the remote host

MKDIR

Create a directory on the remote host

PWD

Display the name of the current working directory on the remote host

QUOTE

Send an FTP command to the remote server

REMOTEHELP

Bring up the remote FTP server’s online help facility

RENAME

Rename a file on the remote host

SITE

Issue a site-specific command to the remote server

USER

Set the username at the remote host

Table 3-6 TCPware FTP Logicals for Users

FTP_STARTUP

Define the FTP_STARTUP logical to point to the FTP_STARTUP.COM file. For example:

$ DEFINE /SYSTEM /EXECUTIVE FTP_STARTUP SYS$MANAGER:FTP_STARTUP.COM

Client users can override this startup file by creating their own. Including the command DEFINE/PROCESS FTP_STARTUP in a user's LOGIN.COM file overrides any

TCPWARE_FTP_MAX_PRE_ALLOCATION

The logical TCPWARE_FTP_MAX_PRE_ALLOCATION may be defined to limit the size that a file will be pre-allocated to when file size information is available at transfer time. This can be important when transferring very large files, as it can take a long time to pre-allocate the file at the start of the transfer and timeout routines in FTP and/or firewalls may cause connections to be dropped. This logical does not have any effect for STRU OVMS transfers of Indexed, Contiguous, or Contiguous, Best Try files; these files need to have accurate allocation size information at the start of the transfer.

TCPWARE_ADD_CC_ON_FIXED_RECORD_FILES

If this logical is defined to TRUE and a file is transfered as TYPE IMAGE with QUOTE SITE RMS BLOCK OFF in effect, the FTP server will separate the records of a fixed length record file with the linefeed character. This is useful for avoiding the explicit conversion necessary when transfering the file to a non-VMS system with an FTP client that is not able to do record mode transfers.

TCPWARE_FTP_ALL_VERSIONS

Requests the NLST and LIST commands to display all versions of the specified files. If TCPWARE_FTP_ALL_VERSIONS is defined, the logical TCPWARE_FTP_STRIP_VERSION has no effect.

TCPWARE_FTP_ALL_VERSIONS is ignored if the FTP server is in UNIX emulation mode.

TCPWARE_FTP_DISALLOW_UNIX_STYLE

Controls whether UNIX style filename parsing is done. If not defined and a / is found in the filename, it is assumed to be a UNIX style filename. The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE /SYSTEM /EXEC TCPWARE_FTP_DISALLOW_UNIX_STYLE FALSE

TCPWARE_FTP_EXTENSION_QUANTITY

Defines the default allocation/extention quantity for new files and appends. The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE /SYSTEM /EXEC TCPWARE_FTP_EXTENSION_QUANTITY n (number of blocks)

TCPWARE_FTP_KEEP_DIR_EXT

Sometimes the FTP server strips the .DIR extension from the file name of a directory when the NLST function is requested. The FTP server now looks for the logical TCPWARE_FTPD_KEEP_DIR_EXT and, if defined, does not remove the .DIR extension. To use this feature, define the logical as:

$ DEFINE TCPWARE_FTPD_KEEP_DIR_EXT TRUE

To return to the default behavior, deassign this logical.

TCPWARE_FTP_MESSAGE_FILE

Defines the message file the FTP user sees when connecting to the server or moving between directories. The definition of this logical is commented out but defined in the FTP_CONTROL.COM file as follows:

$ DEFINE TCPWARE_FTP_MESSAGE_FILE ".MESSAGE"

TCPWARE_FTP_NOKEEPALIVES

If this logical is defined, the FTP server will not send keepalives on the control channel. The KEEPALIVE command allows the FTP client program to toggle, whether or not it desires keepalives to be sent on the control channel. The SET [NO]KEEPALIVE command allows the FTP client to explicitly set whether or not it desires keepalives on the control channel.

TCPWARE_FTP_ONLY_BREAK_ON_CRLF

If this logical is set and an ASCII file is transferred, a new line is created in the file upon receipt of a carriage return/line feed sequence.

If this logical is not set and an ASCII file is transferred, a new line is created upon receipt of either a carriage return/line feed sequence or a line feed.

TCPWARE_FTP_SEMANTICS_FIXED_IGNORE_CC

If this logical is defined to TRUE, then GET operations of fixed lengths record files will not have a <CR>(carriage return)<LF>(line feed) added to the end of each record. The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE TCPWARE_FTP_SEMANTICS_FIXED_IGNORE_CC ?

TCPWARE_FTP_SERVER_LOG_LIMIT

By setting this logical in the LOGIN.COM file, you can specify that log files be retained. Set the logical name to a dash (-) to retain all log files, or specify a number in the range of 1 to 32000.

Directory size restrictions limit the number of potential files that can actually be created. If you do not specify a number or value, one log file is created or overwritten for each FTP session. Use the DCL PURGE command to delete unneeded log files. The following example specifies that 42 log files be retained:

$ DEFINE TCPWARE_FTP_SERVER_LOG_LIMIT 42

TCPWARE_FTP_STRIP_VERSION

Causes VMS mode output to have no versions. The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE /NOLOG TCPWARE_FTP_STRIP_VERSION ?

TCPWARE_FTP_USE_SRI_ENCODING_ON_ODS5

The logical TCPWARE_FTP_USE_SRI_ENCODING_ON_ODS5 can be defined to 1, TRUE or YES to cause the file name encoding used for UNIX-style file names on ODS-2 disks to be used on ODS-5 disks. This also sets the default case of letters in filenames to lowercase and ignores the stored case.

TCPWARE_FTP_UNIX_STYLE_BY_DEFAULT

If you define this logical, the FTP server starts in UNIX emulation mode.

The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE /NOLOG TCPWARE_FTP_UNIX_STYLE_BY_DEFAULT ?

When sending the command from a non-OpenVMS client, a space is required between the file specification and the qualifier. For example:

$ GET filename /LOG

Previous command syntax: ftp>put xx x.x/image=2048New command syntax: ftp>put x.x "x.x/image=2048"You can disable this feature so that the FTP server can accept an OpenVMS transfer mode qualifier without including the space between the file specification and the qualifier. To disable this requirement, define the logical:

$ DEFINE TCPWARE_FTPD_NOUNIX_SYNTAX "TRUE"

TCPWARE_FTP_UNIX_STYLE_CASE_INSENSITIVE

Allows UNIX style filename handling to be case insensitive. The ? in the logical represents where defined values go. Defined values can be either alpha or numeric.

$ DEFINE /NOLOG TCPWARE_FTP_UNIX_STYLE_CASE_INSENSITIVE ?

TCPWARE_FTPD_NOUNIX_SYNTAX

When sending a command to a non-OpenVMS client, a space is required between the file specification and the qualifier. For example:

FTP> GET filename /LOG

Previous command syntax: ftp>put xx x.x/image=2048New command syntax: ftp>put x.x "x.x/image=2048"You can disable this feature so that the FTP server can accept an OpenVMS transfer mode qualifier without including the space between the file specification and the qualifier. To disable this requirement, define the following logical:

$ DEFINE /SYSTEM /EXECUTIVE_MODE TCPWARE_FTPD_NOUNIX_SYNTAX "TRUE"

Troubleshooting

Access error messages help by entering HELP TCPWARE MESSAGES [identifier], or connect to web site http://www.process.com (select Customer Support followed by the Error Messages button).

ACCOUNT

Specifies the user's account if the remote server requires it.

Format

ACCOUNT account

Parameter

account

User's account. Enclose in quotes if it contains special characters or embedded spaces, or contains mixed-case characters.

Example

The following specifies account Smith on the remote system. Use quotes around the mixed-case account name.

FTP> ACCOUNT "Smith"

CLOSE

Closes the connection to the remote FTP server if one is open and keeps you in FTP.

OPEN and CONNECT also close an existing connection before opening another one.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File TransfersConnectionClose

or Open

Format

CLOSE

Synonym

DISCONNECT

Example

The following closes the current connection:

FTP> CLOSE

COPY

Copies files to or from a remote host. You specify whether the source or destination file is local or remote using the /LOCAL or /REMOTE qualifier. COPY supports full wildcard filespecs except wildcard symbols enclosed in a quoted string. Use the /MULTIPLE qualifier for a wildcard remote source filespec. /REMOTE also supports use of asterisk (*) wildcards after a semicolon (;) in remote file specifications. This creates the same version in the destination file as in the source file (instead of creating a new version). If the server is not OpenVMS, the version number is part of the filename. TCPware does not issue a warning if the server host already has a higher numbered version.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File Transfers• Select file(s) in Local Files for local-to-remote copy, or select file(s) in Remote Files for remote-to-local copy•Copy--> for a local-to-remote copy, or <--Copy for a remote-to-local copy. Give file new name, if desired, in New Local Name or New Remote File/Dir Name

Format

COPY source [,source,...] destination

Equivalents

GET= COPY source /REMOTE destination

RECV= COPY source /REMOTE destination

MGET= COPY source /REMOTE /MULTIPLE destination

PUT= COPY source /LOCAL destination

SEND= COPY source /LOCAL destination

MPUT= COPY source /LOCAL /MULTIPLE destination

Parameters

source

Input filespec. Use a comma between multiple filespecs. Enclose the filespec in quotes if you want to preserve case and did not use the SET NOLOWERCASE command. The format is:

node"username password"::path

node

hostname or DECnet node name (with OpenVMS Alpha V6.1 and later, and all OpenVMS I64 systems, the hostname can be a domain name or IP address)

username

valid account on the host

password

password (PASSCODE if using Token Authentication) for the account

path

location and name of the file

You can omit the node"username password":: part of the specification unless it is for a DECnet file. If omitted, Client-FTP uses the current default directory. You can use the node::path syntax (omitting the username and password) if you want access to anonymous FTP resources. In this case, FTP-OpenVMS implicitly adds the /ANONYMOUS qualifier.

Use the /LOCAL or /REMOTE qualifier after the parameter, depending on the context. The local filespec must conform to OpenVMS filenaming rules. The remote filespec must conform to the filenaming conventions of the remote host.

Enclose the pathname in quotes if it contains delimiters or symbols the FTP server could possibly misinterpret. For example, the following remote filespec is enclosed in quotes because it includes slashes (/) that OpenVMS normally interprets as qualifier delimiters:

ALPHA"smithabcd"::"/usr/bin/proj1.txt"

destination

Output filespec. Enclose the filespec in quotes if you want to preserve case and did not use the SET NOLOWERCASE command. If wildcarded (*), Client-FTP uses the source filename or extension, unless the filespec is a quoted string. See the source parameter for the destination filespec format.

To obtain the same version number in the destination file as in the source file (instead of creating a newer one), wildcard the destination file version using ;*. Note that if the server is not an OpenVMS host, the version number is included in the filename. You do not get a warning if the server host already has a higher numbered version. Also, if the server host already has the version specified, the old file with that version is overwritten.

Transfer Qualifiers (Positional)

/LOCAL

The preceding file is on the local host. If /LOCAL follows source, /REMOTE is implicit for destination. If /LOCAL is omitted, Client-FTP searches for a node; if found, Client-FTP assumes the file is remote. Do not use for both source and destination.

/REMOTE

The preceding file is on the remote host. If /REMOTE follows source, /LOCAL is implicit for destination. If /REMOTE is omitted, Client-FTP searches for a node; if found, Client-FTP assumes the file is remote. Do not use for both source and destination. (See the destination parameter on how to preserve version numbers on a remote copy.)

/MULTIPLE

Transfers multiple files. Use after source only. Include wildcards in source only because some remote hosts do not recognize the OpenVMS asterisk and percent characters as wildcards. The remote host's server must support the FTP NLST command. Not all servers support VMS files. If the server does and you do not specify another mode (using a qualifier or the STRUCTURE or SET DEFAULT commands), /VMS is the default.

File Type Qualifiers (Positional)

If you omit one of the file type qualifiers, Client-FTP transfers the file based on either:

The current default setting; for example, ASCII or IMAGE.

The extension (type) of the file you want to copy (see Table 3-2).

Setting a file type qualifier overrides the default transfer format for this transaction only. (See also the SET DEFAULT command.)

/ASCII

Transfers the preceding file in formatted ASCII format (see Table 3-2).

/BINARY

Transfers the preceding .BIN, .LDA, .OBJ, or .STB file in formatted binary format.

/BLOCK

Transfers the preceding STREAM, STREAM_CR, STREAM_LF, or UNDEFINED file in block mode (see Table 3-2).

/FORTRAN

Transfers the preceding file in FORTRAN mode. The first character of each record is a FORTRAN carriage control character. Some hosts do not recognize this transfer format.

/IMAGE[=size]

Transfers the preceding file in image mode. Optional size sets the record size of the local output file (see Table 3-2). Does not apply to remote output files. The maximum size for this qualifier is 32768.

/RECORD

Transfers the preceding file using STRU R so as to communicate the record structure during the copy. Not all servers support record structure mode. If you specify both /RECORD and /VMS, Client-FTP uses /VMS.

/VARIABLE

Transfers an image file (see /IMAGE) in variable length record mode. At the destination site, all /IMAGE records have a fixed length. Applies to local output image files only. This qualifier has meaning only if the /IMAGE qualifier is present.

/VMS

Transfers the preceding file in VMS file mode (see Table 3-2). Allows you to transfer any type of RMS file between OpenVMS systems. If you use /VMS, Client-FTP ignores /APPEND, /ASCII, /BINARY, /BLOCK, /FORTRAN, /IMAGE, and /VARIABLE. If you specify both /RECORD and /VMS, Client-FTP uses /VMS.

Other Qualifiers (Non-positional)

/ANONYMOUS
/NOANONYMOUS

Enables (/ANONYMOUS) or denies (/NOANONYMOUS) anonymous user access to remote resources. You can omit /ANONYMOUS if you use the node file syntax (node::pathname). (See Anonymous Users.)

/APPEND

Appends the source file to the destination file. If the destination file does not exist, Client-FTP creates it. Only valid if appending to a file with the same file transfer type. Some remote hosts might not support this operation.

/CONFIRM
/NOCONFIRM (default)

/CONFIRM issues a confirmation prompt before copying a file. Useful when source contains wildcards so that you can confirm each file copy. Respond with Y or N. /NOCONFIRM is the default.

If confirming multiple file copying, use with COPY/MULTIPLE with a wildcard value. Position the qualifier immediately after the COPY verb to relate to all files, or after the particular filename to relate to that file only.

/CONTIGUOUS=blocks

Local output file should have an initial contiguous allocation of the specified number of blocks. If the output file is smaller than the specified blocks, Client-FTP truncates the allocation. If the output file is larger, the additional allocations are non-contiguous. Does not apply to remote output files.

/FDL

Uses and then deletes a separate FDL file describing the specified file's OpenVMS RMS record attributes. This qualifier is useful after a PUT /FDL operation from a VMS node transfers a file to a non-VMS node: the GET /FDL operation can then return the file with the proper record attributes back from the non-VMS node. The default is not to create an accompanying FDL file. The TYPE command determines the type of file. A transfer of:

ASCII data results in a sequential file with variable length records (the default).

IMAGE data results in a sequential file with fixed length records of 512 bytes.

/IGNORE
/NOIGNORE (default)

/IGNORE ignores errors so that copying can continue with the next file. /NOIGNORE terminates copying if an error occurs.

/LOG
/NOLOG (default)

/LOG displays file specifications for each file transferred. /NOLOG does not display the transferred file's specifications.

Examples

1 Each of these commands copies the STUFF.TXT file from the local host to remote host SYS1 (the receiving system stores the file under the same filename in user SMITH's directory):

FTP> COPY STUFF.TXT SYS1"SMITH SECRET"::
FTP> PUT STUFF.TXT SYS1"SMITH SECRET"::

2 Each of these commands copies the DATA1.TXT and DATA2.TXT files from the remote host to the local host, assuming that a connection to the remote host is currently open:

FTP> COPY DATA1.TXT,DATA2.TXT /REMOTE *
FTP> GET DATA1.TXT,DATA2.TXT

3 Each of the following commands copies all .BAS files from a remote OpenVMS host to the local host. The /MULTIPLE qualifier and the asterisk wildcard are used in the COPY command, and they are omitted in the equivalent MGET command.

FTP> COPY *.BAS/REMOTE/MULTIPLE *
FTP> MGET *.BAS

4 The issuer of the following command wants to copy all local .SQL type files into multiple files in the remote UNIX system's directory.

FTP> COPY *.SQL/LOCAL/MULTIPLE "/usr/users/sql/*"

To accomplish this, the issuer uses an asterisk wildcard in the output filespec, as in Example 3. However, the result is not as intended. Because the asterisk is part of a quoted string, the command actually copies the files into a single file literally named * on the remote host.

To avoid this, set the remote default directory to the full pathname. You do not have to specify the quoted pathname in the COPY command:

FTP> SET DEFAULT/REMOTE "/usr/users/sql"
FTP> COPY *.SQL/LOCAL/MULTIPLE *

The asterisk now acts as a true wildcard, with the intended result.

CREATE/DIRECTORY

Creates a directory on the remote host. The /DIRECTORY qualifier is required as part of the command. Some remote hosts might not support directory creation operations.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File Transfers• Enter new directory name in
New Remote File/Dir NameMake Dir>

Format

CREATE/DIRECTORY remote-directory

Synonym

MKDIR

Parameter

remote-directory

Directory to create on the remote host, in the format:

[node"username password"::]directory

To open a connection first, use the node"username password"::part of the format. This syntax is optional. If you omit the parameter and a connection is already open, Client-FTP uses the current default directory. The directory part of the format is any valid remote directory specification. Enclose the specification in quotes if it contains special characters or embedded spaces, or is case-sensitive.

Use the node::directory syntax to create an anonymous user directory. The /ANONYMOUS qualifier is implicit.

Qualifier

/ANONYMOUS
/NOANONYMOUS

Enables (/ANONYMOUS) or denies (/NOANONYMOUS) creation of anonymous user directories. You can omit /ANONYMOUS if using the node file syntax (node::pathname). (See Anonymous Users.)

Examples

1 These commands are equivalent and create a directory USERS on the remote OpenVMS host SYS1, with the username and password specified explicitly:

FTP> CREATE/DIRECTORY SYS1"SMITH SECRET"::[USERS]
FTP> mkdir sys1"smith secret"::[users]

2 All three of the following commands create a directory USERS in the anonymous directory on the remote OpenVMS host SYS2.

FTP> CREATE/DIRECTORY SYS2::[USERS]
FTP> mkdir sys2::[users]
FTP> mkdir sys2::[users] /anonymous

The commands are equivalent to:

FTP> CREATE/DIRECTORY SYS2"ANONYMOUS user-email-address"::[USERS]

DEFINE/KEY

Associates an equivalence string and a set of attributes with a key on the terminal keyboard.

Format

DEFINE/KEY key-name ["]equivalence-string["]

Parameters

key-name

Name of the key to define. Table 3-7 lists key designations for three terminal types:

On LK201 terminals, you can define three types of keys: numeric keypad, editing keypad (except the up and down arrow keys), and function key row (except F1 through F5).

On VT100-type terminals, you can also define the left arrow and right arrow keys. On VT200 terminals, the left arrow and right arrow keys, and the F6 through F14 keys, are for command line editing. Issue the DCL command SET TERMINAL/ NOLINE_EDITING to define these keys before you run Client-FTP. You can also press Ctrl/V to enable keys F7 through F14 (but not F6).

On VT52 terminals, the only definable keys are on the numeric keypad.

Table 3-7 Key Designations for Three Terminal Types (Continued)

Key Name

LK201

VT100-type

VT52

PF1

PF1

PF1

[blue]

PF2

PF2

PF2

[red]

PF3

PF3

PF3

[gray]

PF4

PF4

PF4

 

KP0,...,KP9

0,...,9

0,...9

0,...9

PERIOD

.

.

.

COMMA

,

,

,

MINUS

-

-

-

ENTER

ENTER

ENTER

ENTER

LEFT

RIGHT

_

_

_

Find (E1)

Find

 

 

Insert Here (E2)

Insert_Here

 

 

Remove (E3)

Remove

 

 

Select (E4)

Select

 

 

Prev Screen (E5)

Prev_Screen

 

 

Next Screen (E6)

Next_Screen

 

 

HELP

Help

 

 

DO

Do

 

 

F6,...,F20

F6,...,F20

 

 

equivalence-string

String to substitute when you press the key. If the string contains spaces, enclose it in quotes.

Qualifiers

/ECHO
/NOECHO (default)

/ECHO displays the equivalence string on your screen after you press the key. /NOECHO is the default. Do not use /NOECHO with /NOTERMINATE.

/IF_STATE=(state-name,...)
/NOIF_STATE (default)

/IF_STATE specifies a list of one or more state-names (an alphanumeric string) for the key definition to be in effect. If you specify only one state-name, you can omit the parentheses. By including several state-names, you can define a key to have the same function in all the specified states. /NOIF_STATE is the default, where Client-FTP uses the current state.

Establish states using /SET_STATE.

/LOCK_STATE
/NOLOCK_STATE (default)

/LOCK_STATE specifies that the state set by /SET_STATE remains in effect until explicitly changed. /NOLOCK_STATE is the default, meaning the state which has been set in effect by /SET_STATE is in effect only for the next definable key you press or the next read-terminating character you type.

You can specify /LOCK_STATE only on the same command line as /SET_STATE.

/SET_STATE=state-name
/NOSET_STATE (default)

/SET_STATE specifies the state-name (an alphanumeric string) you want set for the key. The default is /NOSET_STATE, where the current state locked by /LOCK_STATE is in effect.

/TERMINATE
/NOTERMINATE (default)

/TERMINATE specifies that Client-FTP terminates (effectively executes) the current equivalence string when someone presses the defined key. /NOTERMINATE allows you to create key definitions that insert text into command lines, after prompts, or into other typed text.

Example

The following sets the F1 key on the keyboard to the ""SMITH SECRET"::[USERS]" string, sets the state to 1, and locks the state for that definition:

FTP> DEFINE/KEY F1 """SMITH SECRET""::[USERS]" /SET=1 /LOCK

DELETE

Deletes files or directories on the remote host.

Some remote hosts might not support file or directory deletion operations.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File Transfers• Select file (or files) in Remote Files or directory (or directories) in Remote DirectoriesDelete-> for files or Del Dir> for directories.

The remote file listing displays version numbers of files. Only the highest-numbered version appears in the list. Use Refresh> to refresh the remote listing display.

Format

DELETE file[,file,...]

Synonyms

RMDIR dir[,dir,...] = DELETE /DIRECTORY

MDELETE file[,file,...] = DELETE /MULTIPLE

CAUTION! The DIRECTORY command does not list hidden files (files that start with a period). Using any wildcards with the MDELETE command deletes hidden files, which you might need.

Parameters

file

dir

Remote files or directories to delete. If used with the /DIRECTORY qualifier, you can indicate the remote directory in the format:

[node"username password"::]directory

To open a connection first, use the node"username password":: part of the format. This syntax is optional. If you omit the parameter and a connection is already open, Client-FTP uses the current default directory. The directory part of the format is any valid remote directory specification. Enclose the specification in quotes if it contains special characters or embedded spaces, or is case-sensitive.

Use the node::directory syntax for access to an anonymous user directory. The /ANONYMOUS qualifier is implicit.

When deleting files, file can contain wildcards. See the /MULTIPLE qualifier.

Qualifiers

/ANONYMOUS
/NOANONYMOUS

Enables (/ANONYMOUS) or denies (/NOANONYMOUS) deletion of anonymous files or directories. You can omit /ANONYMOUS if using the node file syntax (node::path). (See Anonymous Users.)

Note! SET DEFAULT can change the defaults indicated for the following qualifiers.

/CONFIRM
/NOCONFIRM (default)

/CONFIRM issues a confirmation prompt before deleting a file. Useful when source contains wildcards so that you can confirm each file copy. Respond with Y or N. /NOCONFIRM is the default.

If confirming multiple file deletions, use with MDELETE or DELETE/MULTIPLE with a wildcard value. Position the qualifier immediately after the DELETE verb to relate to all files, or after the particular filename to relate to that file only.

/DIRECTORY

Deletes a directory (equivalent to RMDIR). If omitted, Client-FTP deletes a file. Do not use with /MULTIPLE.

/IGNORE
/NOIGNORE (default)

/IGNORE ignores errors so that deletion can continue with the next file when using /MULTIPLE. /NOIGNORE terminates the deletion operation if an error occurs.

/LOG
/NOLOG (default)

/LOG displays file specifications for each file deleted.

/MULTIPLE

Deletes multiple files (equivalent to MDELETE). You must include wildcards in the filespec. /MULTIPLE is necessary because other systems do not universally recognize the OpenVMS asterisk and percent characters as wildcards. (You do not need this qualifier with multiple deletes between OpenVMS systems.) The remote host's FTP server must support the FTP NLST command for remote wildcard operations to work. Do not use with /DIRECTORY.

Examples

1 The following deletes the proj1 file from the UNIX /usr/src/directory:

FTP> DELETE "/usr/src/proj1"

2 The following deletes all files with the .TMP extension in the remote default directory. You do not need /MULTIPLE when doing this delete operation between OpenVMS systems. If several versions of any *.TMP file exist, it deletes only the latest version.

FTP> DELETE *.TMP/MULTIPLE

3 The following deletes all files with the FOO filename in the remote default directory. You do not need /MULTIPLE when doing this delete operation between OpenVMS systems. If several versions of any FOO.* file exist, it deletes only the latest version.

FTP> DELETE FOO.*/MULTIPLE

4 The following deletes all files and file versions with the FOO filename in the remote default directory. For example, this command deletes FOO.EXE;1, FOO.EXE;2, FOO.C;1, FOO.C;2, and FOO.TXT;1. You do not need /MULTIPLE when doing this delete operation between OpenVMS systems.

FTP> DELETE FOO.*;*/MULTIPLE

DIRECTORY

Lists files on the remote host. If the remote host is a TCPware host, also lists the creation date and file type.

See LDIR to list files on the local host.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File Transfers•Enter directory path in Current Remote DirectoryRefresh>

Format

DIRECTORY [directory]

Synonym

LS [directory]= DIRECTORY {/BRIEF | /NAME_LIST}

Parameter

directory

Directory to list on the remote host, in the format:

[node"username password"::]directory

To open a connection, use the node"username password":: part of the format. This syntax is optional. If you omit the parameter and a connection is open, Client-FTP uses the current default directory. The directory part of the format is any valid remote directory specification. Enclose the specification in quotes if it contains special characters or embedded spaces, or is case-sensitive.

Use the node::directory syntax for access to an anonymous user directory.
The /ANONYMOUS qualifier is implicit.

Qualifiers

/ANONYMOUS
/NOANONYMOUS

Enables (/ANONYMOUS) or denies (/NOANONYMOUS) anonymous user access to remote resources. You can omit /ANONYMOUS if using the directory syntax node::directory. (See Anonymous Users.)

/BRIEF

/NAME_LIST

Returns a list of filenames instead of a normal directory listing (equivalent to LS). Uses the FTP NLST command. /BRIEF and /NAME_LIST are synonyms.

/OUTPUT=file

Filespec for a local file to receive the directory listing. If omitted, the directory is displayed on your terminal.

Examples

1 The following returns a listing for the remote /usr/src/ UNIX directory, assuming that a connection to the remote host is open:

FTP> DIRECTORY "/usr/src/"

2 The following returns a listing for the remote SYS$SYSTEM directory, assuming that a connection to the remote host is open:

FTP> DIRECTORY SYS$SYSTEM:

DISPLAY

Displays a remote file on the screen.

Equivalent to the GET (or COPY /REMOTE) command with SYS$OUTPUT as the local file specification.

If a VMS Plus mode transfer is requested, DISPLAY temporarily cancels VMS Plus mode, transfers the file(s), and resets VMS Plus mode again.

Note that displaying a non-ASCII file might produce unrecognizable output, as would be the case with the DCL TYPE command.

Format

DISPLAY remote-file[,remote-file,...]

Equivalents

COPY remote-file[,remote-file,...] /REMOTE [/MULTIPLE] SYS$OUTPUT

[M]GET remote-file[,remote-file,...] SYS$OUTPUT

Parameters

remote-file

Input filespec on the remote host. Enclose in quotes if you want to preserve case and did not use the SET NOLOWERCASE command, or the filespec contains delimiters or symbols the FTP server can interpret in special ways. Use a comma between multiple filespecs. The remote filespec must conform to the filenaming conventions of the remote host.

Examples

The following shows formats of acceptable equivalent commands that implement the DISPLAY function:

FTP> DISPLAY TEXT.TXT
FTP> GET TEXT.TXT SYS$OUTPUT
FTP> MGET TEXT.TXT, TEXT2.TXT SYS$OUTPUT
FTP> COPY TEXT.TXT /REMOTE SYS$OUTPUT
FTP> COPY TEXT.* /REMOTE /MULTIPLE SYS$OUTPUT
FTP> COPY NODE"USER PASSWORD"::TEXT.TXT SYS$OUTPUT

ENABLE [DISABLE] VMS_PLUS

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

In VMS Plus mode, file transfers use File Descriptor Language (FDL) information to create output files.

Format

ENABLE VMS_PLUS

DISABLE VMS_PLUS

ERROR_EXIT

Exits FTP with a specified status if an error occurs in the previous FTP command. This feature is useful when running FTP from a command procedure.

Note that you exit FTP-OpenVMS if you try to use this command interactively.

Format

ERROR_EXIT [status]

Parameter

status

Optional status value the DCL $STATUS symbol returns if FTP exits. Specifies which command (or sequence of commands) failed. If omitted, Client-FTP uses the status value of the last error.

Note! Client-FTP reports the $STATUS as the status value ORd with %X10000000.

Example

The following example is part of a DCL command procedure:

.
$ SET NOON
$ FTP
OPEN LILAC SMITH PASSWORD
ERROR_EXIT %X10000010
PUT DATA_FILE1.TXT
ERROR_EXIT %X10000020
PUT DATA_FILE1.IMG
ERROR_EXIT %X10000030
PUT DATA_FILE1.DES
ERROR_EXIT %X10000040
EXIT
$ FTP_EXIT_STATUS = $STATUS
$ SET ON
$ IF (FTP_EXIT_STATUS .EQ. %X10000010) THEN GOTO LOGIN_FAILED
$ IF (FTP_EXIT_STATUS .EQ. %X10000020) THEN GOTO TRANSFER_1_FAILED
.
.

This command procedure transfers several files and uses ERROR_EXIT to detect if any of the transfers fail. FTP_EXIT_STATUS returns the following values:

%X10000010 if the connection or login to LILAC fails

%X10000020 if FTP cannot transfer DATA_FILE1.TXT

and so on

1 if the connection is successful

EXIT

Exits FTP and returns to the DCL prompt.

If a connection is open, Client-FTP closes it before exiting.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File TransfersFileExit

Format

EXIT

Synonyms

QUIT

BYE

GET

Copies files from a remote host.

GET supports full wildcard filespecs except wildcards enclosed in a quoted string. Use the /MULTIPLE qualifier for a wildcarded remote filespec.

Graphical User Interface Equivalent

TCPware FTP-OpenVMS File Transfers• Select file (or files) in Remote Files
Remote Files<--Copy. Give file new name, if desired, in New Local Name

Format

GET remote-file[,remote-file,...] [local-filename]

Equivalents

COPY remote-file /REMOTE local-filename

MGET wildcarded-remote-files = GET remote-file /MULTIPLE

RECV remote-file[,remote-file,...] [local-filename]

Parameters

remote-file

Input filespec on the remote host. Enclose in quotes if you want to preserve case and did not use the SET NOLOWERCASE command, or the filespec contains delimiters or symbols the FTP server can interpret in special ways. Use a comma between multiple filespecs.

The remote filespec must conform to the filenaming conventions of the remote host. In OpenVMS-to-OpenVMS file transfers, the remote-file and local-filename formats are the same. (See the local-filename parameter).

wildcarded-remote-files

Input filespec on the remote host in wildcarded format. Wildcards include the % or ? symbol to indicate individual characters, and the * symbol to indicate multiple characters. Examples of wildcarded filespecs are *.txt , W????.*, and *.*;*.

local-filename

Output filespec on the local host. If omitted, Client-FTP uses the remote-file filename (and extension if it exists), unless remote-file is a quoted string. If used, must conform to the OpenVMS filenaming format:

node"username password"::path

node

hostname or DECnet node name (with OpenVMS Alpha V6.1 and later, and all OpenVMS I64 systems, the host name can be a domain name or IP address)

username

valid account on the host

password

password (PASSCODE if using Token Authentication) for the account

path

location and name of the file

You can omit the node"username password":: part of the specification unless it is for a DECnet file. If omitted, Client-FTP uses the current default directory.

You can use the node::path syntax (omitting the username and password) if you want access to anonymous FTP resources, in which case the /ANONYMOUS qualifier is implied.

Qualifiers

If you omit one of the file type qualifiers (/ASCII, /BINARY, /FORTRAN, /IMAGE, /VMS), Client-FTP transfers the file based on either:

The current default setting; for example, ASCII or IMAGE.

The extension (type) of the file you want copied (see Table 3-2).

Setting a file type qualifier overrides the default transfer format for this transaction only. See also the SET DEFAULT command.

/ANONYMOUS
/NOANONYMOUS

Enables (/ANONYMOUS) or denies (/NOANONYMOUS) anonymous user access to remote resources. You can omit /ANONYMOUS if using the node file syntax (node::path). (See Anonymous Users.)

/APPEND

Appends the remote-file file to the local-filename. If the local-filename does not exist, Client-FTP creates it. Some remote hosts do not support this operation. NOTE: If the operation fails, try appending in binary mode by using the /BINARY qualifier.

/ASCII

Transfers the file in formatted ASCII format (see Table 3-2).

/BINARY

Transfers .BIN, .LDA, .OBJ, and .STB, files in formatted binary format (see Table 3-2).

/BLOCK

Transfers STREAM, STREAM_CR, STREAM_LF, and UNDEFINED files in block mode (see Table 3-2).

/CONFIRM
/NOCONFIRM (default)

/CONFIRM issues a confirmation prompt before getting a file. Useful when source contains wildcards so that you can confirm each file copy. Respond with Y or N. /NOCONFIRM is the default.

If confirming multiple file gets, use with MGET or GET/MULTIPLE with a wildcard value. Position the qualifier immediately after the GET verb to relate to all files, or after the particular filename to relate to that file only.

/CONTIGUOUS=blocks

Local output file should have an initial contiguous allocation of the specified number of blocks. If the output file is smaller than the specified blocks, Client-FTP truncates the number of blocks allocated. If the output file is larger, the additional allocations are non-contiguous. Does not apply to remote output files.

/FDL

Uses and then deletes a separate FDL file describing the specified file's OpenVMS RMS record attributes. This qualifier is useful after a PUT /FDL operation from a VMS node transfers a file to a non-VMS node: the GET /FDL operation can then return the file with the proper record attributes back from the non-VMS node. The default is not to create an accompanying FDL file. The TYPE command determines the type of file. A transfer of:

ASCII data results in a sequential file with variable length records (the default).

IMAGE data results in a sequential file with fixed length records of 512 bytes.

/FORTRAN

Transfers the file in FORTRAN mode (see Table 3-2). The first character of each record is a FORTRAN carriage control character. Some hosts do not recognize this transfer format.

/IGNORE
/NOIGNORE (default)

/IGNORE ignores errors so that copying can continue with the next file. /NOIGNORE terminates copying if an error occurs.

/IMAGE[=size]

Transfers the file in image mode. Optional size sets the record size of the local output file (see Table 3-2). Does not apply to remote output files.

/LOG
/NOLOG (default)

/LOG displays file specifications for each file transferred.

/MULTIPLE

Transfers multiple files (equivalent to MGET). Use after remote-file only and include wildcards in remote-file. Necessary because some remote hosts do not recognize the OpenVMS asterisk, percent, or question mark characters as wildcards. /MULTIPLE ensures that the remote host understands more than one file is to be transferred. The remote host's server must support the FTP NLST command for remote wildcard operations to work.

/RECORD

Transfers the preceding file using STRU R so as to communicate the record structure during the copy. A positional qualifier. Not all servers support record structure mode. If you specify both /RECORD and /VMS, Client-FTP uses /VMS.

/VARIABLE

Transfers an image file (see /IMAGE) in variable length record mode. All /IMAGE records are fixed length when stored at the destination. Applies to local output image files only.

/VMS

Transfers the file in VMS file mode (see Table 3-2). Allows you to transfer any type of RMS file between OpenVMS systems. A positional qualifier. If you use /VMS, Client-FTP ignores /APPEND, /ASCII, /BINARY, /BLOCK, /FORTRAN, /IMAGE, and /VARIABLE. If you specify both /RECORD and /VMS, Client-FTP uses /VMS.

Not all servers support VMS files. If the server does and you do not specify another mode (using a qualifier or the STRUCTURE or SET DEFAULT commands), /VMS is the default.

Examples

1 The following copies the DATA1.TXT and DATA2.TXT