### FLAM

#### Synopsis

    HELP:   Flam4 utility command
    TYPE:   OBJECT
    SYNTAX: > flcl FLAM(NETINP.{},NETOUT.{},COMPRESS/C,DECOMPRESS/UNCOMPRESS/D,REMAIN,APPEND/ADD,FLAMFILE/FL['str'/STREAM/DUMMY...],MEMBER/MEM='str',FLAMIN/FLAMI['str'/STREAM/DUMMY...],FLAMOUT/FLAMO='str'/STREAM/DUMMY,OUTPATH/OPATH='str',MODE/MO/CMPMODE=CX7/CX8/VR8/ADC/NDC/AES/FLAMENC,NDC,CRYPTOMODE/CRYMODE/ENCMODE/CRYPTMODE/CRYPTOM=OFF/AES/FLAMENC,CRYPTOKEY/CRYPTKEY/CRYPTOK='bin',PASSWORD/PASSW='bin',PAASCII='bin-ascii',PAEBCDIC='bin-ebcdic',PAXWORD='bin-hex',PARFILE/PARF/PAFILE/PARAMETER_FILE='str',PARDDN/PADDN/PARD='str',RECDELIM/RECDEL/RECD='bin-hex',RECFORMAT/RECFORM/RECFMT/RECFM/RECF=FIX/F/VAR/V/TEXT/STREAM/UNDEFINED/UNDEF/U/FIXBLK/FB/FIXS/FBS/VARBLK/VB/VARSPAN/VBS,RECSIZE/MAXSIZE/MAXS=num,INRECDELIM/IRECDEL/IRECD/IREC='bin-hex',INRECFORMAT/IRECFORM/IRECFMT/IRECFM/IRECF=EAF/FIX/DTEXT/TEXT/STREAM/VARIABLE/UNDEFINED/U/F/FIXBLK/FB/V/VARBLK/VB/FIXS/FBS/VARSPAN/VBS/VAR_2B/VAR2B_DATA/VAR_4B/VAR_ASCII/VAR_EBCDIC,INRECSIZE/IRECSIZE/IRECS=num,OUTRECDELIM/ORECDEL/ORECD/ORECDELIM/OUTDELIM/ORDELIM='bin-hex',OUTRECFORMAT/ORECFORM/ORECFMT/ORECFM/ORECF=EAF/FIX/DTEXT/TEXT/STREAM/VARIABLE/UNDEFINED/U/F/FIXBLK/FB/V/VARBLK/VB/FIXS/FBS/VARSPAN/VBS/VAR_2B/VAR2B_DATA/VAR_4B/VAR_ASCII/VAR_EBCDIC,OUTRECSIZE/ORECSIZE/ORECS/ORSIZE/OUTSIZE=num,BLKSIZE/BLKS=num,IBLKSIZE/INBLKSIZE/IBLOCKSIZE/INBLOCKSIZE/IBLK=num,OBLKSIZE/OUTBLOCKSIZE/OBLOCKSIZE/OBLK=num,ATTRIBUTES=NONE/COMMON/ALL,OPTION=CUT/NOCUT/SUPPRESS/NOSUPPRESS,CUT/TRUNCATE/TRU[=YES/NO],NOCUT/NOTRUNCATE,SUPPRESS,NOSUPPRESS,PADCHAR/PAD_CHAR/PAD='bin-hex',TRIMCHAR='bin-hex',MAXBUFFER/MAXB=num,MAXRECORDS/MAXR=num,FLAMCODE/FLAMC=SYSTEM/ASCII/EBCDIC,KMDLL/KMLIB/KMELIB='str',KMEXIT/KMEEXIT/KMEFUC/KME/KMFUNC='str',KMPARAMETER/KMEPAR/KMPARM/KMP='bin',HEADER/HE=YES/NO,COMMENT/COMM/LABEL='str',MSGFILE/LOGFILE/MSGF='str',SECUREINFO/SEC=YES/NO/IGNORE/MEMBER,MSGDISP/MSGD=TERMINAL/MSGFILE/SYSTEM,SHOW/SH=ALL/DIR/ATTRIBUTE/ERROR/NONE,INFO/I=YES/NO/HOLD,CHECKALL/CHECKA,CHECKFAST/CHECKF,HELP/LIST,FILEINFO/FI=YES/NO,CODETABLE='str',TRANSLATE/TRA='str'/E/A/A/E/NONE,NOPATH,CLIMIT/CLI=num,IPRCNTRL=DETACH/RETAIN/ERASE/REPLACE,IRPLFFD/IRP=num,OPRCNTRL=DETACH/RETAIN/ERASE/REPLACE,ORPLFFD/ORP=num,NOMKDIR/NOM,EXK10/EXK1='str',EXK20/EXK2='str',EXD10/EXD1='str',EXD20/EXD2='str',SPACE1=num,SPACE2=num,OSPACE1=num,OSPACE2=num,UNIT='str',OUNIT='str',STORCLASS/STORCLAS/STORC='str',OSTORCLASS/OSTORCLAS/OSTORC='str',VOLUME/VOL='str',OVOLUME/OVOL='str',DATACLASS/DATAC='str',ODATACLASS/ODATACLAS/ODATAC='str',MGMTCLASS/MGMTCLAS/MGMTC='str',OMGMTCLASS/OMGMTCLAS/OMGMTC='str',DSORG/DS/FCBTYPE=SEQ/PS/EDS/ESDS/KDS/KSDS/RDS/RRDS/LDS,IDSORG/IFCBTYPE=SEQ/PS/LIB/PDS/USS/EDS/ESDS/KDS/KSDS/RDS/RRDS,ODSORG/ODSO=SEQ/PS/LIB/PDS/USS/EDS/ESDS/KDS/KSDS/RDS/RRDS,ICLOSDISP/ICLO=REWIND/UNLOAD/LEAVE,CLOSDISP/CLO=REWIND/UNLOAD/LEAVE,OCLOSDISP/OCLO=REWIND/UNLOAD/LEAVE,DISPS=NEW/SHR/MOD/OLD,DISPN/DISPNORMAL=CATALOG/CATLG/DELETE/KEEP/UNCATALOG/UNCATLG,DISPA/DISPABNORMAL=CATALOG/CATLG/DELETE/KEEP/UNCATALOG/UNCATLG,ODISPS=NEW/SHR/MOD/OLD,ODISPN/ODISPNORMAL=CATALOG/CATLG/DELETE/KEEP/UNCATALOG/UNCATLG,ODISPA/ODISPABNORMAL=CATALOG/CATLG/DELETE/KEEP/UNCATALOG/UNCATLG,KEYDISP/KEYD=OLD/NEW/DEL,KEYLENGTH/KEYLEN/KEYL=num,OKEYPOSITION/OKEYPOS/OKEYP=num,OKEYLENGTH/OKEYL=num,ORGKEYPOS/ORGKEYPO/ORGKEYP=num,ORGKEYLEN/ORGKEYL=num,IKEYPOSITION/IKEYPOS/IKEYP=num,IKEYLENGTH/IKEYLEN/IKEYL=num,DEVICE/DEV=FILE/DISK/TAPE/FLOPPY/STREAMER/USER,IDEVICE/IDEV=FILE/DISK/TAPE/FLOPPY/STREAMER/USER,ODEVICE/ODEV=FILE/DISK/TAPE/FLOPPY/STREAMER/USER,SPLITMODE/SPLITM=NONE/SERIAL/PARALLEL,SPLITNUMBER/SPLITN=num,SPLITSIZE/SPLITS=num,FLAMDDN/FLAMD='str',IDDN['str'...],ODDN='str',MSGDDN/MSGDD='str',REMOVE/DELETE/INDELETE/IDELETE,FROM='str'/DEFAULT/ASCII/EBCDIC/BOMUTF/BOMUCS/SYSTEM/LOCAL,CHRMODE/SUBMODE=STOP/IGNORE/SUBSTITUTE/IDENTITY/TRANSLIT,TO='str'/DEFAULT/ASCII/EBCDIC/SYSTEM/LOCAL,LARGER,DIR(),LOG(),NORUN)

#### Description

The FLAM command can be used to compress or decompress individual files or groups of files either interactively or by means of procedures. The compress or decompress parameter specifies which operation is to be performed. All the information necessary to execute the command can be specified in the form of inputs made directly on the command line, in a parameter file or as installation-specific default values.

The FLAM command is backward-compatible with the FLAM4 utility and designed to work with FLAM4 archives, also called FLAMFILEs. There are a few differences to the old FLAM4 utility:

- Completion/Condition codes are defined by CLE/P
  - Return code 0, 4 and 8 have the same meaning (OK, WARNING, ERROR)
  - Higher return codes are different and correspond to more critical issues
  - There are also completion codes between 0 and 4 or 4 and 8, for example 1 if a warning in the log (can be deactivated)
  - Special condition codes (>64) are the same
  - Please use the built-in function 'ERRORS' or refer to the appendix 'Return Codes' for more information
  - The main difference in completion codes are:
    - DMS errors result in a return code of 8 and not 12 with FLAM5
    - If directory walk (wildcards) fail for all files FLAM5 returns 8 instead of 4 (it returns 4 like FLAM4 if not all files processed successfully)
- The log output is in FLAM5 syntax and looks different to the old FLAM4 utilities but is now the same on each platform
- The default value file is replaced by the FLAM5 property management (and much more intelligent default behavior)
- The default behavior differs a little bit and if required the property management must be used to adjust it
- If squared, curly brackets or other operators are required, the parameters must be enclosed in quotation marks
  - This was minimized as much as possible to be compatible with the old syntax
- If keywords used insaide a string value in a parameter assignment the string must enclose in quotation marks
  - IDDN=FLAMDD will result in a syntax error, because FLAMDD is a valid keyword and CLP try to assign the value of FLAMDD
  - IDDN='FLAMDD' will work because 'FLAMDD' is interpreted a string value
- The selection of members to read from a FLAMFILE is now made via the member definition of the FLAMIN parameter
  - As part of the URL: FLAMIN='FLAM.FILE.ADC/?HUGO.PDS(*)'
  - Or by the new parameter MEMBER: MEMBER='HUGO.PDS(*)'
  - Instead of: FLAMOUT=<HUGO.PDS(*)>
- The file name mapping (selection and replacement rules) is different and works like documented below (see INPUT TO OUTPUT NAME MAPPING)
- No support of VSAM-LDS as FLAMIN or FLAMOUT (original data) on z/OS (not supported by LE)
- The new FL5 system header is not supported by the old FLAM4 components
  - VSAM data sets archived with FLAM4 can be reproduced with FLAM5 but not vice versa
  - Sizes of original files are only known by FLAM5 (FLAM4 uses hard-coded defaults for primary (2/4MiB) and secondary space (40/50(MiB)))
- Recreation of archived PDS load libraries is not yet supported within FLAM5
  - FLAM4 archived PDS load libraries and can be recreated
  - FLAM4 does not support this for PDSEs
  - FLAM5 does not support it at all till the XMIT support will be available
- FLAM5 uses the CEE runtime environment (LE) and FLAM4 works LE-less on z/OS, which may result in different behavior
  - Writing KSDS with new key position and length with FLAM5 results in re-ordered records and in a FIOPUT error on FLAM4 if reordering is required
  - Empty records are really empty records (length=0) with FLAM4, with FLAM5 (LE) a empty record is written as one padding byte (see Handling of Empty Records)
- FLAM4 recognizes some errors only after an open of an output file, which may result in an empty file
  - FLAM5 detects a lot of such errors before opening to avoid creation of empty files
- FLAM5 recognizes from the combination of specified parameters whether compression or decompression is requested
  - FLIMIN FLAMFILE (=COMP) and FLAMFILE FLAMOUT (=DECO)
  - On z/OS, COMPRESS or DECOMPRESS must be specified for FLAM4
  - On Unix and Windows DECOMPRESS is the default for FLAM4
- The print control character handling is more intelligent in FLAM5
  - To be backward compatible:
    In the case you set a certain record format without print control character and the original file contains print control character you must define OPRNCTR=RETAIN to ensure the print control character as part of the record like in FLAM4. If this new parameter not defined to RETAIN the print control character is not part of the record in this case.
  - The provided record length in FLAM5 don't include the print control character (is one byte shorter then in FLAM4)
- The default padding character is in FLAM4 always x'40' and in FLAM5 x'40' only used if text (ASA/MCC or CCSID defined) else it is x'00'
- With FLAM4 for undefined files the record length must be provided by the caller, FLAM5 use the block size instead
- The LIST switch on Windows will be the same as HELP. To get the current default values (properties) the built-in function GETPROP must be used.
- FLAM4 on z/OS often requires upper case. FLAM5 syntax is not case sensitive,i.e. lower case can often be used
- Given IRECFM and IRECSIZE are override by FLAM4 if the file is cataloged, FLAM5 try to allocate and open the file with the given parameter
  - This result sometimes in errors with FLAM5 because the read file don't match with the given parameter (file attributes in conflict)
  - Sometimes the runtime environment converts the data to the requested record format (original is VBA and requested is VB)
- The FLAM4 UserIO is no longer supported for original data (`IDEVICE=USER` and `ODEVICE=USER` is ignored)
- FLAM4 don't support large files (`DSNTYPE=LARGE`) at dynamic allocation, a corresponding data class must be used in this case
  - FLAM5 supports large files by default if the amount of required tracks above the limit
  - With version 5.1.22 the FLAM4 components set the DSNTYPE too large if more than 64K tracks allocated
  - Only FLAM5 supports since version 5.1.22 extended attribute datasets (up to 16 TiB)
- FLAM4 works with hard-coded defaults for space allocation (primary 2/4MiB secondary 40/50MiB)
  - FLAM5 determines the file size and allocates depending on the space used by the original file by default
  - This does not work for multi-volume datasets, in this case only the space used of the first volume will be allocated
  - If you write a PO and you will extend this dataset later it is recommended to provide custom space values
- FLAM5 supports also the default DD name 'FLAMOUT' at compress if 'FLAMFILE' not allocated and the same for 'FLAMIN' at read

If the FLAM command is specified with the 'list' parameter, a list of the currently active settings of the default values is displayed; they can be modified by the system manager using the '-defaults' parameter.

The FLAM command permits a separate FLAMFILE to be created from each original file (this requires input name mapping, which is differs to FLAM4). It is also possible to compress a group of original files into one FLAMFILE.

The input files which are to be (de)compressed can either be specified by their fully qualified name or by patterns with wildcards. Output filenames can be explicit or generated by substitution rules.

When decompressing, by default a file is to be restored with its original name and attributes.

With the exception of the '-list' and '-defaults' parameters, there are equivalent FLAM parameters for all the elements of the command syntax, so that each setting can be entered either directly in the command line or in a parameter file which is referred to in the command by the parameter parfile=parameter file. Using a parameter file permits complicated keyboard inputs to be avoided, for example if settings which differ from the installed default values are required frequently.

The following features are supported:

- Different kinds of remote access protocols (SSH)
- Different kinds of data sources (Files, Streams, Tables)
- Different kinds of I/O methods (Binary, Character, Text, Record, FLAM)
- Different compression modes (ADC, CX7, CX8, VR8 and NDC)
- Different encryption modes (AES and FLAMENC)
- Powerful character conversion based on CCSIDs

If the FLAM command is not sufficient, you can use the CONV command which supports FLAMFILEs and other compression formats and provide various conversion and formatting modes. FLAM and CONV parameter are not identical.

To get syntax information, please use:

       flcl SYNTAX FLAM

To get help for a parameter, please use:

       flcl HELP FLAM.parameter[.parameter[...]]

To read the manual page for a parameter, please use:

       flcl MANPAGE FLAM.parameter[.parameter[...]]
          or
       flcl HELP FLAM.parameter[.parameter[...]] MAN

To generate the user manual for the command, please use:

       flcl GENDOCU FLAM=filename

Parameters can be defined via command line (directly or through a parameter file) or via properties taken from the corresponding property file.

#### Example

For the FLAM4 utility the command name 'flam' is default and can be omitted. The FLCL utility has no default command, in this case the command name 'FLAM' must be defined.

       flcl FLAM comp flamin=swift.txt flamfile=swift.fla inrecformat=stream

Reads file in record format stream (usual text), compresses with default compression mode ADC, writes FLAMFILE.

       flcl FLAM deco flamfile=swift.fla flamout=swift.txt outrecformat=stream

Reads and decompresses FLAMFILE, writes output file in record format stream.

#### Arguments

- `SWITCH: NORUN - Don't run the command only show parsed parameter`