#### MODE

#### Synopsis

    HELP:   Mode in which the original file is compressed and, when desired, encrypted
    TYPE:   NUMBER
    SYNTAX: MODE/MO/CMPMODE=CX7/CX8/VR8/ADC/NDC/AES/FLAMENC

#### Description

- z/OS: Compression mode only.
- Unix: Compression mode and, when desired, with encryption mode.
- Windows: Compression mode only.

Input file(s) are compressed with the specified FLAM mode.

FLAM supports four compression modes: adc, cx7, cx8, and vr8. In the adc, cx8, and vr8 modes, it creates the FLAMFILE as a binary file. Mode adc is the most efficient one. It compresses the datastream by removing the redundancy of repetitive sequences and can be used universally. The other modes mainly eliminate "vertical redundancy", i.e. their efficiency relies on the recognition of re-occurring column contents in table-structured data.

Compression mode adc can be combined with one of two encryption methods supported by FLAM. The first is AES, that has been declared standard for US government agencies by NIST (National Institute of Standards and Technology), the second flamenc is a proprietary algoriths of limes datentechnik gmbh. None of the other compression methods allows encryption.

In all binary modes the compressed information is largely independent of the characteristics of the system on which the compression took place, i.e. the FLAMFILEs must not be modified, for example, if they are transmitted on a line which translates codes automatically. FLAMFILEs which are compressed in the cx7 mode, on the other hand, are insensitive to code translations, since they represent all control information by means of alphanumeric characters, the codes for which are standardized internationally in the ASCII and EBCDIC systems. Providing the original data is character-coded and suitable for exchange between systems with different character sets, the information content of the FLAMFILE remains fully intact after it has been converted to the character set of the destination system, despite the altered binary contents, thanks to the character-oriented interpretation.

The compression mode is identified automatically when the file is decompressed. The user thus does not need to know the compression mode in order to decompress a file.

Compression mode CX8 and VR8 does not support `CRYPTOMODE=FLAM`. Compression mode CX7 does not support either `CRYPTOMODE=ADC` nor `CRYPTOMODE=FLAM`.

z/OS
  MODE is used as Compression mode only.
  The compression mode is especially important for file transfer. For local use only the 8 bit modes should be used (ADC/CX8/VR8) for better efficiency.
  For file transfer on transparent lines also the 8 bit modes should be used. For compressed text data (only printable characters - no control or tab characters) shall be transferred via non transparent lines the 7 bit mode (CX7) is appropriate.
UNIX
  MODE is used as Compression mode and, when desired, as encryption mode.
  This parameter specifies the mode in which the original file is compressed and, if desired, encrypted.
WINDOWS
  MODE is used as Compression mode only.
  The input file is compressed with the specified FLAM mode. The key word mode= may be omitted.

Syntax restrictions for FLAMv4 or older:

- z/OS
  - `MODE=ADC/CX7/CX8/VR8/NDC`
  - `MO=ADC/CX7/CX8/VR8/NDC`
- UNIX
  - `-mode=adc/aes/cx7/cx8/vr8/flamenc`
    (see also parameter NDC)
- WINDOWS
  - `mode=adc/aes/cx7/cx8/vr8/ndc`

Values

- z/OS
  - `ADC` - 8 bit compression of highest efficiency
  - `CX7` - transformable 7 bit compression
  - `CX8` - 8 bit compression (CPU time optimised)
  - `VR8` - 8 bit compression (space optimised)
  - `NDC` - no compression
- UNIX
  - `adc` - 8 bit compression of highest efficiency.
    With `-mode=adc` the input file is compressed in adc mode and a binary FLAMFILE is created. This is the most efficient mode and can be used universally irrespective of the data structure. With this mode, a password can be specified to encrypt the FLAMFILE, see also parameters CRYPTOKEY and PASSWORD
  - `aes` - `mode=aes` causes the input file to be compressed in the adc mode with AES encryption. A password must be specified with the `-password` parameter, see also parameters CRYPTOKEY and PASSWORD.
  - `cx7` - transformable 7 bit compression.
    With `-mode=cx7`, the input file is compressed in the cx7 mode and a character-coded FLAMFILE is created. However, files should only be compressed in this mode if they do not contain any non-printing characters. It is a slightly less efficient mode, though on the other hand the FLAMFILE which is created can be converted to other character sets, e.g. from ASCII to EBCDIC, without losing information.
  - `cx8` - 8 bit compression (CPU time optimised).
    With `-mode=cx8` the input file is compressed in the cx8 mode, respectively, and a binary FLAMFILE is created. The purpose of this mode is to ensure compatibility with previous versions.
  - `vr8` - 8 bit compression (space optimised).
    With `-mode=vr8`, the input file is compressed in vr8 mode, respectively, and a binary FLAMFILE is created. The purpose of this mode is to ensure compatibility with previous versions.
  - `flamenc` - `mode=flamenc` causes the input file to be compressed in the adc mode with FLAM encryption (the proprietary encryption method used with FLAM 3). A password must be specified with the `-password` parameter. See also parameters CRYPTOKEY and PASSWORD.
  - See also parameter NDC.
- WINDOWS
  - `adc` - 8 bit compression of highest efficiency.
    FLAM Version 3: The input file is compressed in ADC mode and a binary FLAMFILE is generated.
  - `aes` - FLAM Version 4: The input file is compressed with the AES method. A password must be specified, see also parameters CRYPTOKEY and PASSWORD.
  - `cx7` - Transformable 7 bit compression.
    The input file is compressed in CX7 mode and a character coded FLAMFILE is generated. However, in this mode only those files should be compressed that solely contain printable characters. This mode is a little less efficient, but the generated. FLAMFILE can be converted to other character codes without information loss, for example from ASCII to EBCDIC using remote data transmission.e.g. from ASCII to EBCDIC, without losing information.
  - `cx8` - 8 bit compression (CPU time optimised).
    The input file is compressed in cx8 mode and a binary FLAMFILE is generated. This mode is more efficient and includes a stricter integrity check during decompression. But the generated FLAMFILE cannot be transmitted via 7 bit lines or via line sections where automatic code conversion takes place.
  - `vr8` - 8 bit compression (space optimised).
    The input file is compressed in vr8 mode and a binary FLAMFILE® is generated. In contrast to CX8 and CX7 mode the VR8-compressed data is a continuous bit stream and has no byte structure.this mode is to ensure compatibility with previous versions.
  - `ndc` - No data compression.
    FLAM Version 3 compatible: The input file is not compressed. An ADC-compatible binary FLAMFILE® is generated. This mode is used for the packaging and the encryption of already compressed data.

Default

- z/OS
  - ADC
- UNIX
  - none
- WINDOWS
  - none

Valid for

- compression

#### Selections

- `CX7 - Compression encoding as printable characters`
- `CX8 - Compression encoding as binary data`
- `VR8 - Enhanced compression encoding as binary data`
- `ADC - Advanced Data Compression`
- `NDC - No data compression`
- `AES - AES encryption`
- `FLAMENC - FLAM encryption`