× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You could download the free ARP-ZIP utility from here:

http://www.arpeggiosoftware.com/

It's a native iseries command driven zipper that does zips, tars, jars, gzips, bzips and z's. It has encryption too. Wildcards of course.

On 10/22/2012 10:46 PM, Anderson, Kurt wrote:
Hi,

I'm posting this mainly for the archives (although also for any additional input as people see fit), as it was a hassle I went through.

Quite often we create a file on the IFS, zip it, then FTP the zipped file. This is how we zip it, and it works great:
STRQSH CMD('jar cfM /Customer/DLG/BillingReportFiles/DLG1207F-Corp228147F.zip -C /Customer/DLG/BillingReportFiles/ DLG1207F-Corp228147F.csv')

I've been given a task to zip up multiple files. I tried using the wildcard, which didn't work, and have since found out that QSH will interpret the wildcard instead of passing it along to the jar command.
jar cfM /Customer/DLG/BillingReportFiles/DLG1207F-DVDCDR.zip -C /Customer/DLG/BillingReportFiles/ DLG1207F-*.*
When I did this, it created a zip file that had a 0 byte version of itself inside. The new zip file was created in the same directory as the .csv file, but did not zip up that .csv.

I also tried using a period (.) instead of DLG1207F-*.* That didn't go over so well as it started to create a huge zip file (hopefully me exiting out of QSH cancelled that... I deleted the file as well.).

I eventually discovered what I believe to be the issue. It seems that STRQSH was resolving the wildcard in the current directory' outside of the file path I was expecting it to use (the one supplied to the JAR command).

I have modified our zip process to now to change the current directory prior to performing the zip. In doing this, STRQSH appears to correctly resolve the wildcards.
STRQSH CMD('cd /Customer/DLG/BillingReportFiles/; jar cfM /Customer/DLG/BillingReportFiles/DLG1207F-DVDCDR.zip -C /Customer/DLG/BillingReportFiles/ DLG1207F-*.*')

I wondered if this issue of STRQSH interpreting wildcards would be a good reason to switch over to the new QZIPZIP API, however according to the documentation that doesn't support wildcards either.
"Wild card characters and pattern matching of the path name is not supported."

I was also wondering if there was a way to escape STRQSH from resolving wildcards so the command being called would.

Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems, a division of Enghouse Networks



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.