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.
CustomCall Data Systems, a division of Enghouse Networks
This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact