FLAMFILE

Synopsis

HELP:   Name/URL of FLAMFILE for read or write operation [STREAM]
TYPE:   STRING
SYNTAX: FLAMFILE/FL['str'/STREAM/DUMMY...]

Description

Filename for FLAMFILE with compressed (or uncompressed) data.

During compression, compressed data is written into the specified FLAMFILE.

During decompression, compressed data is read from specified FLAMFILE and is stored uncompressed.

The parameter FLAMFILE can be used together with parameter MEMBER.

In case of compression, the input filename is renamed to the string in parameter 'MEMBER' and is stored as member name in the FLAMFILE. In case of decompression, the member in the FLAMFILE is renamed to the string in parameter 'MEMBER' and is stored with this name as output file.

Selection and conversion rules using pointed brackets '<>' in parameter FLAMFILE are dropped in FLAM5 and cannot be used anymore. So, the rules described in in the FLAM4 Manual are deprecated. The new rules are explained in the section Input to Output Name Mapping and apply to the parameter FLAMFILE. The old FLAM4 syntax must be migrated in this case.

Instead of using pointed brackets '<>' use of URL syntax is possible now and is a substitute for using the parameter FLAMFILE and MEMBER.

Example: FLAMFILE=flamfile.adc/?newifile.txt

In the case of compression, the input file specified as FLAMIN is written to the FLAMFILE flamfile.adc as newifile.txt (stored as member in the FLAMFILE).

Syntax restrictions for FLAMv4 or older:

Values

Default

Valid for

File specification on z/OS

Specifying a filename is an alternative to assigning the file by means of a DD statement. The specification can contain a conversion rule for filenames. The name can be specified in wildcard syntax for decompression. The character > in front of the filename means that the flamfile contains a list of filenames to be decompressed. DUMMY acts like the DD-statement //.. DD DUMMY

Filename

In principle, FLAM is able to process all filenames via JCL valid in z/OS. FLAM stores the name of the compressed file into the FLAMFILE, if required. To avoid any conflicts with national character sets or naming conventions in other systems, all filenames stored in ASCII character set are translated for message and selection in the following way:

All national characters are translated to 'X', a backslash '\' to slash '/', and whitespace ' ' to underline '_'. So it is easier to enter foreign filenames that are unsupported in the z/OS environment. The filename itself remains unchanged in the FLAMFILE. Entering DUMMY as a filename causes FLAM to use this file as dummy like the JCL command //ddname DD DUMMY. I.e. reading an input file leads to EOF (end of file), writing to an output file has no effect. So, DD-statements are not necessary for DUMMY files.

Filename list

By prefixing the '>' character (greater than) to the filename or DD-NAME, the FLAM parameters FLAMIN and IDDN are able to specify a list of files for compression instead of one single file. It is also possible to specify a file list for decompression by means of the FLAMFILE or FLAMDD parameter. In this list, each filename must be contained in a separate record; leading or trailing space characters (X'40') are ignored. A comment can be inserted after the first space character following the filename. Empty records or records with an asterisk '*' in the first column are regarded as comment lines. All filenames usable in z/OS are legal. Wildcard syntax is allowed.

Example: If the records in the file USER.DAT.LIST contain the following filenames:

USER.DAT.PS
USER.VSAM.ESDS
USER.POLIB.*
USER.PO(MEMBER)

the specification

//... EXEC PGM=FLAM,
// PARM=´C,FLAMIN=>USER.DAT.LIST´

leads to all the files specified being compressed into one FLAMFILE (group file).

The file that contains the list of filenames can have any format supported by FLAM and be of any type.

For 'in-stream files', i.e. input files temporarily created by JES, it is advisable to assign the filenames by means of DD names:

