• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Admin Alert: FTPing Save Files from Windows to i5/OS

    July 18, 2007 Joe Hertvik

    In administering third-party software on iSeries and System i machines, it’s common to receive program updates as save files delivered to a Windows desktop. Once received, these save files must be uploaded and restored to an i5/OS or OS/400 partition for installation. To make this process easier, this week’s column presents a basic checklist for using FTP to transfer a save file from a Windows PC to an i5/OS partition.

    Save files updates usually reach Windows desktops in one of two forms. They are either downloaded as a zip file from a Web site or they can be sent directly to you via email. If you have to manually move a save file from a Windows PC to an i5/OS or OS/400 logical partition, here are nine easy steps to make that transfer as quick and as painless as possible.

    1.   If delivered in a zip file, extract the file into an empty Windows folder. In many cases, the received save file is delivered in compressed zip file format. So the first step is to use WinZip or another archiving program to extract the delivered files into an empty Windows folder. I specify an empty folder so that you won’t confuse your received files with other files that were saved at another time. If there are any readme or special instruction files extracted from the zip file, be sure to review those files before uploading or applying the changes.

    2.   Make sure that the save file is named correctly for an upload. Many vendors and Web sites deliver save files that have no file extension assigned to them. When using this checklist, the uploaded file name must end in an extension of .savf or the upload will not work correctly. So if necessary, rename your Windows save file so that it has an extension name of .savf (i.e., if the file is named upload, it must be renamed to upload.savf for this technique to work).

    3.   Start the FTP server on your i5/OS or OS/400 partition. In this scenario, your Windows box is functioning as an FTP client and your i5/OS partition is serving as the FTP server. For security, FTP servers should not be left on indefinitely and if the server is currently ended, you must restart it to perform this transfer. You can restart the i5/OS FTP server by issuing the following Start TCP/IP Server command (STRTCPSVR).

    STRTCPSVR *FTP

    On an i5/OS box, this command starts multiple FTP jobs in the QSYSWRK subsystem. These jobs will have names like QFTP00207, QTFTP00219, etc. It’s not a problem if you run the STRTCPSVR *FTP command a second time when your FTP server is already running. In that case, i5/OS will simply ignore the duplicated FTP start command.

    4.   Start an FTP client session on the Windows box where your .savf file is located. You can do this by clicking on the Start button and selecting the Run option off the Windows start menu. Inside the Run input box, type in one of the following two commands.

    FTP DNS_name

    Or

    FTP xxx.xxx.xxx.xxx

    If you use the first option, DNS_name must equal the DNS name of the i5/OS box you want to start an FTP session with. In the second option, xxx.xxx.xxx.xxx must equal the IP address of the i5/OS box that is running your FTP server. Both options will start an FTP session between your Windows desktop and your i5/OS box.

    5.   The i5/OS FTP server will prompt you to log on with your user name and password. Enter a user profile name that has proper authority to create and upload a file to your target library.

    6.   Inside your Windows FTP session, enter the following FTP sub-commands:

    QUOTE SITE NAMEFMT 1
    CD QSYS.LIB/System_i_library_name.LIB
    LCD x:folder
    BIN
    PUT file_name.savf
    QUIT

    Each FTP sub-command performs the following actions.

    QUOTE SITE NAMEFMT 1. This command tells the i5/OS FTP server to use the AS/400 Integrated File System (AS/400 IFS) naming format for this file transfer. When transferring to i5/OS libraries, AS/400 IFS formatting uses extensions such as .SAVF to determine what type of objects are being transferred and what format to use for saving a transferred object. We cannot successfully FTP a save file from a Windows PC to i5/OS box without executing this sub-command.

    CD QSYS.LIB/System_i_library_name.LIB. Changes the name of the working directory inside your FTP session to the i5/OS library name that you want to transfer the save file into. After running this sub-command, any FTP transfers to or from the i5/OS partition will use this library as its designated transfer location on the System i.

    LCD x:folder. Changes the name of the local working directory on your Windows FTP client to the Windows drive and folder name designated in the x:folder literal. All transfers to and from the Windows PC will use the files listed in this folder. If I wanted to use the C:HOLD directory as my Windows local directory, I would type the command like this: LCD C:HOLD.

    BIN. BIN designates that the file will be transferred in FTP binary mode, which means that all the information in the file will be transferred bit-by-bit to your target library, exactly as it is stored on the Windows client machine. There will be no ASCII-to-EBCDIC translation for this transfer and the stored file on your i5/OS box will become an exact duplicate of the save file that you transferred from your Windows PC. Virtually all System i vendors that I’ve encountered deliver save files as binary objects.

    PUT file_name.savf. A PUT command tells the FTP session to transfer the designated save file from the local working directory on the FTP client (the Windows machine) up to the working directory on the FTP server (the System i, iSeries, or AS/400). The local working directory and working directory locations were defined in the CD and LCD FTP sub-commands listed above. Again, note that the file name being uploaded must end in an extension of .SAVF or the FTP transfer will not work correctly.

    QUIT. After the FTP PUT transfer completes successfully, the QUIT statement ends the FTP client session and closes down your Windows FTP session.

    7.   Once the file is uploaded on your AS/400, run a Restore Library command (RSTLIB) to restore the fixes from the uploaded save file to your system. In most cases, you will be restoring an entire library from the vendor’s machine back to your System i partition. You can perform this restore by running RSTLIB this way:

    RSTLIB SAVLIB(SAVED_LIB) DEV(*SAVF)
    SAVF(System_i_library_name/SAVF_NAME)

    If you’re not sure what the name of the saved library on your system is, run the following Display Save File command (DSPSAVF) and it will show you the name of the library that was saved, as well as all the objects that were saved inside that library and the command that was used to save the library objects into this save file.

    DSPSAVF FILE(System_i_library_name/SAVF_NAME)

    8.   End the FTP server with the following END TCP Server command (ENDTCPSVR):

    ENDTCPSVR *FTP

    9.   Follow your vendor’s instructions for applying the fixes. These instructions can generally be found in a README.TXT file that came with the software. Some vendors will include the README instructions as a member within an enclosed QTXTSRC source file, which can be viewed by using the old Start PDM command (STRPDM) or by using IBM’s WebSphere Development Studio Client for System i product.

    And that’s all there is to transferring a save file from a PC to the System i. If you know the ins and outs, it’s a fairly simple operation.

    About Our Testing Environment

    Configurations described in this article were tested on an i5 550 box running i5/OS V5R3. Many of the commands may also be available in earlier versions of the operating system running on iSeries or AS/400 machines. If a command is present in earlier versions of the i5/OS or OS/400 operating systems, you may notice some variations in the pre-V5R3 copies of these commands. These differences may be due to command improvements that have occurred from release to release.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  Join us at the Annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
    Seagull Software:  Web-enable your System i apps with LegaSuite GUI
    VAULT400:  Securely archive data with Instant Back-Up & 24x7 Recovery

    IT Jungle Store Top Book Picks

    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Infor Re-Brands Datastream EAM, Adds New Feature IBM Creates New Power, SMB Server Divisions

    Leave a Reply Cancel reply

Volume 7, Number 26 -- July 18, 2007
THIS ISSUE SPONSORED BY:

WorksRight Software
ProData Computer Services
Twin Data

Table of Contents

  • Bring Back My Qshell Output
  • Customize the PC5250 Popup Keypad
  • Admin Alert: FTPing Save Files from Windows to i5/OS

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle