z/OS ISPF Software Configuration and Library Manager Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


FLMTCOND macro

z/OS ISPF Software Configuration and Library Manager Guide and Reference
SC19-3625-00

The FLMTCOND macro provides a means of running or skipping BUILD translators based upon the group at which the BUILD takes place and return codes from previous BUILD translators in the same language definition. The use of FLMTCOND is similar to the use of the COND keyword parameter on a JCL EXEC statement. This similarity is restricted by the requirement that multiple uses of FLMTCOND in a language definition require each corresponding FLMTRNSL macro to have identical output KEYREF and DFLTTYP keyword values on the FLMALLOC statements.

The FLMTCOND macro can be used to specify a group, combinations of return codes from previous BUILD translators in the same language definition, or both in order to:
  • Run one of two BUILD translators
  • Run or skip a BUILD translator only under certain conditions
  • Run or skip several BUILD translators that have the same outputs
Note:
  1. An FLMTCOND macro must follow an FLMTRNSL macro with FUNCTN=BUILD. Only one FLMTCOND macro can be specified for each FLMTRNSL.
  2. The GROUP and NOTGROUP parameters are mutually exclusive. If neither GROUP nor NOTGROUP is specified, the relations list and action applies to all groups.
  3. FLMTCOND can be used with the GROUP or NOTGROUP parameters to provide an IF-THEN-ELSE effect in which only one of two translators is used. The NOTGROUP keyword can provide flexibility in altering the hierarchy without similar alterations in the language definitions.
  4. Use of the FLMTCOND statement does not cause a recompilation when a member is promoted to another group, it only specifies actions to be taken if a build is performed at the new group. To cause a rebuild to occur automatically, add an FLMLRBLD statement for the language.
The logic of the GROUP, NOTGROUP, WHEN, and ACTION parameters is shown in this illustration:
For specifying GROUP keyword:
  IF the BUILD group is in the group_list
       AND
  WHEN at least one relation is TRUE THEN
       DO ACTION
  ELSE
       DO OTHER ACTION

For specifying NOTGROUP keyword:
  IF the BUILD group is NOT in the group_list
       AND
  WHEN at least one relation is TRUE THEN
       DO ACTION
  ELSE
       DO OTHER ACTION

DEFAULTS:
  GROUP  = ALL GROUPS
  WHEN   = TRUE
  ACTION = RUN

Macro format

Read syntax diagramSkip visual syntax diagram
>>-FLMTCOND--+---------------------+---------------------------->
             +-GROUP=group_list----+   
             '-NOTGROUP=group_list-'   

>--+----------------------+--+-------------------+-------------><
   '-,WHEN=relations_list-'  |          .-RUN--. |   
                             '-,ACTION=-+-SKIP-+-'   

Parameters

GROUP=group_list
This parameter specifies the groups where the relations list and action are used.

The group list must be enclosed in parentheses or single quotes, with a comma and no spaces between the group names. The list of groups is not checked for validity when the project definition is assembled or during build. This allows alternate project definitions to function without requiring that all groups be defined in the alternate project definition.

The other ACTION is taken for build groups not in the group_list.

GROUP=() or GROUP='' specifies an empty group list.

NOTGROUP=group_list
Use this parameter to specify groups to which you do not want the relations list and action applied.

NOTGROUP=() or NOTGROUP='' specifies an empty group list.

The format of the group_list is the same as for the GROUP parameter.

,WHEN=relations_list
This parameter specifies the conditions under which the translator is run. The default is TRUE.
The relations_list is (s1,r1,v1) or ((s1,r1,v1),…,(sn,rn,vn)) where:
  • si is the translator label for a previous FLMTRNSL macro of a BUILD translator in the same language definition. An asterisk (*) can be used to match the previous FLMTRNSL (with or without a translator label) in the language definition for the BUILD translator that last executed. Using an asterisk allows you to refer back at run time to the BUILD translator that was last executed in the language definition at this point. There is no default.
  • ri is a standard relation such as EQ, NE, LT, GT, LE, or GE. There is no default.
  • vi is an unsigned integer with a maximum value of 999999999. This relation is compared with the return code from a previous Build translator identified by si in the language definition. There is no default.

At run time, SCLM stops examining the relations in a list as soon as a TRUE relation is found. Incorrect labels in relations that follow a TRUE relation do not result in an error message. The relations in a list can be viewed as Boolean values connected by a Boolean OR. Build translators that have not executed are ignored for si = *.

SCLM stops examining previous Build translators for a relation when the label si is located even if the Build translator did not execute. The relation is evaluated as FALSE for Build translators that did not execute.

,ACTION=RUN|SKIP
This parameter specifies the action to take at run time.

The decision to RUN or SKIP the translator depends upon the build group, the GROUP|NOTGROUP parameter, and the WHEN parameter.

All FLMTRNSL macros in a language definition that also use FLMTCOND with a WHEN keyword must use the same FLMALLOC KEYREF and DFLTTYP keyword values for all output allocations (KEYREF is OBJ, OUTx, COMP, LIST, LOAD or LMAP). Use of the same keywords results in an architecture definition that is correct for all possible return codes at run time.

When the default architecture definition is constructed, SCLM does not know what the return codes will be at run time. These assumptions are made:
  • The WHEN keyword value contains a TRUE relation.
  • The FLMTRNSL macros will not be executed.

Example 3

Code example
Result
not specified
Run the translator for all groups.
FLMTCOND
Run the translator for all groups. This is legal, but has the same effect as not specifying FLMTCOND.
FLMTCOND ACTION=SKIP
Skip the translator for all groups.
FLMTCOND WHEN=(STEP1,EQ,4)
Run the translator for all groups if the return code from the previous translator with label STEP1 equaled 4.

Skip the translator for all groups if the return code from the previous translator with label STEP1 did not equal 4.

FLMTCOND WHEN=(STEP1,EQ,4), ACTION=SKIP
Run the translator for all groups if the return code from the previous translator with label STEP1 did not equal 4.

Skip the translator for all groups if the return code from the previous translator with label STEP1 equaled 4.

FLMTCOND NOTGROUP=(FVT,SVT,PROD)
Run the translator if the group is not FVT, SVT, or PROD.

Skip the translator if the group is FVT, SVT, or PROD.

FLMTCOND NOTGROUP=(FVT,SVT,PROD), ACTION=SKIP
Run the translator if the group is FVT, SVT, or PROD.

Skip the translator if the group is not FVT, SVT, or PROD.

FLMTCOND NOTGROUP=(FVT,SVT,PROD), WHEN=(STEP1,EQ,4)
Run the translator if the group is not FVT, SVT, or PROD and the return code from the previous translator with label STEP1 equaled 4.

Skip the translator if the return code from the previous translator with label STEP1 did not equal 4.

Skip the translator if the group is FVT, SVT, or PROD.

FLMTCOND NOTGROUP=(FVT,SVT,PROD), WHEN=(STEP1,EQ,4), ACTION=SKIP
Run the translator if the return code from the previous translator with label STEP1 did not equal 4 or if the group is FVT, SVT, or PROD.

Skip the translator if the group is not FVT, SVT, or PROD and the return code from the previous translator with label STEP1 equaled 4.

FLMTCOND GROUP=(FVT,SVT,PROD)
Run the translator if the group is FVT, SVT, or PROD.

Skip the translator if the group is not FVT, SVT, or PROD.

FLMTCOND GROUP=(FVT,SVT,PROD), ACTION=SKIP
Run the translator if the group is not FVT, SVT, or PROD.

Skip the translator if the group is FVT, SVT, or PROD.

FLMTCOND GROUP=(FVT,SVT,PROD), WHEN=(STEP1,EQ,4)
Run the translator if the group is FVT, SVT, or PROD and the return code from the previous translator with label STEP1 equaled 4.

Skip the translator if the return code from the previous translator with label STEP1 did not equal 4.

Skip the translator if the group is not FVT, SVT, or PROD.

FLMTCOND GROUP=(FVT,SVT,PROD), WHEN=(STEP1,EQ,4), ACTION=SKIP
Run the translator if the return code from the previous translator with label STEP1 did not equal 4 or if the group is not FVT, SVT, or PROD.

Skip the translator if the group is FVT, SVT, or PROD and the return code from the previous translator with label STEP1 equaled 4.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014