cannam@128: ZLIB version 1.2.8 for AS400 installation instructions cannam@128: cannam@128: I) From an AS400 *SAVF file: cannam@128: cannam@128: 1) Unpacking archive to an AS400 save file cannam@128: cannam@128: On the AS400: cannam@128: cannam@128: _ Create the ZLIB AS400 library: cannam@128: cannam@128: CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library') cannam@128: cannam@128: _ Create a work save file, for example: cannam@128: cannam@128: CRTSAVF FILE(ZLIB/ZLIBSAVF) cannam@128: cannam@128: On a PC connected to the target AS400: cannam@128: cannam@128: _ Unpack the save file image to a PC file "ZLIBSAVF" cannam@128: _ Upload this file into the save file on the AS400, for example cannam@128: using ftp in BINARY mode. cannam@128: cannam@128: cannam@128: 2) Populating the ZLIB AS400 source library cannam@128: cannam@128: On the AS400: cannam@128: cannam@128: _ Extract the saved objects into the ZLIB AS400 library using: cannam@128: cannam@128: RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB) cannam@128: cannam@128: cannam@128: 3) Customize installation: cannam@128: cannam@128: _ Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed, cannam@128: according to the comments. cannam@128: cannam@128: _ Compile this member with: cannam@128: cannam@128: CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE) cannam@128: cannam@128: cannam@128: 4) Compile and generate the service program: cannam@128: cannam@128: _ This can now be done by executing: cannam@128: cannam@128: CALL PGM(ZLIB/COMPILE) cannam@128: cannam@128: cannam@128: cannam@128: II) From the original source distribution: cannam@128: cannam@128: 1) On the AS400, create the source library: cannam@128: cannam@128: CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library') cannam@128: cannam@128: 2) Create the source files: cannam@128: cannam@128: CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules') cannam@128: CRTSRCPF FILE(ZLIB/H) RCDLEN(112) TEXT('ZLIB library includes') cannam@128: CRTSRCPF FILE(ZLIB/TOOLS) RCDLEN(112) TEXT('ZLIB library control utilities') cannam@128: cannam@128: 3) From the machine hosting the distribution files, upload them (with cannam@128: FTP in text mode, for example) according to the following table: cannam@128: cannam@128: Original AS400 AS400 AS400 AS400 cannam@128: file file member type description cannam@128: SOURCES Original ZLIB C subprogram sources cannam@128: adler32.c ADLER32 C ZLIB - Compute the Adler-32 checksum of a dta strm cannam@128: compress.c COMPRESS C ZLIB - Compress a memory buffer cannam@128: crc32.c CRC32 C ZLIB - Compute the CRC-32 of a data stream cannam@128: deflate.c DEFLATE C ZLIB - Compress data using the deflation algorithm cannam@128: gzclose.c GZCLOSE C ZLIB - Close .gz files cannam@128: gzlib.c GZLIB C ZLIB - Miscellaneous .gz files IO support cannam@128: gzread.c GZREAD C ZLIB - Read .gz files cannam@128: gzwrite.c GZWRITE C ZLIB - Write .gz files cannam@128: infback.c INFBACK C ZLIB - Inflate using a callback interface cannam@128: inffast.c INFFAST C ZLIB - Fast proc. literals & length/distance pairs cannam@128: inflate.c INFLATE C ZLIB - Interface to inflate modules cannam@128: inftrees.c INFTREES C ZLIB - Generate Huffman trees for efficient decode cannam@128: trees.c TREES C ZLIB - Output deflated data using Huffman coding cannam@128: uncompr.c UNCOMPR C ZLIB - Decompress a memory buffer cannam@128: zutil.c ZUTIL C ZLIB - Target dependent utility functions cannam@128: H Original ZLIB C and ILE/RPG include files cannam@128: crc32.h CRC32 C ZLIB - CRC32 tables cannam@128: deflate.h DEFLATE C ZLIB - Internal compression state cannam@128: gzguts.h GZGUTS C ZLIB - Definitions for the gzclose module cannam@128: inffast.h INFFAST C ZLIB - Header to use inffast.c cannam@128: inffixed.h INFFIXED C ZLIB - Table for decoding fixed codes cannam@128: inflate.h INFLATE C ZLIB - Internal inflate state definitions cannam@128: inftrees.h INFTREES C ZLIB - Header to use inftrees.c cannam@128: trees.h TREES C ZLIB - Created automatically with -DGEN_TREES_H cannam@128: zconf.h ZCONF C ZLIB - Compression library configuration cannam@128: zlib.h ZLIB C ZLIB - Compression library C user interface cannam@128: as400/zlib.inc ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface cannam@128: zutil.h ZUTIL C ZLIB - Internal interface and configuration cannam@128: TOOLS Building source software & AS/400 README cannam@128: as400/bndsrc BNDSRC Entry point exportation list cannam@128: as400/compile.clp COMPILE CLP Compile sources & generate service program cannam@128: as400/readme.txt README TXT Installation instructions cannam@128: cannam@128: 4) Continue as in I)3). cannam@128: cannam@128: cannam@128: cannam@128: cannam@128: Notes: For AS400 ILE RPG programmers, a /copy member defining the ZLIB cannam@128: API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC). cannam@128: Please read comments in this member for more information. cannam@128: cannam@128: Remember that most foreign textual data are ASCII coded: this cannam@128: implementation does not handle conversion from/to ASCII, so cannam@128: text data code conversions must be done explicitely. cannam@128: cannam@128: Mainly for the reason above, always open zipped files in binary mode.