Previous Page Contents Page Next Page

2.2 Using AFTP

To enter the AFTP environment, ensure that the source program (AFTP) is in a directory in your path, and type one of the following commands at the Solaris prompt:

aftp
aftp RemoteSystemID

where RemoteSystemID is a Remote System ID as defined in Destination Names.

When AFTP is started, the

aftp>
prompt is displayed.

Alternatively, type the following at the Solaris prompt to specify an input file that contains a series of AFTP subcommands:

aftp [ 
input-file]

The commands in the input file are executed within the AFTP environment.

Before you can use AFTP subcommands to the AFTPD target program, you first have to establish a session with that program. Some configurations also require you to specify security information for the target program. For more information, see Using AFTP (and ACOPY) When Security Is Required.

2.2.1 Selecting a User ID

File operations on the remote system are performed as a particular user. The default user is anon. If the anon user ID has insufficient file access permissions on the remote machine or it is not configured, specify a different user ID by using the UserID parameter.

If conversation-level security is configured on the session, specify a user ID that is configured with conversation-level security on the remote system.

Using AFTP (and ACOPY) When Security Is Not Required

If conversation-level security is not required, the following conditions apply when using the aftp and acopy commands:

  • If an anon account is available on a remote machine, you do not have to specify a UserID (see Establishing a Session Using the Default User ID (ANON)).

  • If an anon account is not available, you must specify a UserID. In this case, a Password is required before you can perform file operations on the remote system (see Establishing a Session Using a Specific User ID).

  • If you do not specify a UserID and an anon account is not available, you receive the following error message:

    The User ID is not available on this system

Using AFTP (and ACOPY) When Security Is Required

If conversation-level security is required, file operations on the remote system are permitted if the UserID you specify satisfies each of the following conditions:

  • It is available on the remote system

  • It is a user ID configured for conversation-level security

You must specify a Password before file operations are performed by the specified user account.

If the UserID you specify for the conversation-level security does not have a matching UserID on the remote system, file operations are done using the anon account on the target computer. If the anon account does not exist, the copy fails.

Note

The System Administrator specifies the UserID and Password values by using the define_userid_password command.

Establishing a Session Using the Default User ID (ANON)

  1. At the

    aftp>
    prompt, type:

    open RemoteSystemID

    where RemoteSystemID specifies the LU name of a computer on your APPC network that is running the AFTPD target program. (For more information about specifying a destination, see Destination Names.)

  2. At the user ID prompt, press Return.

    AFTP displays a message indicating that you are connected to RemoteSystemID.

Establishing a Session Using a Specific User ID

  1. At the

    aftp>
    prompt, type:

    open RemoteSystemID

    where RemoteSystemID specifies the LU name of a computer on your APPC network that is running the AFTPD target program. (For more information about specifying a destination, see Destination Names.)

  2. At the user ID prompt, type a UserID.

  3. At the password prompt, type the Password associated with the specified UserID.

    AFTP displays a message indicating that you are connected to RemoteSystemID.

2.2.2 Transferring Files

Using AFTP, you can transfer files from an AFTP target system to your local system, and you can transfer files from your local system to the target system. Some of the common transfer operations that AFTP supports are illustrated in the following examples:

Single file transfer without assigning a new file name

  • To copy a remote file (in the remote current directory) to your current local directory without changing the file name, enter the following subcommand:

    get RemoteFile
  • To copy a local file (in the local current directory) to the remote current directory without changing the file name, enter the following subcommand:

    put Filename

Single file transfer assigning a new file name

  • To copy a remote file called Filename .doc (in the remote current directory) to the local current directory (and assign a new file name of Filename .txt), enter the following subcommand:

    get Filename.doc 
    Filename.txt
  • To copy a local file called Filename .txt (in the local current directory) to the remote current directory (and assign a new file name of Filename .doc), enter the following subcommand:

    put Filename.txt 
    Filename.doc

Multiple file transfer using wildcards

  • To copy multiple remote files (not in the remote current working directory) to a set of local files (not in the local working directory) and assign different file names, enter the following subcommand:

    get /work/a*.doc /u/a*.txt
    

    In this example, the get subcommand copies all documents starting with a and ending with a file extension of .doc in a remote directory called /work/ to files with the extension .txt in a local directory named /u/.

  • To copy multiple local files (not in the local current working directory) to a set of remote files (not in the remote working directory) and assign different file names, enter the following subcommand:

    put /u/a*.txt /work/a*.doc
    

    In this example, the put subcommand copies all documents starting with a and ending with a file extension of .txt in a local directory called /u/ to files with the extension .doc in a remote directory named /work/.

If you want to be prompted for each file while transferring multiple files, issue the prompt subcommand before executing the transfer (see AFTP Subcommands to Set File Transfer Attributes).

See AFTP Subcommands to Transfer Files, for a summary of file-transfer subcommands.

2.2.3 Ending a Session with a Target System

To end the session with the current target system while remaining in the AFTP environment, type close.

AFTP displays the message

Goodbye
, indicating that the session with the remote computer is closed. At this point, you can either establish a new session with a different partner or exit AFTP. (See Exiting the AFTP Environment.)

Previous Page Contents Page Top of Page Next page