fhg
Volume 7, Number 26 -- July 18, 2007

Admin Alert: FTPing Save Files from Windows to i5/OS

Published: July 18, 2007

by 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


Sponsored By
TWIN DATA

Full system console control for multiple AS/400s and LPARs from
anywhere on your LAN, WAN, VPN, even over the Internet!

Perform certain System Maintenance and Configuration Procedures while in "Restricted State." Execute certain types of System Backups (SAVSYS) and respond to "System Console Only" messages.

Call for details about this IP Console Solution: 800-597-2525
www.twindata.com


Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

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

 

The Four Hundred
The Database Is the Computer

Another i5 Pricing Tweak: No User Cap on i5 515s

System i Skills: Building Bridges Over the Generation Gap

Mad Dog 21/21: To Avatar and Avatar Not

The Linux Beacon
Microsoft's GPL v3 Stance Puts Future of Novell Pact in Doubt

Oracle Says 11g Database Is Better, Cheaper, and Faster

NEC, Stratus Flesh Out Fault Tolerant Server Lines

Mad Dog 21/21: To Avatar and Avatar Not

Four Hundred Stuff
IBM Buys HA and Data Replication Software Maker DataMirror

NGS Takes Deconstructive Approach to Business Intelligence

Kisco Cranks Up Security Tool's Horsepower with V8

ACOM Supports Firefox with Content Manager

Big Iron
Three-Digit z Boxes Head for History

Top Mainframe Stories From Around the Web

Chats, Webinars, Seminars, Shows, and Other Happenings

System i PTF Guide
July 14, 2007: Volume 9, Number 28

July 7, 2007: Volume 9, Number 27

June 30, 2007: Volume 9, Number 26

June 23, 2007: Volume 9, Number 25

June 16, 2007: Volume 9, Number 24

June 9, 2007: Volume 9, Number 23

The Windows Observer
Microsoft's Software Assurance Customers On the Fence, Forrester Says

Microsoft's GPL v3 Stance Puts Future of Novell Pact in Doubt

A Potpourri of Fixes Marks A Slow Patch Tuesday

Hype Machine Prepped for Windows Server 2008 Launch

The Unix Guardian
IBM Says AIX 6 Beta Program Off to a Good Start

Oracle Says 11g Database Is Better, Cheaper, and Faster

IBM Charges 20 Percent Premium for Software Running on Power6 Cores

As I See It: The All-American Exhausting Vacation

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

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

Four Hundred Guru

BACK ISSUES

From the IT Jungle Forums
What is holding companies back from using CASE tools?

Adopted Authority....

Data Structure Array (SORTING)

CL Question on Overrides

Problem with "cpyfrmimpf"





 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement