How to ZIP multiple files in IFS using Java QSHELL command JAR(Java Archive) on IBM i (AS400)

Опубликовано: 02 Октябрь 2024
на канале: AS400 and SQL Tricks
50
2

#ibmi #as400 #QShell
To zip the file I use the Java Jar command, which is run in the QSHELL environment using the STRQSH command.
------------------------------------------------------

/* Format of Java command (QSHELL command) Jar */
/* Java archive command */
/* jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ... */
/*Options are as follows */
/*c -- Create new archive (zip file) */
/*C -- Change to the specified directory and include following file */
/*e -- Specify application entry point for stand alone application */
/* bundled into an executable jar file */
/*f -- Specify archive file name */
/*i -- Generate index for specified Jar file */
/*m -- Include manifest information in manifest file */
/*M -- Do not create manifest file */
/*P -- preserve leading '/' (absolute path) and ''..'' (parent directory) */
/* components from file names */
/*t -- List table of contents for archive */
/*u -- Update existing archive */
/*v -- Generate verbose ouput on standard output */
/*x -- Extract named file or all files from archive */
/*0 (zero) -- Store only, no zipping */

/* Run in QSHELL environment using STRQSH command */
/* Command STRQSH (start QSH) has a CMD parameter. */
/* It allows to run a Qshell command. */