Environment variables can be managed via the operating system or via
the FLAM4 configuration. The latter can be managed with the built-in
functions SETENV,
GETENV and DELENV. To
list the current state of all usable environment variables the
built-in function LSTENV can be used. For help
messages for each usable environment variable please use
HLPENV. There are also some platform-specific
mechanisms that can be used to set environment variables:
Linux, Windows, USS and other Unix-like OS
Environment variables are read from the file .stdenv in the current
working directory or the user's home directory. The file in the home
directory is only considered if the file does not exist in the working
directory or cannot be read.
Mainframe systems
DD:STDENV or the data set name &SYSUID..STDENV can alternatively be
used to set environment variables.
The STDENV file allows to define the FLAM4_CONFIG_FILE,
FLAM4_DEFAULT_OWNER_ID, LANG and other environment variables
in JCL.
The definition of the LANG variable outside of the program configuration
file is recommended, so that the system character set is defined in each
situation. The program configuration filename is used as is. No
placeholder substitutions (e.g. <USER>) are possible.
It might be useful to have a dedicated environment per user on
mainframes. In such a case, it makes sense to define the environment in
a dedicated file for each user.
//STDENV DD DSN=USER.ENVIR(&SYSUID.), DSP=SHR
Since z/OSv2r1 you can also use exported JCL symbols like environment
variables. The exported JCL symbols have lower priority than the same
environment variable. The service CEEGTJS is called dynamically and the
language environment must be in the STEPLIB concatenation to use it.
Additionally, all z/OS system symbols can be used in the string
replacement (<&LDAY>). The environment variables have the highest
priority, followed by the exported JCL symbols. System symbols have the
lowest priority. If the variable name is not found, then no replacement
is done and the angle brackets are kept in place.
//E0 EXPORT SYMLIST=*
//S1 SET BLKSIZE=27886
//S3 SET LRECL=128
Default record format
For z/OS, the default record format and record length for non-existent
output files is recfm=VB, lrecl=516. An attempt is made to open an
existing file with recfm=* for overwriting (DISP=OLD). If this fails,
another attempt is made with recfm=VB, lrecl=516 to write a new file
(DISP=NEW). The environment variable CLP_DEFAULT_DCB can be used to
change this default file mode string.
See "Keyword Parameters for File Mode" for fopen() in
z/OS XL C/C++ Runtime Library Reference for more information and for
the correct syntax. Beside recfm with a valid record format (not
+ or *) and lrecl, the space parameter can be set.
All other file mode parameters are managed by CLP.
Property file vs. environment variables
Beside all the environment variables managed by CLE it is possible to
set all properties as environment variables to override the hard coded
default values with CLP. If a property is defined as environment
variable and in a property file, then the value in the property file
overrides the setting in the environment. The environment variable
name for each property is built by the rules below:
convert all characters to upper case
replace all dots (.) by underline (_)
To get a list and help for all properties please use the built-in
function GENPROP to generate property files. The properties can be
defined per owner, per program and globally. The owner-specific
definition overrides the program specific definition and the
program-specific definition overrides the global definition.
Examples:
CONV_READ_TEXT_ENL2LF=OFF #in general the 0x15 to 0x25 conversion is off#
HUGO_FLCL_CONV_READ_TEXT_ENL2LF=ON # for owner 'hugo' the conversion is on#
The value string behind the sign (including the comment) will be used
as supplement for the command line processor. Aliases are not supported
in this case. You can only define properties for the main argument. If a
string must be enclosed with apostrophe, please don't use double
quotation marks because these are used in addition if a new property
file is built based on the environment settings.
FLCL_ICNV_FROM='IBM-1141' # this is the best solution
FLCL_ICNV_TO=UTF-8 # "UTF-8" could result in errors
USS31 - Choose USS 31-bit as platform (NL; HFP float bias)
USS64 - Choose USS 64-bit as platform (NL; IEEE float bias)
VSE - Choose VSE as platform (NL)
BS2 - Choose BS2000-OSD as platform (NL)
MAC - Choose MAC as platform (CR)
FL_ARCHIVE_DECRYPT (&FLARCDC) - How to decrypt a FLAM5 archive an input is read from -- a parameter file, a copybook, a row list (the DECRYPT overlay alone: PWD(...) or PGP())
FL_ARITHMETIC_METADATA (&FLARIMD) - Use ARITHMETIC for the flag and length buffer of a pot if no compression level is given (default YES)
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_DEFAULT_CCSID (&FLCCSID) - Internal default CCSID for neutral string elements (if not defined then 'UTF-8')
FL_DEFAULT_ASCII_CCSID - Default CCSID for ASCII character sets (if ASCII machine and LANG, then default is taken from LANG else default is 'ISO-8859-1'))
FL_DEFAULT_EBCDIC_CCSID - Default CCSID for EBCDIC character sets (if EBCDIC machine and LANG, then default is taken from LANG else default is 'IBM-1047'))
FL_PGP_PREF_SYMALG_AES128 (&FLPA128) - Invert order of preferred symmetric algorithms from AES256/192/128 to AES128/192/256 in PGP certificates
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_ALLOW_LOW_ENTROPY - If defined and no source of entropy is available, the random number generate is seeded with a low entropy which may result in weak encryption keys
FL_DEFAULT_CHAR_MODE (&FLCHARM) - Default error handling if character not available in target character set [STOP]
STOP - Stop at the first non-convertible character
FL_DEFAULT_MIN_COMP_RATIO (&FLCMPRT) - Default minimum compression ratio (10-90 (default is 90 (less than 10% compression efficiency will skip by default))
FL_4_EXPANSION_FACTOR (&FL4EXPF) - Expansion factor for FLAMFILEs decompression (default is 10 (valid 1-1000)) - must be defined to activate default expansion handling
FL_GZ_EXPANSION_FACTOR (&FLGZEXP) - Expansion factor for GZIP decompression (default is 5)
FL_GZ_COMPRESSION_FACTOR (&FLGZCMP) - Compression factor for GZIP compression (default is 2)
FL_BZ_EXPANSION_FACTOR (&FLBZEXP) - Expansion factor for BZIP2 decompression (default is 6)
FL_BZ_COMPRESSION_FACTOR (&FLBZCMP) - Compression factor for BZIP2 compression (default is 2)
FL_XZ_EXPANSION_FACTOR (&FLXZEXP) - Expansion factor for XZ decompression (default is 10)
FL_XZ_COMPRESSION_FACTOR (&FLXZCMP) - Compression factor for XZ compression (default is 2)
FL_ZS_EXPANSION_FACTOR (&FLZSEXP) - Expansion factor for ZSTD decompression (default is 10)
FL_ZS_COMPRESSION_FACTOR (&FLSZCMP) - Compression factor for ZSTD compression (default is 2)
FL_KEY_EXPIRE_WARN_DAYS (&FLKEYWD) - Amount of days to warn before a key will expire (default is 90 (3 months))
FL_RETURN_IF_LOG_WARNING (&FLRLOGW) - If set to OFF, the completion code 0 is returned instead of 1 if a relevant warning is written to the log
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_FAVE_LIBRARY - Set default library for anti virus scanning (default is 'libfave')
FL_FAVE_FUNCTION - Set default function for anti virus scanning (default is 'CLAMAVC')
FL_FAVE_PARAMETER - Set default parameter for anti virus scanning (default is 'clamav.daemon:3310')
FL_FOBJ_LIBRARY - Set default library for user-defined object store SPI (default is 'libfobj')
FL_FOBJ_FUNCTION - Set default function for user-defined object store SPI (default is 'FOBJUSR')
FL_FOBJ_PARAMETER - Set default parameter string for user-defined object store SPI (default is '')
FL_FLUCFS_MAPSIZE - Set the upper size of the flucFS metadata database, in bytes or with a K, M or G suffix (default 64M, about 42000 files)
FL_FSEG_LIBRARY - Set default library for user-defined segment store SPI (default is 'libfseg')
FL_FSEG_FUNCTION - Set default function for user-defined segment store SPI (default is 'FSEGUSR')
FL_FSEG_PARAMETER - Set default parameter string for user-defined segment store SPI (default is '')
FL_OBJSTORE_DATBUF (&FLOSDAT) - Default for store.*(DATBUF) in bytes: buffered I/O of the object store collecting data segments into one object (default 4194304)
FL_OBJSTORE_MBRBUF (&FLOSMBR) - Default for store.*(MBRBUF) in bytes: buffered I/O of the object store collecting member index segments into one object (default 1048576)
FL_OBJSTORE_DIRBUF (&FLOSDIR) - Default for store.*(DIRBUF) in bytes: buffered I/O of the object store for the directory segment (default 1, which stores it one to one)
FL_OBJSTORE_PAGESIZE - Objects a cloud store asks for per listing request (1 to the protocol maximum of 1000, which is also the default)
FL_OBJSTORE_QDEPTH (&FLOSQDP) - Object PUTs a cloud store may have in flight at once, and its GET prefetch slots (0 or unset=8, min 1, max 32; libcurl transport only)
FL_FLSERVHZ_PATH (&FLHZPTH) - Program FLAM starts for REST access through the z/OS HTTP enabler (default: 'flservhz' on PATH, else /usr/lpp/flam/bin/flservhz); z/OS only
FL_FLSERVHZ_STDERR - File the z/OS HTTP enabler helper writes its own messages to when the caller has no stderr (default: discarded); z/OS only
FL_HWTHTTP_VERBOSE - Trace of the z/OS HTTP enabler: OFF (default), ON (redacted) or UNREDACTED (writes credentials); SAF: RST.TRACE READ resp. CONTROL; z/OS only
FL_HWTHTTP_VERBOSE_DD - DD the z/OS HTTP enabler trace is routed to (max 8 chars); name one -- on standard output the trace can end the job; no own permit; z/OS only
FL_HWTHTTP_IPSTACK (&FLHZIPS) - Name of the TCP/IP stack the z/OS HTTP enabler uses (1 to 8 characters); z/OS only
FL_HWTHTTP_CIPHERS - System SSL cipher suites for the z/OS HTTP enabler, 4-character specs; unset uses FLAM's own list incl. ECDHE_ECDSA; z/OS only
FL_HWTHTTP_KEEP_CONN_AFTER_ERR (&FLHZKCN) - Reuse a z/OS HTTP enabler connection after a non-2xx answer; unset means do not, which works around a toolkit defect; z/OS only
FL_HWTHTTP_SSLTRACE - System SSL trace level for secure connect failures, as documented by IBM for your release; SAF: RST.TRACE READ; z/OS only
FL_HWTHTTP_KEEP_ANCHOR (&FLHZANC) - Leave the z/OS HTTP enabler anchor variable in place; ON breaks every child process without the IBM fix [OFF]; z/OS only
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_CLAMAV_DAEMON - Set default communication parameter for ClamAV client (default is 'clamav.daemon:3310:10')
FL_AVSCAN_READ - If defined, anti virus scanning when reading is activated (corresponding default values must be defined)
FL_AVSCAN_WRITE - If defined, anti virus scanning when writing is activated (corresponding default values must be defined)
FL_AVSCAN_COMPRESS - If defined, anti virus scanning is done on a compressed GZIP data stream (must be supported by service provider)
FL_SYSOUT_MAIL_CLASS (&FLSOMC) - Default class for SYSOUT allocation if FORMAT.MAIL() is used (only on z/OS)
FL_SYSOUT_MAIL_WRITER (&FLSOMW) - Default program for SYSOUT allocation if FORMAT.MAIL() is used (only on z/OS)
FL_LITERAL_CACHE_SIZE (&FLITCS) - Size of the hash table used (by power of 2) for the literal cache (8>=x<=20 (256 to 1.048.576 entries))
FL_OBJECT_CACHE_SIZE (&FOBJCS) - Size of the hash table used (by power of 2) for the object cache (8>=x<=20 (256 to 1.048.576 entries))
FL_CLP_CACHE_SIZE (&FCLPCS) - Size of the hash table used (by power of 2) for the CLP cache (2>=x<=8 (4 to 256 entries))
FL_RECORD_FORMAT_MAPPING (&FLRECFM) - If this variable is not set to DATATYPE (is the default), records with length field (RECF=VAR) are used
DATATYPE - Binary data as binary (RECF=BIN), Text as text (RECF=TXT)
FL_FIOREC_PARSEEXT - Default for read.record(PARSEEXT). ON enables filename-qualifier parsing at read by default; OFF (default) requires the PARSEEXT parameter per read
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_IBM_UNICODE_SERVICE (&FLIBMUS) - Define use of z/OS Unicode Services for simple character conversions to lower performance [AUTO]
AUTO - Use it, if behavior the same and faster (single character A accepted)
A - Single character shortcut for AUTO
ON - Activate it (with round trip conversion)
OFF - Deactivate it (no use of Unicode Services)
FL_WRITE_DATA_TO_ERRTRACE (&FLWD2ET) - Write data to trace (must be OFF if error trace is to be part of the support ticket) [OFF]
YES - Yes, do it (same as ON; single character Y accepted)
Y - Single character shortcut for YES (same as ON)
ON - Activate it (same as YES)
NO - No, do not do it (same as OFF; single character N accepted)
N - Single character shortcut for NO (same as OFF)
OFF - Deactivate it (same as NO)
FL_CA_BUNDLE - REST/HTTPS: trust anchor for TLS verification -- a PEM file, or a SAF keyring or key database name on z/OS
FL_REST_ATTEMPTS (&FLRSATT) - REST/HTTPS: TOTAL attempts per request incl. the first (1 = no retry, default 3); a connect failure, a lost connection and a transient 429/5xx are retried on a new connection
FL_REST_RETRY_WAIT (&FLRSWAT) - REST/HTTPS: initial wait in ms before a retry, doubled per attempt and jittered (default 500, max 8000); see FL_REST_ATTEMPTS
AWS_ACCESS_KEY_ID - S3: AWS access key ID (fallback for store.s3() PROVIDER.ACCESSKEY parameter)
AWS_DEFAULT_REGION - S3: AWS region (fallback for store.s3() PROVIDER.REGION parameter; default: us-east-1)
FL_S3_PORT - S3: port override merged into the endpoint (fallback for store.s3() PROVIDER.PORT parameter)
AWS_WEB_IDENTITY_TOKEN_FILE - S3: file holding an OIDC token for AssumeRoleWithWebIdentity (fallback for store.s3() PROVIDER.WEBIDENTITYFILE parameter)
FL_S3_IMDS - S3: take the credentials from the instance metadata service (fallback for store.s3() PROVIDER.IMDS parameter)
FL_IBM_APIKEY - S3: IBM Cloud api key, selects IAM instead of SigV4 (fallback for store.s3() PROVIDER.APIKEY parameter)
FL_IBM_IAM_ENDPOINT - S3: IBM Cloud IAM token endpoint (fallback for store.s3() PROVIDER.IAMENDPOINT parameter)
AWS_CONTAINER_CREDENTIALS_FULL_URI - S3: container credential endpoint (ECS/Fargate, EKS Pod Identity); used when IMDS is enabled
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI - S3: container credential path on 169.254.170.2; used when IMDS is enabled
AWS_CONTAINER_AUTHORIZATION_TOKEN - S3: bearer token for the container credential endpoint - kept secret
AZURE_STORAGE_ACCOUNT - Azure: storage account name (fallback for store.azure() PROVIDER.ACCOUNT parameter)
FL_AZURE_PREFIX - Azure: blob name prefix (fallback for store.azure() PREFIX parameter)
FL_AZURE_PORT - Azure: port override merged into the endpoint (fallback for store.azure() PROVIDER.PORT parameter)
AZURE_FEDERATED_TOKEN_FILE - Azure: file holding the client assertion for workload identity (fallback for store.azure() PROVIDER.FEDERATEDFILE parameter)
FL_CDA_PROVIDER (&FLCDAPR) - CDA: provider name, basename of its json file (fallback for store.ibmcda() PROVIDER parameter); z/OS only
FL_CDA_BUCKET (&FLCDABK) - CDA: bucket or container name inside the provider (fallback for store.ibmcda() BUCKET parameter); z/OS only
FL_CDA_PREFIX - CDA: object key prefix within the bucket (fallback for store.ibmcda() PREFIX parameter); z/OS only
FL_CDA_SESSION (&FLCDASES) - CDA: use a session (GDKINIT/GDKTERM) where CDA offers one; saves a provider and key file read per operation [ON; OFF disables]; z/OS only
FLAM4MF - Enable Microfocus Enterprise Server support for FLAM and FLUC record interfaces (ccsid/yes/no)
FLAM4MF_TRACEFILE - Enable a trace file for the MF-EDZ stubs supporting the record interface (Windows or Linux filename)
FLAM4MF_STATIC_SYSVAR - Static system variables are read from filename into the environment (filename in EBCDIC or ASCII, Syntax: 'SYMBOL=value', also use 'DD:SYSVAR')
FLAM4MF_DYNAMIC_SYSVAR - Dynamic system variables are read from filename into the environment (in conjunction with the JCL User Exit of MF-EDZ to add dynamic variables)
FL4SEPA_SIGFILE_PRIMARY_SPACE_TRK - Primary space of signature file for migration (if not defined the required space is determined from the used space of the old signature file)
FL4SEPA_SIGFILE_SECONDARY_SPACE_TRK - Secondary space of signature file for migration (if not defined the required space is determined from the used space of the old signature file))
_EDC_ZERO_RECLEN (&FLZRECL) - Used for handling of empty records (see dedicated chapter below) on z/OS
Beside the static environment variables there a lot of dynamic formed environment variables supported.
FLAM4_CONFIG_FILE - the configuration filename (default is '$HOME/.flam4.config' on UNIX/WIN or '&SYSUID..FLAM4.CONFIG' on mainframes)
FLAM4_DEFAULT_OWNER_ID - the default owner ID (default is 'limes')
owner_FLAM4_command_PROPERTY_FILENAME - To override default property file names
path_argument - to override the hard coded default property value
FLAM specific handling of environment variables
On platforms (mainly mainframe systems) where system symbols are
available, some of the environment variables can be pre-defined over
corresponding system variables. See install.txt or use built-in function
HLPENV (in parenthesis the corresponding
system symbols are listed).
Trailing whitespace is removed from variable values before being used.
A system symbol must start with & or an alphabetic character followed
by alphanumeric characters.
Boolean environment variables
Many environment variables accept a boolean value that enables or disables a
feature. Boolean values are matched case-insensitively. The following
values are accepted:
To enable: ON, YES, or the single character Y
To disable: OFF, NO, or the single character N
For automatic behavior (where supported): AUTO or the single character A
All three forms are equivalent and can be written in any combination of upper
and lower case (e.g. on, Yes, y all enable a feature). The accepted
values are listed in the help for each variable (use built-in function
HLPENV for details).
Considerations for the LANG variable
The environment variable LANG is also used on EBCDIC systems to
interpret several syntax characters correctly, which depend on the
codepage. See chapter special EBCDIC code page support
for how the CCSID can be defined. It is important to set this
variable to the correct value on EBCDIC systems. If this environment
variable is not set, files and literals are interpreted in IBM-1047 on
z/OS and USS. If you use another CCSID for entry, you must define the
environment variable LANG to enable correct parsing for strings that
contain special characters like ~. We recommend defining the
corresponding system variables (&FLANGLC, &FLANGCC and &FLANGCS) via
SYS1.PARMLIB(IEASYMxx) on z/OS (see also install.txt). These three
system symbols are used to build the environment variable LANG based on
the string below:
The language code (de) is important for correctly selecting the
default CCSID if an ASCII code page was detected.
Considerations for the ENVID variable
The ENVID variable is normally one character to separate test and
production environments. On z/OS the default is simply the first letter
of system symbol &SYSCLONE or if not defined (on all platforms) 'T'
for test.
Considerations for the FLAM4MF variable family (only Microfocus Enterprise Server)
The variable FLAM4MF and (if needed) FLAM4MF_TRACEFILE should be set in
the environment of the Microfocus Enterprise Server instance where the
FLAM or FLUC record interfaces are used. To define static and dynamic
system variables, the FLAM4MF_STATIC/DYNAMIC_SYSVAR environment variable
can be used to read the system variables to the environment. The second
file was mainly introduce for the MF-EDZ JCL user exit, which can be
used to provide the dynamic symbols like JOBNAME as keyword=value pair
as the dynamic file. All the files read to build the environment undergo
automatic ASCII and EBCDIC detection. A semicolon can be used to mark
the end of a keyword-value pair (an inline FB80 encoding in JCL on EDZ
does not contain newline characters).
To undefine an environment variable, there must be no characters behind
the equal sign. To replace a variable with nothing upon use, the
environment variable must be set to one or more whitespace character(s).
Trailing whitespace is removed from the value string, so a value which
contains only whitespace characters will result in an empty string upon
substitution.
For Micro Focus EDZ environments, the DD name SYSVAR is supported to
define system variables. The function used to read the keyword=value
pairs automatically detects if EBCDIC is used (character > 0x80) and
converts the lines automatically to the local character set.
Other used system symbols on z/OS
The LE-less part of FLAM can only use system symbols. Below is a list of
available variables:
*&FLREUCEE - Activate reuse of language environment in FLAM ZEDC support
*&FLOGQL1 - First qualifier to specify the FLAM usage log stream name
*&FLOGQL2 - Second qualifier to specify the FLAM usage log stream name
*&FLOGQL3 - Third qualifier to specify the FLAM usage log stream name
See install.txt for z/OS for more information.
Other ways to define environment variables
On Unix platforms the '/etc/profile' or .bashrc or command line can be
used to export environment variables. On windows under system control
global or user specific environment variables can be defined. On z/OS
additional the DD:CEEOPTS can be used to define environment variables,
see example for ZEDC usage below:
Additional with global relevance the environment variables can also be
defined over the PARMLIB member CEEPRMxx on z/OS, see examples for all 3
environments below: