Below are instructions on how to access the AS400 system at Seneca as well as FTP file from/to your PC at home. These instructions assume that you have access to the internet via an ISP. You need and AS/400 Terminal Emulator. Mocha is the one recommended by the school To get the Mocha software go to http://cs.senecac.on.ca Click on the Software Button on the Left then select Windows 95 on the right pane This brings you to the Windows 95 Shareware page. ( site location is: http://www.mochasoft.dk/. ) Simply click on hyperlink DOWNLOAD for the Mocha software and save the software to disk (requires Winzip software: site location: http://www.winzip.com/) Unzip the file in a temporary directory and install the software. When you run the software for the first time you will be prompted for a HOSTNAME. You will type in odin.senecac.on.ca for the PORT type in 23 (if its not already there). Click on OK and you should now be connected to ODIN (AS400). AS/400 & FTP and spool files FTP - Upload/Download from the AS/400 You will want to be able to upload and/or download information from the AS/400. You can FTP into the AS/400 using a graphical FTP to send from and retrieve to your PC. You can also use the old command line FTP which is sometimes more reliable (a sample session can be found below). Here's how FTP and the AS/400 work. 1. On your PC (from home or in a lab), start an FTP program. A command line FTP program is built into Win95/98/NT. Most people like to use WS_FTP. The ftp host is: odin.senecac.on.ca (or zeus.senecac.on.ca) User ID is: your AS/400 User ID Password is: your AS/400 password Initial Remote Host Directory is automatically set as your AS/400 current library (specified by your user profile). 2. ensure your FTP transfer type is ascii, that is, text. When you use ascii transfer, the AS/400 automatically converts between its IBM mainframe EBCDIC character set and the UNIX/DOS world ASCII character set. Do not use binary or auto transfer. If you do, you will get garbage. 3. to change AS/400 libraries, use the FTP function to change directories (cd). An FTP directory is equivalent to an AS/400 library. 4. Remember: AS/400 file type objects only define the format of their data, the file's MEMBERs contain the data. You can only transfer data to and from members. Files and their members are listed as: "filename.membername" in an FTP list. 5. transfer AS/400 members to your local PC or from your PC to the AS/400 -- be careful about up/downloading to an existing PC file or AS/400 file member -- FTP will over-write it. Sample command line FTP session: (open a DOS window) d:\> ftp ftp> open odin.senecac.on.ca Connected to odin.senecac.on.ca. 220-QTCP at 142.204.57.104. 220 Connection will close if idle more than 15 minutes. User (odin.senecac.on.ca:(none)): mckenna 331 Enter password. Password: 230 MCKENNA logged on. ftp> pwd 257 "MCKENNA" is current library. ftp> cd cmops324 250 Current library changed to CMOPS324. ftp> ls 200 PORT subcommand request successful. 125 List started. LABANSWERS.ANSWERS1 LABANSWERS.ANSWERS2 QCLSRC QDDSSRC REVIEWS.REVIEW1 REVIEWS.REVIEW11 REVIEWS.REVIEW12 REVIEWS.REVIEW2 REVIEWS.REVIEW3 REVIEWS.REVIEW4 REVIEWS.REVIEW5 REVIEWS.REVIEW6 REVIEWS.REVIEW7 REVIEWS.REVIEW8 REVIEWS.REVIEW9 250 List completed. 248 bytes received in 0.20 seconds (1.23 Kbytes/sec) ftp> get labanswers.answers1 d:\$data\seneca\OPS324_lab1_answers.txt 200 PORT subcommand request successful. 150 Retrieving member ANSWERS1 in file LABANSWERS in library CMOPS324. 250 File transfer completed successfully. 9965 bytes received in 3.21 seconds (3.10 Kbytes/sec) ftp>quit To upload from your PC to the AS/400, use the command PUT and reverse the paths/filenames. i.e. ftp> put PC-path\filename.ext library/filename.membername You will probably want to pretty things up on the AS/400 afterwards, e.g. add a text description -- use WRKMBRPDM to do it. ************************************************************** OBTAINING PRINTER FILES FOR USE AT HOME ** This will be most useful for students taking CBL344 or RPG444. > README: You can not use FTP with printer files. You must first create a file to store your printed output, copy the printed output to the file and, then you can download the information. 1. To create a file to save printouts, enter the command CRTPF + F4 - Complete >> File: Library: Record Length: Text: PRINTOUTS DC324snn 132 Saving printed output Use WRKOBJPDM DC324snn to make certain file was created. You only need to do this once. Keep the file -- you will probably use it again. 2. Enter WRKSPLF. You should see something like this. File QPSUPRTF User DC324C01 User Data Sts RDY Pages 2 Copies 1 Form Type *STD Press F11 (new view). You should see something like this. File QPSUPRTF 20:06:10 File Nbr 1 Job QPADEV0064 User DC324C01 Number 726828 Date 01/26/99 Time On a piece of paper, WRITE down the File, File Nbr, Job, and Number. 3. To copy the spool file to the file PRINTOUTS, enter the command CPYSPLF + F4. Complete the entries as shown in the eaxmple below. REMEMBER: your entries will be different. Copy Spooled File (CPYSPLF) Type choices, press Enter. Spooled file To data base Library . . Job name . . . . . file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . QPSUPRTF PRINTOUTS DC324snn QPADEV0064 Name Name Name, *LIBL, *CURLIB Name, * User . . . . . . . . . Number . . . . . . . . Spooled file number . To member . . . . . . Replace or add records . . . . . . . . . . . . . . . . . . . . . . . DC324snn 726828 1 *FIRST *REPLACE Name 000000-999999 1-9999, *ONLY, *LAST Name, *FIRST *REPLACE, *ADD name1 *ADD Name, *FIRST *REPLACE, *ADD OR To member . . . . . . . . . . . Replace or add records . . . . . If you have multiple spool files to copy, the latter may be the best technique since you can later transfer many members in a single FTP session. 4. Execute the CPYSPLF command. If the copy was executed correctly, enter the command WRKOBJPDM, work with PRINTOUTS and, use option 5 to display the copied data member(s). 5. You can now use FTP to download the data for use at home. Reminder: FTP downloads 'file.member'. In this case, PRINTOUTS.PRINTOUTS or PRINTOUTS.name1 Ann Hersch <Ann.Hersch@senecac.on.ca> Ann Hersch <Ann.Hersch@senecac.on.ca> Netscape Conference Address Netscape Conference DLS Server Additional Information: Last Name First Name Ann Hersch Version 2.1