Skip to content

File Tailoring

The file tailoring function is somewhat different to the usual HLLX process in that there is no user interaction to work with. The file tailoring function provides a mechanism for other HLL exits to set variable values that the file tailoring programs can pick up and turn in to ISPF variables that are used in file tailoring the skeletons.

The 4-character exit name identifier for file tailoring is FTLR.

Select option 5 File Tailoring from the HLL Exit Definition - Function Selection (CMNHLLMM) panel to define customized ISPF variables for file tailoring:

CMNHLLMM                     HLL Exit Definition - Function Selection
Option ===>_________________________________________________________

1 All                       Full list

2 Build                     Component checkin, build, recompile, relink, delete
3 Package Create            Initial create of a package
4 Package Update            Subsequent update of package attributes
5 File Tailoring            Define customized ISPF variables for file tailoring
6 Checkout                  Component Checkout from baseline/promotion
7 Promote/Demote            Promotion and demotion of components
8 Audit                     Audit job submission and audit process
9 Freeze                    Package freeze and selective unfreeze/refreeze
A Approve/Reject            Package approve and reject
R Revert/Backout            Package revert and backout
S Specific                  Package syslib, Standard Language, Query etc.
U Scratch/Rename            Utility functions

E ERO                       ERO functions

M Miscellaneous             HLLX procedure name
Z Modify                    Issue Reload, Detach, or Attach modify commands
In response, the HLL Exit Definition (CMNHLLMN) panel is displayed:

CMNHLLMN            HLL Exit Definition                 Row 1 to 5 of 5
Command ===> __________________________________________Scroll ===> CSR

Internal External   + Active 1=LE       Description  +
    Name    Name             2=REXX     Debug Userids +
-------------------------------------------------------------------------------
FTLR00BA            NO       2          install/baseline file tailoring
    Debug:          NO       2
-------------------------------------------------------------------------------
FTLR00BL            NO       2          build job file tailoring
    Debug:          NO       2
-------------------------------------------------------------------------------
FTLR00BP            NO       2          base ZMF promotion file tailoring
    Debug:          NO       2
-------------------------------------------------------------------------------
FTLR00EB            NO       2          ERO autoresolve file tailoring
    Debug:          NO       2
-------------------------------------------------------------------------------
FTLR00EP            NO       2          ERO promotion file tailoring
    Debug:          NO       2
There is a single exit point per file tailoring program:

File Tailoring Program Name Description Exit Name
CMNVFTLR ZMF component build FTLR00BL
CMNVPRFT ZMF promote/demote FTLR00BP
CMNVPIJB ZMF install/baseline x.node FTLR00BA
CMNVRACR ERO autoresolve build FTLR00EB
CMNVRPFT ERO promote/demote FTLR00EP

The single exit point is called multiple times (hard limited to 999 to avoid loops) at the control of the exit code (that is, the exit code is called until the exit says stop calling me). Each time the exit can pass back a single variable name, length, and value. The file tailoring program vdefines and assigns a value to each variable that the exit passes to it.

A REXX sample, in which variables passed to the exit are displayed and three ISPF variables are defined, is supplied as member HXRFTLR of the CMNZMF.SAMPLES distribution library. A COBOL sample is supplied as member HXCFTLR of the CMNZMF.SAMPLES distribution library.

A single data structure is passed to all of these exits. Many of the fields are related to component build only (as detailed below). There is, potentially, a huge number of different fields that may be required by the promote/demote and baseline/install exits in order to make a decision on what, if any, extra ISPF variables need to be defined. It is expected that the exit can use ZMF XML services to access that information.

We envisage the way to use these exits is to have other exits (for example, exits for package create and/or package update) to set certain VPOOL variables which can then be subsequently accessed by the file tailoring exits and turned into ISPF variables for use in the target file tailoring skeletons.

Data Interface for File Tailoring Exits

General

LE-Language Variable Name REXX Variable Name Length Purpose
FTLRFUNC function 8 Internal exit name
FTLRDBUG debugCall 1 Debug exit call (Y/N)
FTLRORGN callOrigin 3 ISPF = SPF XML Service = XMLZDD = ZDDZMF4ECL = ECL
FTLRZMFS zmfSubs 1 ZMF subsystem character
FTLRPDB2 db2Subs 4 Default Db2 subsystem for this ZMF instance
FTLRUSER userid 8 Userid for function calling this exit
FTLREXTN externalName 256 External routine name defined for this exit
FTLRVCNT cumulativeVarCount 3 How many times has this exit been called
FTLRLAST lastVarName 8 The name of the last variable defined by ZMF at the request of this exit
FTLRFROM fromEroZmf 3 Called from an ERO or base ZMF process
FTLRPKGN packageId 10 Package name
FTLRJOB1 jobCard01 72 Job card line #1 (blank for Install/Baseline)
FTLRJOB2 jobCard02 72 Job card line #2 (blank for Install/Baseline)
FTLRJOB3 jobCard03 72 Job card line #3 (blank for Install/Baseline)
FTLRJOB4 jobCard04 72 Job card line #4 (blank for Install/Baseline)
FTLRRLSE release 8 ERO release
FTLRAREA releaseArea 8 ERO area
FTLRUV1 userVariable01-05 8*5 Set of five 8-byte user variables
FTLRUV6 userVariable06-10 72*5 Set of five 72-byte user variables

