[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Zip a IBM iSeries Save File on a PC

Posted on 2009-12-29
Medium Priority
Last Modified: 2013-12-06
I am trying to do an online backup each night to file, ftp it to a Windows 2003 server, compress it with WinRAR and then send it off site.  I do a full SAVLIB on Sunday and a SAVCHGOBJ the other days.  This is just one library and the problem is that the full save is over 2GB.  When I decompress the full backup, FTP is back to the iSeries and try to do a DSPSAVF it tell me invalid data.  The smaller saves display okay.  

I've tried using the ZIPSAVE from easy400.net but could never get it to work and the same with JAR.  Another issue is that after I save the library to a SAVF the system storage goes from 60% to 80% so zipping the SAVF on the iSeries pushes it over 90%.

Does anyone know of a compression software to use on the PC side that will work on the large SAVF.  Here is the WinRAR command being run:
"C:\Program Files\WinRAR\winrar.exe" m -m5 "D:\iSeries\s36f.rar" "D:\iSeries\s36f"


Question by:DCS12
LVL 36

Accepted Solution

Gary Patterson earned 1200 total points
ID: 26138411
I've used numerous Windows, Unix, and Linux utilities to archive AS/400 save files (WinZIP, WinRAR, 7zip, tar, gzip, jar, etc.) over the years and I've never had a problem with any of them.  The bottom line is that if a compression utility works properly and decompresses the exact stream of bytes that were compressed originally, then the use of compression utilities should be transparent.

Something else is going on here.  Perhaps there is a problem with the mechanism that you use to FTP?  Verify that you are doing a BINARY transfer in both directions, for example.  ASCII transfer will definitely screw things up.

If your SAVF is large, verify that you are using the built-in data compression feature found on save commands?  DTACPR(*YES)  If the data is compressible, this option will result in a much smaller save file (of course, this means that it will not shrink much when zipped, if at all).

What problem did you have with ZIPSAVE and jar?

Anyway, if you create a save file, it takes up space.  If you then zip onto AS/400, the zip file is going to take up space.  Nothing you can really do about that.  If space is an issue, save to a save file using compression, FTP BINARY to a PC, and ZIP it there.

If you continue to have trouble, post back and "show your work" - post the exact sequence of events and commands, FTP session output, etc. that is failing for you.

- Gary Patterson

Check out my EE profile: http://www.experts-exchange.com/M_4382324.html

Author Comment

ID: 26140378
Here is the process:

1.  A CL runs the command to save the library after clearing the SAVF:
             SAVLIB     LIB(QS36F) DEV(*SAVF) SAVF(QGPL/S36F) +      
2. The Windows run a batch file:
     FTP -n -s:ftpas400Commands.sess

   Here is the contents of the script ftpas400Commands:
User as400 Password
CD qgpl
LCD D:/iseries

3. Another batch file is ran to compress it.
    C:\Program Files\WinRAR\winrar.exe" m -m5 "D:\iSeries\s36f.rar" "D:\iSeries\s36f"

Everything looks correct to me.

I will try again tonight and let you know.  
LVL 36

Expert Comment

by:Gary Patterson
ID: 26140673
Yep, that looks fine on the save side.  What about the restore side?  It needs to be done as a BINARY transfer, too.

What do the "m" and "-m5" options do on the WINRAR command.

You said the small save files are OK, but the big ones aren't?  One thought:  Is it possible that the WINRAR command is getting executed before the FTP transfer completes, and perhaps is only picking up a partial file some of the time on the long transfers?  That would explain the corrupt file.

Maybe the WinRAR command could just be tacked into the bottom of the FTP bat file to guarantee that one doesn't run until the other is complete?

Maybe if you have and old S36F file on the PC, you can compare it to the unzipped file (Windows FC command in Binary mode) and see if the end of it is missing.

- Gary
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 400 total points
ID: 26140962
Hmm what sill happen if you restore a ftped file is it was not zipped? does that work?

Also Gary's idea about incomplete file is possible
Normally Iprefer to push the file from the AS/400 instead of pulling it but ok.
should not make any diference.

with Garry's idea your script has look like this

User as400 Password
CD qgpl
LCD D:/iseries
GET S36F S36F.tmp
REN S36F.tmp S36F

So the S36F file is only available when the transfer has completed.

command -m is move
switch -m5 is compression level

Have a nice newyears eve :-)
LVL 33

Assisted Solution

shalomc earned 400 total points
ID: 26144909
About  a year ago I tested the various options of save file compression and zip, to see which results in the smallest size.
If you go for smallest ZIP size and best overall performance, DO NOT compress the save file with the built-in native options.



Author Closing Comment

ID: 31670764
Thanks guys.  Turns out it was Windows now having enough temp memory to FTP.  

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question