This interface provides all FLCL commands (ARCHIVE
, , ...) for archive processing as simple to use programming interface. It is based on the Frankenstein Limes Access Method (FLAM).
The programming interface can be used to integrate the archive processing capabilities provided by FLAM into a custom program.
Additionally, it provides interactive help, documentation, syntax and other information to support the use of the commands.
This interface is also provided as load module interface for COBOL, PL1 and other languages. The corresponding load module interface is called FLM5UPLB.
For each command, there is a function that accepts a command line and property file string that follows the FLCL syntax and produces the same return/condition code as the FLCL. If the command string starts with an =
sign, then a parameter filename must follow. The file is expected to contain the actual command string:
r=flamarchive("=para.txt",NULL,":STDERR",NULL);
corresponds to:
FLCL ARCHIVE=para.txt
As second parameter you can provide a property file (NULL means no properties). The third parameter controls the print outs. If you define for a command, then no printouts are done. Normally ":STDERR" is used for printouts, but you can also define ":STDOUT" or a file name. The last parameter is optional and activates the trace output.
For output files you can define ":STDERR" or ":STDOUT" to assign the corresponding streams.
The property file string is parsed before the command line string. The property string may contain command properties in the property file syntax of FLCL. You can provide the contents of a property file from an arbitrary source via the property string. To generate a property file you can use:
FLCL GENPROP ARCHIVE=filename (works for any command by replacing ARCHIVE with the right command)
You can also provide the filename of a property file by passing an =
sign followed by the filename. Properties are then read from that file:
r=flamarchive("=para.txt","=prop.txt",NULL,NULL);
To use FLCL property files, the program name must still be the default "flcl". If you write a program which is not compatible to FLCL, please set another program name (see next section). To manage the contents of a property file, the function flampro() is provided.
The program and owner name can be managed by the corresponding functions. The default program name is "flcl". The default owner name is "limes". The default values are used, if a NULL pointer or an empty string is passed. The owner id and program name are limited to 64 bytes, including the null termination. Longer names are ignored.
For all default character conversions, it is useful to set the environment variable LANG. Other used environment variables of FLAM can be found in the FLCL manual. The function (flamenv()) to load the FLAM environment can be used in front of the first API call to establish the same environment used by FLAM utilities, subsystems and so on. This give the application developer the possibility to adjust the environment before the first real call is done.
The return codes of the subprogram are called condition codes and are returned on subprogram termination.
Special condition codes can be found in the FLCL manual (FLCLBOOK).
The reason code (internal FLAM return code) can be determined by calling the function flamrsn(). A corresponding text message is returned by the function flammsg(). All FLAM reason codes are listed in FLCL manual (FLCLBOOK).
Sample programs in C with name SCFMUxxx can be found as part of the installation package for mainframe systems in the library SRCLIBC(SCFMUxxx), with the corresponding compile and link step in JOBLIB(SBUILD). For other platforms (Windows, UNIX) the sample program source of SCFMUxxx is located in the sample
directory. The compile and link procedures can be found in the Makefile of the same directory.