Skip to content

Promote/Demote

This section describes the promote/demote functional area of the high-level language exits. The 4-character exit name identifier is PRDM.

Select option 7 Promote/Demote from the HLL Exit Definition - Function Selection (CMNHLLMM) panel to define exits for component promotion and demotion:

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. Here is how a sample panel might look:

CMNHLLMN                    HLL Exit Definition                 Row 1 to 6 of 12
Command ===>___________________________________________________ Scroll ===> CSR

Internal    External    + Active    1=LE     Description     +
    Name        Name                2=REXX   Debug Userids      +
-------------------------------------------------------------------------------
PRDM00XD                NO          2       pre demotion service
    Debug:              NO          2
-------------------------------------------------------------------------------
PRDM01XD                NO          2       post demotion service
    Debug:              NO          2
-------------------------------------------------------------------------------
PRDM00XP                NO          2       pre promotion service
    Debug:              NO          2
-------------------------------------------------------------------------------
PRDM01XP                NO          2       post promotion service
    Debug:              NO          2
-------------------------------------------------------------------------------
PRDM0100                NO          2       post promote/demote main menu
    Debug:              NO          2
-------------------------------------------------------------------------------
PRDM0101                NO          2       post site selection
    Debug:              NO          2

The panels around which exit points will be placed are listed below. The internal exit name (also known as function code) is PRDM0pnn, where:

  • p=0 is the pre-exit.

  • p=1 is the post-exit.

  • nn is an alphanumeric identifier relating to the panel for which the exit is taken.

The pre-exit is taken before the panel is displayed and the post-exit is taken after the panel has been displayed.

An internal exit name of PRDM0p01, for example, means that both pre- and post-exits exist. That is, the name of the pre-exit is PRDM0001 and the name of the post-exit is PRDM0101. If it makes no sense to have a pre-exit, the internal exit name is given as PRDM0101 (post-exit only). If it makes no sense to have a post-exit, the internal exit name is given as PRDM0001 (pre-exit only).

Most table displays have only post-exits. That is, we do not want to have a pre-exit that manipulates the lists that ZMF generates. We may want to have a post-exit to validate the selections that the user makes from the lists.

The panels around which the promote/demote exit points are placed are:

Panel ID Description Exit Name
CMNRPM00 Promote/demote main menu PRDM0100
CMNRPM01 Site selection PRDM0101
CMNRPM03 Promote options PRDM0003/PRDM0103
CMNRPM04 Demote options PRDM0004/PRDM0104
CMNRPM05 Selective promote/demote PRDM0105
CMNRPM07 Promotion level selection PRDM0107

Pre- and post-XML-service calls for promote and demote are:

XML Service Name Description Exit Name
package.service.promote Component promote PRDM00XP/PRDM01XP
package.service.demote Component demote PRDM00XD/PRDM01XD

Sample Exits

Sample exits are provided in the CMNZMF.SAMPLES distribution library. These examples show how to list all the information coming in to the exits. Not all information is available to all exits. The exits that occur early in the dialog will not have as much information as the exits that occur later in the dialog.

The promote/demote exit examples are:

  • HXCPRDM - COBOL example
  • HXPPRDM - PL/I example
  • HXRPRDM - REXX example

Most of the fields are fixed in nature. (See the data interface below.) However, there is an optional variable length section. This section contains the names and library types of all the components selected for promotion/demotion.

The format of this variable length data in COBOL is:

***
* VARIABLE BLOCK POINTER
*
* EACH ENTRY IN A VARIABLE LENGTH BLOCK CONSISTS OF THE DATA
* FOLLOWED BY A POINTER TO THE NEXT ENTRY. WHEN THAT POINTER
* IS NULL THEN THERE ARE NO FURTHER ENTRIES IN THE BLOCK.
***
    03  PRDMVARB-PTR        USAGE IS POINTER.
*
***
* SELECTED COMPONENT LIST
***
01  PRDMCPNT.
    03  PTR-NEXT-PRDMCPNT   POINTER.
*                                   POINTER TO NEXT ENTRY
    03 PRDMCTYP             PIC X(3).
*                                   THE CMPNT LIBTYPE
    03 PRDMCOMP.
*                                   THE VARLEN COMPONENT NAME
        49 PRDMCOMP-LEN     PIC S9(4) COMP.
*                                                   LENGTH
        49 PRDMCOMP-NAME    PIC X OCCURS 0 TO 256 TIMES
                                    DEPENDING ON PRDMCOMP-LEN.
*                                                   NAME

The format of this variable length data in PL/I is:

/***                                                                */
/* VARIABLE BLOCK POINTERS                                          */
/*                                                                  */
/* EACH ENTRY IN A VARIABLE LENGTH BLOCK CONSISTS OF THE DATA       */
/* FOLLOWED BY A POINTER TO THE NEXT ENTRY. WHEN THAT POINTER       */
/* IS NULL THEN THERE ARE NO FURTHER ENTRIES IN THE BLOCK.          */
/*** */
        2 PRDMVBP               PTR;
/***                                                                */
/* SELECTED COMPONENT LIST                                          */
/***                                                                */
DCL     1 PRDMCPNT              BASED(WORKVBP),
            2 PTR_NEXT_PRDMCPNT PTR,        /*POINTER TO NXT BLOCK  */
            2 PRDMCTYP          CHAR(3),    /*COMPONENT LIBTYPE     */
            2 PRDMCOMP          CHAR(256)   VARYING; /* CMPNT NAME  */
The method for traversing this variable length list is the same as that used in other functions. The anchor pointer (PRDMVBP) points to the first in the chain of entries (null if no chain exists). Each entry contains a pointer to the next entry (null at end of chain).

The difference with this list to other functions is that the data in each entry is variable in length itself. (The component name can be any length up to 256 bytes.) The sample code shows methods for dealing with this variable length.

REXX makes use of stem variables as usual with a variable number of similar data items.

Note

The list of components is only provided on a selective promote/demote and consists of just those components selected. On a full promote/demote no such list is provided. (The list is potentially huge and may never be needed.) If such information is needed, you can easily obtain it in the exit itself by making use of ZMF XML services. The samples provided show how this is done.

A single data structure is passed to all of these exits.

Data Interface

LE-Language Variable Name REXX Variable Name Length Purpose Modifiable Cursor Field No.
PRDMFUNC function 8 Internal exit name No
PRDMDBUG debugCall 1 Debug exit call (Y/N) No
PRDMORGN callOrigin 3 ISPF=SPF, XML Service=XML, ZDD=ZDD, ZMF4ECL=EC L No
PRDMZMFS zmfSubs 1 ZMF subsystem character No
PRDMPDB2 db2Subs 4 Default Db2 subsystem for this ZMF instance No
PRDMUSER userid 8 Userid for function calling this exit No
PRDMEXTN externalName 256 External routine name defined for this exit No
PRDMPKGN packageId 10 The package being acted on No 001
PRDMPSTA packageStatus 3 Package status (DEV,FRZ, and so on) No 002
PRDMPINS packageInsDate 8 Package Install Date yyyymmdd No
PRDMPFUN promoFunction 8 PROMOTE vs DEMOTE No 004
PRDMPTYP promoType 6 FULL vs SELECT No
PRDMPSCP promoScope 8 CHECK vs SERVICE (relevant to service exits only) No
PRDMOPTN optionRequested 1 Option chosen from panel No
PRDMSITE promoSite 8 Target site No 005
PRDMPNAM promoName 8 Target promotion name No 006
PRDMPLVL promoLevel 2 Target promotion level Yes 007
PRDMLPNM lastPromoName 8 Last promotion name No 008
PRDMLPLV lastPromoLevel 2 Last promotion level No 009
PRDMPDTE promoDate 10 Promotion date yyyy/mm/dd No 010
PRDMPTME promoTime 8 Promotion time hh🇲🇲ss No 011
PRDMPUSR promoUser 8 Promotion userid No 012
PRDMSCHD scheduleDate 8 Schedule date yyyymmdd Yes 013
PRDMSCHT scheduleTime 4 Schedule time hhmm Yes 014
PRDMSLST shortList 1 Short selection list Y/N Yes 015
PRDMBYPO bypassOverlayCheck 1 Bypass overlay check Y/N Yes 016
PRDMSUPN suppressNotify 1 Suppress batch messages Y/N Yes 017
PRDMMIXC mixedCase 1 Name has mixed case? Yes 034
PRDMJOB1 jobCard01 72 Job card line #1 Yes 018
PRDMJOB2 jobCard02 72 Job card line #2 Yes 019
PRDMJOB3 jobCard03 72 Job card line #3 Yes 020
PRDMJOB4 jobCard04 72 job card line #4 Yes 021
PRDMFORC demoteRequired 1 Prior demote required Y/N No 022
PRDMUVPN userVarPanel 8 User variable panel name Yes
PRDMUV01 - 05 userVariable01-05 8*5 Set of five 8-byte package user variables Yes 024-028
PRDMUV06 - 10 userVariable06-10 72*5 Set of five 72-byte package user variables Yes 029-033
PRDMUVAR userVariables 1 Display User variable panel (Y/N) Yes 023
PRDMOPRF optsProfile 8 To select the ZDDOPTS profile to display user options for the ZMF Client Pack Yes

Repeated Group (Variable Length)

LE-Language Variable Name REXX Variable Name Length Purpose Modifiable Cursor Field No.
PRDMCTYP componentType. 3 Selected component libtype (stem variable, componentType.0 has number of instances) No
PRDMCOMP componentName. 0-256 Selected component name (stem variable, componentName.0 has number of instances) No

Returned by Exit

LE-Language Variable Name REXX Variable Name Length Purpose Modifiable Cursor Field No.
PRDMGO proceed 3 Set to 'NO' to stop the file tailoring process Yes
PRDMLOKD dataLocked 3 Fields locked? (YES/NO) Yes
PRDMSHRT shortMsg 24 Short error message text Yes
PRDMLONG longMsg 128 Long error message text Yes
PRDMCURS cursorField 3 For ISPF to place cursor on return to the panel display. The values relating to each field are shown in this table. Yes
PRDMCHNG dataChanged 3 This field must be set to YES if you wish to return changed values to ZMF. Yes