//... EXEC PGM=FLAM,PARM=´C,IDDN=>DDNAME´
//DDNAME DD *
USER.DAT.PS
USER.VSAM.ESDS
USER.POLIB.*
USER.PO(MEMBER)
/*

This allows the filename list to be specified directly in the job.

Wildcard syntax

Filenames can be specified in FLAM by means of parameters written with wildcard syntax. Correspondingly, the entry FLAMIN=USER.*.DATA.%BC leads to the compression of all files with the 1st qualifier USER, any 2nd qualifier, DATA as the third part of their name, and a three-digit 4th qualifier which ends with BC and begins with any character. The asterisk "*" stands for any (even an empty) character string. The percent character "%" stands for any character. These special characters are also allowed within members of one or more PO libraries:

USER.POLIB(FL*)

specifies all members of the library USER.POLIB, that begin with FL;

USER.*D.LIB(A%%B)

specifies all members whose 4-digit names begin with A and end with B and whose libraries have the identification USER, LIB as their final qualifier, and D as the last character of the second to the last part of their name. All input files are stored in this way in one compressed file (group file). Correspondingly, the wildcard entry in the selection rule for decompression

FLAMOUT=USER.DAT.*LIB

leads to the decompression of only those items of compressed data whose original names conform to the syntax specified. (Comment: this procedure requires a FLAM file header (HEADER=YES) and the file information FILEINFO=YES) for compression).

Example:

C,FLAMFILE=USER.DAT.CMP,FLAMIN=USER.*B.*LIB,...

All files with names that conforming to the FLAMIN specification are to be compressed into the file USER.DAT.CMP.

If the files

   USER.DATA.ALIB
   USER.DATAB.BLIB
   USER.DATCB.CLIB
   USER.DATCB.DLIB

are catalogued, the 1st file does not conform to the wildcard syntax and is ignored during compression.

If

$$D,FLAMFILE=USER.DAT.CMP,FLAMOUT=USER.DATCB.*LIB$$

is now specified for decompression, only the files USER.DATCB.CLIB and USER.DATCB.DLIB will be decompressed. Correspondingly, it is also possible to select a number of FLAMFILEs for decompression:

..D,FLAMFILE=USER.CMP.*.VR8,...

means all FLAMFILEs with the identification USER, CMP as their 2nd qualifier, any character string as the 3rd part of their name and VR8 as their last qualifier are to be decompressed.

File specification on other platforms

If the input specification contains more than one element, the following rules regarding syntax and assignment to the FLAMFILE specifications must be obeyed.

Input Specification rules

The input specification may consist of a file or directory name, a pattern (with wildcards), or a list of such elements. Elements of a list are separated by commas. Filenames may contain space characters, but not as first characters. Filnames containing spaces must be enclosed in double quotes. The files specified as input files must actually exist. At least one matching file must exist for a pattern. Otherwise, the flam command will be aborted and an error message output. If the input specification specifies files for processing by FLAM, either the -flamin parameter or -flamfile must be specified for the compression or decompression procedure respectively. If the data is to be entered via the special stdin file, the parameter for the input specification is omitted. FLAM can thus be used as a filter.

Assignment of Input Specifications to Output Specifications

If the flam command contains several different input and output specifications, they are assigned to one another. The assignment determines where the compressed data of each original file and the decompressed data of each compressed file is saved. The input and output specifications are assigned to one another by means of their positions in the lists. The first input specification is assigned to the first output specification and the second input specification to the second output specification, etc. If there are more input specifications than output specifications, the excess input specifications are assigned to the final output specification. If there are too many output specifications, the excess ones are ignored. If the output specification is a file specification, all the outputs which result from processing the assigned input files are saved in this file. The file attributes must be compatible. If the output specification is a substitution rule, a separate FLAMFILE, which is named according to this rule, is created during the compression procedure for each of the assigned input files. During the decompression procedure, the substitution rule is applied to the names of the FLAMFILEs and not to the names of the compressed original files, i.e. each FLAMFILE results in a separate decompressed file. If a FLAMFILE which contains the compressed data of several different files is assigned an output file, all the compressed data in this FLAMFILE is decompressed into the output file. The output specification [] or [*] is then necessary in order to create separate files again. In this case, each compressed block is decompressed into a file with the original name. In the example below, the flam command contains a list of input specifications and a list of output specifications.

flam -compress -attributes=all
-flamin=*.dat,*.txt,func1.hlp,func2.hlp
-flamfile=[.dat=.cmp],text.arc,[hlp=xyz]

The list of input specifications contains four entries, namely the output specifications, two substitution rules and a file specification. In accordance with the assignment rules, a file with the same name and a .cmp extension is created for each file which has a .dat extension, and the compressed data of all the files with a .txt extension is saved in a single FLAMFILE called text.arc. The compressed data of func1.hlp is saved in func1xyz on account of the substitution rule contained in the final output specification. Since there are no further output specifications, this rule is also applied to func2.hlp, i.e. a FLAMFILE called func2xyz is created for its compressed data. It should be noted that text.arc can only be decompressed into separate files if -attributes=all is specified for the compression procedure, so that the names of all the original files are included in the FLAMFILE. Either of the output specifications [] or [*] can be used for the decompression procedure, to ensure that the files are decompressed separately and given their original names again. If an output file were to be specified, a single file would result, in which all the records of the original files would be concatenated. If the output specification contains more than one file, the following rules described with regard to the syntax and the assignment to the FLAMFILE specifications must be observed.

Output Specification rules

The output specification may consist of a filename, a list of filenames (separated by commas), or a substitution rule. A substitution rule has the following format: [string1=string2]. Moreover, one of the output specifications [ ], [*], or [filename] may be used (see description below). Output files are created if they do not exist and overwritten if they do. If a substitution rule is defined as an output specification, the name of the FLAMFILE or the decompressed file must be formed by substituting string2 for string1 in the name of the input file. The strings and the equal sign must have no separating spaces in between. The substitution rule applies only to file names and not to path names. Example:

flam -compress -mode=cx8
flamin=helptxt1.txt,helptxt2.txt
flamfile=[.txt=.cmp]

causes the files called helptxt1.txt and helptxt2.txt to be compressed and the compressed data to be saved in the associated FLAMFILEs called helptxt1.cmp and helptxt2.cmp. The substitution rule must be applicable to all the assigned input files, i.e. string1 must be contained in the names of every one of these files, or the flam command will be aborted for the file to which it does not apply and an error message will be output. Only one substitution takes place when the name of the output file is formed, even if string1 occurs more than once in the name of the input file. The output specifications [file name], [ ], and [*] have special meanings. Using [file name] as output specification causes the decompression to select one or when file name contains wildcards-, possibly several, matching file(s) from a FLAMFILE archive. Those are decompressed into the current directory unless -outpath=... directs otherwise. If the output specification for the decompression procedure is [*], the names of the decompressed files are derived from the FLAMFILE, provided the FLAMFILE actually contains them. If not, an error message is output. -attributes=all must be specified for the compression procedure, in order to include the names of the original files in the FLAMFILE. If the output specification is [], the effect is similar to the output specification [*], i.e. the names of the decompressed files are derived from the FLAMFILE(s), except that only the file name is taken into account. The path name is ignored. All the files are thus created in the current directory if no -outpath specification is given. Once again, -attributes=all must have been set for the compression procedure. The output specifications [file name], [], and [*] must not be part of a list of output specifications, i.e. they must stand alone. If the output specification specifies files for processing by FLAM, either the -flamfile parameter or -flamout must be specified for the compression or decompression procedure respectively. If the data is to be output to the special file stdout, the parameter for the output specification must be omitted. FLAM can thus be used as a filter.

man_flam4_assignintooutspec.txt

Selections