|
PGM PARM(&FILE &ENTRYPATH) &fILE = file.TXT &ENTRYPATH = /dIR/Subdir/ DCL VAR(&ENTRYPATH) TYPE(*CHAR) LEN(20) DCL VAR(&PCFILE) TYPE(*CHAR) LEN(20) DCL VAR(&PCFILE2) TYPE(*CHAR) LEN(20) DCL VAR(&FILE) TYPE(*CHAR) LEN(20) DCL VAR(&STRING) TYPE(*CHAR) LEN(40) DCL VAR(&STRING2) TYPE(*CHAR) LEN(40) DCL VAR(&P) TYPE(*DEC) LEN(5 0) DCL VAR(&COMMAND) TYPE(*CHAR) LEN(250) DCL VAR(&PSSRERROR) TYPE(*CHAR) LEN(01) VALUE('N') /*********************************************************************/ /* Set log file for unzip command */ /*********************************************************************/ OVRDBF FILE(THSTDOUT1) TOFILE(QTXTSRC) MBR(THSTDOUT1) /*********************************************************************/ /* Form command for unzip action */ /*********************************************************************/ CHGVAR VAR(&PCFILE2) VALUE(&FILE) CHGVAR VAR(&P) VALUE(1) LOOP: IF COND(%SST(&FILE &P 1) = '.') THEN(DO) CHGVAR VAR(&P) VALUE(&P - 1) CHGVAR VAR(&PCFILE) VALUE((%SST(&FILE 1 &P))) CHGVAR VAR(&PCFILE) VALUE(&PCFILE |< '.zip') ENDDO ELSE CMD(DO) CHGVAR VAR(&P) VALUE(&P + 1) GOTO LOOP ENDDO CHGVAR VAR(&COMMAND) VALUE(' ') CHGVAR VAR(&STRING) VALUE(&ENTRYPATH |< &PCFILE) CHGVAR VAR(&STRING2) VALUE(&ENTRYPATH |< &PCFILE2) CHGVAR VAR(&COMMAND) VALUE('jar -cMf' |> + &STRING |> &STRING2) /*********************************************************************/ /* Execute Unix unzip command */ /*********************************************************************/ QSH CMD(&COMMAND) /*********************************************************************/ -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Green, Jimmy Sent: 24 June 2005 4:42 PM To: Midrange-L Subject: zip file on ifs What is the best way to zip files on the ifs? What tools are good or is there a native way in os/400? Thanks for your Help!! Jimmy Green I.T. Operations Mgr Grocery Supply Co. 800-231-1938 Ext 268
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.