Previous Page Contents Page Next Page

2.3 AFTP Subcommands

In addition to its file transfer capabilities, AFTP enables you to change the default settings for file transfers based on specific file transfer requirements, and to manipulate files and directories on the remote (target) system. The sections that follow summarize the uses of all of the AFTP subcommands. You can only execute these subcommands from within the AFTP command shell.

2.3.1 Opening and Closing a Connection to a Partner Computer

AFTP Subcommands to Start and End a Connection to a Target Computer , summarizes the subcommands that enable you to open and close a connection to a partner computer.

AFTP Subcommands to Start and End a Connection to a Target Computer

AFTP SubcommandDescription

open <destination>

Opens a connection to <destination> , where <destination> is a Remote System ID as defined in Destination Names.

close

Closes the current open AFTP session without exiting from the AFTP environment.

disconnect or disc

Alias for close.

2.3.2 Setting or Querying AFTP File Transfer Attributes

You can define file transfer attributes from within the AFTP environment. When you start AFTP, the transfer attributes take default settings. You can change these settings based on the specific file transfer requirements. Once you set these attributes, they remain set until you update them or close your connection. An exception to this rule is the modename subcommand. The value of modename is not reset until you exit AFTP. AFTP Subcommands to Set File Transfer Attributes, summarizes the subcommands that affect file transfer attributes.

AFTP Subcommands to Set File Transfer Attributes

AFTP SubcommandDescription

ascii or asc

Changes the data transfer type to . Issue this subcommand only when a session is open.

bell [ | ]

If your system supports this subcommand, issue bell to turn a bell (sounded during transmission) on or off. When you set bell to , a sound is made after each file transfer completes. If you specify bell without a new setting, it toggles the current setting.

binary or bin

Changes the data transfer type to . Issue this subcommand only when a session is open.

date [ | ]

Sets how the file date is handled during file transfers. If you set the option (the default), all files you create inherit the date from the source file. If you set the option, all files you create are time-stamped with the current date and time. If you specify date without an option, the current date setting is displayed. Issue this subcommand only when a session is open.

modename [ appc-modename]

Sets the APPC mode name used in the transfer of files. The appc-modename parameter is one to eight characters long. The default APPC mode name is #BATCH. Issue this subcommand only when a session is closed.

prompt [ | ]

Controls whether AFTP prompts for each file while executing a get, put, or delete subcommand. If you issue prompt without specifying an option, the current setting is displayed. The default setting is .

status or stat

Provides information about the current transfer characteristics.

system or sys

Provides information about the server computer.

type [ | ] | []

Sets the data transfer type to either or . If you specify , AFTP checks the initialization file and uses the transfer type specified there. If no transfer type is specified in the initialization file, AFTP uses the transfer mode. The default setting for the type subcommand is .

2.3.3 Transferring Files

The AFTP transfer function is described in Using AFTP.

AFTP Subcommands to Transfer Files, summarizes the AFTP subcommands that transfer files.

AFTP Subcommands to Transfer Files

AFTP SubcommandDescription

get remote-file [local-file]

Use the get subcommand to transfer a copy of one or more files from the remote computer to the local computer. The remote-file parameter is the name of the file on the remote computer that you want to copy. You can use wildcards to create a list of files you want to copy. If you do not specify local-file, AFTP copies the files into your current local directory using the remote-file name without the directory path.

receive or recv

Alias for get.

put local-file [remote-file]

Use the put subcommand to transfer a copy of one or more files from the local computer to the remote computer. The local-file parameter is the name of the local file on your computer you want to copy to the remote computer. You can use wildcards to create a list of files you want to copy. If you do not specify remote-file, AFTP copies the files into the current directory on the remote computer using the local-file name without the directory path.

send

Alias for put.

2.3.4 Directory and File Manipulation on the Target Computer

AFTP includes subcommands to enable you to manipulate files and directories on the target computer, make and remove directories, list directory contents, rename files, and perform other common operating system functions.

AFTP Subcommands to Manipulate Directories and Files on the Target Computer, summarizes the AFTP subcommands used for directory and file manipulation on the target computer.

AFTP Subcommands to Manipulate Directories and Files on the Target Computer

AFTP SubcommandDescription

cd directory-spec

Changes the current working directory of the target computer to the directory you specify with directory-spec .

delete remote-file-spec or del remote-file-spec

Deletes the file on the target computer you specify with remote-file-spec.

dir []

Provides a long directory list of the files and directories on the target computer. The list is displayed in the target computer's native format. Use to specify particular files you want to display. You can use wildcards to generate a list of files. If you specify a directory, all files within that directory on the target computer are displayed. Issue this subcommand only when a session is open.

ls []

Displays a short directory list from the target computer. Only file names and directory names (not file attributes) are shown. Use to specify the files you want to display. You can use wildcards to generate a list of files. If you specify a directory, all files within that directory are displayed. Issue this subcommand only when a session is open.

lsd []

Provides a short directory list from the target computer that contains only directories. Use to specify the directories you want displayed on the target computer. You can use wildcards to generate a list of files. If you specify a directory, all subdirectories within that directory are displayed. Issue this subcommand only when a session is open.

mkdir directory-spec or md directory-spec

Creates a new directory on the target computer. You cannot use wildcards. Issue this subcommand only when a session is open.

pwd

Displays the name of the present working directory on the target computer. Issue this subcommand only when a session is open.

rename old-filename new-filename

Renames a file on the target computer from old-filename to new-filename. You cannot use wildcards. Issue this subcommand only when a session is open.

rmdir directory-spec or rd directory-spec

Removes the directory on the target computer that you specify with directory-spec. You cannot use wildcards. Issue this subcommand only when a session is open.

2.3.5 Setting Allocation Sizes When Writing Files

AFTP includes subcommands that enable you to allocate sizes when writing files to, or reading files from, a file system that supports record-oriented files (such as VM, MVS, and AS/400). Use these subcommands to control block size, record length, and record format.

AFTP Subcommands to Set Allocation Sizes when Writing Files, summarizes the AFTP subcommands used for setting allocation sizes when writing files.

AFTP Subcommands to Set Allocation Sizes when Writing Files

AFTP SubcommandDescription

alloc [ allocation-size]

Sets the allocation size to use when writing files on a computer that uses record-oriented files, such as Virtual Machine (VM), Multiple Virtual Storage (MVS), and Application System 400 (AS/400) systems. The default setting is 0, indicating that the storing computer should use its own default setting.

block [ block-size]

Sets the block size to use when writing files. This value is used only on systems that use record-oriented files, such as VM, MVS, and AS/400 systems. The default setting is 0, indicating that the storing computer should use its own default setting.

lrecl [ record-length]

Sets the record length to use when writing files. This value is used only on systems that use record-oriented files, such as VM, MVS, and AS/400 systems. The default setting is 0, indicating that the storing computer should use its own default setting.

recfm [ record-format]

Sets the record format to use when writing files. This value is used only on systems that use record-oriented files, such as VM, MVS, and AS/400 systems. Following are the allowable values: 0, V, VA, VB, VM, VS, VBA, VBM , VBS, VSA, VSM, VBSA, VBSM, F, FA , FB, FM, FBA, FBM, FBS, FBSM, FBSA, U, and UA. The default setting is 0, indicating that the storing computer should use its own default setting.

2.3.6 Local Commands on the Source Computer

You can enter commands on the source computer at any time during an AFTP session.

You do not have to be connected to an AFTPD target program to execute the subcommands summarized in AFTP Subcommands that Affect the Source Computer.

AFTP Subcommands that Affect the Source Computer, summarizes the subcommands that affect the source computer.

AFTP Subcommands that Affect the Source Computer

AFTP SubcommandDescription

! <command>

Enables the user to issue miscellaneous non- AFTP commands on the local computer. Use <command> to specify any command you want to execute locally. Include any arguments in <command> that you want sent to the local command.

lcd [ pathspec]

Changes the current directory on the local computer. If you do not specify pathspec, the command displays the current local directory path.

lpwd

Displays the current working directory of the local computer.

2.3.7 Using AFTP Help Subcommands

AFTP Subcommands to Access Online Help, summarizes the subcommands that enable you to access online help within the AFTP environment.

You do not have to be connected to an AFTPD target program to execute the subcommands summarized in AFTP Subcommands to Access Online Help.

AFTP Subcommands to Access Online Help

AFTP SubcommandDescription

?

Alias for help.

help

Provides a list of topics for which help is available.

help <command>

Provides detailed help on the command you specify.

2.3.8 Exiting the AFTP Environment

AFTP Subcommands to Exit the AFTP Environment, summarizes the subcommands that enable you to exit AFTP.

AFTP Subcommands to Exit the AFTP Environment

AFTP SubcommandDescription

exit

Exits the AFTP environment, closing any active AFTP sessions.

bye

Alias for exit.

quit

Alias for exit.
Previous Page Contents Page Top of Page Next page