The information in this article applies to:
SUMMARYHow to Establish AFTP Connectivity to an AS/400 or MainframeAn AFTP (APPC File Transfer Protocol) connection can be established using Microsoft SNA Server versions 3.0 and above to an AS/400 or Mainframe running IBM's AFTP protocol found in the APPC Applications Suite. (AFTP is a necessary component on the Mainframe or AS/400, or there is no possibility of the Microsoft SNA AFTP Service communicating with the AS/400 through AFTP.) The AFTP Service allows users to use standard FTP clients or to use the AFTP client software (included as part of the Microsoft SNA client) to transfer files back and forth to an AS/400 or Mainframe. AFTP access to an AS/400 or Mainframe can be established by implementation of the steps below.Configuring the SNA AFTP Service on the SNA Server
Configuring FTP-AFTP AccessIf the SNA AFTP Server is going to be used as an FTP-AFTP Gateway and allowing standard FTP clients to communicate to the Mainframe or AS/400, then perform the following steps on the SNA AFTP Server:
NOTE: If you are using IIS 4.0 and encounter error 0127 when trying to start the FTP Publishing Service, it will be necessary to obtain hotfix 10250. Using the FTP-AFTP Proxy Gateway Service
For example: User: yourname@appn.as400This is an example of using the Fully Qualified Remote LU Name. -or- User: yourname@aftpdThis is an example of using a CPIC Symbolic Destination Name. NOTE: A number of commands in the AFTP client are not supported by an FTP client, for example recfm for controlling the host record format for uploaded files. These commands can be implemented in FTP through the use of the quote facility or the Site command, depending on your client. Choose the method supported by your FTP client. NOTE: If you use a login account from a trusted domain, you must disable anonymous logins on the FTP server. For more information, please see the following Microsoft Knowledge Base article: Q123417 Err Msg: 530 User <User Name> Cannot Log In Configuring an AFTP Client to AFTP Server ConnectionWhen you use Microsoft SNA Server for AFTP access, the SNA AFTP Server must be configured with either a CPIC Symbolic Destination Name or have the Local and Remote LU partnered when using the AFTP client. The AFTP client is a CPI-C application and cannot specify a Local LU alias. Security and permissions for the AFTP server must also be configured. When the user issues the open command, he or she can open to the remote LU (either its alias or the fully qualified remote LU name). By default, the AFTP client uses the mode #BATCH and the invokable TP name AFTPD. These defaults can be changed by using the modename and tpname commands.Configuring a CPIC Symbolic Destination Name for AFTP
Configuring AFTP Client-AFTP Server Access SecurityBefore attempting to make the connection, the AFTP client will prompt you for a user ID and password. This user ID is used by the AFTP server for file permissions (different users have different permissions), as well as for APPC conversation security. A user who types the user ID Anonymous is not prompted for a password. No APPC conversation security is specified on the ALLOCATE flowing from the AFTP client, and the AFTP server treats this as "no user ID."NOTE: For more information on security and AFTP, refer to the online help documentation or part 5 of the SNA Administration Guide. The Aftpserv.ini file is used to set user permissions in order to provide users access to specific directories. Configuring the Aftpserv.ini File
Installing and Using the AFTP Client Software
Obtaining and Configuring AFTP on the AS/400NOTE: The following information can be found on the online documentation for AFTP, obtained from IBM. Microsoft makes no claims for the accuracy of this documentation and cannot guarantee or imply reliability, serviceability, performance, or functionality of the AFTP program running on the AS/400 or Mainframe systems.Obtaining AFTPAFTP was made available for OS/400 V3R1 on June 13, 1995. Because it uses system APIs new to V3R1, it is not supported on prior releases of OS/400.AFTP is available for free two ways:
AS/400 AFTP Online DocumentationAS/400 APPC File Transfer ProtocolAPPC File Transfer Protocol (AFTP) is an advanced program-to-program Communications (APPC) application protocol that provides file transfer services to application programs and end-users. With AFTP, you can copy text and binary files between your computer and any computer running the AFTP server. Disclaimer This material has not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, performance or function of these programs. All programs contained herein are provided to you "AS IS". THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. AS/400 AFTP Client and Server Functions
Specify HELP COMMANDS in the AFTP environment for subcommand
invocation specifics.
AS/400 Server Setup After restoring the AFTP library on the AS/400 server system, the following must be done. The AFTP library must be placed in the User Library List. Update the QUSRLIBL system value. The subsystem which will handle the AFTPD invocations must be restarted to pick up the new library list entry. If your subsystem, APPC controller and APPC device configurations are not already defined, these may need to be configured. See the OS/400 Communications Configuration Reference for configuration information. AS/400 Client Setup After restoring the AFTP library on the AS/400 Client system, the following should be done. CPI-C side information should be defined. Use the CRTCSI command to do this for each destination server. Set TPNAME on this command to "AFTPD". If your subsystem, APPC controller and APPC device configurations are not already defined, these may need to be configured. See the OS/400 Communications Configuration Reference for configuration information. You also may want to place the AFTP library in the User Library List. AS/400 AFTP Invocation There are 3 possible ways to invoke AFTP for the AS/400. The first is to call AFTP using just system destination name. CALL AFTP system_destination This will use the CPI-C side information system destination providing it is configured and found. If not the system_destination will be used as a remote LU name. The second is to call AFTP using -f option. CALL AFTP PARM(system_destination '-f' 'file_name') This will use a file of AFTP commands which will be input to the AFTP application. The file_name must be specified using the following format: 'file(member)' if the member name is different that the file name, or 'file' if the member name is the same as the file name. NOTE: The user ID and Password must be specified in the file either after the open command if system destination was not specified on the AFTP call, or as the first 2 entries in the file if the system destination was specified on the AFTP call. The third is to call AFTP using no options. CALL AFTP This will put you in the AFTP environment. You can then specify your mode name and use the OPEN command to start a conversation to a server system. AS/400 AFTP naming convention. The AS/400 uses a library structure, so the naming convention that AFTP uses is library/file.member. Save files do not have member names associated with the file. When listing libraries on the AS/400, the output list will include all the files and members that are part of the library. The DIR command will include the files and members. To list a library that is not the current directory, a slash must be provided after the library specification. For example, to list the XXXX library you must specify "ls XXXX/". If the "/" is not specified AFTP will try to list the XXXX file in the current directory. This rule applies for multiple PUTS, GETS and DELETES also.
Please note AS/400 AFTP will not recognize any file having a "."
as part of its name. AS/400 AFTP assumes anything after the "." is
part of the member name.
Please note AS/400 AFTP will not recognize any file having a "." as part of its name. AS/400 AFTP assumes anything after the "." is part of the member name. AS/400 AFTP Notes and Limitations -- Server user ID and password must be capitalized. -- The LSD command will only work for the QSYS library. To see all libraries on the server AS/400, use the LSD command on the QSYS library. -- AS/400 files will always be overwritten. -- To display a file from a remote system specify "-" as the local system name on the get command( get file.mbr - ). -- If a file does not exist on the AS/400 previous to transfer, a physical file(*DATA) will be created with record length of 512 for binary transfers, and 80 for ebcdic and ascii transfers. -- If you would like a physical file to be created with a different record length, use the lrecl command. -- The ALLOC command can be used to specify the maximum # of records in a physical file. -- During the RENAME of a member, the filename (file.mbr) must be the same name in the source and target. -- Retrieve previous command (PF9) does not work for AFTP client. -- Server will not delete a DB file with existing members. -- Server will not remove directory (library) with existing files. -- Server may not support anonymous userid. -- A file with greater than 78 record length will not completely display when using the "get file -" command invocation. -- Save files must be transferred using the binary data type. -- Logical files may not be transferred using the binary data type. -- Empty DDM file members will not be transferred. -- Date function will not be use when adding members to the AS/400. The NEW date will always be used. -- EBCDIC should only be used between AS/400 systems. -- AS/400 does not support BELL, RECFM, and BLOCK commands. -- AS/400 has no ANAME support. AS/400 AFTP Programs and Library Files
AFTPERR, AFTPTRC, and AFTPACT will be created by the AFTP or AFTPD programs
and will be created under the profile that is running the program. These
files are not updated for users that do not have write permission
to the files.
Additional query words:
Keywords : |
Last Reviewed: September 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |