|
Devani, Shreya wrote: > I need to zip & un-zip DB2 files on the Iseries. > > I don't want to complicate the issue by using Java. Then you might be better not posting in a Java forum ;-) Seriously, you'd be addressing an even wider body of experience if you posted this kind of question on midrange-l. But see below... > call gzip parm('-N' '-q' '-9' '/path/file.ext') > > > > It works for a .TXT file on the IFS but not for a database file. If you have gzip installed such that it is accessible from QShell, the following command works: gzip --stdout --best /qsys.lib/mccallim.lib/coclsrc.file/* > ~/zipped-source.gz The --stdout option says "write on standard output, keep original files unchanged", and the redirect sends it to a file in my home directory. Your original attempt probably failed because it was trying to replace the DB file with the zipped version, which is what gzip does by default. Alternative (and probably better) solutions might be just to save the file to a save file with the DTACPT(*YES) option, or to use the iSeries QShell jar command: jar -cvf ~/zipped-source.jar /qsys.lib/mccallim.lib/coclsrc.file/* added manifest adding: qsys.lib/mccallim.lib/coclsrc.file/COCSGNO.MBR(in = 47440) (out= 6527 )(deflated 86%) Just because it's a jar file doesn't mean it has to contain Java classes. HTH. Cheers, Martin. -- Martin McCallion Senior Technical Consultant Misys Wholesale Banking Systems 1 St George's Road, London, SW19 4DR, UK T +44 (0)20 8486 1951 F +44 (0) 20 8947 3373 martin.mccallion@xxxxxxxxx www.misys.com This email and any attachments have been scanned for known viruses using multiple scanners. We believe that this email and any attachments are virus free, however the recipient must take full responsibility for virus checking. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the intended named recipient of this email then you should not copy it or use it for any purpose, nor disclose its contents to any other person. You should contact the Misys Banking and Securities Division as shown below so that we can take appropriate action at no cost to yourself. Misys Banking and Securities Division, 1 St George's Road, Wimbledon, London, SW19 4DR, England. Email: banking.postmaster@xxxxxxxxxx Tel: +44 (0) 20 8879 1188 Fax: +44 (0) 20 8947 3373
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.