Promotion/Demotion

LE-Language Variable Name REXX Variable Name Length Purpose
FTLRPSIT promoSite 8 Target site
FTLRPLVL promoLevel 2 Target level nn
FTLRPNME promoName 8 Target promotion name
FTLRPFUN promoFunction 8 'PROMOTE', 'SELPROM', 'CLEANUP', 'DEMOTE', 'SELDEMO'

Build

LE-Language Variable Name REXX Variable Name Length Purpose
FTLRVOBJ buildProcessObject 8 'cmponent'
FTLRVMSG buildProcessMessage 8 'submit'
FTLRVSCP buildProcessScope 8 'stage','recomp','relink','checkout','build','checkin'
FTLRVPRC buildProcessName 8 Internal name for file tailoring process (usually VCOMP000).
FTLRLTYP componentType 3 Library type
FTLRCOMP component 256 Component name
FTLRPROC buildProc 8 Build procedure
FTLRLANG language 8 Language
FTLRDB2P useDb2PreCompileOption 1 Db2 precompile requested (Y/N)
FTLRUO1 userOption01-10 1*10 First set of the original component user options
FTLRUO2 userOption11-20 1*10 Second set of the original component user options
FTLR01 userOption0101-105 1*5 Set of five extended 1-byte component user options
FTLR02 userOption0201-203 2*3 Set of three extended 2-byte component user options
FTLR03 userOption0301-303 3*3 Set of three extended 3-byte component user options
FTLR04 userOption0401-403 4*3 Set of three extended 4-byte component user options
FTLR08 userOption0801-805 8*5 Set of five extended 8-byte component user options
FTLR10 userOption1001-1002 10*2 Set of two extended 10-byte component user options
FTLR16 userOption1601-1602 16*2 Set of two extended 16-byte component user options
FTLR34 userOption3401-3402 34*2 Set of two extended 34-byte component user options
FTLR44 userOption4401-4402 44*2 Set of two extended 44-byte component user options
FTLR64 userOption6401-6405 64*5 Set of five extended 64-byte component user options
FTLR72 userOption7201-7205 72*5 Set of five extended 72-byte component user options

Returned by Exit

LE-Language Variable Name REXX Variable Name Length Purpose
FTLRGO proceed 3 Set to 'NO' to stop the file tailoring process
FTLRSHRT shortMsg 24 Not used at present
FTLRLONG longMsg 128 Set to message text you wish to be reported in the file tailoring task output when stopping the process
FTLRMORE moreToCome 3 Set to 'YES' if you wish to define another variable. ZMF will keep calling this exit until this is set to something other than 'YES' (max 999 times)
FTLRVNAM ispfVarName 8 The name of the ISPF variable you wish to have ZMF vdefine for use by the current file tailoring process
FTLRVLEN ispfVarLen 4 The length of the variable value
FTLRVVA L ispfVarValue 1024 The variable value (character variables only)

The following example, taken from the HXRFTLR member of the CMNZMF.SAMPLES distribution library, shows how to have this exit define three ISPF variables:

/* */
/* Here we define three variables which will be available during the     */
/* skeleton file tailoring performed by the current process.             */
/* This exit is able to return a single variable at a time and is        */
/* called repeatedly while moreToCome is set to YES (max 999 times).     */
/*                                                                       */
/* The name of the last variable to be defined by this exit is           */
/* presented on the next call in the lastVarName variable. */
/*                                                                       */
If lastVarName = "          " then
    Do
        ispfVarName =   "MYVAR1"
        ispfVarLen =    "12"
        ispfVarValue =  "1234567890AB"
        moreToCome =    "YES"
    End

If lastVarName = "MYVAR1"    then
    Do
        ispfVarName = "MYVAR2"
        ispfVarLen = "8"
        ispfVarValue = "12345678"
        moreToCome = "YES"
    End
If lastVarName = "MYVAR2"   then
    Do
        ispfVarName = "MYVAR3"
        ispfVarLen = "4"
        ispfVarValue = "1234"
        moreToCome = "NO"
    End
The following example shows how to stop the process and provide a reason for doing so:

/*                                                                   */
/* stopping the file tailoring process and setting an error message  */
/*                                                                   */
proceed = "NO"
longMsg = "Example of how to let the developer know what went wrong"