Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ZIP containers

&pagelevel(3)&pagelevel

The BS2ZIP application enables ZIP containers to be created on BS2000 systems, and files to be added to and extracted from these containers. The ZIP compression used is the Zlib method.

This application is also able to read ZIP containers built on foreign platforms (Windows, Unix systems, Linux) provided they use the Zlib compression method and provided they are compliant with PKZIP 4.5 or GZIP.

The containers created in BS2000 can also be reopened on foreign platforms if they were created in WinZip-compatible format.

The command to start the BS2ZIP application is /START-ZIP-MANAGER or /START-ZIP.

After starting the application, the user has to open an existing container or to create a new one with the OPEN-ZIP-CONTAINER statement. In the case of the creation of a new container the user has to select the appropriate container format (operand FORMAT of the statement) according to the usage planned for the container to be created.

Please respect the following rules to select the appropriate format:

  1. Container creation :

    • if you plan to use the container on BS2000 platforms only, you can create it in BS2000 format However, if you zip SAM or ISAM file including special print control characters, use the BS2000 format.

    • if you plan to export the container on foreign platforms, create your container in *WINZIP compatible format (default one) only.

  2. Container open :

    • you don’ t need to specify the container format at open of an existing container. The program finds itself the container format. However, if you specify the format, it must be the real format of the container otherwise the OPEN-ZIP-CONTAINER statement is rejected. Once, the container is opened, you can add or extract files.

The following table summarizes the default behavior of the BS2ZIP application for the different file types according to the container open format:

ZIP Format

File Access

SAM

ISAM

PAM/PLAM

WINZIP compatible

A:

Data only are saved
WIN-ANSI conversion if file is EBCDIC encoded;
CRLF (0D0A) are inserted as record delimiters

A:

Data and keys are saved 
WIN-ANSI conversion if file is EBCDIC encoded;
CRLF (0D0A) are inserted as record delimiters

A:

Binary save without any conversion

X:

Files are extracted with same organization than the original file.
EBCDIC conversion if necessary
Record rebuild according to 0D0A delimiter
Default processing if no organization info is associated to the file

X:

Files are extracted with same organization than the original file.
EBCDIC conversion if necessary
Record rebuild according to 0D0A delimiter

X:

Files are extracted with same organization than the original file.
Binary rebuild

BS2000

A:

Record length saved with data
No conversion

A:

Record length saved with data
No conversion

A:

Binary save

X:

Files are extracted with same organization than the original file.
No conversion

X:

Files are extracted with same organization than the original file.
No conversion

X:

Files are extracted with same organization than the original file.
Binary rebuild

A: Add
X: Extract

Using the ADD-FILE and EXTRACT-FILE statements you can modify this default behavior. See those statements for details.

Note
In the case of a WinZip-compatible container it is assumed that a CRLF (0D0A) indicates the end of a data record. The original file may not contain any such binary values, otherwise the file is “spoilt” when it is extracted. A WinZip-compatible container should not contain any non-printable SAM or ISAM files.

ADD-FILE

CHARACTER CONVERSION

Meaning

*BY-CONTAINER-FORMAT

Default value. Behavior determined by the ZIP container open format

*NO

No conversion is forced

*TO-EBCDIC

EBCDIC conversion is forced (only for SAM/ISAM files in ASCII encoding)

*TO-WIN-ANSI

WIN-ANSI conversion is forced (only for SAM/ISAM files in EBCDIC encoding)

EXTRACT-FILE

The open format determined by ZIP container format can be modified at EXTRACT-FILE time:

DATA-TYPE

Container format

WINZIP-COMPATIBLE

BS2000

*NOT-SPECIFIED

If no file info found in ZIP container
Then *CHARACTER is assumed
Else file info is used - EBCDIC conversion done according to file type

If no file info found
Then error
Else file info is used - no conversion

*CHARACTER

File is extracted as a SAM file
Records are assumed to be delimited by 0D0A
EBCDIC conversion performed

Statement rejected

*BINARY

File is extracted as a PAM file
No conversion performed

Statement rejected

*SAM-BINARY

File is extracted as a SAM file, REC-FORM=U
No conversion performed

Statement rejected

CHARACTER- CONVERSION

Meaning

*BY-CONTAINER-FORMAT

Default value. Behavior determined by the ZIP container open format

*NO

No conversion is forced

TO-WIN-ANSI

WIN-ANSI conversion is forced (only for extraction to SAM/ISAM file)

*TO-EBCDIC

EBCDIC conversion is forced (only for extraction to SAM/ISAM file)

*BY-PARAMETERS(...)Conversion will be made according to specified source and target character sets (only for extraction to SAM/ISAM file)
*FROM-CCSOrigin coded character set, from which all characters will be converted.
Supported coded character sets: WCP1252P, UTF8, ISO88591, ISO8859F (XHCS names, see manual XHCS [5] )
*TO-CCSTarget coded character set, to which all characters will be converted.
Supported coded character sets: EDF04F, EDF041, EDF03DRV, EDF03IRV, EDF04DRV, EDF04IRV (XHCS names, see manual XHCS [5])

Block format when extracting to various disk formats

When extracting a file, BS2ZIP takes into account the disk format in which the file is stored, the block format (BLOCK-CONTROL-INFO) of the original file which is stored in the archive, and the specification in the BLOCK-CONTROL-INFO operand which controls whether the block format must be retained. As a result of this, in some cases the file cannot be extracted, or a block format which differs from that of the original file must be selected.

Extracting to K disks

The extracted files contain the block format of the original file.

Extracting to NK2 disks

Files with the PAMKEY block format cannot be extracted using the BLOCK-CONTROL= *KEEP option.

Depending on the archive format, the BLOCK-CONTROL=*IGNORE option is used to set the block format as follows:

Properties of the original file

Specification in the BLOCK-CONTROL operand

(BS2000 format)

(WINZIP-COMPATIBLE format)

FCB type

BLK-CTRL

*KEEP

*IGNORE

*KEEP

*IGNORE

PAM

PAMKEY

Not extracted

NO

Not extracted

NO

PAM

DATA

Like original

Like original

Like original

Like original

PAM

NO

Like original

Like original

Like original

Like original

SAM

PAMKEY

Not extracted

DATA

Not extracted

DATA

SAM

DATA

Like original

Like original

Like original

Like original

ISAM

PAMKEY

Not extracted

DATA2K

Not extracted

DATA2K

ISAM

DATA

Like original

Like original

Like original

Like original