CA Endevor Software Change Manager® Exits Guide r14 This documentation and any related computer software help programs (hereinafter referred to as the "Documentation") are for your informational purposes only and are subject to change or withdrawal by CA at any time. This Documentation may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, without the prior written consent of CA. This Documentation is confidential and proprietary information of CA and may not be used or disclosed by you except as may be permitted in a separate confidentiality agreement between you and CA. Notwithstanding the foregoing, if you are a licensed user of the software product(s) addressed in the Documentation, you may print a reasonable number of copies of the Documentation for internal use by you and your employees in connection with that software, provided that all CA copyright notices and legends are affixed to each reproduced copy. The right to print copies of the Documentation is limited to the period during which the applicable license for such software remains in full force and effect. Should the license terminate for any reason, it is your responsibility to certify in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, LOST INVESTMENT, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. The use of any software product referenced in the Documentation is governed by the applicable license agreement and is not modified in any way by the terms of this notice. The manufacturer of this Documentation is CA. Provided with "Restricted Rights." Use, duplication or disclosure by the United States Government is subject to the restrictions set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)(3), as applicable, or their successors. Copyright © 2010 CA. All rights reserved. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies. CA Product References This document references the following CA products: ■ ■ ■ CA Endevor® Software Change Manager (CA Endevor SCM) CA Top Secret ® for z/OS (CA Top Secret for z/OS) CA ACF2 ™ for z/OS (CA ACF2 for z/OS) Contact CA Contact Technical Support For your convenience, CA provides one site where you can access the information you need for your Home Office, Small Business, and Enterprise CA products. At http://ca.com/support, you can access the following: ■ ■ ■ ■ ■ Online and telephone contact information for technical assistance and customer services Information about user communities and forums Product and documentation downloads CA Support policies and guidelines Other helpful resources appropriate for your product Provide Feedback If you have comments or questions about CA product documentation, you can send a message to
[email protected]. If you would like to provide feedback about CA product documentation, complete our short customer survey, which is also available on the CA Support website, found at http://ca.com/docs. Contents Chapter 1: Introduction 9 Exits .......................................................................................... 9 Exit Names ................................................................................... 10 Exits and High-Level Languages ............................................................... 11 Define Multiple COBOL Programs for the Same Exit Point .................................... 11 Sample COBOL Linkage Section ............................................................ 12 Store User Exits .............................................................................. 12 Debug an Exit Program ....................................................................... 12 Sample Exit Trace Log ........................................................................ 13 How to Identify Exits.......................................................................... 14 @C1UEXIT Macro Statements .............................................................. 14 Identifying the Start of the User Exit Table Using the @C1UEXIT Macro Statement ............ 15 Identifying a Program as an Exit Using the @C1UEXIT Macro Statement ...................... 15 Identifying the End of the User Exit Table Using the @C1UEXIT Macro Statement ............. 16 Anchor IDs and Multiple User Exits ......................................................... 17 Chapter 2: Using Exit Points 21 Exit Point Functions ........................................................................... 21 Exit Point 1 Programs ......................................................................... 23 Exit Point 1 Assembler Control Blocks ...................................................... 23 Exit Point 1 COBOL Control Blocks ......................................................... 24 Exit Point 1 Control Block Return Codes .................................................... 24 Exit Point 2 Programs ......................................................................... 25 Exit Point 2 Assembler Control Blocks ...................................................... 26 The Exit Point 2 ENVFCBA Field (Assembler) ................................................ 27 Exit Point 2 COBOL Control Blocks ......................................................... 28 Exit Point 2 COBOL Source and Target Fields ............................................... 30 Exit Point 2 Control Block Return Codes .................................................... 31 Exit Point 3 Programs ......................................................................... 31 Exit Point 3 Assembler Control Blocks ...................................................... 31 The Exit Point 3 ENVFCBA Field ............................................................ 32 Exit Point 3 COBOL Control Blocks ......................................................... 33 Exit Point 3 COBOL Source and Target Fields ............................................... 34 Exit Point 3 Return Codes ................................................................. 35 Exit Point 4 Programs ......................................................................... 35 Exit Point 4 Assembler Control Blocks ...................................................... 36 The Exit Point 4 ENVFCBA Field ............................................................ 36 Contents 5 Exit Point 4 COBOL Control Blocks ......................................................... 37 Exit Point 4 COBOL Source and Target Fields ............................................... 38 Exit Point 4 Return Codes ................................................................. 38 Exit Point 5 Programs ......................................................................... 38 Exit Point 5 Assembler Control Blocks ...................................................... 39 Exit Point 5 COBOL Control Blocks ......................................................... 39 Exit Point 5 Return Codes ................................................................. 40 Exit Point 6 Programs ......................................................................... 40 Exit Point 6 Assembler Control Blocks ...................................................... 40 Exit Point 6 COBOL Control Blocks ......................................................... 41 Exit Point 6 Return Codes ................................................................. 41 Issue Messages from Exit Programs ............................................................ 41 How CA Endevor SCM Builds Messages ......................................................... 42 How CA Endevor SCM Issues Messages ........................................................ 42 Chapter 3: Using Exit Control Blocks 45 Exit Control Blocks ............................................................................ 46 The Primary Information Block ................................................................ 47 $ECBDS DSECT Sample ................................................................... 47 EXIT_CONTROL_BLOCK Layout Sample .................................................... 56 The Request Information Block ................................................................ 74 $REQPDS DSECT Sample .................................................................. 74 REQUEST-INFO-BLOCK Layout Sample ..................................................... 80 The Assembler Environment Block ............................................................. 91 $ENVDS DSECT Sample ................................................................... 92 The COBOL Environment Block ................................................................ 96 XXX-ENVIRONMENT-BLOCK Layout Sample ................................................. 97 SRC-ENVIRONMENT-BLOCK Field Descriptions .............................................. 99 TGT-ENVIRONMENT-BLOCK Field Descriptions ............................................. 102 The Assembler Element Master Information Block .............................................. 106 $ELMDS DSECT Sample .................................................................. 106 The COBOL Element Master Information Block ................................................. 121 ELEMENT-MASTER-INFO-BLOCK Layout Sample ............................................ 121 SRC-ELEMENT-MASTER-INFO-BLOCK Field Descriptions .................................... 127 TGT-ELEMENT-MASTER-INFO-BLOCK Field Descriptions .................................... 137 The Assembler File Block ..................................................................... 147 $FILDS DSECT Sample ................................................................... 147 The COBOL File Block ........................................................................ 149 XXX-FILE-CONTROL-BLOCK Layout Sample ................................................ 150 SRC-FILE-CONTROL-BLOCK Field Descriptions ............................................. 150 TGT-FILE-CONTROL-BLOCK Field Descriptions ............................................. 152 The SMF Action Record....................................................................... 153 6 Exits Guide .... 161 COBOL Exit Points ...................................................................................................................................................... 171 Chapter 5: Using the Package Shipment Exit 201 The Package Shipment Exit ............................ 273 $PFILDS DSECT.............. 262 PACKAGE-EXIT-HEADER-BLOCK Layout ...................................................... 167 Data Record Availability ........................................... 204 Additional Exit Design Considerations ........................................... 273 PACKAGE-EXIT-FILE-BLOCK Layout ....... 157 Sample SETUP Routine .................................................. 255 The Package Header Control Block .................................................................................................................... 155 Writing Exit Programs for Package Actions............................................... 262 $PHDRDS DSECT ............................. 165 How Requests for Data Work ......... 276 $PACTREQ DSECT ......................................................................................... 215 The Primary Information Block for COBOL ....................................................................... 156 Package Exit Points ........................................................................... 210 Control Block Initialization and Availability ................... 166 COBOL Request Flags and Return Codes ........................... 268 The Package File Control Block ................................................................................................................................................... 233 The Package Request Control Block ................................................................................................................. 275 The Package Action Request Block .................................................................................................................................................................................................................................................. 168 Package Exit Actions ............... 249 PACKAGE-REQUEST-BLOCK Layout .............................. 215 The Primary Information Block for Assembler ................... 161 Requests for Data ..........................................Chapter 4: Using Package Exits 155 Package Processing ................................................................................................ 201 Assembler Calling Conventions ... 165 The Record-Level Interface ................................................ 277 Contents 7 ................................................................................................................. 157 Enabling Package Exit Points .................................................................... 205 Sample Exit Program ....................................................................................................................................................... 165 Assembler Request Flags and Return Codes ............................................................................ 206 Chapter 6: Using Package Exit Control Blocks 209 Package Exit Control Blocks ........................................................... 214 The Package Exit Control Block .................................................................. 248 $PREQPDS DSECT ...................... 170 Package Exit Return Codes ................ 203 COBOL Calling Conventions Example . 202 Assembler Example ........................................................... . 307 $PSHPREQ DSECT ........................................................................................................................................ 326 Sample Exit 6 Program ................................................... 318 PACKAGE-EXIT-COLLECT-BLOCK Layout ........................................................................... 332 XIT7MAIL .......................... 320 Package Exit Example .......... 294 $PAPPREQ DSECT .......................... 317 $PCOLREQ DSECT ................ 339 Index 341 8 Exits Guide ......................................................... 308 PACKAGE-EXIT-SHIPMENT-BLOCK Layout ........ 285 The Package Approver Request Block ............................................................................................................ 305 The Package Ship Request Block ...................... 300 The Package Backout Request Block .............................................................................................................................................................................................. 316 The Product Collection Request Block .......................................................................................... 314 PACKAGE-EXIT-SCL-BLOCK Layout ..... 323 Building the CCID Table for Exit 2 ................................................................... 303 PACKAGE-EXIT-BACKOUT-BLOCK Layout ...................... 321 Chapter 7: Exit Program Examples 323 Exits 2 and 6 ........................PACKAGE-EXIT-ACTION-BLOCK Layout ............................................................................ 294 PACKAGE-EXIT-APPROVER-MAP Layout.......................................................................................................................................................................... 324 Sample Exit 2 Program ....................................... 313 $PSCLREQ DSECT ................................................................ 335 Other Sample Exit Programs ........... 330 Notification Utility Exit Programs ............ 302 $PBODREQ DSECT .................................... 311 The Package SCL Request Block ............................................................................................................................ 333 CALLMLIF ........................................................................................................................... displaying messages and modifying information as necessary based on the control block information. you must: ■ ■ ■ Identify the exits that you want to use." Chapter 1: Introduction 9 . see the chapter "Using Package Exits. The user exits table is created during CA Endevor SCM implementation. Write the exits. and then updated as necessary. When it reaches an exit point. Receives the control blocks from the exit program. CA Endevor SCM: ■ ■ ■ ■ Builds one or more control blocks. During session initialization. Passes the control blocks to the exit program. then loads all exits defined in the C1UEXITS table into storage. CA Endevor SCM loads the Defaults Table and the C1UEXITS table. For more information about package exits. Note: Exits written for package functions differ in some respects from other exits. Identify the exits to CA Endevor SCM by including them in the user exits table (C1UEXITS). Checks the user exit table to determine the exits to be called.Chapter 1: Introduction This section contains the following topics: Exits (see page 9) Exit Names (see page 10) Exits and High-Level Languages (see page 11) Store User Exits (see page 12) Debug an Exit Program (see page 12) Sample Exit Trace Log (see page 13) How to Identify Exits (see page 14) Exits To use exit programs with CA Endevor SCM. storage contained in subpools 10 to 19 can be freed at the subpool level without affecting the operation of CA Endevor SCM. where nn is the number of the exit point where CA Endevor SCM calls the program. Although user exits can use any storage subpool. the default name for an exit program to be called at exit point 1 is C1UEXT01. We recommend that internal names for exits written in a high-level language (for example. For example. not through Register 15. 10 Exits Guide . COBOL) maintain this naming convention. Note: For more information about naming conventions for exits. CA Endevor SCM supports standard IBM calling conventions for all user exits.Exit Names The CA Endevor SCM exit interface is designed for use with exits written in either assembler or in high-level languages such as COBOL. If you choose to use another naming convention for your exit programs. They must also be re-entrant and re-usable. Exit Names CA Endevor SCM provides a sample exit table with exit program names of C1UEXTnn. be sure to change the names in the sample exit table before building the table. see Exits and High Level Languages (see page 11). There is one exception: exit programs must pass return codes back to CA Endevor SCM through the exit control block. CA Endevor SCM has reserved storage subpools 10 to 19 for user exits. you might rename the second C1UEXT03 program as XIT3PROG2. Compile the second program for the same exit. you might rename program C1UEXT03 as XIT3PROG1. link-edit it with the high-level language exit program. Edit the C1UEXITS table to include the renamed exits. Rename the compiled program. see CSIQJCL member BC1JEXIT If you are using a COBOL compiler that supports address pointer fields. to set the address of the control blocks to the pointer field.Exits and High-Level Languages Exits and High-Level Languages CA Endevor SCM provides an interface program. you need to edit the sample exits as follows: ■ ■ Redefine all the pointer fields. Instead. Compile the first exit program. EPC1UEXT. 5. you do not need to use the EPCIUEXT program. which makes control blocks available to exit programs written in high-level languages such as COBOL. 6. Use the SET statement in the Procedure Division. To use EPC1UEXT. Repeat the compile and rename steps as necessary. Rename the second program. Sample linkage editor input is shown next: INCLUDE SYSLIB(EPC1UEXT) *front-end program* INCLUDE SYSLIB(exit program name) *real exit program* ENTRY EPC1UEXT NAME C1UEXTnn(R) Note: Program EPC1UEXT recognizes only one exit program for each exit point. This program is provided as a load module in the uprfx.iqual. 2. For example.CSIQLOAD library. in the sample exits. 3. For example. for example C1UEXT03. Define Multiple COBOL Programs for the Same Exit Point To define multiple COBOL programs for the same exit point 1. Chapter 1: Introduction 11 . naming EPC1UEXT as the entry point. This program would also be named C1UEXT03. as 'USAGE IS POINTER'. For a sample JCL that compiles and links a COBOL exit. Program EPC1UEXT does not support package function exits. 4. and include the following statement in the job: //EN$TRXIT DD DSN=data set name. This allows you to compare input and output information. there is a bug in your program.Store User Exits Sample COBOL Linkage Section A sample COBOL linkage section is provided as member EXITBLKS in the iprfx. This member contains COBOL representations of most of the exit control blocks. DISP=SHR ■ In the foreground. Note: For testing purposes. Exit trace output is contained in the User Exit Parameter Trace Log. RECFM=FB. It can be copied into exits that you are writing in COBOL. allocate the data set as previously described. 12 Exits Guide . Allocate a data set with the following DCB parameters: LRECL=133. Store User Exits It is recommended that you store exit programs in an authorized LINKLIST library using the exit name as the load module name. If the information in a particular field in the after-exit control block is not what you expect.CSIQOPTN library. BLKSIZE=1330. perform one of the following actions: ■ In batch mode. To produce the exit trace log. Debug an Exit Program CA Endevor SCM includes a trace facility for use in debugging exit programs and for viewing the information passed to your exit programs by CA Endevor SCM.iqual. and then allocate the file to the foreground session data set using the following command: ALLOC FI(EN$TRXIT) DA('data set name') SHR REUS The exit trace log includes a listing of control block contents for the beforeand after-exit points. do one of the following: a. DSORG=PS. Include this statement in a batch job: //EN$TRXIT DD SYSOUT=* b. the authorization parameter (AUTH=NO) for the @C1UEXIT macro allows you to load the exit routines from either CONLIB or STEPLIB. If CONLIB/STEPLIB is listed. LINKLIST.Sample Exit Trace Log Sample Exit Trace Log The following illustration is a portion of a sample exit trace log for a before-action (exit 2) program. or LPA. Chapter 1: Introduction 13 . STEPLIB. If STEPLIB is listed. or LPA. the exit was found in STEPLIB. the exit was found in CONLIB. LINKLIST. This sample trace log lists the libraries that are searched to find the exit program. .. Use sample JCL BC1JTABL to assemble and link-edit C1UEXITS to your iprfx. @C1UEXIT TYPE=END One TYPE=START macro must be coded as the first macro in the table source. One TYPE=END macro must be coded as the last macro in the table source.. This indicates that the information has remained the same and the program is functioning normally.How to Identify Exits Note: For more information. the exits are called in the order defined in the exit point within the load module. BC1JTABL can be found in the installation library iprfx.iqual. One EXIT#= macro should be coded for each exit program that you identify to CA Endevor SCM. 14 Exits Guide . @C1UEXIT Macro Statements The C1UEXITS source consists of a series of @C1UEXIT macro statements. within each exit number. During CA Endevor SCM execution..CSIQSRC library.CSIQAUTU outside of SMP/E or use an SMP/E USERMOD to accomplish this. How to Identify Exits You identify exit programs to CA Endevor SCM by adding a @C1UEXIT macro to the source code of the user exits table (C1UEXITS).NAME=program.CSIQJCL. The following list contains three varieties of @C1UEXIT macros statements: ■ ■ ■ @C1UEXIT TYPE=START. The sample source code can be found in the C1UEXITS member in the iprfx.iqual. The following illustration is a comparison of the after-action control block information for the modifiable fields.iqual. @C1UEXIT EXIT#=number. see Exit Point Functions (see page 21) and Exit Control Blocks (see page 210). ANCHID= Identifies the anchor ID for this user exit.ANCHID=0. You must code a single macro of this format for each exit module to be identified.. Exits that cannot run in batch must set PECBBATX to "N" during the Setup call. The format is as follows: @C1UEXIT TYPE=START. ■ No—Indicates that all or most package exits cannot run in batch (without TSO services). ■ Identifying a Program as an Exit Using the @C1UEXIT Macro Statement @C1UEXIT EXIT#=number. Those exits that can run in batch should set PECBBATX to "Y" during the Setup call... the default is zero (0)..XIT7BAT=YES Where: XIT7BAT= Sets a default value for PECBBATX. NAME= Defines the program name. If an anchor ID is not coded.AUTH=YES Where: EXIT#= The exit point where you want CA Endevor SCM to call the exit program. Acceptable values are: PECBBATX to "N" during the Setup call. a severity 4 MNOTE is generated at assembly time and a default value of "No" is chosen.How to Identify Exits Identifying the Start of the User Exit Table Using the @C1UEXIT Macro Statement @C1UEXIT TYPE=START. If this keyword is not coded. Chapter 1: Introduction 15 . This name must be the same as the name of the called program.identifies the start of the user exit table and sets a default value of Yes or No for PECBBATX. Acceptable values are 1 through 7. The valid range for an anchor ID is 0-9999.NAME=program. identifies a program as a CA Endevor SCM exit.NAME=C1UEXT01. Yes—Indicates that all or most package exits can run in batch (without TSO services). The format is as follows: @C1UEXIT EXIT#=1. Acceptable values are: ■ ■ Yes-Default. Acceptable values are: ■ Y . Coding this value will also cause OPENs to be executed under the security context of the alternate ID.Indicates that CA Endevor SCM will not switch to the alternate ID prior to the opening of a data set. ■ ■ Identifying the End of the User Exit Table Using the @C1UEXIT Macro Statement @C1UEXIT TYPE=END identifies the end of the user exit table.Default. N . The format is as follows: @C1UEXIT TYPE=END 16 Exits Guide . Indicates that CA Endevor SCM will switch to the alternate ID just prior to the opening of a data set and switch back to the user ID on completion of the open.Indicates that CA Endevor SCM will switch to the alternate ID just prior to invoking the user exit and switch back to the user ID on completion of the exit. No-Indicates that the user exits are stored in either a STEPLIB or CONLIB. Indicates that the user exits are stored in an authorized library.How to Identify Exits AUTH= Indicates whether the exit program is stored in an authorized library. Use this option when testing exits. + . USE_ALTID= Indicates how the switch to the alternate ID is to be done for the exit program. Anchor IDs work as follows: ■ CA Endevor SCM initialization logic builds an anchor ID table. CA Endevor SCM copies the value in the ECBUEXT field into the anchor ID table. An exit 3 routine called RECEXIT3 with an anchor ID of 2. ■ ■ Example: Define Additional Exits for CA Endevor SCM In this example. can modify the ECBUEXT field in the $ECBDS DSECT. Before a user exit is invoked. To do this.How to Identify Exits Anchor IDs and Multiple User Exits Anchor IDs allow you to store information produced by one user exit that needs to be passed to one or more other user exits. After the exit terminates. assume you want to specify three additional exits to be supported by CA Endevor SCM and that the information produced by exit 1 will be used by exits 3 and 6. associating each anchor ID with a default value of 0000. Chapter 1: Introduction 17 . An exit 6 routine called STATEXT6 with an anchor ID of 2. if necessary. Anchor IDs can have a value of 0-9999. The user exit. assign the same anchor ID to all the exits that use the information. CA Endevor SCM copies the value stored in the anchor ID table into the ECBUEXT field in the $ECBDS DSECT. CA Endevor SCM user exits have an anchor ID of 0. CA Endevor SCM then executes the user exit. You might specify the following exit routines: ■ ■ ■ An exit 1 routine called SECEXIT1 with an anchor ID of 2. AUTH=YES *---------------------------------------------------------------------* * TYPE=DEFINITION DENOTES THE END OF THE EXIT TABLE. CA Endevor SCM then invokes SECEXIT1.ANCHID=0.AUTH=YES @C1UEXIT EXIT#=7. 2.AUTH=YES @C1UEXIT EXIT#=2.NAME=C1UEXT01.ANCHID=2.AUTH=YES @C1UEXIT EXIT#=6.AUTH=YES @C1UEXIT EXIT#=1.ANCHID=2.How to Identify Exits You would then modify the exit table by adding three lines to the @C1UEXIT macro in the BC1JXIT JCL. This processing proceeds as follows: 1. CA Endevor SCM reads the value associated with anchor ID 2 in the anchor ID table.ANCHID=2.NAME=C1UEXT02. 4. in the order in which they are listed.AUTH=YES @C1UEXIT EXIT#=6.ANCHID=0.NAME=STATEXT6.NAME=RECEXIT3.AUTH=YES @C1UEXIT EXIT#=3. Note that the value associated with anchor ID 2 prior to calling RECEXIT3 in the anchor ID table will be the value in the ECBUEXT field after the execution of program SECEXIT1.NAME=C1UEXT03.ANCHID=0.NAME=C1UEXT07.NAME=C1UEXT05. 3.ANCHID=0.NAME=SECEXIT1. Prior to calling program SECEXIT1. passing the $ECBDS DSECT or one of the parameters. and copies this value into the ECBUEXT field of the $ECBDS DSECT. * *---------------------------------------------------------------------* @C1UEXIT EXIT#=1. 18 Exits Guide .XIT7BAT=YES *---------------------------------------------------------------------* * SEE CA Endevor SCM EXITS MANUAL FOR A DESCRIPTION OF * * DEFINING MULTIPLE USER EXITS. * *---------------------------------------------------------------------* @C1UEXIT TYPE=END END When CA Endevor SCM reaches the first exit point. CA Endevor SCM copies the value in the ECBUEXT field of the $ECBDS DSECT into the anchor ID table slot associated with anchor ID 2. Execution of program RECEXIT3 follows the four steps described previously.NAME=C1UEXT04.AUTH=YES @C1UEXIT EXIT#=5.ANCHID=0. both program C1UEXT01 and program SECEXIT1 will be called. Program SECEXIT1 terminates and returns to CA Endevor SCM.NAME=C1UEXT06.AUTH=YES @C1UEXIT EXIT#=3.ANCHID=0.ANCHID=0.AUTH=YES @C1UEXIT EXIT#=4. as follows: *---------------------------------------------------------------------* C1UEXITS @C1UEXIT TYPE=START. CA Endevor SCM calls both C1UEXT03 and RECEXIT3. When exit point 3 is reached. How to Identify Exits When exit point 6 is reached. Execution of program STATEXT6 follows the four steps described above. CA Endevor SCM calls both the C1UEXT06 and STATEXT6 routines. Chapter 1: Introduction 19 . Note that the value associated with anchor ID 2 in the anchor ID table prior to calling STATEXT6 will be the value in the ECBUEXT field after the execution of program RECEXIT3. . Note: For more information. see the chapter "Using Package Exits. Before and after each package function. Called before exit 2 for add. Immediately before CA Endevor SCM terminates processing. and retrieve processing. When CA Endevor SCM is reinvoked by executing CA Endevor SCM from within a processor. update. or before the first CA Endevor SCM panel is displayed (foreground).Chapter 2: Using Exit Points This section contains the following topics: Exit Point Functions (see page 21) Exit Point 1 Programs (see page 23) Exit Point 2 Programs (see page 25) Exit Point 3 Programs (see page 31) Exit Point 4 Programs (see page 35) Exit Point 5 Programs (see page 38) Exit Point 6 Programs (see page 40) Issue Messages from Exit Programs (see page 41) How CA Endevor SCM Builds Messages (see page 42) How CA Endevor SCM Issues Messages (see page 42) Exit Point Functions CA Endevor SCM provides seven exit points. but before it is written out. At job initialization. base library. either before the first action is executed (batch). each exit point is also reinvoked. After an action has been completed and the MCF. and/or delta library have been updated for the action. Exit Point 1 2 3 Occurs After each CA Endevor SCM security check. If SMF recording is in effect. Before an action is executed (in either the foreground or batch) after all input has been validated. The following table summarizes the exit point functions." 4 5 6 7 Chapter 2: Using Exit Points 21 . according to this information. this exit is called after the SMF record is prepared. You submit an ADD request. informing the owner that you want to add the module. base and delta libraries. then calls exit 3 programs. You log off CA Endevor SCM. then calls exit 2 programs. CA Endevor SCM reads the Defaults Table. You might write a program for exit point 5 that logs CA Endevor SCM activity. Sends a message to the production control supervisor that the element has been added. You might write an exit 6 program that completes the log of CA Endevor SCM activity initiated at the start of the session.Exit Point Functions Example: Use CA Endevor SCM to Call Exit Programs This example illustrates when CA Endevor SCM calls exit programs. 2. then calls exit 1 programs. 3. 22 Exits Guide . CA Endevor SCM calls exit 6 programs. CA Endevor SCM calls exit 4 programs to make sure the element to be added is in PDS format. then calls exit 5 programs. builds the SMF record. You might write an exit 3 program that: ■ ■ Updates the SMF record prior to writing it. You select CA Endevor SCM on ISPF Main Menu. and suggests exits that a user might write for each point. 1. 5. loads exit programs. You might write a program for exit point 1 that also checks your security profile in CA ACF2 for z/OS. CA Endevor SCM checks your authority to select the chosen environment. You might write an exit 2 program that: ■ ■ Changes the DELETE INPUT SOURCE option from N to Y whenever a user adds or updates an element. You select an environment on the Environment Options Menu. CA Endevor SCM adds the element. Sends a message to the owner of a module that is signed out. the C1UEXITS table. 4. and updates the Master Control File. The following section describes each exit point in detail. Exit Point 1 Assembler Control Blocks The following table lists the Assembler Exit Control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECBRTCD ECBMSGCD ECBMSG ECBUEXT Environment Block ($ENVDS) None Chapter 2: Using Exit Points 23 .CA ACF2 for z/OS or CA Top Secret for z/OS). For example. and Resource Security Table to determine whether the user is authorized to perform the action. you might write an exit to interface with another security package (for example. You should use exit 1 programs to do the following: ■ ■ Validate the return code from the CA Endevor SCM security check. after making a separate security check to verify access to each menu option. Before performing an action. User Security Table.Exit Point 1 Programs Exit Point 1 Programs Exit point 1 occurs after each CA Endevor SCM security check. and CA Endevor SCM calls exit 1 programs when the following happens: ■ ■ Building a menu panel. after checking the Access Security Table. Perform additional security checking. on entry to the exit. The associated error message is ECBMSG in Assembler and ECB-MESSAGE-TEXT for COBOL. When passed back to CA Endevor SCM: failed. 4 The user is not defined to the Access Security Table or the User Security Table. 24 Exits Guide . the element is referenced in the Resource Security Table. of the Exit Control block. Abort the request. however. The following describes the return codes: 0 When passed to exit: the user is authorized to perform the action. and the requested action is valid. 8 When passed to exit: not passed to exit programs. 12 The user is not authorized to access the system/subsystem named by the action. in the ECBRTCD for Assembler and ECB-RETURN-CODE for COBOL.Exit Point 1 Programs Exit Point 1 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECB-RETURN-CODE ECB-MESSAGE-CODE ECB-MESSAGE-TEXT ECB-EXIT-HOLD-FIELD Environment Block (SRC-ENVIRONMENT-BLOCK) (TGT-ENVIRONMENT-BLOCK) None Exit Point 1 Control Block Return Codes CA Endevor SCM passes the return code from its security check to exit 1. When passed back to CA Endevor SCM: passed successfully. both in foreground and in batch: ADD. Use exit 2 programs to do the following: ■ ■ ■ Cancel an action. be sure to test the setting of the ECBPKG field in the ECB. Exit 2 is invoked before to open the temporary data set "userid. For more information about SMF recording. based on the Resource Security Table. Before an ADD action: – – To find out if the element exits further up the map. The programs are called just before the action is executed. Change some of the input to an action. To find out what processor group will be used for the element. Note: If you are using the SMF Interface. Your exit 2 programs can be called during package validation processing to determine during CAST or INSPECT if conditions exist that would cause failure. the exit is called immediately before action execution. For example. activate the following option in ENCOPTBL: EXIT02_CAST_INSPECT=Y Important! If you enable this feature. TRANSFER. and RESTORE.0. For example. MOVE. ARCHIVE. GENERATE. SIGNIN. CA Endevor SCM writes an SMF Security Record out if an error is returned from the exit. Modify CA Endevor SCM defaults automatically. DELETE. before the element is edited or created. If this field contains I. Under Quick Edit.QERCVYnn. CCID validation by your own programs would cause failure. UPDATE. see the Administration Guide. this information was only available if the element to be added already existed at the target stage. Chapter 2: Using Exit Points 25 . the exit is called during validation processing.Exit Point 2 Programs 16 The requested action cannot be issued against the requested element.RECOVERY". Exit Point 2 Programs CA Endevor SCM calls exit 2 programs before executing the following actions. To enable this feature. There will be no call to EXIT03 if ECBPKG contains I. If this field contains Y or N. you might write an exit program to change the DELETE INPUT SOURCE option from N to Y whenever a user adds or updates an element. ■ ■ Note: Prior to release 4. RETRIEVE. Add or update the user data. after the data for the action is validated but before the actual processing starts. Exit Point 2 Programs Exit Point 2 Assembler Control Blocks The following table lists the Assembler control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECBRTCD ECBUEXT ECBMSGCD ECBMSG Source Environment Block ($ENVDS) Target Environment Block ($ENVDS) Request Information Block ($REQPDS) None ENVNEW (Y/N) ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ REQCCID REQCOMM REQSISOF REQSISOC REQEXPND REQOVRWR REQRTCOD REQELVER REQCPYBK REQBENE REQOEMCH REQOSYCH REQOCMCH REQOTMSG REQDEL REQMOVWH REQUPDT REQBYGEN REQONLCMP REQSYNC 26 Exits Guide . ENVNEW contains N (for not new). Element Action Source $ENVDS Block Points To $FILDS Target $ENVDS Block Points To Add ENVNEW (Y/N)-This field contains Y or N for ADD actions. depending on the action requested.Exit Point 2 Programs Control Block Fields Modifiable by Exit Programs ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ REQIGGF REQBYPD REQOPGRP REQSOUID REQOSRCH REQORSGN REQOJUMP REQOSGNI REQUSR REQNOSRC Element Master Information Block ($ELMDS) and/or File Block ($FILDS) None The Exit Point 2 ENVFCBA Field (Assembler) The Source $ENVDS block points to the source of the action. The Target $ENVDS block points to the target location. the ENVFCBA field in each $ENVDS block points to either an Element Master block ($ELMDS) or a File block ($FILDS). As shown in the following table. Update Retrieve Generate Move $FILDS $ELMDS $ELMDS $ELMDS $ELMDS $FILDS None ■ $ELMDS-when element is at target prior to move Chapter 2: Using Exit Points 27 . ■ ■ If a MAPPED element exists (further up the map). If this is the first occurrence of the element in the MAP from the target location then ENVNEW contains a Y. Exit Point 2 Programs Element Action Source $ENVDS Block Points To Target $ENVDS Block Points To ■ Delete Signin Transfer Archive Restore $ELMDS $ELMDS $ELMDS $ELMDS $FILDS None-when element not at target prior to move None None $ELMDS $FILDS $ELMDS Exit Point 2 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECB-RETURN-CODE ECB-EXIT-HOLD-FIELD ECB-MESSAGE-CODE ECB-MESSAGE-TEXT Source Environment Block (SRC-ENVIRONMENT-BLOCK) Target Environment Block (TGT-ENVIRONMENT-BLOCK) None ■ ■ ■ ■ ■ ■ ■ ■ ■ TGT-ENV-MAP-NEW(Y/N) TGT-ELM-PROCESSOR-GROUP REQ-CCID REQ-COMMENT REQ-SISO-INDICATOR REQ-COPY-INDICATOR REQ-EXPINCL-INDICATOR REQ-OVERWRITE-INDICATOR REQ-ACTION-RC Request Information Block (REQUEST-INFO-BLOCK) 28 Exits Guide . Exit Point 2 Programs Control Block Fields Modifiable by Exit Programs ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ REQ-NEW-VERSION REQ-GEN-COPYBACK REQ-BENE REQ-EM-CHK REQ-SY-CHK REQ-CM-CHK REQ-TMSG REQ-DELETE-AFTER REQ-MOVE-WITH-HISTORY REQ-ADD-WITH-UPDATE REQ-BYPASS-GEN-PROC REQ-DEL-COMPS-ONLY REQ-SYNCHRONIZE REQ-IGNGEN-FAIL REQ-BYPASS-DEL-PROC REQ-PROCESSOR-GROUP REQ-SIGNOUT-USRID REQ-SEARCH-OPTION REQ-RETAIN-SIGNOUT-OPT REQ-JUMP-OPTION REQ-SIGNIN-OPTION REQ-USER-DATA REQ-GEN-NOSOURCE Element Master Information Block (SRC-ELEMENT-MASTER-INFO-BLOCK) (TGT-ELEMENT-MASTER-INFO-BLOCK) and/or File Block (SRC-FILE-CONTROL-BLOCK) (TGT-FILE-CONTROL-BLOCK) None Chapter 2: Using Exit Points 29 . Exit Point 2 COBOL Source and Target Fields The Source SRC-ENVIRONMENT-BLOCK block points to the source of the action. As shown in the following table.Exit Point 2 Programs Note: For ADD actions a DUMMY TARGET ELEMENT MASTER INFORMATION BLOCK is presented with the PROCESSOR GROUP name. or the system determined processor group name. This is the content of the OVERIDE PROCESSOR GROUP option of the ADD Action. No other fields are available in this control block. each Environment block points to either an Element Master block or to a File block. UPDATE actions (or ADD with option UPDATE) have a complete TARGET ELEMENT MASTER INFORMATION BLOCK. depending on the action requested: Element Action Add Update Retrieve Generate Move Source SRC-ENVIRONMENT-BLOCK Block Points To SRC-FILE-CONTROL-BLOCK SRC-FILE-CONTROL-BLOCK SRC-ELEMENT-MASTER-INFO-B LOCK SRC-ELEMENT-MASTER-INFO-B LOCK SRC-ELEMENT-MASTER-INFO-B LOCK Target TGT-ENVIRONMENT-BLOCK Block Points To None TGT-ELEMENT-MASTER -INFO-BLOCK TGT-FILE-CONTROL -BLOCK None ■ TGT-ELEMENT-MASTER-INF O-when element is at target prior to move None-when element not at target prior to move ■ Delete Signin Transfer Archive Restore SRC-ELEMENT-MASTER-INFO-B LOCK SRC-ELEMENT-MASTER-INFO-B LOCK SRC-ELEMENT-MASTER-INFO-B LOCK SRC-ELEMENT-MASTER-INFO-B LOCK SRC-FILE-CONTROL-BLOCK None None TGT-ELEMENT-MASTER -INFO-BLOCK TGT-FILE-CONTROL -BLOCK TGT-ELEMENT-MASTER -INFO-BLOCK 30 Exits Guide . because ELEMENT MASTER INFORMATION BLOCKS are normally only built for existing master record information while in the present case no element exists at the target location. The Target TGT-ENVIRONMENT-BLOCK block points to the target location. UPDATE. MOVE. The programs are called after each action is completed. Exit Point 3 Assembler Control Blocks The following table lists the Assembler control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block Fields Modifiable by Exit Programs ■ ECBRTCD Chapter 2: Using Exit Points 31 . It is passed as the second parameter in the parameter list. Modify the SMF Action Request record. To retrieve the user data. CA Endevor SCM passes the SMF Action Request record to the exit programs. before returning to CA Endevor SCM.Exit Point 3 Programs Exit Point 2 Control Block Return Codes You signal the results of the exit using the return code field ECBRTCD in Assembler or ECB-RETURN-CODE in COBOL. GENERATE. both in foreground and in batch: ADD. These return codes are described as follows: 0 Proceed with the action. The exit did not change any action-related data. including execution of any processors. DELETE. ARCHIVE. and RESTORE. SIGNIN. Exit Point 3 Programs CA Endevor SCM calls exit 3 programs after executing the following actions. If SMF recording is in effect. and the master control file base and/or delta libraries have been updated. Use exit 3 programs to do the following: ■ ■ ■ Perform general logging and recording. 4 Proceed with the action. 8 Abort the action request. TRANSFER. Place the appropriate code in the field of the Exit Control block. and the revised fields should be used for action processing. but the exit changed fields in the Request Information block. RETRIEVE. Element Action Source $ENVDS Block Points Target $ENVDS Block To Points To Add Update Retrieve Generate Move Delete Signin Transfer $FILDS $FILDS $ELMDS $ELMDS $ELMDS $ELMDS $FILDS None $ELMDS (if the element has not $ELMDS been deleted by this action) $ELMDS $ELMDS None None $ELMDS (if the element has not $ELMDS been deleted by this action) 32 Exits Guide . The Target $ENVDS block points to the target location.Exit Point 3 Programs Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECBSMFWR ECBMSGCD ECBMSG ECBUEXT Request Information Block ($REQPDS) SMF Action Record Source Environment Block ($ENVDS) Target Environment Block ($ENVDS) Element Master Information Block ($ELMDS) and/or File Block ($FILDS) None All None None None The Exit Point 3 ENVFCBA Field The Source $ENVDS block points to the source of the action. depending on the action requested. the ENVFCBA field in each $ENVDS block points to either an Element Master block ($ELMDS) or a File block ($FILDS). As shown in the following table. Exit Point 3 Programs Element Action Source $ENVDS Block Points Target $ENVDS Block To Points To Archive Restore $ELMDS (if the element has not $FILDS been deleted by this action) $FILDS $ELMDS Exit Point 3 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ■ ECB-RETURN-CODE ECB-SMF-WRITE-FLAG ECB-MESSAGE-CODE ECB-MESSAGE-TEXT ECB-EXIT-HOLD-FIELD Request Information Block (REQUEST-INFO-BLOCK) SMF Action Record Source Environment Block (SRC-ENVIRONMENT-BLOCK) Target Environment Block (TGT-ENVIRONMENT-BLOCK) Element Master Information Block (SRC-ELEMENT-MASTER-INFO-BLOCK) (TGT-ELEMENT-MASTER-INFO-BLOCK) and/or File Block (SRC-FILE-CONTROL-BLOCK) (TGT-FILE-CONTROL-BLOCK) None All None None None Chapter 2: Using Exit Points 33 . depending on the action requested. each Environment block points to either an Element Master block or to a File block. As shown in the following table. 34 Exits Guide .Exit Point 3 Programs Exit Point 3 COBOL Source and Target Fields The Source SRC-ENVIRONMENT-BLOCK block points to the source of the action. The Target TGT-ENVIRONMENT-BLOCK block points to the target location. Element Action Add Update Retrieve Generate Move Delete Signin Transfer Archive Restore Source SRC-ENVIRONMENT-BLOCK Block Points To SRC-FILE-CONTROL-BLOCK SRC-FILE-CONTROL-BLOCK Target TGT-ENVIRONMENT-BL OCK Block Points To TGT-ELEMENT-MASTER-I NFO-BLOCK TGT-ELEMENT-MASTER-I NFO-BLOCK SRC-ELEMENT-MASTER-INFO-BL TGT-FILE-CONTROL OCK -BLOCK SRC-ELEMENT-MASTER-INFO-BL None OCK SRC-ELEMENT-MASTER-INFO-BL TGT-ELEMENT-MASTER-I OCK NFO-BLOCK SRC-ELEMENT-MASTER-INFO-BL None OCK SRC-ELEMENT-MASTER-INFO-BL None OCK SRC-ELEMENT-MASTER-INFO-BL TGT-ELEMENT-MASTER OCK -INFO-BLOCK SRC-ELEMENT-MASTER-INFO-BL TGT-FILE-CONTROL OCK -BLOCK SRC-FILE-CONTROL-BLOCK TGT-ELEMENT-MASTER -INFO-BLOCK Note: This applies if the element has not been deleted by the action. (At the time the exit is called. 0 Successful completion. The exit program passes the File block back to CA Endevor SCM.) Set up controls so users can only retrieve elements into certain data sets. Note: If you use exit 4 and change the name of the data set being used as input. If the option. If you change the DDname. and pass a return code of 4. Place the appropriate code in the ECBRTCD field for Assembler and the ECB-RETURN-CODE field for COBOL in the Exit Control block. The file exit 4 points to will be recorded in the MCF as the source input file. before returning to CA Endevor SCM. 4 Successful completion. UPDATE. you have to allocate the external file dynamically. from VSAM to PDS format. you must dynamically allocate the file identified by the new DDname field. This is because if you change the data set defined to the File block. Exit Point 4 Programs CA Endevor SCM calls exit 4 programs before calling exit 2 programs for the following actions: ADD. the member will be deleted from the data set that exit 4 points to. and RETRIEVE. for example. or add elements from certain data sets. but check the ECBSMFWR field to determine whether to write out the SMF record.Exit Point 4 Programs Exit Point 3 Return Codes Valid return codes for this exit are listed next. ■ Chapter 2: Using Exit Points 35 . Change the DDname (FILDDN) used for the action. CA Endevor SCM has already allocated the data set for the DDname passed to the exit. To Delete Input Source. The File block describes the external file used during action processing. which is cumbersome with tape (archive) files. Use exit 4 programs to do the following: ■ ■ Change external files. Note: This exit is not called for ARCHIVE and RESTORE requests. is specified. even though these actions use the File block. you should be aware of the following: – – – Dataset validation will still be based on the file used by exit 4 and not source DSN in the SCL. depending on the action requested. the ENVFCBA field in each $ENVDS block points to either an Element Master block ($ELMDS) or a File block ($FILDS). As shown in the following table.Exit Point 4 Programs Exit Point 4 Assembler Control Blocks The following table lists the Assembler control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECBRTCD ECBMSGCD ECBMSG ECBUEXT Request Information Block ($REQPDS) Source Environment Block ($ENVDS) Target Environment Block ($ENVDS) File Block ($FILDS) None None None ■ ■ ■ ■ FILDSN (ignored) FILDDN FILDSMEM (ignored) FILDSTY (ignored) The Exit Point 4 ENVFCBA Field The Source $ENVDS block points to the source of the action. Element Action Add Update Retrieve Source $ENVDS Block Points To $FILDS $FILDS $ELMDS Target $ENVDS Block Points To $ELMDS $ELMDS $FILDS 36 Exits Guide . The Target $ENVDS block points to the target location. Exit Point 4 Programs Exit Point 4 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECB-RETURN-CODE ECB-MESSAGE-CODE ECB-MESSAGE-TEXT ECB-EXIT-HOLD-FIELD Request Information Block (REQUEST-INFO-BLOCK) Source Environment Block (SRC-ENVIRONMENT-BLOCK) Target Environment Block (TGT-ENVIRONMENT-BLOCK) File Block (SRC-FILE-CONTROL-BLOCK) (TGT-FILE-CONTROL-BLOCK) None None None ■ ■ ■ ■ ■ ■ ■ ■ SRC-FIL-DATASET-NAME (ignored) TGT-FIL-DATASET-NAME(ignored) SRC-FIL-DDNAME TGT-FIL-DDNAME SRC-FIL-DATASET-MEMBER (ignored) TGT-FIL-DATASET-MEMBER (ignored) SRC-FIL-DATASET-TYPE (ignored) TGT-FIL-DATASET-TYPE (ignored) Chapter 2: Using Exit Points 37 . make sure to allocate the file before returning a code 4. In batch. each Environment block points to either an Element Master block or a File block depending on the action requested. Element Action Source SRC-ENVIRONMENTBLOCK Block Points To SRC-FILE-CONTROL-BL OCK SRC-FILE-CONTROL-BL OCK Target TGT-ENVIRONMENT-BLOCK Block Points To TGT-ELEMENTMASTER-INFO-BLOCK TGT-ELEMENTMASTER-INFO-BLOCK Add Update Retrieve SRC-ELEMENT-MASTER. immediately after CA Endevor SCM allocates its internal control blocks. it is called before the first CA Endevor SCM panel is displayed. The Target TGT-ENVIRONMENT-BLOCK block points to the target location. In foreground. 0 Proceed with the action.Exit Point 5 Programs Exit Point 4 COBOL Source and Target Fields The Source SRC-ENVIRONMENT-BLOCK block points to the source of the action.TGT-FILE-CONTROL -BLOCK INFO-BLOCK Exit Point 4 Return Codes Valid return codes for this exit are listed next. Place the appropriate code in the ECBRTCD field for Assembler or ECB-RETURN-CODE for COBOL in the Exit Control Block. As shown in the following table. Exit Point 5 Programs CA Endevor SCM calls exit 5 programs at session initialization. 8 Abort the action request. 38 Exits Guide . before returning to CA Endevor SCM. but the exit changed fields in the Request Information block and the revised fields should be used for action processing. it is called before the first action is executed. If you change the data set used. 4 Proceed with the action. Exit Point 5 Programs Use exit 5 programs to do the following: ■ ■ ■ Change the User ID. Make calls to SMF records. Create a log of activity against CA Endevor SCM. Exit Point 5 Assembler Control Blocks The following table lists the Assembler control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ■ ECBRTCD ECBUSER ECBMSGCD ECBMSG ECBUEXT Exit Point 5 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ■ ECB-RETURN-CODE ECB-USER-ID ECB-MESSAGE-CODE ECB-MESSAGE-TEXT ECB-EXIT-HOLD-FIELD Chapter 2: Using Exit Points 39 . make sure to pass a return code of 4. If you change the User ID. In batch. Exit Point 6 Assembler Control Blocks The following table lists the Assembler control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block ($ECBDS) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECBRTCD ECBMSGCD ECBMSG ECBUEXT 40 Exits Guide . Place the appropriate code in the ECBRTCD field for Assembler or the ECB-RETURN-CODE for COBOL in the Exit Control block. they are called just before CA Endevor SCM returns to ISPF. 4 Proceed with the action. The exit did not change the User ID. these programs are called just before the job terminates. 0 Successful completion. and the revised ID should be used for subsequent processing.Exit Point 6 Programs Exit Point 5 Return Codes Valid return codes for this exit are listed next. but the exit changed the USER ID field in the Exit Control block. Use exit 6 programs to do the following: ■ ■ Collect statistics. before returning to CA Endevor SCM. Exit Point 6 Programs CA Endevor SCM calls exit 6 programs before it ends a session. Complete logging activity started by an exit 5 module. In foreground. before returning to CA Endevor SCM. Issue Messages from Exit Programs To issue messages from your exit programs. 0 Successful completion. you must code the exit programs. Place the appropriate code in the ECBRTCD field in Assembler or the ECB-RETURN-CODE for COBOL in the Exit Control block. To code Assembler programs When coding Assembler programs. fill in the following fields: Exits 1-6 7 Control Block $ECBDS $PECBDS Return code ECBRTCD PECBRTCD Message code (optional) ECBMSGCD PECBMGCD Message text (batch only) ECBMSG PECBMSG Chapter 2: Using Exit Points 41 .Issue Messages from Exit Programs Exit Point 6 COBOL Control Blocks The following table lists the COBOL control blocks and the fields that can be modified by exit programs: Control Block Exit Control Block (EXIT-CONTROL-BLOCK) Fields Modifiable by Exit Programs ■ ■ ■ ■ ECB-RETURN-CODE ECB-MESSAGE-CODE ECB-MESSAGE-TEXT ECB-EXIT-HOLD-FIELD Exit Point 6 Return Codes Valid return codes for this exit are listed next. CA Endevor SCM builds the message itself starting with CIU. iprfx.' (CIU0801E EXIT 2&$RB.iqual. USER IS NOT AUTHORIZED TO PERFORM THIS ACTION How CA Endevor SCM Issues Messages In foreground. adding the string 'exit # . An example of a message code is 0801. 42 Exits Guide . The following message codes are reserved: ■ ■ 0001 09nn How CA Endevor SCM Builds Messages In foreground. In batch. the message code format should be 0nnn. fill in the following fields: Exits 1-6 7 Control Block EXIT-CONTROL-BLOC K PACKAGE-EXIT-BLOC K Return code ECB-RETURN-CODE PECB-NDRV-EXIT-RC Message code (optional) ECB-MESSAGE-CODE PECB-MESSAGE-ID Message text (batch only) ECB-MESSAGE-TEXT PECB-MESSAGE The message code default is 0000.CSIQMENU.-&$RB. If you want the message to have an ISPF equivalent. CA Endevor SCM builds a message identifier by combining the message code and return code (0801E). where nn are the second and third digits of the message code. dropping the first digit of the message code (801E). then adding the message text. For example: CIU0801E EXIT 2 . CA Endevor SCM passes the message identifier (CIUU801E) to ISPF. An example of a return code is 12. adding the message code and severity code (CIU0801E).ACTION DENIED. which searches for that string in member CIUUnn in the installed message library.). and then adding CIUU to the result: CIUU801E.How CA Endevor SCM Builds Messages To code COBOL programs When coding COBOL programs. see the IBM website at http://www. Note: For more information about building ISPF messages. search for "ISPF Guide". CA Endevor SCM writes the formatted message to the Batch Execution Report. which can contain multiple messages.How CA Endevor SCM Issues Messages You must create this member in order to issue ISPF messages. This text can be up to 80 characters.ALARM=YES 'THE SPECIFIED PACKAGE ID IS INVALID FOR YOUR USE ' Line 1 contains a message identifier and short message text of up to 25 characters. you would create member CIUU80. Line 2 contains long message text.com. so member CIUU80 might look like this: CIUU801I 'ACTION ALLOWED' . in this case ACTION DENIED. Each message must take up two lines. Chapter 2: Using Exit Points 43 . it displays the short message text. Then.ALARM=YES 'USER IS AUTHORIZED TO PERFORM THIS ACTION ' CIUU801E 'ACTION DENIED ' . In this example.ALARM=YES 'USER IS NOT AUTHORIZED TO PERFORM THIS ACTION ' CIUU802E 'INVALID PKID' . When ISPF finds the string CIUU801E.ibm. In batch. . Chapter 3: Using Exit Control Blocks This section contains the following topics: Exit Control Blocks (see page 46) The Primary Information Block (see page 47) The Request Information Block (see page 74) The Assembler Environment Block (see page 91) The COBOL Environment Block (see page 96) The Assembler Element Master Information Block (see page 106) The COBOL Element Master Information Block (see page 121) The Assembler File Block (see page 147) The COBOL File Block (see page 149) The SMF Action Record (see page 153) Chapter 3: Using Exit Control Blocks 45 . Source File block 6. Exit Control block 2. In the following illustration. Target Environment block 7. Target Element Master Information block 46 Exits Guide . CA Endevor SCM formats a series of control blocks with information relevant to the exit. This section describes each of the control blocks in this structure. alphabetic fields are space-filled and numeric fields are zero-filled. register 1 points to an address list. which in turn points to the control blocks. Request Information block 3. Source Element Master Information block 5. Source Environment block 4.Exit Control Blocks Exit Control Blocks When a user exit is invoked. In all cases where specific fields do not apply for the processing at hand. The control blocks are always passed to the exit program in the following order: 1. WITH MODS RETURN 8 ABORT NUMBER OF PARMS PASSED (INCLUSIVE) 00160019 00170019 00180019 00190019 00200019 00200019 00210019 00220019 00230019 00250019 Chapter 3: Using Exit Control Blocks 47 . It is pointed to by Register 1: 0(R1). RETURN 4 ALL O. The Primary Information Block The following sections contain sample control blocks and field descriptions for Assembler and COBOL. $ECBDS DSECT Sample This is the first and primary information block passed to exit programs.BLOCK TO DESCRIBE THE USER EXIT INTERFACE * * EXIT CONTROL BLOCK * * 11/17/87 * * * ********************************************************************** ECBLEN DC AL2(ECBSIZE) LENGTH OF THE BLOCK ECBVERS DC AL2(ECB$VERS) CURRENT VERSION OF THE BLOCK ECB$VERS EQU 3 VERSION 2 ECBID DC CL4'$ECB' BLOCK ID ECBFLAG DC F'0' ANY SPECIAL FLAGS ORG ECBFLAG REUSE ECBFLAG FIELD ECBSRCHR DC CL1' ' SRCHREPL UTILITY FLAG ECB$ELEM EQU C'E' ELEMENT ADDED/REPLACED ECB$COMP EQU C'O' OUTPUT COMPONENT UPDATED DC CL3' ' UNUSED ORG ECBRTCD ECB$OK ECB$MOK ECB$FAIL ECBARGS DC EQU EQU EQU DC F'0' 0 4 8 F'0' RETURN CODE FROM EXIT RETURN 0 ALL O. SMF Action Record Note: If the control block is not relevant to the user exit. Target File block 9. then the control block will not contain valid data.K.The Primary Information Block 8. and is passed using standard calling conventions.K. A sample $ECBDS DSECT control block shown next: $ECBDS DSECT ********************************************************************** * * * $ECBDS . EXT DS VALIDATION EQU 5 C1UEXT05 .SECURITY EQU 2 C1UEXT02 .ACTUAL ACTION REQUEST DC CL1' ' SMF OUTPUT ENABLED ( Y OR N) DC CL1' ' SMF WRITE BUFFER ( Y OR N) DC F'0' CURRENT ACTIVITY $C1FUNC FUNC=$FUNDSCT.PREFIX=ECB DC CL8' ' ACTION NAME DC CL4' ' MESSAGE ID FOR ERROR MESSAGE MESSAGE CODE WILL BE C1XNNNNS DC H'0' LENGTH OF ERROR MESSAGE EQU 132 SIZE IS 132 DC CL(ECBMSGSZ)' ' MESSAGE DC CL1' ' CALLERS ORIGIN EQU C'E' ENDEVOR EQU C'Q' QUICK-EDIT DC CL1' ' RUNNING UNDER A PKG? EQU C'N' ACTION IS NOT RUN UNDER A PACKAGE EQU C'Y' ACTION IS PART OF EXECUTING PACKAGE EQU C'I' EXIT IS CALLED DURING CAST/INSPECT VALIDATION CALL DC F'0' ADDRESS OF $REQDS DC F'0' PANEL TYPE IF INTERNAL EQU 0 NO PANEL INFORMATION EQU 1 ENVIRONMENT LEVEL PANEL EQU 2 TOP/MAIN LEVEL PANEL EQU 3 FOREGROUND LEVEL PANEL DC F'0' USER EXIT HOLD FIELD DC F'0' INTERNAL SECURITY FUNCTIONS SEE EQUATES FOLLOWING ECBFUNC DC F'0' HIGHEST RC SET BY PREVIOUS EXITS EQU *-$ECBDS LENGTH OF $ECBDS BLOCK 00260019 00270019 00280019 00290019 00300019 00300019 00300019 00310019 00320019 00340019 00350019 00360019 00370019 00370119 00370219 00370320 00370420 00380019 00381014 00382019 00490019 00510019 00520019 00530019 00531019 00540019 48 Exits Guide .INTERNAL ONLY CALL EQU C'N' NO .PRE-ACTION EQU 3 C1UEXT03 .The Primary Information Block ECBEXTN ECB$CON1 ECB$CON2 ECB$CON3 ECB$CON4 ECB$CON5 ECB$CON6 ECB$MEXT ECBUSER ECBMODE ECB$TSO EXB$BAT ECBINTNL ECB$YES ECB$NO ECBSMFAC ECBSMFWR ECBFUNC ECBFUNAM ECBMSGCD * ECBMSGLN ECBMSGSZ ECBMSG ECBCALR ECB$NDV ECB$QE ECBPKG ECBPKGN ECBPKGY ECBPKGI * ECBREQA ECBPNLT ECB$NONE ECB$PENV ECB$PPRM ECB$PFOR ECBUEXT ECBIFUNC * ECBHIRC ECBSIZE DC F'0' EXIT NUMBER BEING INVOKED EQU 1 C1UEXT01 .JOB INITIATION EQU 6 C1UEXT06 .JOB TERMINATION EQU 6 MAX EXIT NUMBER DEFINED DC CL8' ' TSO USER/BATCH JOBNAME DC CL1' ' MODE FOR ONLINE(TSO) OR BATCH EQU C'T' TSO MODE EQU C'B' BATCH MODE DC CL1' ' INTERNAL CALL FLAG ( PANEL BUILD) EQU C'Y' YES .POST-ACTION EQU 4 C1UEXT04 . and 4. Meaning: Stop action processing for exits 1. On entry to the exit. Meaning: Successful (or continue processing). Chapter 3: Using Exit Control Blocks 49 .The Primary Information Block The following list contains descriptions of the fields in the $ECBDS DSECT. or 16. On return from the exit. 2. see the individual write-up of each exit. Applies for all exits. ECBVERS Version number to identify the Exit Control block ($ECBDS) written by the exit handler. if CA Endevor SCM has detected a security violation in its own checking (in which case this is passed as 4. ECBRTCD Modifiable by exits 1-6. ECBLEN Size of the Exit Control block ($ECBDS). 12. (Any value other than those listed next is set to 8. An exception occurs with exit 1. Values are: ■ Value: 0 – – ■ Label: ECB$OK. in bytes. Value is always "$ECB". ■ Value: 8 – – Label: ECB$FAIL. ECBID Code that identifies this as the Exit Control block. Use the ECB$VERS label to verify that the correct version of this DSECT was passed to your exit. but some control block data was modified by the exit. as described for exit 1). exit programs cannot modify these fields. this field has meaning as follows. ECBFLAG Not used. Make sure to modify the changed data if necessary before proceeding.) For further detail. This field contains the return code. This should always be 1. this field is generally set to 0. Value: 4 – – Label: ECB$MOK. for use in rapid identification when you are scanning your modules visually. Applies for exits 1-5. Meaning: Successful (continue processing). Unless otherwise noted. The Primary Information Block ■ Value: 12 – – Label: none Meaning: Used only on entry to an exit 1 program. indicating end-of-list. ■ Value: 16 – – Label: none Meaning: Used only on entry to an exit 1 program. Meaning: Exit 2 invoked ■ Value: 3 – – Label: ECB$CON3 Meaning: Exit 3 invoked ■ Value: 4 – – Label: ECB$CON4 Meaning: Exit 4 invoked ■ Value: 5 – – Label: ECB$CON5 Meaning: Exit 5 invoked ■ Value: 6 – – Label: ECB$CON6. 50 Exits Guide . ECBEXTN Number identifying the exit being invoked: Values are: ■ Value: 1 – – ■ Label: ECB$CON1 Meaning: Exit 1 invoked. Value: 2 – – Label: ECB$CON2. Modifiable by exit 5. The last word of the list is X'80'. ECBARGS Number of parameters passed to the exit in the address list (R1). Meaning: Exit 6 invoked ECBUSER User ID associated with the current processing. ECBFUNC Action code. as defined by the SMFREC# parameter of the Defaults Table: Y (yes) or N (no).The Primary Information Block ECBMODE Indicates whether the current action was requested in foreground or batch. Indicates whether CA Endevor SCM is set up to write out SMF action and/or security records. as defined by the SMFACT and SMFSEC parameters of the Defaults Table: Y (yes) or N (no). Value: B – – Label: ECB$BAT Meaning: Action was requested in batch. You can suppress writing SMF records by setting this field to N using exit 3. Values are as follows: ■ Value: Y – – ■ Label: ECB$YES Meaning: Processing involves dynamic TSO panel building Value: N – – Label: ECB$NO Meaning: Processing involves an action request ECBSMFAC Indicates whether CA Endevor SCM was installed to support SMF recording. The codes correspond to the actions as follows: 1-Add 2-Update 3-Retrieve 4-Delete Chapter 3: Using Exit Control Blocks 51 . ECBSMFWR Applicable if ECBSMFAC is Y. ECBINTNL Indicates whether the current processing relates to building a panel dynamically or to an action request. Values are as follows: ■ Value: T – – ■ Label: TSO Meaning: Action was requested in foreground. Used to construct the message code written to the CA Endevor SCM Execution Report by the exit handler. Default value is 0000. and s is a severity code associated with ECBRTCD (I for return code of less than 8. ECBMSGLN Not used. where nnnn is defined by this field. and so forth). ECBMSGCD Modifiable by exits 1-6. the error code is formatted as C1Unnnns. A message code precedes each message written to the report. and applies if the ECBMSG field contains a non-blank value. UPDATE. For messages produced by user exits. E for return codes of 8 and above). ECBMSGSZ Not used. Passed to exits 1-4.The Primary Information Block 5-Generate 6-Display 7-Move 8-Archive 9-Reserved 10-Reserved 11-CHGTYPE 12-Signin 13-Override Signout 14-ENVRNMGR 15-Print 16-Transfer 17-Validate 18-Restore ECBFUNAM Literal to describe the current action (ADD. 52 Exits Guide . Values are as follows: ■ Value: E – – ■ Label: ECB$NDV Meaning: Exit is running under CA Endevor SCM Value: Q – – Label: ECB$QE Meaning: Exit is running under Quick-Edit If the Exit is called as a second level CA Endevor SCM function. ■ Value: I – – Label: ECBPKGI Meaning: Inspect. ECBPKG Indicates if the action runs under a Package or is being called during package validations (Cast or Inspect). the exit handler records the message in the CA Endevor SCM Execution Report. The exit is called as part of package validation during Cast or Inspect. The action is executed as part of a Package. then the content of ECBCALR reflects the secondary level. Error message associated with the current activity.The Primary Information Block ECBMSG Modifiable by exits 1-6. 103 characters in this field are available for messages. This is NOT an executing action. For exit 1. If there is a message in this field when you return from the user exit. ECBCALR Indicates that the Exit is executing under CA Endevor SCM or Quick-Edit. The action is executed outside a Package. Chapter 3: Using Exit Control Blocks 53 . the ECBCALR value is E. Values are as follows: ■ Value: N – – ■ Label: ECBPKGN Meaning: No. for example if C1BM3000 is used in a processor or if an API program is running in a CA Endevor SCM Exit. The first 29 positions are for CA Endevor SCM-generated information. In both these examples. For the other exits. Value: Y – – Label: ECBPKGY Meaning: Yes. this is set on entry if a security violation has occurred. this is blank on entry. The message is preceded in that report with an error code (C1Unnnns format. described previously for the ECBMSGCD field). When you are using anchor IDs. ECBPNLT Indicates the type of panel being processed when the exit was invoked. ECBIFUNC Same as ECBFUNC (above). this field contains an address that points to a block of user data. this field is used to store address values read by exit programs from the anchor ID table. Generally.The Primary Information Block ECBREQA A pointer to the Request Information block (DSECT $REQPDS). used to save (and pass) information between user exits. 54 Exits Guide . Values are as follows: ■ Value: 0 – – ■ Label: ECB$NONE Meaning: No panel information is available Value: 1 – – Label: ECB$PENV Meaning: Exit was called while processing an Environment Definition panel ■ Value: 2 – – Label: ECB$PPRM Meaning: Exit was called while processing the Primary Options Menu ■ Value: 3 – – Label: ECB$PFOR Meaning: Exit was called while processing a foreground panel ECBUEXT Modifiable by exits 1-6. User field. Any value placed in this field remains there until the end of the CA Endevor SCM session. or until another user exit loads a new value in this field. The Primary Information Block ECBHIRC Highest return code set by previously executed system and user exits for this exit number. Values are as follows: E The utility is adding or updating an element. O The utility is updating an output data set name component. ECBSRCHR Indicates. Size of the $ECBDS DSECT. if not blank. ECBSIZE Size of the $ECBDS DSECT. the the Search and Replace utility is being run. Chapter 3: Using Exit Control Blocks 55 . 88 DISPLAY-ACTION VALUE 6. 88 C1IEXT03 VALUE 3. 05 ECB-RETURN-CODE PIC 9(8) COMP 88 RETURN-OK VALUE 0. 88 ACTION-CALL VALUE 'N'. 88 RETURN-ABORT VALUE 8. 56 Exits Guide . 05 ECB-ARGUMENTS PIC 9(8) COMP 05 ECB-EXIT-NUMBER PIC 9(8) COMP 88 C1IEXT01 VALUE 1. SYNC. 88 RETURN-OK-MODS VALUE 4. SYNC. 88 SMF-NO-WRITE-BUF VALUE 'N'. 88 TSO VALUE 'T'. 88 SMF-DISABLED VALUE 'N'. SYNC. It is pointed to by Register 1: 0(R1). 05 ECB-SMF-FLAG PIC X. 88 MOVE-ACTION VALUE 7. 05 ECB-LENGTH PIC 9(4) COMP 05 ECB-CURRENT-VERSION PIC 9(4) COMP 05 ECB-BLOCK-ID PIC X(4). 05 ECB-TSO-BATCH-MODE PIC X. A sample EXIT-CONTROL-BLOCK control block is shown next: 01 EXIT-CONTROL-BLOCK. 88 GENERATE-ACTION VALUE 5. 05 ECB-ACTION-CODE PIC 9(8) COMP 88 ADD-ACTION VALUE 1.The Primary Information Block EXIT_CONTROL_BLOCK Layout Sample This is the first and primary information block passed to exit programs. 88 UPDATE-ACTION VALUE 2. 88 ELEMENT-SOURCE VALUE 'E'. 05 ECB-SMF-WRITE-FLAG PIC X. 88 BATCH VALUE 'B'. SYNC. 05 ECB-CALL-FLAG PIC X. 05 ECB-USER-ID PIC X(8). 88 INTERNAL-CALL VALUE 'Y'. and is passed using standard calling conventions. SYNC. 88 DELETE-ACTION VALUE 4. SYNC. 88 C1IEXT04 VALUE 4. 88 HIGH-EXIT-NUMBER VALUE 6. 88 C1IEXT06 VALUE 6. 88 SMF-ENABLED VALUE 'Y'. 88 C1IEXT05 VALUE 5. 88 SMF-WRITE-BUFFER VALUE 'Y'. 88 OUTPUT-COMPONENT VALUE 'O'. 10 FILLER PIC X(3). 10 ECB-SRCHR PIC X. 88 C1IEXT02 VALUE 2. SYNC. 88 RETRIEVE-ACTION VALUE 3. 05 ECB-FLAG PIC 9(8) COMP 05 FILLER REDEFINES ECB-FLAG. VALUE 11. PIC 9(4) COMP SYNC. VALUE 17. PIC X(4). VALUE 18. VALUE 'I'. PIC X(1). Chapter 3: Using Exit Control Blocks 57 . PIC 9(8) COMP SYNC. VALUE 'N'. VALUE 'Y'. VALUE 'N'. SYNC. PIC X(4). PIC X(1). VALUE 14. VALUE 'Y'. PIC X.The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 * * * 01 88 ARCHIVE-ACTION 88 CHGTYPE-ACTION 88 SIGNIN-ACTION 88 SO-OVERRIDE-ACTION 88 ENV-MGR-ACTION 88 PRINT-ACTION 88 TRANSFER-ACTION 88 VALIDATE-ACTION 88 RESTORE-ACTION ECB-ACTION-NAME ECB-MESSAGE-CODE ECB-MESSAGE-LENGTH ECB-MESSAGE-TEXT ECB-CALLER-ORIGIN 88 CALLER-ENDEVOR 88 CALLER-QUICKEDIT ECB-UNDER-PACKAGE 88 PACKAGE-YES 88 PACKAGE-NO 88 PACKAGE-INSPECT ECB-REQUEST-POINTER ECB-PANEL-TYPE 88 NO-PANEL-INFO 88 ENVIRONMENT-PANEL 88 MAIN-PANEL 88 FOREGROUND-PANEL ECB-EXIT-HOLD-FIELD ECB-SECURITY-FUNCTION ECB-HIGH-RC VALUE 8. PIC X(40). SYNC. VALUE 'Y'. 05 REQ-LENGTH 05 REQ-CURRENT-VERSION 05 REQ-BLOCK-ID 05 REQ-CCID 05 REQ-COMMENT 05 REQ-REQUEST-FLAG 05 REQ-SISO-INDICATOR 88 SIGNOUT-OVERRIDE 88 NO-SIGNOUT-OVERRIDE 05 REQ-COPY-INDICATOR 88 RETRIEVE-COPY-ONLY 88 RETRIEVE-FOR-UPDATE 05 REQ-EXPINCL-INDICATOR 88 EXPAND-INCLUDES 88 NO-EXPAND-INCLUDES 05 REQ-OVERWRITE-INDICATOR PIC 9(4) COMP SYNC. PIC X. SYNC. PIC X. PIC X(8). VALUE 1. SYNC. VALUE 13. PIC 9(8) COMP PIC 9(8) COMP VALUE 0. VALUE 16. PIC 9(8) COMP PIC 9(8) COMP PIC 9(8) COMP SYNC. VALUE 3. PIC X. REQUEST-INFO-BLOCK. VALUE 15. SYNC. VALUE 'N'. VALUE 'E'. VALUE 'Q'. VALUE 12. VALUE 'Y'. PIC X(12). PIC 9(4) COMP PIC X(132). VALUE 'N'. VALUE 2. REQ-MOVE-WITH-HISTORY PIC X. 88 YES-SYNCHRONIZE VALUE 'Y'. 88 BYP-ELM-NAME-EDIT VALUE 'Y'. REQ-BYPASS-DEL-PROC PIC X. 58 Exits Guide . 88 NO-BYPASS-DEL-PROC VALUE 'N'. 88 DELETE-AFTER-ACTION VALUE 'Y'. REQ-SEARCH-OPTION PIC X. 88 NO-BYPASS-GEN-PROC VALUE 'N'. 88 BYPASS-GEN-PROC VALUE 'Y'. 88 ADD-WITH-UPDATE VALUE 'Y'. 88 RETAIN-SIGNOUT VALUE 'Y'. 88 BYPASS-DEL-PROC VALUE 'Y'. 88 NO-DEL-COMPS-ONLY VALUE 'N'. 88 IGNORE-GEN-FAIL VALUE 'Y'. 88 NO-SYNCHRONIZE VALUE 'N'. 88 GEN-COPYBACK VALUE 'Y'. 88 NO-JUMP-SPECIFIED VALUE 'N'. 88 MOVE-WITH-HISTORY VALUE 'Y'. REQ-ACTION-RC PIC 9(8) COMP SYNC. 88 NO-GEN-COPYBACK VALUE 'N'. 88 MOVE-WITHOUT-HISTORY VALUE 'N'. REQ-ADD-WITH-UPDATE PIC X. 88 ADD-WITHOUT-UPDATE VALUE 'N'. REQ-TMSG PIC X(1). REQ-SIGNIN-OPTION PIC X. REQ-NEW-VERSION PIC X(2). 88 NO-RETAIN-SIGNOUT VALUE 'N'. REQ-PROCESSOR-GROUP PIC X(8). 88 NO-DELETE-AFTER-ACTION VALUE 'N'. 88 NO-INGORE-GEN-FAIL VALUE 'N'. REQ-GEN-COPYBACK PIC X. 88 NO-SEARCH-ENV-MAP VALUE 'N'. REQ-SY-CHK PIC X(1). REQ-JUMP-OPTION PIC X. 88 NO-WRITE-OVER-MEMBER VALUE 'N'. REQ-SYNCHRONIZE PIC X. REQ-BYPASS-GEN-PROC PIC X. REQ-CM-CHK PIC X(1). REQ-DELETE-AFTER PIC X. REQ-RETAIN-SIGNOUT-OPT PIC X.The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 88 WRITE-OVER-MEMBER VALUE 'Y'. 88 SEARCH-ENV-MAP VALUE 'Y'. REQ-EM-CHK PIC X(1). 88 DEL-COMPS-ONLY VALUE 'Y'. 88 JUMP-IS-OK VALUE 'Y'. REQ-IGNGEN-FAIL PIC X. REQ-DEL-COMPS-ONLY PIC X. REQ-SIGNOUT-USRID PIC X(8). REQ-BENE PIC X(1). PIC X(37). PIC X(7). VALUE '1'. PIC 9(4) COMP PIC 9(4) COMP PIC X(8). SYNC. PIC 9(4) COMP PIC X. PIC X(8). 05 SRC-ENV-LENGTH 05 SRC-ENV-CURRENT-VERSION 05 SRC-ENV-BLOCK-ID 05 SRC-ENV-FLAGS 05 SRC-ENV-TYPE-OF-BLOCK 88 SRC-INTERNAL-C1-BLOCK 88 SRC-EXTERNAL-ENV-BLOCK 88 SRC-ARCHIVE-FILE 05 SRC-ENV-IO-TYPE 88 SRC-SOURCE-LOCATION 88 SRC-TARGET-LOCATION 05 SRC-ENV-NEXT-ENV-POINTER 05 SRC-ENV-FILE-POINTER 05 SRC-ENV-SITE-NAME 05 SRC-ENV-STAGE-ID 88 SRC-STAGE-ONE 88 SRC-STAGE-TWO 05 SRC-ENV-STAGE-CODE 05 FILLER PIC 05 SRC-ENV-ELEMENT-VERSION 05 SRC-ENV-ELEMENT-LEVEL 05 SRC-ENV-ENVIRONMENT-NAME 05 SRC-ENV-STAGE-NAME 05 SRC-ENV-SYSTEM-NAME 05 SRC-ENV-SYSTEM-DATA 05 SRC-ENV-SYSTEM-CCID-VALDT 88 SRC-SYSTEM-VALIDATE 88 SRC-SYSTEM-NO-VALIDATE 05 FILLER 05 SRC-ENV-SUBSYSTEM-NAME 05 SRC-ENV-SUBSYSTEM-DATA 05 SRC-ENV-TYPE-NAME PIC 9(4) COMP PIC 9(4) COMP PIC X(4). X. VALUE 'I'. PIC X. SYNC. SYNC. PIC X(8). PIC X(8). PIC X. PIC X. Chapter 3: Using Exit Control Blocks 59 . VALUE 'N'. VALUE 'N'. PIC 9(8) COMP PIC 9(8) COMP PIC X.The Primary Information Block 05 05 05 05 05 * * * 01 88 SIGNIN-IS-SPECIFIED 88 NO-SIGNIN-SPECIFIED REQ-USER-DATA REQ-AUTOGEN 88 REQ-AUTOGEN-YES 88 REQ-AUTOGEN-NO REQ-AUTOGENX 88 REQ-AUTOGENX-YES 88 REQ-AUTOGENX-NO REQ-GEN-NOSOURCE 88 GEN-NOSOURCE 88 GEN-SOURCE FILLER VALUE 'Y'. VALUE 'N'. SYNC. PIC X(8). VALUE '2'. VALUE 'N'. PIC X. VALUE 'Y'. PIC X. PIC X(1). VALUE 'O'. SYNC. VALUE 'C'. PIC X(8). VALUE 'Y'. PIC X(8). PIC X. SRC-ENVIRONMENT-BLOCK. SYNC. PIC X(80). VALUE 'Y'. VALUE 'Y'. VALUE 'E'. SYNC. VALUE 'N'. VALUE 'A'. 05 SRC-ELM-LAST-ACTION PIC X(8). 05 SRC-ELM-PROCESSOR-LAST-TIME PIC 9(4). 05 SRC-ELM-GEN-DATE PIC 9(6). 05 SRC-ELM-LAST-LEVEL-TOTAL PIC 9(8) COMP 05 SRC-ELM-MOVE-DATE PIC 9(6). 05 SRC-ELM-LENGTH PIC 9(4) COMP 05 SRC-ELM-CURRENT-VERSION PIC 9(4) COMP 05 SRC-ELM-BLOCK-ID PIC X(4). SYNC. SYNC. 05 SRC-ELM-PROCESSOR-USERID PIC X(8). SYNC. 05 SRC-ELM-FROM-DSN PIC X(44). 05 SRC-ELM-BASE-LEVEL-NUMBER PIC 9(4) COMP 05 SRC-ELM-BASE-TOTAL-STMTS PIC 9(8) COMP 05 SRC-ELM-BASE-DATE PIC 9(6). 05 SRC-ELM-LEVEL-TIME PIC 9(4). 05 SRC-ELM-LEVEL-DATE PIC 9(6). 05 SRC-ELM-BASE-USERID PIC X(8). SYNC. 05 SRC-ELM-PROCESSOR-NAME PIC X(10). SRC-ENV-AREA-BUFFER PIC X(257). 05 SRC-ELM-PROCESSOR-LAST-DATE PIC 9(6). 05 SRC-ELM-GEN-TIME PIC 9(4). 05 SRC-ELM-GEN-USERID PIC X(8). FILLER PIC 9(8) COMP SYNC OCCURS 19 TIMES. 05 FILLER PIC X(3). 05 SRC-ELM-LEVEL-COMMENT PIC X(40). 05 SRC-ELM-PROCESSOR-RC PIC 9(4) COMP 05 SRC-ELM-PROCESSOR-C1-RC PIC 9(4) COMP 05 SRC-ELM-PROCESSOR-LAST-COMMENT PIC X(40). SYNC. SRC-ENV-MAP-NEW PIC X(1). FILLER PIC X(7). SRC-ENV-ELEMENT-AREA-OFFSET PIC 9(4) COMP SYNC. SYNC. SYNC.The Primary Information Block 05 05 05 05 05 05 05 05 * * * 01 SRC-ENV-TYPE-DATA PIC X(8). SYNC. 05 SRC-ELM-FLAGS PIC 9(8) COMP 05 SRC-ELM-ELEMENT-VERSION PIC 9(4) COMP 05 SRC-ELM-ELEMENT-LEVEL PIC 9(4) COMP 05 SRC-ELM-NUMBER-INSERTS PIC 9(8) COMP 05 SRC-ELM-NUMBER-DELETES PIC 9(8) COMP 05 SRC-ELM-ELEMENT-NAME PIC X(10). 05 SRC-ELM-BASE-TIME PIC 9(4). SYNC. 05 SRC-ELM-CURRENT-CCID PIC X(12). FILLER PIC 9(4) COMP SYNC. SYNC. SRC-ENV-ELEMENT-NAME PIC X(10). 05 SRC-ELM-BASE-COMMENT PIC X(40). SRC-ELEMENT-MASTER-INFO-BLOCK. 05 SRC-ELM-FROM-MEMBER PIC X(10). 05 SRC-ELM-LEVEL-USERID PIC X(8). 60 Exits Guide . SYNC. SYNC. 05 SRC-ELM-PROCESSOR-FLAG PIC X. PIC X(2). PIC X. PIC 9(6). PIC X(12).6 FOLLOW 05 05 05 05 05 05 05 SRC-ELM-UPDATE-MEMBER-NAME SRC-ELM-BASE-MEMBER-NAME SRC-ELM-LOWER-LEVEL-IND SRC-ELM-PCT-PREV-INSERT-DEL SRC-ELM-PCT-PREV-DELS-REINS SRC-ELM-ESD-FP-NAME-IF-OBJ SRC-ELM-DELTA-FORMAT 88 SRC-ELM-FORWARD-DELTA 88 SRC-ELM-REVVERSE-DELTA SRC-ELM-PACKED-INDICATOR 88 SRC-ELM-BASE-NOT-PACKED SRC-ELM-LAST-PROC-VERSION SRC-ELM-LAST-PROC-LEVEL SRC-ELM-RECORD-FORMAT PIC X(10). PIC 9(4). PIC X(8). PIC X(8). PIC 9(4) COMP SYNC. PIC X(8). PIC X. PIC X(8). PIC X. PIC X(8). PIC X(44). PIC X(8). PIC 9(4). PIC X. PIC X(8). PIC X(12). PIC X(8). PIC X(8). PIC X(8). PIC 9(6). PIC 9(4).The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 SRC-ELM-MOVE-TIME SRC-ELM-MOVE-USERID SRC-ELM-RETRIEVE-DATE SRC-ELM-RETRIEVE-TIME SRC-ELM-RETRIEVE-USERID SRC-ELM-RETRIEVE-COMMENT SRC-ELM-RETRIEVE-TO-DSN SRC-ELM-RETRIEVE-TO-MEMBER FILLER PIC SRC-ELM-RET-CCID SRC-ELM-GEN-CCID SRC-ELM-MOD-ACTION SRC-ELM-ACTION-CCID SRC-ELM-ACTION-COMM SRC-ELM-ACTION-USER SRC-ELM-ACTION-DATE SRC-ELM-ACTIOM-TIME SRC-ELM-SIGNOUT-ID SRC-ELM-LOC-FLAG SRC-ELM-FR-ACTION SRC-ELM-FR-ACT-USERID SRC-ELM-FR-ACT-DATE SRC-ELM-FR-ACT-TIME SRC-ELM-FR-SITE SRC-ELM-FR-ENV SRC-ELM-FR-SYS SRC-ELM-FR-SUBSYS SRC-ELM-FR-ELEMENT SRC-ELM-FR-TYPE SRC-ELM-FR-STG-NBR SRC-ELM-FR-VER SRC-ELM-FR-LEVEL PIC 9(4). PIC X(40). PIC X. PIC X(10). VALUE 'Y'. PIC X(40). PIC 9(4) COMP SYNC. PIC X. PIC X(10). PIC 9(6). * NEW ELEMENT FIELDS FOR E/MVS 3. PIC X. PIC X. 05 05 05 05 Chapter 3: Using Exit Control Blocks 61 . PIC X. PIC X. PIC X(8). VALUE 'F'. PIC X(12). X(30). PIC X(8). VALUE 'R'. PIC X(10). SRC-ELM-CONF-LAST-LVL-TOTAL PIC S9(8) COMP SYNC. SRC-ELM-TO-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. SRC-ELM-PACKAGE-WITH-OUTPUT PIC X(16). SRC-ELM-PKG-RES-TIMESTAMP2 PIC X(4). SRC-ELM-CONF-LAST-LVL-NBR PIC S9(4) COMP SYNC. SRC-ELM-CONF-DELTA-FORMAT PIC X. SRC-ELM-FROM-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. FILLER PIC X(27). SRC-ELM-CONF-REGRES-INS-PCT PIC S9(4) COMP SYNC. SRC-ELM-BASE-ELM-VERSION PIC S9(4) COMP SYNC. SRC-ELM-PROCESSOR-GROUP PIC X(8). 88 SRC-ELM-TO-PATH-TYPE VALUE 'P'. SRC-ELM-AREA-BUFFER PIC X(2320). SRC-ELM-TO-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. SRC-ELM-NOSOURCE-FLG PIC X. SRC-ELM-CONF-BASE-TIME PIC 9(4). 88 SRC-ELM-FROM-NA-TYPE VALUE ' '. SRC-ELM-CONF-LAST-LVL-DATE PIC 9(6). SRC-ELM-USER-DATA PIC X(80). SRC-ELM-LAST-PROC-PACKAGE PIC X(16). SRC-ELM-PACKAGE-RESERVED PIC X(16). SRC-ELM-CONF-BASE-DATE PIC 9(6). 88 SRC-ELM-NOSOURCE VALUE 'Y'. 88 SRC-ELM-TO-NA-TYPE VALUE ' '. FILLER PIC X(40). SRC-ELM-OPACKAGE-TIMESTAMP2 PIC X(4). SRC-ELM-PACKAGE-TIMESTAMP2 PIC X(4). 88 SRC-ELM-FROM-DSN-TYPE VALUE 'D'. 62 Exits Guide . SRC-ELM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. SRC-ELM-INSERTS-LAST-LEVEL PIC S9(4) COMP SYNC. SRC-ELM-CONF-LAST-VERSION PIC S9(4) COMP SYNC. SRC-ELM-CONF-DELTA-BASE-FLG PIC X. SRC-ELM-CONF-LAST-LVL-TIME PIC 9(4). 88 SRC-ELM-FROM-PATH-TYPE VALUE 'P'. SRC-ELM-PACKAGE-TIMESTAMP1 PIC X(4).The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 SRC-ELM-CONF-DELTA-MEM-ID PIC X(8). SRC-ELM-CONF-REGRES-DEL-PCT PIC S9(4) COMP SYNC. SRC-ELM-CONF-BASE-TOTAL PIC S9(8) COMP SYNC. SRC-ELM-OPACKAGE-TIMESTAMP1 PIC X(4). SRC-ELM-TO-FILE-TYPE-FLG PIC X. SRC-ELM-FROM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. SRC-ELM-PKG-RES-TIMESTAMP1 PIC X(4). SRC-ELM-CONF-DELTA-VERSION PIC S9(4) COMP SYNC. 88 SRC-ELM-CONF-BASE-IN-DELTA VALUE 'Y'. 88 SRC-ELM-TO-DSN-TYPE VALUE 'D'. SRC-ELM-CONF-COMP-STAT-FLAG PIC X. SRC-ELM-CONF-BASE-LVL-NBR PIC S9(4) COMP SYNC. SRC-ELM-FROM-FILE-TYPE-FLG PIC X. SRC-ELM-DELETES-LAST-LEVEL PIC S9(4) COMP SYNC. SYNC. PIC X(8). PIC X(1). PIC 9(8) COMP PIC 9(8) COMP PIC X. * * * 01 TGT-ENVIRONMENT-BLOCK. SYNC. VALUE 'I'. PIC X. X(44).The Primary Information Block * * * 01 SRC-FILE-CONTROL-BLOCK. Chapter 3: Using Exit Control Blocks 63 . 05 SRC-FIL-LENGTH 05 SRC-FIL-CURRENT-VERSION 05 SRC-FIL-BLOCK-ID 05 SRC-FIL-DATASET-NAME 05 SRC-FIL-DATASET-MEMBER 05 SRC-FIL-DDNAME 05 SRC-FIL-DATASET-TYPE 05 SRC-FIL-PATH-AREA-OFFSET 05 SRC-FIL-NAME-AREA-OFFSET 05 FILLER 05 SRC-FIL-AREA-BUFFER PIC PIC PIC PIC PIC PIC PIC PIC PIC PIC PIC 9(4) COMP SYNC. VALUE 'N'. PIC 9(4) COMP PIC 9(4) COMP PIC X(8). VALUE 'N'. VALUE '2'. VALUE 'Y'. SYNC. VALUE '1'. PIC X(8). 05 TGT-ENV-LENGTH 05 TGT-ENV-CURRENT-VERSION 05 TGT-ENV-BLOCK-ID 05 TGT-ENV-FLAGS 05 TGT-ENV-TYPE-OF-BLOCK 88 TGT-INTERNAL-C1-BLOCK 88 TGT-EXTERNAL-ENV-BLOCK 88 TGT-ARCHIVE-FILE 05 TGT-ENV-IO-TYPE 88 TGT-SOURCE-LOCATION 88 TGT-TARGET-LOCATION 05 TGT-ENV-NEXT-ENV-POINTER 05 TGT-ENV-FILE-POINTER 05 TGT-ENV-SITE-NAME 05 TGT-ENV-STAGE-ID 88 TGT-STAGE-ONE 88 TGT-STAGE-TWO 05 TGT-ENV-STAGE-CODE 05 TGT-ENV-ELEMENT-CHANGES 88 TGT-SOURCE-CHANGES 88 TGT-NO-SOURCE-CHANGES 05 TGT-ENV-ELEMENT-VERSION 05 TGT-ENV-ELEMENT-LEVEL 05 TGT-ENV-ENVIRONMENT-NAME 05 TGT-ENV-STAGE-NAME 05 TGT-ENV-SYSTEM-NAME 05 TGT-ENV-SYSTEM-DATA 05 TGT-ENV-SYSTEM-CCID-VALDT 88 TGT-SYSTEM-VALIDATE 88 TGT-SYSTEM-NO-VALIDATE PIC 9(4) COMP PIC 9(4) COMP PIC X(4). SYNC. PIC X. X(21). S9(4) COMP SYNC. VALUE 'E'. VALUE 'Y'. X(4). X(10). X(1027). PIC 9(4) COMP PIC X. VALUE 'A'. SYNC. SYNC. PIC X. X(3). X(8). SYNC. VALUE 'O'. VALUE 'C'. S9(4) COMP SYNC. PIC X. PIC X(8). 9(4) COMP SYNC. TGT-ENV-ELEMENT-AREA-OFFSET PIC 9(4) COMP SYNC. 05 TGT-ELM-PROCESSOR-USERID PIC X(8). TGT-ENV-SUBSYSTEM-NAME PIC X(8). SYNC. SYNC. 05 TGT-ELM-FROM-MEMBER PIC X(10). SYNC. 05 TGT-ELM-CURRENT-CCID PIC X(12). 05 TGT-ELM-PROCESSOR-FLAG PIC X. SYNC. 05 TGT-ELM-GEN-TIME PIC 9(4). 05 TGT-ELM-PROCESSOR-LAST-DATE PIC 9(6). 05 TGT-ELM-PROCESSOR-LAST-TIME PIC 9(4). SYNC. SYNC. 05 TGT-ELM-BASE-LEVEL-NUMBER PIC 9(4) COMP 05 TGT-ELM-BASE-TOTAL-STMTS PIC 9(8) COMP 05 TGT-ELM-BASE-DATE PIC 9(6). SYNC. FILLER PIC X(7). 05 TGT-ELM-BASE-COMMENT PIC X(40). TGT-ENV-ELEMENT-NAME PIC X(10). FILLER PIC 9(4) COMP SYNC. SYNC. 05 FILLER PIC X(3). 05 TGT-ELM-LEVEL-TIME PIC 9(4). TGT-ENV-TYPE-NAME PIC X(8). SYNC. TGT-ENV-MAP-NEW PIC X(1). TGT-ENV-SUBSYSTEM-DATA PIC X(8). 05 TGT-ELM-LEVEL-DATE PIC 9(6).The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 * * * 01 FILLER PIC X(7). 05 TGT-ELM-BASE-TIME PIC 9(4). 64 Exits Guide . TGT-ENV-TYPE-DATA PIC X(8). 05 TGT-ELM-FROM-DSN PIC X(44). 05 TGT-ELM-FLAGS PIC 9(8) COMP 05 TGT-ELM-ELEMENT-VERSION PIC 9(4) COMP 05 TGT-ELM-ELEMENT-LEVEL PIC 9(4) COMP 05 TGT-ELM-NUMBER-INSERTS PIC 9(8) COMP 05 TGT-ELM-NUMBER-DELETES PIC 9(8) COMP 05 TGT-ELM-ELEMENT-NAME PIC X(10). FILLER PIC 9(8) COMP SYNC OCCURS 19 TIMES. TGT-ENV-AREA-BUFFER PIC X(257). 05 TGT-ELM-GEN-DATE PIC 9(6). 05 TGT-ELM-LEVEL-COMMENT PIC X(40). SYNC. 05 TGT-ELM-PROCESSOR-RC PIC 9(4) COMP 05 TGT-ELM-PROCESSOR-C1-RC PIC 9(4) COMP 05 TGT-ELM-PROCESSOR-LAST-COMMENT PIC X(40). SYNC. 05 TGT-ELM-LENGTH PIC 9(4) COMP 05 TGT-ELM-CURRENT-VERSION PIC 9(4) COMP 05 TGT-ELM-BLOCK-ID PIC X(4). 05 TGT-ELM-PROCESSOR-NAME PIC X(10). 05 TGT-ELM-BASE-USERID PIC X(8). TGT-ELEMENT-MASTER-INFO-BLOCK. 05 TGT-ELM-GEN-USERID PIC X(8). PIC 9(6). PIC X(2). PIC X(8). PIC X(40). PIC X(8). PIC X(10). PIC X. PIC X(12). PIC 9(4). PIC X(40).The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 TGT-ELM-LEVEL-USERID TGT-ELM-LAST-ACTION TGT-ELM-LAST-LEVEL-TOTAL TGT-ELM-MOVE-DATE TGT-ELM-MOVE-TIME TGT-ELM-MOVE-USERID TGT-ELM-RETRIEVE-DATE TGT-ELM-RETRIEVE-TIME TGT-ELM-RETRIEVE-USERID TGT-ELM-RETRIEVE-COMMENT TGT-ELM-RETRIEVE-TO-DSN TGT-ELM-RETRIEVE-TO-MEMBER FILLER PIC TGT-ELM-RET-CCID TGT-ELM-GEN-CCID TGT-ELM-MOD-ACTION TGT-ELM-ACTION-CCID TGT-ELM-ACTION-COMM TGT-ELM-ACTION-USER TGT-ELM-ACTION-DATE TGT-ELM-ACTIOM-TIME TGT-ELM-SIGNOUT-ID TGT-ELM-LOC-FLAG TGT-ELM-FR-ACTION TGT-ELM-FR-ACT-USERID TGT-ELM-FR-ACT-DATE TGT-ELM-FR-ACT-TIME TGT-ELM-FR-SITE TGT-ELM-FR-ENV TGT-ELM-FR-SYS TGT-ELM-FR-SUBSYS TGT-ELM-FR-ELEMENT TGT-ELM-FR-TYPE TGT-ELM-FR-STG-NBR TGT-ELM-FR-VER TGT-ELM-FR-LEVEL PIC X(8). PIC X(8).6 FOLLOW 05 05 05 05 05 05 05 TGT-ELM-UPDATE-MEMBER-NAME TGT-ELM-BASE-MEMBER-NAME TGT-ELM-LOWER-LEVEL-IND TGT-ELM-PCT-PREV-INSERT-DEL TGT-ELM-PCT-PREV-DELS-REINS TGT-ELM-ESD-FP-NAME-IF-OBJ TGT-ELM-DELTA-FORMAT 88 TGT-ELM-FORWARD-DELTA 88 TGT-ELM-REVVERSE-DELTA TGT-ELM-PACKED-INDICATOR PIC X(10). PIC X(12). PIC 9(6). PIC X. VALUE 'R'. PIC X. PIC X(8). PIC 9(4). PIC X(8). PIC X(8). PIC X(44). PIC X. PIC X. PIC X(8). 05 Chapter 3: Using Exit Control Blocks 65 . PIC X(12). PIC X(8). PIC 9(6). PIC 9(6). PIC X(8). PIC X. PIC X(10). PIC X(8). PIC 9(8) COMP SYNC. * NEW ELEMENT FIELDS FOR E/MVS 3. PIC X(8). PIC X. PIC 9(4). PIC X(8). PIC X(10). VALUE 'F'. PIC 9(4) COMP SYNC. PIC 9(4) COMP SYNC. X(30). PIC X(8). PIC 9(4). TGT-ELM-CONF-LAST-LVL-NBR PIC S9(4) COMP SYNC.The Primary Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 88 TGT-ELM-BASE-NOT-PACKED VALUE 'Y'. TGT-ELM-FROM-FILE-TYPE-FLG PIC X. TGT-ELM-OPACKAGE-TIMESTAMP1 PIC X(4). TGT-ELM-PACKAGE-WITH-OUTPUT PIC X(16). TGT-ELM-INSERTS-LAST-LEVEL PIC S9(4) COMP SYNC. 88 TGT-ELM-TO-PATH-TYPE VALUE 'P'. TGT-ELM-PACKAGE-RESERVED PIC X(16). TGT-ELM-LAST-PROC-PACKAGE PIC X(16). TGT-ELM-FROM-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-ELM-CONF-LAST-VERSION PIC S9(4) COMP SYNC. 66 Exits Guide . 88 TGT-ELM-FROM-NA-TYPE VALUE ' '. TGT-ELM-CONF-DELTA-BASE-FLG PIC X. TGT-ELM-PACKAGE-TIMESTAMP1 PIC X(4). TGT-ELM-PACKAGE-TIMESTAMP2 PIC X(4). TGT-ELM-LAST-PROC-LEVEL PIC X. TGT-ELM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-ELM-CONF-LAST-LVL-TIME PIC 9(4). TGT-ELM-LAST-PROC-VERSION PIC X. 88 TGT-ELM-FROM-PATH-TYPE VALUE 'P'. TGT-ELM-DELETES-LAST-LEVEL PIC S9(4) COMP SYNC. 88 TGT-ELM-NOSOURCE VALUE 'Y'. 88 TGT-ELM-FROM-DSN-TYPE VALUE 'D'. TGT-ELM-CONF-BASE-LVL-NBR PIC S9(4) COMP SYNC. TGT-ELM-CONF-DELTA-FORMAT PIC X. 88 TGT-ELM-TO-DSN-TYPE VALUE 'D'. TGT-ELM-CONF-REGRES-INS-PCT PIC S9(4) COMP SYNC. TGT-ELM-CONF-BASE-DATE PIC 9(6). TGT-ELM-PROCESSOR-GROUP PIC X(8). TGT-ELM-TO-FILE-TYPE-FLG PIC X. TGT-ELM-PKG-RES-TIMESTAMP2 PIC X(4). TGT-ELM-CONF-COMP-STAT-FLAG PIC X. TGT-ELM-TO-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-ELM-CONF-LAST-LVL-DATE PIC 9(6). TGT-ELM-CONF-REGRES-DEL-PCT PIC S9(4) COMP SYNC. TGT-ELM-FROM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-ELM-RECORD-FORMAT PIC X. TGT-ELM-OPACKAGE-TIMESTAMP2 PIC X(4). TGT-ELM-PKG-RES-TIMESTAMP1 PIC X(4). TGT-ELM-NOSOURCE-FLG PIC X. TGT-ELM-CONF-LAST-LVL-TOTAL PIC S9(8) COMP SYNC. TGT-ELM-TO-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-ELM-CONF-BASE-TOTAL PIC S9(8) COMP SYNC. TGT-ELM-CONF-DELTA-VERSION PIC S9(4) COMP SYNC. 88 TGT-ELM-TO-NA-TYPE VALUE ' '. TGT-ELM-CONF-DELTA-MEM-ID PIC X(8). TGT-ELM-CONF-BASE-TIME PIC 9(4). TGT-ELM-BASE-ELM-VERSION PIC S9(4) COMP SYNC. 88 TGT-ELM-CONF-BASE-IN-DELTA VALUE 'Y'. Use the (ECB-CURRENT-VERSION) label to verify that the correct version of this DSECT was passed to your exit. 05 TGT-FIL-DATASET-TYPE PIC X(3). ECB-CURRENT-VERSION Version number to identify the Exit Control block (EXIT-CONTROL-BLOCKS) written by the exit handler. 05 TGT-FIL-DDNAME PIC X(8). TGT-FILE-CONTROL-BLOCK. 05 TGT-FIL-DATASET-NAME PIC X(44). X(2320). 05 TGT-FIL-CURRENT-VERSION PIC 9(4) COMP SYNC. ECB-FLAG Not used. exit programs cannot modify these fields. ECB-BLOCK-ID Code that identifies this as the Exit Control block. 05 TGT-FIL-AREA-BUFFER PIC X(1027). Chapter 3: Using Exit Control Blocks 67 . 05 TGT-FIL-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. for use in rapid identification when you are scanning your modules visually. COBOL Field Descriptions (EXIT-CONTROL-BLOCK) The following list contains descriptions of the fields in the EXIT-CONTROL-BLOCK. in bytes. Value is always "$ECB". This should always be 1.The Primary Information Block 05 05 05 05 * * * 01 FILLER TGT-ELM-AREA-BUFFER TGT-ELM-USER-DATA FILLER PIC PIC PIC PIC X(27). 05 FILLER PIC X(21). 05 TGT-FIL-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. X(40). X(80). 05 TGT-FIL-BLOCK-ID PIC X(4). Unless otherwise noted. ECB-LENGTH Size of the Exit Control block (EXIT-CONTROL-BLOCKS). 05 TGT-FIL-LENGTH PIC 9(4) COMP SYNC. 05 TGT-FIL-DATASET-MEMBER PIC X(10). This field contains the return code. ■ Value: 12 – – Label: none Meaning: Used only on entry to an exit 1 program. An exception occurs with exit 1. this field has meaning as follows. if CA Endevor SCM has detected a security violation in its own checking (in which case this is passed as 4. this field is generally set to 0. Make sure to modify the changed data if necessary before proceeding. (Any value other than those listed next is set to 8. Possible values are as follows: ■ Value: 0 – – ■ Label: RETURN-OK Meaning: Successful (or continue processing). or 16. indicating end-of-list. 12. Applies for all exits Value: 4 – – Label: RETURN-OK-MODS Meaning: Successful (continue processing). 2.The Primary Information Block ECB-RETURN-CODE Modifiable by exits 1-6. and 4. ■ Value: 8 – – Label: RETURN-ABORT Meaning: Stop actiFon processing for exits 1. 68 Exits Guide . Applies for exits 1-5. but some control block data was modified by the exit. ECB-ARGUMENTS Number of parameters passed to the exit in the address list (R1). see the individual write-up of each exit. The last word of the list is X'80'.) For further detail. On entry to the exit. ■ Value: 16 – – Label: none Meaning: Used only on entry to an exit 1 program. as described for exit 1). On return from the exit. ECB-TSO-BATCH-MODE Indicates whether the current action was requested in foreground or batch. ECB-USER-ID User ID associated with the current processing.The Primary Information Block ECB-EXIT-NUMBERS Number identifying the exit being invoked: Values are as follows: ■ Value: 1 – – ■ Meaning: C1IEXT01 Exit 1 invoked Value: 2 – – Label: C1IEXT02 Meaning: Exit 2 invoked ■ Value: 3 – – Label: C1IEXT03 Meaning: Exit 3 invoked ■ Value: 4 – – Label: C1IEXT04 Meaning: Exit 4 invoked. ■ Value: 5 – – Label: C1IEXT05 Meaning: Exit 5 invoked. Modifiable by exit 5. ■ Value: 6 – – Label: C1IEXT06 Meaning: Exit 6 invoked. Values are as follows: ■ Value: T – – ■ Label: TSO Meaning: Action was requested in foreground Value: B – – Label: BATCH Action was requested in batch Chapter 3: Using Exit Control Blocks 69 . The values correspond to the actions as follows: 1-Add 2-Update 3-Retrieve 4-Delete 5-Generate 6-Display 7-Move 8-Archive 9-Reserved 10-Reserved 11-CHGTYPE 12-Signin 13-Override Signout 14-ENVRNMGR 70 Exits Guide .The Primary Information Block ECB-CALL-FLAG Indicates whether the current processing relates to building a panel dynamically or to an action request. You can suppress writing SMF records by sorting this field to N using exit 3. as defined by the SMFREC# parameter of the Defaults Table: Y (yes) or N (no) ECB-SMF-WRITE-FLAG Applicable if ECB-SMF-FLAG is Y. Indicates whether CA Endevor SCM is set up to write out SMF action and/or security records. ECB-ACTION-CODE Action code. Values are as follows: ■ Value: Y – – ■ Label: INTERNAL-CALL Meaning: Processing involves dynamic TSO panel building Value: N – – ACTION-CALL Processing involves an action request ECB-SMF-FLAG Indicates whether CA Endevor SCM was installed to support SMF recording. as defined by the SMFACT and SMFSEC parameters of the Defaults Table: Y (yes) or N (no). ECB-MESSAGE-TEXT Modifiable by exits 1-6. For exit 1. For messages produced by user exits. The first 29 positions are for CA Endevor SCM-generated information. UPDATE. this is blank on entry. Used to construct the message code written to the CA Endevor SCM Execution Report by the exit handler. Chapter 3: Using Exit Control Blocks 71 . and is a severity code associated with ECB-RETURN-CODE (I for return codes less than 8. this is set on entry if a security violation has occurred. described previously for the ECB-MESSAGE-CODE field). where nnnn is defined by this field. If there is a message in this field when you return from the user exit. the error code is formatted as C1Unnnns.The Primary Information Block 15-Print 16-Transfer 17-Not used 18-Restore ECB-ACTION-NAME Literal to describe the current action (ADD. ECB-MESSAGES-LENGTH Not used. The message is preceded in that report with an error code (C1Unnnns format. and so forth). For the other exits. E for return codes of 8 and above). the exit handler records the message in the CA Endevor SCM Execution Report. and applies if the ECB-MESSAGE-TEXT field contains a non-blank value. ECB-MESSAGE-CODE Modifiable by exits 1-6. Passed to exits 1-4. Error message associated with the current activity. Default value is 0000. A message code precedes each message written to the report. The Primary Information Block ECB-CALLER-ORIGIN Action is executing under CA Endevor SCM or Quick-Edit. In both these examples. Values are as follows: ■ Value: Y – – ■ Label: PACKAGE-YES Meaning: Action is running under a package. then the content of ECB-CALLER-ORIGIN reflects the secondary level. the ECB-CALLER-ORIGIN value is E. Values are as follows: ■ Value: E – – ■ Label: CALLER-CA Endevor SCM Meaning: Exit is running under CA Endevor SCM Value: Q – – Label: CALLER-QUICKEDIT Meaning: Exit is running under Quick-Edit If the Exit is called as a second level CA Endevor SCM function. Value: N – – Label: PACKAGE-NO Meaning: Action is not running under a package. ECB-REQUEST-POINTER A pointer to the Request Information block (paragraph REQUEST-INFO-BLOCK). ECB-UNDER-PACKAGE Action is running under a package. 72 Exits Guide . for example if C1BM3000 is used in a processor or if an API program is running in a CA Endevor SCM Exit. ■ Value: I – – Label: PACKAGE-INSPECT Meaning: The exit is called as part of package validation during Cast or Inspect. This is NOT an executing action. User field. ECB-SRCHR The value of this field. ECB-HIGH-RC Highest return code set by previously executed system and user exits for this exit number. or until another user exit loads a new value in this field. used to save (and pass) information between user exits. ECB-SECURITY-FUNCTION Same as ECB-ACTION-CODE (above). Generally.The Primary Information Block ECB-PANEL-TYPE Indicates the type of panel being processed when the exit was invoked. this field is used to store address values read by exit programs from the anchor ID table. When you are using anchor IDs. Values are as follows: ■ Value: 0 – – ■ Label: NO-PANEL-INFO Meaning: No panel information is available Value: 1 – – Label: ENVIRONMENT-PANEL Meaning: Exit was called while processing an Environment Definition panel ■ Value: 2 – – Label: MAIN-PANEL Meaning: Exit was called while processing the Primary Options Menu ■ Value: 3 – – Label: FOREGROUND-PANEL Meaning: Exit was called while processing a foreground panel ECB-EXIT-HOLD-FIELD Modifiable by exits 1-6. Chapter 3: Using Exit Control Blocks 73 . The values are as follows: E The utility is adding or updating an element. this field contains an address that points to a block of user data. Any value placed in this field remains there until the end of the CA Endevor SCM session. O The utility is updating an output data set name component. indicates that the Search and Replace utility is being run. if not blank. COMP VALIDATION VALIDATE ACTION . $REQPDS DSECT Sample $REQPDS DSECT control block is shown here: $REQPDS DSECT REQLEN DC REQVERS DC REQ$VERS EQU REQID DC REQCCID DC REQCOMM DC REQFLAG DC REQSISOF DC REQ$YES EQU REQ$NO EQU REQSISOC DC REQEXPND DC REQOVRWR REQRTCOD REQELVER REQCPYBK REQBENE REQOEMCH REQOSYCH REQOCMCH REQOTMSG REQDEL REQMOVWH REQUPDT REQBYGEN REQONLCMP REQSYNC REQIGGF REQBYDP DC DC DC DC DC DC DC DC DC DC DC DC DC DC DC DC DC AL2(REQSIZE) AL2(REQ$VERS) 2 CL4'$REQ' CL12' ' CL40' ' F'0' CL1' ' C'Y' C'N' CL1' ' CL1' ' CL1' F'0' CL2' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' CL1' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' LENGTH OF THE BLOCK CURRENT VERSION OF THE BLOCK VERSION OF THE BLOCK BLOCK ID CCID FOR ACTION COMMENT FOR ACTION SPECIAL FLAGS SIGN-OUT OVERRIDE FOR ACTION YES NO RETRIEVE COPY ONLY ( Y OR N) RETRIEVE EXPAND INCLUDES ( Y OR N) RETRIEVE WRITE OVER EXISTING MBR ACTION RETURN CODE NEW VERSION GENERATE COPYBACK OPTION BYPASS ELEMENT NAME EDIT VALIDATE ACTION .SYNCHRONIZATION VALIDATE ACTION . Exit 2 programs can change the information in this block.ELEMENT MASTER VALIDATE ACTION .The Request Information Block The Request Information Block CA Endevor SCM passes this block to programs for exits 1-4.TERSE MESSAGES DELETE ELEMENT AFTER ACTION (Y/N) MOVE WITH HISTORY (Y/N) ADD WITH OPTION UPDATE (Y/N) BYPASS GENERATE PROCESSOR (Y/N) DELETE ONLY COMPONENT (Y/N) SYNCHRONIZE (Y/N) IGNORE GENERATE FAILED (Y/N) BYPASS DELETE PROCESSOR 74 Exits Guide . Value is always "$REQ. UPD AND GEN AUTOGEN ON BEHALF OF A COMPONENT GENERATE NOSOURCE OPTION ** RESERVED ** LENGTH OF $REQPDS BLOCK $REQPDS DSECT Field Descriptions The following list contains brief descriptions of the fields in the $REQPDS DSECT. in bytes. REQID Code that identifies this as the Request Information block. Unless otherwise noted. Chapter 3: Using Exit Control Blocks 75 . Use the REQ$VERS label to verify that the correct version of this DSECT was passed to your exit. exit 2 programs can modify these fields. REQFLAG Not used. REQCCID CCID associated with the current action request. REQVERS Version number of the Request Information block. This should always be 2. Exit 2 programs cannot modify this field.The Request Information Block REQOPGRP REQSOUID REQOSRCH REQORSGN REQOJUMP REQOSGNI REQUSR REQOAUTG REQOAUTX REQNOSRC REQSIZE DC DC DC DC DC DC DS DC DC DC DS EQU CL8' ' CL8' ' CL1' ' CL1' ' CL1' ' CL1' ' XL80 CL1' ' CL1' ' CL1' ' XL37 *-$REQPDS PROCESSOR GROUP OPTION SIGN-OUT TO USER ID SEARCH ENVIRONMENT MAP RETAIN SIGNOUT JUMP SIGNIN USER DATA TO WRITE TO MCF AUTOGEN OPTION FOR ADD. REQCOMM Comments associated with the current action request. REQLEN Size of the Request Information block ($REQPDS). Exit 2 programs cannot modify this field." Exit 2 programs cannot modify this field. for use in rapid identification when you are scanning your modules visually. Although you can modify this field.The Request Information Block REQSISOF Indicates whether the current action requested a sign-out override. REQOVRWR Applicable for a RETRIEVE action. REQRTCOD Action return code. Indicates whether the current action requested that INCLUDEs be expanded: Y (yes) or N (no). Indicates whether the current action requested an overwrite if a member by the same name exists already in the output library: Y (yes) or N (no). REQCPYBK Applicable for a GENERATE action. 76 Exits Guide . REQSISOC Applicable for a RETRIEVE action. UPDATE and TRANSFER actions. REQBENE This field is only used by the CA Endevor SCM Interface to the Natural Environment and is applicable for the ADD. Meaning: Action did not request a signout override. REQELVER Applicable for an ADD or TRANSFER action. Value: 2 – – Label: REQ$NO. It indicates if the editing of the element name should be bypassed: Y (yes) or N (no). Indicates the version number of the element being added or transferred. Indicates whether the current action specified NO SIGNOUT: Y (yes) or N (no). You can change the version number under certain circumstances to any value from 01-99. REQEXPND Applicable for a RETRIEVE action. The version number defaults to 01 for an element being added or to the from location version number of the element being transferred. Values are as follows: ■ Value: 1 – – ■ Label: REQ$YES Meaning: Action requested a signout override. Indicates whether you want to copy the element from up the map and then generate it in the stage specified in the SCL. we do not recommended that you do so. DELETE. Indicates whether the Validate action option TERSE MESSAGES is in effect for the current action to limit the amount of message detail written to the C1MSGS1 report. This includes ADD. TRANSFER. Indicates whether the Validate action option SYNCHRONIZATION is in effect for the current action to check whether the element is involved in an out-of-sync condition. REQOSYCH Applicable for the Validate action. REQBYGEN Applicable for an ADD. or TRANSFER) will be deleted upon successful completion of the requested action: Y (yes) or N (no). TRANSFER. DELETE. and UPDATE. MOVE. Indicates whether you want to update the element if it exists already: Y (yes) or N (no). MOVE. Indicates whether the Validate action option COMPONENT VALIDATION is in effect for the current action to check whether the element components exists and are valid. and UPDATE actions. Indicates whether the current action requested a MOVE WITH HISTORY: Y (yes) or N (no). REQMOVWH Applicable for a MOVE action. Indicates whether the Validate action option ELEMENT MASTER is in effect for the current action to check whether the element has been successfully generated. ARCHIVE. Indicates whether the member (for an ADD or UPDATE) or element (for an ARCHIVE. REQDEL Applicable for all actions where the deletion of a member/element applies. Indicates whether you want the generate processor to execute after the source management has been performed: Y (yes--bypass the processor) or N (no--execute the processor). TRANSFER. ARCHIVE. REQUPDT Applicable for an ADD action. Chapter 3: Using Exit Control Blocks 77 . REQOCMCH Applicable for the Validate action. This value is X'40' if a delete does not apply for the current action. REQOTMSGS Applicable for the Validate action. UPDATE. and RESTORE action. Can only be modified during ADD.The Request Information Block REQOEMCH Applicable for the Validate action. MOVE. The Request Information Block REQONLCMP Applicable for CA Endevor SCM ACM users only. Indicates whether you want to delete both the element component list and the element, or the element component list only. Y (yes--delete just the element component list) or N (no--delete the element as well as the element component list). If you specify COMPONENT ONLY, REQDEL will be blank and this (REQONLCMP) flag will be set to y (yes). REQSYNC Applicable for a TRANSFER or MOVE action. Indicates whether you want to create a sync level at the at the target when the current level of the element differs from the base level of the FROM location element. For more information, see the SCL Reference Guide and the User Guide. REQIGGF Applicable for a TRANSFER action. Indicates whether you want to ignore the *FAILED* flag for the action and perform the action, whether or not the element was previously generated or moved successfully. REQBYDP Applicable for a MOVE or TRANSFER action. Indicates whether you want the delete processor to execute for this element. Y-The element will be deleted but the delete processor will not be executed, bypassing the delete of any outputs associated with this element. N-The delete processor will be executed and the elements and all outputs will be deleted. REQOPGRP Applicable for an ADD, UPDATE, or GENERATE action. The name of the processor group to be used. If you leave this field blank, the system defaults to the processor group last used for this element (that is, when the element was last generated). REQSOUID Applicable for a SIGNIN action. The user ID of the user to whom you are signing out or reassigning the element. REQOSRCH Applicable for GENERATE and RETRIEVE actions. Indicates if CA Endevor SCM is to search the map when building a list. REQORSGN Applicable for MOVE and TRANSFER actions. Indicates whether to retain signout at the target location of the action. 78 Exits Guide The Request Information Block REQOJUMP Applicable for the MOVE action. Indicates whether CA Endevor SCM allows you to move elements when a version of the element exists at an intermediary stage that is not on the map. REQOSGNI Applicable for the MOVE and TRANSFER actions. Indicates whether to sign in elements at the target location of the action. REQUSR User data that will be written to the MCF record at the target of action. EXIT 2 can define up to 80 bytes of user data that will be stored in the element record of the MCF. Set this field to spaces if you want to clear existing user data. REQOAUTG Applicable for the ADD, UPDATE, and GENERATE element actions. Indicates whether the AUTOGEN action option was specified or not. The possible values for this field are: Y (Yes) or N (No). If the value of REQOAUTG is “Y”, then the value REQOAUTX will be “N”. Exit 2 programs cannot modify this field. REQOAUTX Indicates whether this where-used element was generated on behalf of a component element. The possible values for this field are: Y (Yes) or N (No). If the value of REQOAUTX is “Y”, then the value of the REQOAUTG field will be “N”. Exit 2 programs cannot modify this field. REQNOSRC Applicable for the GENERATE element action. Indicates whether to fetch an element’s source back to the target location from up the map or not. The possible values for this field are: Y (Yes) or N (No). REQSIZE Size of the $REQPDS DSECT. Exit 2 cannot modify this field. Chapter 3: Using Exit Control Blocks 79 The Request Information Block REQUEST-INFO-BLOCK Layout Sample CA Endevor SCM passes this block to programs for exits 1-4. Exit 2 programs can change the information in this block. A sample REQUEST-INFO-BLOCK control block is shown: 01 REQUEST-INFO-BLOCK. 05 REQ-LENGTH 05 REQ-CURRENT-VERSION 05 REQ-BLOCK-ID 05 REQ-CCID 05 REQ-COMMENT 05 REQ-REQUEST-FLAG 05 REQ-SISO-INDICATOR 88 SIGNOUT-OVERRIDE 88 NO-SIGNOUT-OVERRIDE REQ-COPY-INDICATOR 88 RETRIEVE-COPY-ONLY 88 RETRIEVE-FOR-UPDATE PIC PIC PIC PIC PIC PIC PIC 9(4) COMP SYNC. 9(4) COMP SYNC. X(4). X(12). X(40). 9(8) COMP SYNC. X. 05 VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. 05 05 05 05 05 REQ-EXPINCL-INDICATOR PIC X. 88 EXPAND-INCLUDES VALUE 'Y'. 88 NO-EXPAND-INCLUDES VALUE 'N'. REQ-OVERWRITE-INDICATOR PIC X. 88 WRITE-OVER-MEMBER VALUE 'Y'. 88 NO-WRITE-OVER-MEMBER VALUE 'N'. REQ-ACTION-RC PIC 9(8) COMP SYNC. REQ-NEW-VERSION REQ-GEN-COPYBACK 88 GEN-COPYBACK 88 NO-GEN-COPYBACK REQ-BENE 88 BYP-ELM-NAME-EDIT REQ-EM-CHK REQ-SY-CHK REQ-CM-CHK PIC X(2). PIC X. VALUE 'Y'. VALUE 'N'. PIC X(1). VALUE 'Y'. PIC X(1). PIC X(1). PIC X(1). 05 05 05 05 05 05 05 05 REQ-TMSG PIC X(1). REQ-DELETE-AFTER PIC X. 88 DELETE-AFTER-ACTION VALUE 'Y'. 88 NO-DELETE-AFTER-ACTION VALUE 'N'. REQ-MOVE-WITH-HISTORY PIC X. 88 MOVE-WITH-HISTORY VALUE 'Y'. 88 MOVE-WITHOUT-HISTORY VALUE 'N'. REQ-ADD-WITH-UPDATE PIC X. 88 ADD-WITH-UPDATE 88 ADD-WITHOUT-UPDATE REQ-BYPASS-GEN-PROC 88 BYPASS-GEN-PROC 88 NO-BYPASS-GEN-PROC REQ-DEL-COMPS-ONLY VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. 05 05 80 Exits Guide The Request Information Block 05 05 05 88 DEL-COMPS-ONLY 88 NO-DEL-COMPS-ONLY REQ-SYNCHRONIZE 88 YES-SYNCHRONIZE 88 NO-SYNCHRONIZE REQ-IGNGEN-FAIL 88 IGNORE-GEN-FAIL 88 NO-INGORE-GEN-FAIL REQ-BYPASS-DEL-PROC 88 BYPASS-DEL-PROC 88 NO-BYPASS-DEL-PROC REQ-PROCESSOR-GROUP REQ-SIGNOUT-USRID REQ-SEARCH-OPTION 88 SEARCH-ENV-MAP 88 NO-SEARCH-ENV-MAP REQ-RETAIN-SIGNOUT-OPT 88 RETAIN-SIGNOUT 88 NO-RETAIN-SIGNOUT REQ-JUMP-OPTION 88 JUMP-IS-OK 88 NO-JUMP-SPECIFIED REQ-SIGNIN-OPTION 88 SIGNIN-IS-SPECIFIED 88 NO-SIGNIN-SPECIFIED REQ-USER-DATA REQ-AUTOGEN 88 REQ-AUTOGEN-YES 88 REQ-AUTOGEN-NO REQ-AUTOGENX 88 REQ-AUTOGENX-YES 88 REQ-AUTOGENX-NO REQ-GEN-NOSOURCE 88 GEN-NOSOURCE 88 GEN-SOURCE FILLER VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X(8). PIC X(8). PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X(80). PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE 'Y'. VALUE 'N'. PIC X. VALUE ‘Y’. VALUE ‘N’. PIC X(37). 05 05 05 05 05 05 05 05 05 05 05 Chapter 3: Using Exit Control Blocks 81 The Request Information Block COBOL REQUEST-INFO-BLOCK Field Descriptions The following list contains brief descriptions of the fields in the REQUEST-INFO-BLOCK PARAGRAPH. Unless otherwise noted, exit 2 programs can modify these fields. REQ-LENGTH Size of the Request Information block (REQUEST-INFO-BLOCK), in bytes. Exit 2 programs cannot modify this field. REQ-CURRENT-VERSION Version number of the Request Information block. This should always be 2. Use this label to verify that the correct version of this control block layout was passed to your exit. Exit 2 programs cannot modify this field. REQ-BLOCK-ID Code that identifies this as the Request Information block, for use in rapid identification when you are scanning your modules visually. Value is always "$REQ." Exit 2 programs cannot modify this field. REQ-CCID CCID associated with the current action request. REQ-COMMENT Comments associated with the current action request. REQ-REQUEST-FLAG Not used. REQ-SISO-INDICATOR Indicates whether the current action requested a sign-out override. Values are as follows: ■ Value: Y – – ■ Label: SIGNOUT-OVERRIDE Meaning: Action requested a signout override Value: N – – Label: NO-SIGNOUT-OVERRIDE Meaning: Action did not request a signout override 82 Exits Guide The Request Information Block REQ-COPY-INDICATOR Applicable for a RETRIEVE action. Indicates whether the current action specified NO SIGNOUT: Y (yes) or N (no). ■ Value: Y – – ■ Label: RETRIEVE-COPY-ONLY Meaning: Action did not request a signout Value: N – – Label: RETRIEVE-FOR-UPDATE Meaning: Action requested a signout REQ-OVERWRITE-INDICATOR Applicable for a RETRIEVE action. Indicates whether the current action requested an overwrite if a member by the same name exists already in the output library: Y (yes) or N (no). ■ Value: Y – – ■ Label: WRITE-OVER-MEMBER Meaning: Action requested overwrite Value: N – – Label: NO-WRITE-OVER-MEMBER Meaning: Action did not request overwrite REQ-ACTION-RC Action return code. REQ-NEW-VERSION Applicable for an ADD or TRANSFER action. Indicates the version number of the element being added or transferred. The version number defaults to 01 for an element being added or to the from location version number of the element being transferred. You can change the version number under certain circumstances to any value from 01-99. Chapter 3: Using Exit Control Blocks 83 Indicates whether the Validate action option TERSE MESSAGES is in effect for the current action to limit the amount of message detail written to the C1MSGS1 report. UPDATE and TRANSFER actions. REQ-CM-CHK Applicable for the Validate action. Although you can modify this field. REQ-SY-CHK Applicable for the Validate action. Indicates whether the Validate action option COMPONENT VALIDATION is in effect for the current action to check whether the element components exists and are valid. REQ-TMSG Applicable for the Validate action.The Request Information Block REQ-GEN-COPYBACK Applicable for a GENERATE action. 84 Exits Guide . Indicates whether you want to copy the element from up the map and then generate it in the stage specified in the SCL. and is applicable for the ADD. we do not recommended that you do so. Values are as follows: ■ Value: Y – – ■ Label: GEN-COPYBACK Meaning: Action requested that element be copied Value: N – – Label: NO-GEN-COPYBACK Meaning: Action did not request copy REQ-BENE This field is only used by the CA Endevor SCM Natural Interface Application. Indicates whether the Validate action option ELEMENT MASTER is in effect for the current action to check whether the element has been successfully generated. It indicates if the editing of the element name should be bypassed: Y (yes) or N (no). REQ-EM-CHK Applicable for the Validate action. Indicates whether the Validate action option SYNCHRONIZATION is in effect for the current action to check whether the element is involved in an out-of-sync condition. TRANSFER. DELETE. Chapter 3: Using Exit Control Blocks 85 . Can only be modified during ADD. This includes ADD. Indicates whether the member (for an ADD or UPDATE) or element (for an ARCHIVE. This value is X'40' if a delete does not apply for the current action. DELETE.The Request Information Block REQ-DELETE-AFTER Applicable for all actions where the deletion of a member/element applies. and ARCHIVE actions. or TRANSFER) will be deleted upon successful completion of the requested action: Y (yes) or N (no). ARCHIVE. Indicates whether the current action requested a MOVE WITH HISTORY: Y (yes) or N (no). Indicates whether you want to update the element if it exists already: Y (yes) or N (no). and UPDATE. MOVE. UPDATE. MOVE. ■ Value: Y – – ■ Label: MOVE-WITH-HISTORY Meaning: Option requested Value: N – – Label: MOVE-WITHOUT-HISTORY Meaning: Option not requested REQ-ADD-WITH-UPDATE Applicable for an ADD action. Value: N – – Label: ADD-WITHOUT-UPDATE Meaning: Option not requested. ■ Value: Y – – ■ Label: ADD-WITH-UPDATE Meaning: Option requested. Values are as follows: ■ Value: Y – – ■ Label: DELETE-AFTER-ACTION Meaning: Action requested delete Value: N – – Label: NO-DELETE-AFTER-ACTION Meaning: Action did not request delete REQ-MOVE-WITH-HISTORY Applicable for a MOVE action. MOVE. TRANSFER. REQ-DELETE-AFTER will be blank and this (REQ-DEL-COMPS-ONLY) flag will be set to y (yes). ■ Value: Y – – ■ Label: DEL-COMPS-ONLY Meaning: Option requested Value: N – – Label: NO-DEL-COMPS-ONLY Meaning: Option not requested 86 Exits Guide . Y (yes--delete just the element component list) or N (no--delete the element as well as the element component list). REQ-DEL-COMPS-ONLY Applicable for CA Endevor SCM ACM users only.The Request Information Block REQ-BYPASS-GEN-PROC Applicable for an ADD. or the element component list only. TRANSFER. bypassing the delete of any outputs associated with this element. If you specify COMPONENT ONLY. Indicates whether you want to delete both the element component list and the element. ■ Value: Y – – ■ Label: BYPASS-GEN-PROC Meaning: Option requested Value: N – – Label: NO-BYPASS-GEN-PROC Meaning: Option not requested. UPDATE. Values are: Y-The element will be deleted but the delete processor will not be executed. N-The delete processor will be executed and the elements and all outputs will be deleted. and RESTORE action. Indicates whether you want the generate processor to execute after source management has been performed. Value: N – – Label: NO-IGNORE-GEN-FAIL Meaning: Option not requested. Values are as follows: ■ Value: Y – – ■ Label: YES-SYNCHRONIZATION Meaning: Option requested Value: N – – Label: NO-SYNCHRONIZATION Meaning: Option not requested. Value: N – – Label: NO-BYPASS-DEL-PROC Meaning: Option not requested. Indicates whether you want the delete processor to execute for this element.The Request Information Block REQ-SYNCHRONIZE Applicable for a TRANSFER or MOVE action. bypassing the delete of any outputs associated with this element. REQ-BYPASS-DEL-PROC Applicable for a MOVE or TRANSFER action. REQ-IGNGEN-FAIL Applicable for a TRANSFER action. Chapter 3: Using Exit Control Blocks 87 . Values are as follows: Y-The element will be deleted but the delete processor will not be executed. Indicates whether you want to ignore the *FAILED* flag for the element and perform the action. Indicates whether you want CA Endevor SCM to create a sync level at the target when the current level of the element differs from the base level of the FROM location element. N-The delete processor will be executed and the elements and all outputs will be deleted. whether or not the element was previously generated or moved successfully. ■ Value: Y – – ■ Label: BYPASS-DEL-PROC Meaning: Option requested. Values are: ■ Value: Y – – ■ Label: IGNORE-GEN-FAIL Meaning: Option requested. the system defaults to the processor group last used for this element (that is. REQ-RETAIN-SIGNOUT-OPT Applicable for MOVE and TRANSFER actions. The name of the processor group to be used. If you leave this field blank. 88 Exits Guide . REQ-SIGNOUT-USRID Applicable for a SIGNIN action. when the element was last generated). or GENERATE action. The user ID of the user to whom you are signing out or reassigning the element. REQ-SEARCH-OPTION Applicable for GENERATE and RETRIEVE actions. Indicates if CA Endevor SCM is to search the map when building a list. UPDATE. Values are as follows: ■ Value: Y – – ■ Label: RETAIN-SIGNOUT Meaning: Option requested Value: N – – Label: NO-RETAIN-SIGNOUT Meaning: Option not requested. Values are as follows: ■ Value: Y – – ■ Label: SEARCH-ENV-MAP Meaning: Option requested Value: N – – Label: NO-SEARCH-ENV-MAP Meaning: Option not requested. Indicates whether to retain signout at the target location of the action.The Request Information Block REQ-PROCESSOR-GROUP Applicable for an ADD. Values are as follows: ■ Value: Y – – ■ Label: JUMP-IS-OK Meaning: Option requested Value: N – – Label: NO-JUMP-SPECIFIED Meaning: Option not requested REQ-SIGNIN-OPTION Applicable for the MOVE and TRANSFER actions. Chapter 3: Using Exit Control Blocks 89 .The Request Information Block REQ-JUMP-OPTION Applicable for the MOVE action. Possible values are as follows: ■ Value: Y – – ■ Label: SIGNIN-IS-SPECIFIED Meaning: Option requested Value: N – – Label: NO-SIGNIN-SPECIFIED Meaning: Option not requested. Set this field to spaces if you want to clear existing user data. Indicates whether CA Endevor SCM allows you to move elements when a version of the element exists at an intermediary stage that is not on the map. REQ-USER-DATA User data that will be written to the MCF record at the target of action. EXIT 2 can define up to 80 bytes of user data that will be stored in the element record of the MCF. Indicates whether to sign in elements at the target location of the action. Exit 2 programs cannot modify this field. Exit 2 programs cannot modify this field. then REQ-AUTOGEN will be set to REQ-AUTOGEN-NO. If the REQ-AUTOGENX flag is set to REQ-AUTOGENX-YES. Update and Generate actions. all the where-used elements associated with this component will automatically be generated. ■ Value: N ■ ■ Label: REQ-AUTOGENX-NO Meaning: This is not a where-used element that was generated as a result of AUTOGEN on a component element. 90 Exits Guide . If enabled. Acceptable values are: ■ Value: Y ■ ■ Label: REQ-AUTOGENX-YES Meaning: This is a where-used element that was generated as a result of AUTOGEN on a component element. REQ-AUTOGENX Indicates whether this where-used element was generated on behalf of a component element. If the REQ-AUTOGEN flag is set to REQ-AUTOGEN-YES. This option can only be specified in batch requests. then REQ-AUTOGENX will be set to REQ-AUTOGENX-NO. ■ Value: N – – Label: REQ-AUTOGEN-NO Meaning: Do not automatically generate where-used elements. Acceptable values are: ■ Value: Y – – Label: REQ-AUTOGEN-YES Meaning: Automatically generate where-used elements associated with this component.The Request Information Block REQ-AUTOGEN Applicable for the Add. UPDATE. ARCHIVE. MOVE. Value: N – – Label: GEN-SOURCE Meaning: Indicates to fetch the elements source back to the target location. The Assembler Environment Block CA Endevor SCM passes this control block to programs written for exits 2-4. RETRIEVE. each block points to either an Element Master Information block (for environments internal to CA Endevor SCM) or a File block (for environments external to CA Endevor SCM). The second copy contains information describing the target location for the action. The Environment block serves as an anchor to more detailed information. It describes the environment used by the current action request. The second copy is pointed to by the ENVNEXT field in the first copy. and is pointed to by Register 1: 4(R1). Acceptable values are: ■ Value: Y – – ■ Label: GEN-NOSOURCE Meaning: Indicates not to fetch the elements source back to the target location. TRANSFER. and applies for ADD. Two copies of this block are passed to each exit. Chapter 3: Using Exit Control Blocks 91 . Indicates whether to fetch an element’s source back to the target location from up the map or not. Depending on the action. Each copy contains the following information: ■ ■ The first copy contains information describing the source location used by the action. and RESTORE actions.The Assembler Environment Block REQ-GEN-NOSOURCE Applicable for the GENERATE element action. NE 'YES').C1 ELEMENT INFO EXTERNAL . AIF ('&DSCT'.SKPEQU ANOP ENVLEN DC AL2(ENVSIZE) LENGTH OF THE BLOCK ENVVERS DC AL2(ENV$VERS) VERSION OF THE BLOCK ENV$VERS EQU 3 VERSION 3 ENVID DC CL4'$ENV' BLOCK ID ENVFLAG DC H'0' SPECIAL FLAGS ENVSPEC DC CL1' ' TYPE OF ENVIRONMENT BLOCK ENV$C1 EQU C'C' INTERNAL TO CA Endevor SCM-C1 ENV$EXT EQU C'E' EXTERNAL INFORMATION ENV$ARCH ENVIOTY ENV$INP ENV$OUT ENVNEXT ENVFCBA * * ENVSITE ENVSTGID ENVSTGCD ENVDATAC ENVEVER ENVELVL ENVENVM ENVSTAGE ENVSYSTM EQU C'A' CA Endevor SCM-C1 ARCHIVE ELEM DC CL1' ' I/O TYPE FOR BLOCK EQU C'I' INPUT (SOURCE LOCATION) EQU C'O' OUTPUT (TARGET LOCATION) DC F'0' ADDRESS OF TARGET $ENVDS BLOCK DC A(0) ADDRESS OF THE FILE INFORMATION INTERNAL .The Assembler Environment Block $ENVDS DSECT Sample The $ENVDS DSECT control block is shown here: MACRO &NAME.SKPDSCT $ENVDS DSECT AGO . DATA CHANGED SINCE XIT2 (Y/N) VERSION OF THE ELEMENT LEVEL OF THE ELEMENT ENVIRONMENT NAME STAGE NAME SYSTEM NAME ' ' ' 92 Exits Guide .SKPEQU .FILE INFO DC DC DC DC DC DC DC DC DC CL1' CL1' CL1' CL1' H'0' H'0' CL8' CL8' CL8' ' ' ' ' CURRENT SITE NAME STAGE ID ('1' OR '2') STAGE CODE (FROM C1DEFLTS) EXIT3.SKPDSCT ANOP $ENVDS DS 0D . $ENVDS &DSCT=YES. ENVID Identifies this as an Environment block. Use the ENV$VERS label to verify that the correct version of this DSECT was passed to your exit. in bytes.ELM TYPE RECORD ELEMENT NAME . Unless otherwise noted.The Assembler Environment Block ENVSYSUD ENVSYSCC DC ENVSUBSY ENVSUBUD ENVTYPE ENVTYPUD ENVELEMT DC DC * * * * * DC CL8' ' DC CL1' ' CL7' ' DC CL8' ' DC CL8' ' DC CL8' ' DC CL8' ' DC CL10' ' CL8' ' 19F'0' USER DATA . Chapter 3: Using Exit Control Blocks 93 . ENVLEN Size of the Environment block ($ENVDS).1ST 10 CHARS RESERVED RESERVED OFFSET (FROM BEGINNING OF ENVDS) TO THE ELEMENT NAME AREA. ENVVERS Version number to identify the Environment block ($ENVDS). ENVFLAG Not used. This should always be 3. exit programs cannot modify these fields. FIRST 2 BYTES IN AREA = THE LENGTH OF THE NAME. Value is always "$ENV". THIS IS THEN FOLLOWED BY THE NAME. ELEMENT AREA OFFSET RESERVED AREA BUFFER SPACE LENGTH OF THE $ENVDS BLOCK ENVEAOFF DC H'0' DC H'0' ENVBFAREA DS XL257 ENVSIZE EQU *-$ENVDS MEND $ENVDS DSECT Field Descriptions The following list contains brief descriptions of the fields in the $ENVDS DSECT.SUBSYSTEM RECORD TYPE NAME USER DATA .SYSTEM RECORD SYSTEM CCID VALIDATION (Y/N) RESERVED SUBSYSTEM NAME USER DATA . If ENVSPEC is E. ENVIOTY Indicates whether this block describes a source (from) or target (to) location. ENVSITE CA Endevor SCM site ID. ENVFCBA points to a File block ■ Value: A – – Label: ENV$ARCH Meaning: The location is defined to CA Endevor SCM. ENVFCBA Address of the Element Master Information block ($ELMDS) or File block ($FILDS) pointed to by this Environment block. If ENVSPEC is C. ENVSTGID Stage number for the current action request: 1 or 2. 94 Exits Guide . When RESTORE or TRANSFER actions are initiated from an Archive or Unload file. ENVFCBA points to an Element Master Information block Value: E – – Label: ENV$EXT Meaning: The location is not defined to CA Endevor SCM. as defined to the Defaults Table. Meaning: First environment block for source Value: O – – ENV$OUT.The Assembler Environment Block ENVSPEC Indicates whether the location is defined to CA Endevor SCM. Values are: ■ Value: C – – ■ Label: EVNV$C1. Address of the second (target location) $ENVDS block. Meaning: The location is defined to CA Endevor SCM. this field points to the $ELMDS. ENVFCBA points to an Element Master Information block. Meaning: Second environment block for target ENVNEXT Applicable for the first $ENVDS block. this field points to the $FILDS. Values are: ■ Value: I – – ■ Label: ENV$INP. ENVEVER Version number associated in the MCF with the element. Applicable if the value in the ENVSPEC field is C. Applicable if the value in the ENVSPEC field is C. Applicable if the value in the ENVSPEC field is C. ENVSTAGE Stage name for the current action request.The Assembler Environment Block ENVSTGCD Stage ID for the current action request. ENVSUBUD Not used. Chapter 3: Using Exit Control Blocks 95 . N means no source change took place. Applicable if the value in the ENVSPEC field is C. ENVDATAC Indicates whether source management found that the data had changed. Applicable if the value in the ENVSPEC field is C. ENVSUBSY Subsystem name for the current action request. Applicable if the value in the ENVSPEC field is C. Applicable if the value in the ENVSPEC field is C. ENVSYSTM System name for the current action request. Y means change took place. ENVSYSCC Indicates whether system has CCID validation turned on. and is only in the target (second) copy of $ENVDS. N-System does not have CCID validation turned on. ENVENVM Environment name for the current action request. ENVSYSUD Not used. This field is valid only for Exit 3. ENVELVL Current level of the element. ENVTYPE Element type for the current action request. Values are: Y-System has CCID validation turned on. RETRIEVE. The element name area is composed of 2 parts. It describes the environment used by the current action request. The Environment block serves as an anchor to more detailed information. and RESTORE actions. Each copy contains the following information: ■ ■ The copy SRC-ENVIRONMENT-BLOCK contains information describing the source location used by the action. ENVELEMT First 10 characters of the element name specified for the current action request. The COBOL Environment Block CA Endevor SCM passes this control block to programs written for exits 2-4. The copy TGT-ENVIRONMENT-BLOCK contains information describing the target location for the action and applies for ADD.The COBOL Environment Block ENVTYPUD Not used. ARCHIVE. This points to the element name area. contains the element name area ENVSIZE Size of the $ENVDS DSECT. MOVE. This area is contained within ENBFAREA. Depending on the action. each block points to either an Element Master Information block (for environments internal to CA Endevor SCM) or a File block (for environments external to CA Endevor SCM). This copy is pointed to by the SRC-ENV-NEXT-ENV-POINTER field in the first copy. Two copies of this block are passed to each exit. a 2 byte length field followed by the element name field. ENBFAREA Area Buffer. The length value field contains the binary length of the element name. 96 Exits Guide . ENVEAOFF Offset from the beginning of the block. UPDATE. TRANSFER. 88 SRC-EXTERNAL-ENV-BLOCK VALUE 'E'. 05 SRC-ENV-TYPE-OF-BLOCK PIC X. 05 SRC-ENV-FILE-POINTER PIC 9(8) COMP SYNC. 05 SRC-ENV-IO-TYPE PIC X. 05 SRC-ENV-FLAGS PIC 9(4) COMP SYNC. 05 SRC-ENV-STAGE-CODE PIC X. 88 SRC-STAGE-ONE VALUE '1'. 88 SRC-SOURCE-LOCATION VALUE 'I'. 88 SRC-ARCHIVE-FILE VALUE 'A'. 05 SRC-ENV-LENGTH PIC 9(4) COMP SYNC. 05 FILLER PIC X.The COBOL Environment Block XXX-ENVIRONMENT-BLOCK Layout Sample The following is a sample XXX-ENVIRONMENT-BLOCK control block: 01 SRC-ENVIRONMENT-BLOCK. 88 SRC-TARGET-LOCATION VALUE 'O'. 05 SRC-ENV-BLOCK-ID PIC X(4). 05 SRC-ENV-STAGE-ID PIC X. 05 SRC-ENV-CURRENT-VERSION PIC 9(4) COMP SYNC. 88 SRC-INTERNAL-C1-BLOCK VALUE 'C'. 88 SRC-STAGE-TWO VALUE '2'. 05 SRC-ENV-NEXT-ENV-POINTER PIC 9(8) COMP SYNC. Chapter 3: Using Exit Control Blocks 97 . 05 SRC-ENV-SITE-NAME PIC X. 88 SRC-SYSTEM-VALIDATE VALUE 'Y'. 88 TGT-STAGE-TWO VALUE '2'. 05 SRC-ENV-ELEMENT-NAME PIC X(10). 98 Exits Guide . 05 SRC-ENV-AREA-BUFFER PIC X(257). 05 TGT-ENV-ENVIRONMENT-NAME PIC X(8). 05 SRC-ENV-TYPE-NAME PIC X(8). 05 SRC-ENV-SUBSYSTEM-DATA PIC X(8). 05 SRC-ENV-ELEMENT-AREA-OFFSET PIC 9(4) COMP SYNC. 88 TGT-SOURCE-CHANGES VALUE 'Y'. 05 TGT-ENV-FILE-POINTER PIC 9(8) COMP SYNC. 88 TGT-TARGET-LOCATION VALUE 'O'. 05 TGT-ENV-SYSTEM-CCID-VALDT PIC X(8). 05 SRC-ENV-SYSTEM-NAME PIC X(8). 05 TGT-ENV-ELEMENT-VERSION PIC 9(4) COMP SYNC. 88 TGT-STAGE-ONE VALUE '1'. 05 SRC-ENV-SYSTEM-DATA PIC X(8). 05 TGT-ENV-TYPE-OF-BLOCK PIC X. 05 SRC-ENV-ENVIRONMENT-NAME PIC X(8). 05 SRC-ENV-ELEMENT-LEVEL PIC 9(4) COMP SYNC. 05 TGT-ENV-SITE-NAME PIC X. 05 TGT-ENV-ELEMENT-CHANGES PIC X. 01 TGT-ENVIRONMENT-BLOCK. 05 TGT-ENV-SYSTEM-DATA PIC X(8). 05 TGT-ENV-ELEMENT-LEVEL PIC 9(4) COMP SYNC. 05 FILLER PIC 9(4) COMP SYNC. 88 TGT-EXTERNAL-ENV-BLOCK VALUE 'E'.The COBOL Environment Block 05 SRC-ENV-ELEMENT-VERSION PIC 9(4) COMP SYNC. 05 TGT-ENV-IO-TYPE PIC X. 88 TGT-INTERNAL-C1-BLOCK VALUE 'C'. 05 TGT-ENV-NEXT-ENV-POINTER PIC 9(8) COMP SYNC. 88 SRC-SYSTEM-NO-VALIDATE VALUE 'N'. 88 TGT-ARCHIVE-FILE VALUE 'A'. 05 SRC-ENV-SYSTEM-CCID-VALDT PIC X(1). 88 TGT-NO-SOURCE-CHANGES VALUE 'N'. 05 SRC-ENV-STAGE-NAME PIC X(8). 05 TGT-ENV-BLOCK-ID PIC X(4). 05 FILLER PIC 9(8) COMP SYNC OCCURS 19 TIMES. 05 SRC-ENV-TYPE-DATA PIC X(8). 05 TGT-ENV-LENGTH PIC 9(4) COMP SYNC. 05 TGT-ENV-SYSTEM-NAME PIC X(8). 05 SRC-ENV-SUBSYSTEM-NAME PIC X(8). 05 FILLER PIC X(8). 88 TGT-SOURCE-LOCATION VALUE 'I'. 05 FILLER PIC X(7). 05 TGT-ENV-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 TGT-ENV-STAGE-NAME PIC X(8). 05 TGT-ENV-STAGE-CODE PIC X. 05 TGT-ENV-STAGE-ID PIC X. 05 TGT-ENV-FLAGS PIC 9(4) COMP SYNC. SRC-ENV-LENGTH Size of the Environment block (SRC-ENVIRONMENT-BLOCK). 05 TGT-ENV-AREA-BUFFER PIC X(257). in bytes. 05 FILLER PIC 9(8) COMP SYNC OCCURS 19 TIMES. SRC-ENV-CURRENT-VERSION Version number to identify the Environment block (SRC-ENVIRONMENT-BLOCK). 05 TGT-ENV-TYPE-NAME PIC X(8). 05 FILLER PIC X(8).The COBOL Environment Block 88 TGT-SYSTEM-VALIDATE VALUE 'Y'. This should always be 3. * SRC-ENVIRONMENT-BLOCK Field Descriptions The following list contains brief descriptions of the fields in the SRC-ENVIRONMENT-BLOCK control block layout. SRC-EVN-BLOCK-ID Identifies this as an Environment block. SRC-ENV-FLAGS Not used. 05 TGT-ENV-SUBSYSTEM-NAME PIC X(8). 05 TGT-ENV-TYPE-DATA PIC X(8). 05 TGT-ENV-ELEMENT-AREA-OFFSET PIC 9(4) COMP SYNC. 05 FILLER PIC X(7). Value is always "$ENV". Chapter 3: Using Exit Control Blocks 99 . 88 TGT-SYSTEM-NO-VALIDATE VALUE 'N'. 05 TGT-ENV-ELEMENT-NAME PIC X(10). Unless otherwise noted. 05 TGT-ENV-SUBSYSTEM-DATA PIC X(8). exit programs cannot modify these fields. 05 FILLER PIC 9(4) COMP SYNC. SRC-ENV-SITE-NAME CA Endevor SCM site ID.The COBOL Environment Block SRC-ENV-TYPE-OF-BLOCK Indicates whether the location is defined to CA Endevor SCM. this field points to the SRC-ELEMENT-MASTER-INFO-BLOCK. this field points to the SRC-FILE-CONTROL-BLOCK. SRC-ENV Address of the Element Master Information block (SRC-ELEMENT-MASTER-INFO-BLOCK) or File block (SRC-FILE-CONTROL-BLOCK) pointed to by this Environment block. SRC-ENV-FILE-POINTER points to an Element Master Information block. ■ Value: E – – Label: SRC-EXTERNAL-ENV-BLOCK Meaning: The location is not defined to CA Endevor SCM SRC-ENV-FILE-POINTER points to a File block ■ Value: A – – Label: SRC-ARCHIVE-FILE Meaning: The location is defined to CA Endevor SCM. Address of the second (target location) TGT-ENVIRONMENT-BLOCK block. 100 Exits Guide . If SRC-ENV-TYPE-OF-BLOCK is E. SRC-ENV-IO-TYPE Indicates whether this block describes a source (from) or target (to) location. as defined to the Defaults Table. If SRC-ENV-TYPE-OF-BLOCK is C. Values are: ■ Value: I – – ■ Label: SRC-SOURCE-LOCATION Meaning: Block describes an input or source/from location Value: O – – Label: SRC-TARGET-LOCATION Meaning: Block describes an output or target/to location SRC-ENV-NEXT-ENV-POINTER Applicable for the first SRC-ENVIRONMENT-BLOCK block. Values are: ■ Value: C – – Label: SRC-INTERNAL-C1-BLOCK Meaning: The location is defined to CA Endevor SCM SRC-ENV-FILE-POINTER points to an Element Master Information block. Value: N – – Label: SRC-SYSTEM-NO-VALIDATE Meaning: System does not have CCID validation turned on.The COBOL Environment Block SRC-ENV-STAGE-ID Stage number for the current action request: 1 or 2. SRC-ENV-ENVIRONMENT-NAME Environment name for the current action request. Values are: ■ Value: Y – – ■ Label: SRC-SYSTEM-VALIDATE Meaning: System has CCID validation turned on. Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. SRC-ENV-SYSTEM-DATA Not used. Chapter 3: Using Exit Control Blocks 101 . Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. FILLER Not used SRC-ENV-ELEMENT-VERSION Version number associated in the MCF with the element. Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. ■ ■ 1-SRC-STAGE-ONE 2-SRC-STAGE-TWO SRC-ENV-STAGE-CODE Stage ID for the current action request. SRC-ENV-SYS-CCID-VALDT Indicates if system has CCID validation turned on. SRC-ENV-ELEMENT-LEVEL Current level of the element. SRC-ENV-SYSTEM-NAME System name for the current action request. Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. SRC-ENV-STAGE-NAME Stage name for the current action request. Applicable if the value in the ENVSPEC field is C. TGT-ENVIRONMENT-BLOCK Field Descriptions The following list contains brief descriptions of the fields in the TGT-ENVIRONMENT-BLOCK control block layout. SRC-ENV-ELEMENT-AREA-OFFSET Binary offset value from the beginning of the block which points to the actions element name area. followed by the element name. The length field contains the actual length of the element name which immediately. in bytes. SRC-ENV-ELEMENT-NAME First 10 characters of the element name specified for the current action request. Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. SRC-ENV-ELEMENT-NAME-OFFSET Binary offset value from the beginning of the block which points to the actions element name area. The element name area is made up of 2 parts.The COBOL Environment Block SRC-ENV-SUBSYSTEM-NAME Subsystem name for the current action request. The element name area is made up of 2 parts. a 2 byte binary length field. TGT-ENV-CURRENT-VERSION Version number to identify the Environment block (TGT-ENVIRONMENT-BLOCK). The length field contains the actual length of the element name which immediately follows. Unless otherwise noted. SRC-ENV-TYPE-DATA Not used. SRC-ENV-SUBSYSTEM-DATA Not used. followed by the element name. a 2 byte binary length field. Applicable if the value in the SRC-ENV-TYPE-OF-BLOCK field is C. TGT-ENV-LENGTH Size of the Environment block (TGT-ENVIRONMENT-BLOCK). exit programs cannot modify these fields. SRC-ENV-AREA-BUFFER Area buffer space which contains the element name area. 102 Exits Guide . This should always be 3. SRC-ENV-TYPE-NAME Element type for the current action request. TGT-ENV-TYPE-OF-BLOCK Indicates whether the location is defined to CA Endevor SCM. Applicable for the first TGT-ENVIRONMENT-BLOCK block. Chapter 3: Using Exit Control Blocks 103 . Values are: ■ Value: I – – ■ Label: TGT-SOURCE-LOCATION Meaning: Block describes an input source/from location Value: O – – Label: TGT-TARGET-LOCATION Meaning: Block describes an output target/to location TGT-ENV-NEXT-ENV-POINTER. TGT-ENV-FLAGS Not used. Value is always "$ENV". Values are: ■ Value: C – – Label: TGT-INTERNAL-C1-BLOCK Meaning: The location is defined to CA Endevor SCM TGT-ENV-FILE-POINTER points to an Element Master Information block ■ Value: E – – Label: TGT-EXTERNAL-ENV-BLOCK Meaning: The location is not defined to CA Endevor SCM. TGT-ENV-FILE-POINTER points to a File block ■ Value: A – – Label: TGT-ARCHIVE-FILE Meaning: The location is defined to CA Endevor SCM TGT-ENV-FILE-POINTER points to an Element Master Information block TGT-ENV-IO-TYPE Indicates whether this block describes a source (from) or target (to) location.The COBOL Environment Block TGT-ENV-BLOCK-ID Identifies this as an Environment block. This field is valid only for Exit 3. this field points to the TGT-FILE-CONTROL-BLOCK. this field points to the TGT-ELEMENT-MASTER-INFO-BLOCK. TGT-ENV-ELEMENT-LEVEL Current level of the element. TGT-ENV-SYSTEM-NAME System name for the current action request. TGT-ENV-SYSTEM-DATA Not used. 104 Exits Guide . TGT-ENV-STAGE-ID Stage number for the current action request: 1 or 2 ■ ■ 1-TGT-STAGE-ONE 2-TGT-STAGE-TWO TGT-ENV-ELEMENT-CHANGES Indicates whether source management found that the data had changed. Applicable if the value in the ENVSPEC field is C. TGT-ENV-STAGE-NAME Stage name for the current action request. as defined to the Defaults Table. If TGT-ENV-TYPE-OF-BLOCK is E. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. TGT-ENV-ENVIRONMENT-NAME Environment name for the current action request. ■ ■ 1-TGT-SOURCE-CHANGES 2-TGT-NO-SOURCE-CHANGES TGT-ENV-ELEMENT-VERSION Version number associated in the MCF with the element. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. N means no source change took place.The COBOL Environment Block TGT-ENV-FILE-POINTER Address of the Element Master Information block (TGT-ELEMENT-MASTER-INFO-BLOCK) or File block (TGT-FILE-CONTROL-BLOCK) pointed to by this Environment block. TGT-ENV-SITE-NAME CA Endevor SCM site ID. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. and is only in the TGT-ENVIRONMENT-BLOCK block. If TGT-ENV-TYPE-OF-BLOCK is C. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. TGT-ENV-SUBSYSTEM-DATA Not used. Value: N – – Label: TGT-SYSTEM-NO-VALIDATE Meaning: System does not have CCID validation turned on. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. The element name area is made up of 2 parts. TGT-ENV-ELEMENT-NAME-AREA-OFFSET Binary offset value from the beginning of the block which points to the action element name area. TGT-ENV-TYPE-NAME Element type for the current action request. followed by the element name. TGT-ENV-ELEMENT-NAME First 10 characters of the element name specified for the current action request.The COBOL Environment Block TGT-ENV-SYSTEM-CCID-VALDT Indicates if system has CCID validation turned on. TGT-ENV-AREA-BUFFER Area buffer space which contains the element name area. Applicable if the value in the TGT-ENV-TYPE-OF-BLOCK field is C. Values are: ■ Value: Y – – ■ Label: TGT-SYSTEM-VALIDATE Meaning: System has CCID validation turned on. TGT-ENV-SUBSYSTEM-NAME Subsystem name for the current action request. a 2 byte binary length field. TGT-ENV-TYPE-DATA Not used. The length field contains the actual length of the element name which immediately follows. Chapter 3: Using Exit Control Blocks 105 . Note: On a Transfer action.The Assembler Element Master Information Block The Assembler Element Master Information Block CA Endevor SCM passes this block to programs written for exits 2-4. NE 'YES').HIGH DETLA ELEMENT NAME USER'S CHANGE CONTROL NUMBER BASE LEVEL (PROD=0. this control block is not filled out if the element does not exist at the target. which describes a location internal to CA Endevor SCM (field ENVFCBA).SKPDSCT $ELMDS DSECT AGO .SKPDSCT ANOP $ELMDS DS 0F .BLOCK FOR ELEMENT INFORMATION * * * ********************************************************************************* ********************* ELMLEN DC AL2(ELMSIZE) LENGTH OF THE BLOCK ELMVERS DC AL2(ELM$VERS) VERSION OF THE BLOCK ELM$VERS EQU 6 VERSION 6 ELMID DC CL4'$ELM' BLOCK ID ELMFLAGS DC ELMMVERS DS ELMMLLVL DS ELMMINS DS ELMMDEL DS ELMNAME DS ELMCCID DS ELMM1STL DS F'0' H H F F CL10 CL12 H FLAGS ELEMENT VERSION ELEMENT LEVEL NUMBER NUMBER OF INSERTS . It is pointed to by the Environment block.HIGH DELTA NUMBER OF DELETES . It describes the element specified by the current action request.STAGE=PROD LL) 106 Exits Guide .SKPEQU ANOP ********************************************************************************* ********************* * * * $ELMDS . $ELMDS &DSCT=YES.SKPEQU . $ELMDS DSECT Sample The following is a sample $ELMDS DSECT control block: MACRO &NAME. AIF ('&DSCT'. DSN ELMFMBR DS CL10 ADDED/UPDATED/RESTORE FROM .LAST COMMENT * * LAST CHANGE INFORMATION * ELMCCOM DS CL40 LEVEL COMMENT ELMMLDTE DS CL6 LEVEL DATE (YYMMDD) ELMMLTME DS CL4 LEVEL TIME (HHMM) ELMLUSID DS CL8 LEVEL USER ID ELMMLACT DS CL8 LAST ACTION ELMMLTOT DS F LAST LEVEL TOTAL * Chapter 3: Using Exit Control Blocks 107 .The Assembler Element Master Information Block * * BASE INFORMATION * ELMMBTOT DS F ELMMBDTE DS CL6 ELMMBTIM DS CL4 ELMBCOM DS CL40 ELMBUSID DS CL8 * BASE # STATEMENTS BASE DATE (YYMMDD) BASE TIME (HHMM) BASE COMMENT BASE USER ID * ADD/UPDATE/GEN INFORMATION * ELMPUSID DS CL8 GENERATE USER ID ELMPDSTP DS CL6 GENERATE DATE (YYMMDD) ELMPTSTP DS CL4 GENERATE TIME (HHMM) ELMFDSN DS CL44 ADDED/UPDATED/RESTORED FROM .MEMBER * * PROCESS * ELMPRFLG DS ELMPRONX EQU ELMPROFL EQU ELMPROGN EQU ELMPROMV EQU ELMPRODL EQU ELMPROUN EQU INFORMATION BL1 PROCESSOR FLAG B'00000000' NO PROCESSOR EXECUTED B'10000000' PROCESSOR FAILED B'01000000' LAST PROCESSOR WAS GENERATE B'00100000' LAST PROCESSOR WAS MOVE B'00010000' LAST PROCESSOR WAS DELETE B'00001000' RESTORE PROCESS NOT SPECIFIED DS CL3 ** RESERVED ** ELMLPROD DS CL6 PROCESSOR LAST DATE ELMLPROT DS CL4 PROCESSOR LAST TIME ELMLPROU DS CL8 PROCESSOR USER ID ELMLPRON DS CL10 PROCESSOR NAME ELMMPRC DS H PROCESSOR RETURN CODE ELMMRC DS H PROCESSOR C1 RETURN CODE ELMMPRSA EQU B'00100000' PROCESSOR HAD A SYSTEM ABEND ELMMPRUA EQU B'00010000' PROCESSOR HAD A USER ABEND ELMPCOM DS CL40 PROCESSOR . TO DSN ELMTMBR DS CL10 RETRIEVE .5 FIELDS * ELMRCCID DS CL12 RETRIEVE CCID ELMGCCID DS CL12 GENERATE CCID * * THE FOLLOWING LAST ACTION FIELDS CONTAIN INFORMATION * ASSOCIATED WITH THE LAST ELEMENT-MODIFYING ACTION * ELMODACT DS CL8 LAST ELEMENT-MODIFYING ACTION ELMLCCID DS CL12 LAST ACTION CCID ELMLCOMM DS CL40 LAST ACTION COMMENT ELMLUID DS CL8 LAST ACTION USER ELMLADT DS CL6 LAST ACTION DATE ELMLATM DS CL4 LAST ACTION TIME * ELMSOID DS CL8 SIGNOUT ID * * THE FOLLOWING FROM CA Endevor SCM LOCATION FIELDS CONTAIN * INFORMATION ASSOCIATED WITH THE LAST MOVE.The Assembler Element Master Information Block * MOVE INFORMATION * * (NOTE: THE FOLLOWING THREE FIELDS ARE VALID ONLY FOR * RELEASES OF CA Endevor SCM/MVS PRIOR TO 3.5) * ELMMVDTE DS CL6 MOVE DATE (STAGE II ONLY) ELMMVTIM DS CL4 MOVE TIME (STAGE II ONLY) ELMMUSID DS CL8 MOVE .USER ID * * RETRIEVE INFORMATION * ELMRDSTP DS CL6 RETRIEVE DATE (YYMMDD) ELMRTSTP DS CL4 RETRIEVE TIME (HHMM) ELMRIID DS CL8 RETRIEVE USER ID ELMRCOM DS CL40 RETRIEVE COMMENT ELMTDSN DS CL44 RETRIEVE . TRANSFER * OR RESTORE ACTION * 108 Exits Guide .TO MEM DS CL30 ** RESERVED ** * * NEW 3. The Assembler Element Master Information Block ELFRFLAG DS ELFR$VAL EQU ELFRACT DS ELFRUSID DS ELFRDATE DS ELFRTIME DS ELFRSITE DS ELFRENV DS ELFRSYS DS ELFRSBS DS ELFRELM DS ELFRTYPE DS ELFRSTG# DS ELFRVER DS ELFRLVL DS * * ADDITIONAL * ELMUPDT DS ELMBASE DS ELMLOWL DS ELMIPCTG DS ELMDPCTG DS ELMFPESD DS ELMEDFMT DS ELMENPAK DS ELMLPROV DS ELMPROL DS X X'80' CL8 CL8 CL6 CL4 CL1 CL8 CL8 CL8 CL10 CL8 CL1 H H FROM CA Endevor SCM LOCATION FLAG FIELD FIELDS CONTAIN INFORMATION ACTION NAME USERID ASSOCIATED WITH ACTION DATE ASSOCIATED WITH ACTION TIME ASSOCIATED WITH ACTION FROM CA Endevor SCM LOCATION SITE FROM CA Endevor SCM LOCATION ENVIRONMENT FROM CA Endevor SCM LOCATION SYSTYEM FROM CA Endevor SCM LOCATION SUBSYSTEM FROM CA Endevor SCM LOCATION ELEMENT FROM CA Endevor SCM LOCATION TYPE FROM CA Endevor SCM LOCATION STAGE NBR FROM CA Endevor SCM LOCATION VERSION FROM CA Endevor SCM LOCATION LEVEL ELEMENT FIELDS WHICH WERE ADDED FOR E/MVS 3.1 FORMAT ID RELEASE 2.6 FOLLOW CL10 CL10 CL2 XL1 XL1 CL8 CL1 CL1 XL1 XL1 UPDATE NAME BASE NAME LOWER LEVEL (STAGE) REACHED LEVEL PERCENT OF PREV INSERTS DELETED PERCENT OF PREV DELETES RE-INSERTED ESD NAME FOOTPRINTED (IF OBJECT) ELEMENT DELTA FORMAT Y=ELE BASE NOT PACKED LAST PROCESSOR VERSION NUMBER LAST PROCESSOR LEVEL NUMBER RECORD FORMAT ID RELEASE 2.6 FORMAT ID CURRENT RECORD FORMAT ID CONFIGURATION DELTA MEMBER NAME CONFIGURATION DELTA VERSION NUMBER CONFIGURATION BASE TOTAL CONFIGURATION LAST LEVEL TOTAL CONFIGURATION BASE LEVEL NUMBER CONFIGURATION LAST LEVEL NUMBER ELMFMID DS XL1 ELMV2R1 EQU 21 ELMV2R5 EQU 25 ELMV3R5 EQU 35 ELMV3R6 EQU 36 ELMCFMID EQU 36 ELMXDNAM DS CL8 ELMXBVER DS H ELMXBTOT DS F ELMXLTOT DS F ELMXBLVL DS H ELMXLLVL DS H Chapter 3: Using Exit Control Blocks 109 .5 FORMAT ID RELEASE 3.5 FORMAT ID RELEASE 3. DATA IN PATH AREA D = DSN. * FIRST 2 BYTES IN AREA = THE LENGTH OF THE NAME. CONFIGURATION BUILT BY COPY/RESTORE CONFIGURATION DELTA FORMAT Y = COMP BASE IN DELTA LIB LAST PROCESSED PACKAGE ID TIMESTAMP ASSOC WITH PACKAGE PACKAGE ASSOC WITH ELEMENT OUTPUTS TIMESTAMP ASSOC WITH PACKAGE PROCESSOR GROUP NAME ELEMENT LOCKED TO PACKAGE TIMESTAMP ASSOC WITH PACKAGE "FROM" FLAG FILE TYPE NO "FROM" D/S INFO P = PATH. DATA IN ELMTDSN/ELMTMBR ELMCPKGT DS ELMFFFLG DS ELMFFNONE EQU ELMFFPATH EQU ELMFFDSN EQU ELMTFFLG DS ELMTFNONE EQU ELMTFPATH EQU ELMTFDSN EQU * * OFFSET (FROM BEGINNING OF ELMDS) TO THE PATH AND FILE NAME AREAS. * ELMFPAOFF DS H "FROM" PATH AREA OFFSET ELMFNAOFF DS H "FROM" FILE NAME AREA OFFSET ELMTPAOFF DS H "TO" PATH AREA OFFSET ELMTNAOFF DS H "TO" FILE NAME AREA OFFSET * * OFFSET (FROM BEGINNING OF ELMDS) TO THE ELEMENT NAME AREA. * 110 Exits Guide .. * FIRST 2 BYTES IN AREA = THE LENGTH OF THE NAME. THIS IS THEN * FOLLOWED BY THE NAME. DATA IN ELMFDSN/ELMFMBR "TO" FLAG FILE TYPE NO "TO" D/S INFO P = PATH. DATA IN PATH AREA D = DSN.. THIS IS THEN * FOLLOWED BY THE NAME.The Assembler Element Master Information Block ELMXINS DS H ELMXDLS DS H ELMXRGIN DS H ELMXRGDL DS H ELMXBDTE DS CL6 ELMXBTIM DS CL4 ELMXLDTE DS CL6 ELMXLTIM DS CL4 ELMXFLAG DS XL1 ELMX$MON EQU X'80' ELMX$CPY EQU X'40' ELMXDFMT DS CL1 ELMXUPDT DS CL1 ELMSPKG DS ELMSPKGT DS ELMOPKG DS ELMOPKGT DS ELMPRGRP DS ELMCPKG DS CL16 FL8 CL16 FL8 CL8 CL16 FL8 CL1 C' ' C'P' C'D' CL1 C' ' C'P' C'D' INSERTS AT LAST LEVEL DELETES AT LAST LEVEL CONFIGURATION REGRESSION INSERT PCT CONFIGURATION REGRESSION DELS PCT CONFIGURATION BASE DATE (YYMMDD) CONFIGURATION BASE TIME (HHMM) CONFIGURATION LAST LVL DATE (YYMMDD) CONFIGURATION LAST LVL TIME (HHMM) CONFIGURATION COMPONENT STAT FLAG CONFIGURATION BUILT BY MONITOR=. in bytes. Chapter 3: Using Exit Control Blocks 111 . This field has the same value as the ENVEVER field in the Environment block. This field has the same value as the ENVELVL field in the Environment block. ELMMVERS Version number of the element specified in the action request. Use the ELM$VERS label to verify that the correct version of this DSECT was passed to your exit. ELMMLLVL The current (highest) level of the element. ELMID Identifies this as the Element Master Information block. ELMVERS Version number to identify the Element Master Information block ($ELMDS). ELMMDEL Count of statements deleted from the element source by the last action that invoked source management.The Assembler Element Master Information Block ELMEAOFF ELMBVERS ELMXLVER ELMNOSRC DS H ELEMENT AREA OFFSET DS H ELEMENT BASE VERSION NUMBER DS H ELEMENT COMPONENT LAST VERSION NBR DS CL1 Y . ELMLEN Size of the Element Master Information block ($ELMDS). None of these fields are modifiable by exits. ELMFLAGS Not used. ELMMINS Count of statements added to the element source by the last action that invoked source management. This should always be 6.SOURCE-LESS ELEMENT DS CL27 ** RESERVED ** ELMBFAREA DS XL2320 AREA BUFFER SPACE ELMUSR DS XL80 ELEMENT USER DATA DS XL40 ** RESERVED ** ELMSIZE EQU *-$ELMDS LENGTH OF THE $ELMDS BLOCK MEND $ELMDS DSECT Field Descriptions The following contains brief descriptions of the fields in the $ELMDS DSECT. Value is always "$ELM". 112 Exits Guide . ELMBUSID Base user ID for the element. ELMFMBR Name of the member from which the element was last added.The Assembler Element Master Information Block ELMNAME Name of the MCF element name. See also ELMEAOFF. ELMCCID Last-specified CCID for the element. Applicable if the source data set was a library. Element names longer than 10. ELMBCOM Base comment for the element. ELMPTSTP Generate processor time for the element. The actual name will be placed in the buffer area. ELMPDSTP Generate processor date for the element. or restored. updated. ELMMBTOT Count of source statements in the base level of the element in the current stage. blank otherwise. or restored. updated. ELMMBDTE Base date for the element. ELMM1STL The base level of the element. or names containing special characters or mixed case characters will have a generated MCF element name. ELMMBTIM Base time for the element. ELMFDSN Name of the data set from which the element was last added. ELMPUSID Generate processor user ID for the element. Therefore. Values are: ■ Value: X'00' – – ■ Label: ELMPRONX Meaning: No processor has been run yet for the element Value: X'80' – – Label: ELMPROFL Meaning: The last processor failed ■ Value: X'40' – – Label: ELMPROGN Meaning: The last processor was a generate processor ■ Value: X'20' – – Label: ELMPROMV Meaning: The last processor was a move processor ■ Value: X'10' – – Label: ELMPRODL Meaning: The last processor was a delete processor ■ Value: X'08' – – Label: ELMPROUN Meaning: The element has been restored but not yet processed. ELMLPROU Processor user ID for the element. ELMLPRON (Element) name of the processor last run for the element. Chapter 3: Using Exit Control Blocks 113 .The Assembler Element Master Information Block ELMPRFLG Flag used to describe the last processor run for the element (and related information). ELMLPROT Processor time for the element. processor statistics are unchanged from the archived statistics for the element ELMLPROD Processor date for the element. This field may reference a delete processor (in the case where a delete processor was the last processor run for the current action). ELMMLTOT Count of source statements for the element. ELMCCOM Current-level comment for the element. PRINT. ELMLUSID Current-level user ID for the element. ELMMVTIM Time the element was last moved. ELMPCOM Generate processor comment for the element. Meaning: Processor had a system abend Value: X'20' – – Label: ELMMPRUS Meaning: Processor had a user abend ELMMPRSA Not used. ELMMLTME Current-level time for the element. each action is recorded as the last action--except ARCHIVE. ELMMPRUA Not used. and DISPLAY. Values are: ■ Value: X'10' – – ■ Label: ELMMPRSA. as of the current level.The Assembler Element Master Information Block ELMMPRC Processor return code for the element. ELMMLACT Most recent action executed for the element. LIST. ELMMRC CA Endevor SCM return code for the element. 114 Exits Guide . ELMMVDTE Date the element was last moved. Once executed. ELMMLDTE Current-level date for the element. ELMLCOMM Comment associated with the last action that modified the element. ELMRIID User ID associated with the last retrieve of the element. ELMLUID User ID of the user who performed the last action that modified an element. Chapter 3: Using Exit Control Blocks 115 . an ADD or UPDATE would modify an element. ELMRCCID CCID associated with the last retrieve of the element. ELMRTSTP Time the element was last retrieved. ELMTMBR Name of the member to which the element was last retrieved. A RETRIEVE would not. ELMRDSTP Date the element was last retrieved. ELMTDSN Name of the data set to which the element was last retrieved. ELMRCOM Comment associated with the last retrieve of the element. ELMODACT Last action that modified the element.The Assembler Element Master Information Block ELMMUSID User ID associated with the last move of the element. ELMLATM Time when the last modifying action was performed. For example. blank otherwise. ELMGCCID CCID associated with the last generate of the element. ELMLADT Date of last action that modified the element. ELMLCCID CCID associated with the last action that modified the element. Applicable if the target data set for the last retrieve request was a library. ELFRSYS The system of the last MOVE. ELFRELM The MCF name of the element in the FROM location. ELFRSBS The subsystem of the last MOVE. or RETRIEVE. or RETRIEVE. For example. ELFRSITE The site of the last MOVE. ELFRDATE The date of the last MOVE. ELFRTYPE The type of the element in the FROM location. TRANSFER.The Assembler Element Master Information Block ELMSOID ID of the user to whom the modified element is signed out. ELFRACT The last action. ELFRTIME The time of the last MOVE. 116 Exits Guide . TRANSFER. TRANSFER. Either MOVE. ELFRVER The version of the element in the FROM location. TRANSFER. or RETRIEVE. ELFRFLAG Flag used to indicate whether or not there is information in the following fields which describe the FROM information in a MOVE or TRANSFER action. or RETRIEVE. TRANSFER. ELFRUSID The user ID of the person performing the last MOVE. or RETRIEVE. TRANSFER. or RETRIEVE. TRANSFER. or RETRIEVE. ELFRSTG# The stage number of the element in the FROM location. TRANSFER. or RESTORE. the value X'80' with the label ELFR$VAL means the flag is set to ON. ELFRENV The environment of the last MOVE. all elements returned should have the value 36 in this field. ELMIPCTG Percentage of previous inserts deleted. ELMV3R5 35 . ELMLOWL Internal use only. ELMUPDT Element name in delta library. ELMDPCTG Percentage of previous deletes reinserted. ELMV2R1 21 . Chapter 3: Using Exit Control Blocks 117 . ELMFPESD Name of footprinted object (ESD) module. ELMEDFMT Element delta format. ELMV2R5 25 . ELMENPAK Element base is not compressed when value is Y.Release 2. ELMBASE Element name in base library.The Assembler Element Master Information Block ELFRLVL The level of the element in the FROM location.Release 3.Release 2.5 format ID. For Release 3.5 format ID. ELMPROL Level number of last processor. ELMLPROV Version number of last processor.6. ELMFMID ID of record format.1 format ID. ELMXBDTE Component list base date. ELMXLTIM Component list last level time. ELMXBLVL Component list base level number. ELMXBVER Component list delta member version number. ELMXDNAM Component list delta member name.Release 3. ELMXRGDL Component list regression deletes percent. ELMXRGIN Component list regression insert percent. ELMXLDAT Component list last level date.The Assembler Element Master Information Block ELMV3R6 36 . ELMXINS Inserts at last level. ELMXDLS Deletes at last level.6 format ID. ELMCFMID Current record format ID for all releases 3. 118 Exits Guide .6 or greater this is equal to 36. ELMXBTOT Component list base total. ELMXLTOT Component list last level total. ELMXLLVL Component list last level number. ELMXBTIM Component list base time. ELMSPKGT Time stamp on last processed package. ELMX$CPY Component list built by copy or restore. ELMSIZE Size of the $ELMDS DSECT. Each 4-byte value is a hexadecimal translation of a decimal date or time. The 8-byte time stamps are 2 4-byte values.The Assembler Element Master Information Block ELMXFLAG Component list status flag. if the field contains a time stamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. ELMCPKG Element locked to package. ELMXDFMT Component list delta format.65). The 8-byte time stamps are 2 4-byte values. ELMPRGRP Processor group name. For example. Each 4-byte value is a hexadecimal translation of a decimal date or time. ELMSPKG ID of last package processed. if the field contains a time stamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. ELMXUPDT Internal use only. For example.65). ELMOPKG Package associated with element outputs. Chapter 3: Using Exit Control Blocks 119 . ELMOPKGT Time stamp on package outputs. ELMX$MON Component list built using MONITOR=COMPONENT statement in processor. Path and file names are contained in data areas. followed by the name. See also the fields ELMFPAOFF and ELMFNAOFF. See also fields ELMTPAOFF and ELMTNAOFF.65). 120 Exits Guide . D-Dataset is a DSN. the field will contain the offset value to the "FROM" file name area from the beginning of $ELMDS. ■ ■ ■ Blank-no from the data set P-Dataset is a path name. the field will contain the offset value to the "FROM" path name area from the beginning of $ELMDS.The Assembler Element Master Information Block ELMCPKGT Element locked to package time stamp. This field will contain the offset value to the "TO" path name area from the beginning of the $ELMDS. The path area is composed of a 2 byte binary path name length. ELMFFFLG From data set flag type. D-Dataset is a DSN. See also the fields ELMFDSN and ELMFMBK. See fields ELMTDSN and ELMTMBR. followed by the name. ■ ■ ■ Blank-No from data set P-Dataset is a path name. The 8-byte time stamps are 2 4-byte values. The name area is composed of a 2 byte binary file name followed by the name. ELMTPAOFF When ELMTFFLG indicates a path. The path name is composed of 2 byte binary path name length value. ELMTFFLG To data set flag type. This field will contain the offset value to the "TO" path name area from the beginning of the $ELMDS. followed by the name. if the field contains a time stamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. ELMFPAOFF When ELMFFFLG indicates a path. ELMTNAOFF When ELMTFFLG indicates a path. ELMFNAOFF When ELMFFFLG indicates a path. Each 4-byte value is a hexadecimal translation of a decimal date or time. data can be found in the path or filename data areas. For example. The path name is composed of 2 byte binary path name length value. This area contains the true name of the element which can be up to 255 character. It describes the element specified by the current action request. 05 SRC-ELM-LENGTH PIC 9(4) COMP SYNC. It is pointed to by the Environment block. 05 SRC-ELM-ELEMENT-VERSION PIC 9(4) COMP SYNC. 05 SRC-ELM-ELEMENT-LEVEL PIC 9(4) COMP SYNC. 05 SRC-ELM-CURRENT-VERSION PIC 9(4) COMP SYNC. ELMUSR This field contains the CURRENT USER DATA contents of the element record in the MCF. which describes a location internal to CA Endevor SCM (field SRC-ENV-FILE-POINTER). this control block is not filled out if the element does not exist at the target. followed by the name. The COBOL Element Master Information Block CA Endevor SCM passes this block to programs written for exits 2-4. Note: On a Transfer action. ELMXLVER The element component last version number. ELMNOSRC Indicates if this is a sourceless element or not. 05 SRC-ELM-FLAGS PIC 9(8) COMP SYNC.The COBOL Element Master Information Block ELMEAOFF Contains the offset to the element name areas from the beginning of $ELMDS. 05 SRC-ELM-NUMBER-DELETES PIC 9(8) COMP SYNC. The element area is composed of a 2 byte binary element name length value. Chapter 3: Using Exit Control Blocks 121 . ELMBVERS The element base version number. 05 SRC-ELM-NUMBER-INSERTS PIC 9(8) COMP SYNC. 05 SRC-ELM-BLOCK-ID PIC X(4). ELMBFAREA This buffer area contains the space where all areas are contained. ELEMENT-MASTER-INFO-BLOCK Layout Sample The following is a sample ELEMENT-MASTER-INFO-BLOCK control block layout: 01 SRC-ELEMENT-MASTER-INFO-BLOCK. SRC-ELM-BASE-COMMENT PIC X(40). SRC-ELM-RETRIEVE-DATE PIC 9(6). SRC-ELM-ACTION-CCID PIC X(12). SRC-ELM-BASE-TIME PIC 9(4). SRC-ELM-ACTION-USER PIC X(8). SRC-ELM-LOC-FLAG PIC X. SRC-ELM-ACTIOM-TIME PIC 9(4). SRC-ELM-GEN-TIME PIC 9(4). SRC-ELM-ACTION-COMM PIC X(40). SRC-ELM-SIGNOUT-ID PIC X(8). SRC-ELM-ACTION-DATE PIC 9(6). SRC-ELM-MOVE-USERID PIC X(8). SRC-ELM-RETRIEVE-TIME PIC 9(4). SRC-ELM-PROCESSOR-LAST-COMMENT PIC X(40).The COBOL Element Master Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 SRC-ELM-ELEMENT-NAME PIC X(10). SRC-ELM-MOVE-DATE PIC 9(6). SRC-ELM-RET-CCID PIC X(12). SRC-ELM-BASE-USERID PIC X(8). SRC-ELM-CURRENT-CCID PIC X(12). SRC-ELM-BASE-TOTAL-STMTS PIC 9(8) COMP SYNC. SRC-ELM-FROM-DSN PIC X(44). SRC-ELM-PROCESSOR-USERID PIC X(8). SRC-ELM-GEN-CCID PIC X(12). FILLER PIC X(3). SRC-ELM-PROCESSOR-C1-RC PIC 9(4) COMP SYNC. SRC-ELM-LEVEL-DATE PIC 9(6). SRC-ELM-LEVEL-USERID PIC X(8). SRC-ELM-RETRIEVE-TO-MEMBER PIC X(10). SRC-ELM-LAST-LEVEL-TOTAL PIC 9(8) COMP SYNC. SRC-ELM-LEVEL-COMMENT PIC X(40). SRC-ELM-LAST-ACTION PIC X(8). SRC-ELM-PROCESSOR-LAST-DATE PIC 9(6). SRC-ELM-PROCESSOR-FLAG PIC X. SRC-ELM-BASE-LEVEL-NUMBER PIC 9(4) COMP SYNC. SRC-ELM-MOVE-TIME PIC 9(4). SRC-ELM-FROM-MEMBER PIC X(10). SRC-ELM-PROCESSOR-LAST-TIME PIC 9(4). SRC-ELM-RETRIEVE-USERID PIC X(8). SRC-ELM-RETRIEVE-COMMENT PIC X(40). SRC-ELM-LEVEL-TIME PIC 9(4). SRC-ELM-RETRIEVE-TO-DSN PIC X(44). FILLER PIC X(30). SRC-ELM-GEN-DATE PIC 9(6). SRC-ELM-GEN-USERID PIC X(8). SRC-ELM-PROCESSOR-RC PIC 9(4) COMP SYNC. 122 Exits Guide . SRC-ELM-BASE-DATE PIC 9(6). SRC-ELM-MOD-ACTION PIC X(8). SRC-ELM-PROCESSOR-NAME PIC X(10). SRC-ELM-FR-ACTION PIC X(8). SRC-ELM-FR-ACT-DATE PIC 9(6). 05 SRC-ELM-CONF-LAST-LVL-DATE PIC 9(6). SRC-ELM-FR-ENV PIC X(8). SRC-ELM-FR-SITE PIC X. SRC-ELM-FR-SYS PIC X(8).6 FOLLOW 05 SRC-ELM-UPDATE-MEMBER-NAME PIC X(10). 05 SRC-ELM-CONF-LAST-LVL-NBR PIC S9(4) COMP SYNC. SRC-ELM-FR-VER PIC 9(4) COMP SYNC. 05 SRC-ELM-PACKED-INDICATOR PIC X. SRC-ELM-FR-LEVEL PIC 9(4) COMP SYNC. 88 SRC-ELM-FORWARD-DELTA VALUE 'F'. 05 SRC-ELM-DELTA-FORMAT PIC X. 05 SRC-ELM-CONF-BASE-TIME PIC 9(4). 05 SRC-ELM-CONF-LAST-LVL-TOTAL PIC S9(8) COMP SYNC. 05 SRC-ELM-LOWER-LEVEL-IND PIC X(2). 88 SRC-ELM-REVERSE-DELTA VALUE 'R'. 05 SRC-ELM-CONF-LAST-LVL-TIME PIC 9(4). * NEW ELEMENT FIELDS FOR E/MVS 3. 05 SRC-ELM-CONF-BASE-TOTAL PIC S9(8) COMP SYNC. 05 SRC-ELM-CONF-COMP-STAT-FLAG PIC X. 05 SRC-ELM-LAST-PROC-LEVEL PIC X. 05 SRC-ELM-LAST-PROC-VERSION PIC X. 05 SRC-ELM-CONF-REGRES-INS-PCT PIC S9(4) COMP SYNC. 05 SRC-ELM-RECORD-FORMAT PIC X. 05 SRC-ELM-INSERTS-LAST-LEVEL PIC S9(4) COMP SYNC. 05 SRC-ELM-CONF-BASE-LVL-NBR PIC S9(4) COMP SYNC. SRC-ELM-FR-SUBSYS PIC X(8). 05 SRC-ELM-PCT-PREV-DELS-REINS PIC X. 05 SRC-ELM-PCT-PREV-INSERT-DEL PIC X. 05 SRC-ELM-CONF-BASE-DATE PIC 9(6). SRC-ELM-FR-ELEMENT PIC X(10). 05 SRC-ELM-CONF-DELTA-MEM-ID PIC X(8). Chapter 3: Using Exit Control Blocks 123 . 88 SRC-ELM-BASE-NOT-PACKED VALUE 'Y'. SRC-ELM-FR-ACT-TIME PIC 9(4). SRC-ELM-FR-TYPE PIC X(8). 05 SRC-ELM-ESD-FP-NAME-IF-OBJ PIC X(8). 05 SRC-ELM-LAST-PROC-PACKAGE PIC X(16). 05 SRC-ELM-BASE-MEMBER-NAME PIC X(10). 05 SRC-ELM-DELETES-LAST-LEVEL PIC S9(4) COMP SYNC. 05 SRC-ELM-CONF-DELTA-BASE-FLG PIC X. 05 SRC-ELM-CONF-DELTA-VERSION PIC S9(4) COMP SYNC.The COBOL Element Master Information Block 05 05 05 05 05 05 05 05 05 05 05 05 SRC-ELM-FR-ACT-USERID PIC X(8). 05 SRC-ELM-CONF-DELTA-FORMAT PIC X. 05 SRC-ELM-CONF-REGRES-DEL-PCT PIC S9(4) COMP SYNC. SRC-ELM-FR-STG-NBR PIC X. 05 SRC-ELM-PACKAGE-TIMESTAMP1 PIC X(4). 88 SRC-ELM-CONF-BASE-IN-DELTA VALUE 'Y'. The COBOL Element Master Information Block 05 SRC-ELM-PACKAGE-TIMESTAMP2 PIC X(4). 05 SRC-ELM-PACKAGE-WITH-OUTPUT PIC X(16). 05 SRC-ELM-OPACKAGE-TIMESTAMP1 PIC X(4). 05 SRC-ELM-OPACKAGE-TIMESTAMP2 PIC X(4). 05 SRC-ELM-PROCESSOR-GROUP PIC X(8). 05 SRC-ELM-PACKAGE-RESERVED PIC X(16). 05 SRC-ELM-PKG-RES-TIMESTAMP1 PIC X(4). 05 SRC-ELM-PKG-RES-TIMESTAMP2 PIC X(4). 05 SRC-ELM-FROM-FILE-TYPE-FLG PIC X. 88 SRC-ELM-FROM-NA-TYPE VALUE ' '. 88 SRC-ELM-FROM-DSN-TYPE VALUE 'D'. 88 SRC-ELM-FROM-PATH-TYPE VALUE 'P'. 05 SRC-ELM-TO-FILE-TYPE-FLG PIC X. 88 SRC-ELM-TO-NA-TYPE VALUE ' '. 88 SRC-ELM-TO-DSN-TYPE VALUE 'D'. 88 SRC-ELM-TO-PATH-TYPE VALUE 'P'. 05 SRC-ELM-FROM-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. 05 SRC-ELM-FROM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. 05 SRC-ELM-TO-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. 05 SRC-ELM-TO-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. 05 SRC-ELM-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. 05 SRC-ELM-BASE-ELM-VERSION PIC S9(4) COMP SYNC. 05 SRC-ELM-CONF-LAST-VERSION PIC S9(4) COMP SYNC. 05 SRC-ELM-NOSOURCE-FLG PIC X. 88 SRC-ELM-NOSOURCE VALUE 'Y'. 05 FILLER PIC X(27). 05 SRC-ELM-AREA-BUFFER PIC X(2320). 05 SRC-ELM-USER-DATA PIC X(80) 05 FILLER PIC X(40) * *01 TGT-ELEMENT-MASTER-INFO-BLOCK. 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 TGT-ELM-LENGTH PIC 9(4) COMP SYNC. TGT-ELM-CURRENT-VERSION PIC 9(4) COMP SYNC. TGT-ELM-BLOCK-ID PIC X(4). TGT-ELM-FLAGS PIC 9(8) COMP SYNC. TGT-ELM-ELEMENT-VERSION PIC 9(4) COMP SYNC. TGT-ELM-ELEMENT-LEVEL PIC 9(4) COMP SYNC. TGT-ELM-NUMBER-INSERTS PIC 9(8) COMP SYNC. TGT-ELM-NUMBER-DELETES PIC 9(8) COMP SYNC. TGT-ELM-ELEMENT-NAME PIC X(10). TGT-ELM-CURRENT-CCID PIC X(12). TGT-ELM-BASE-LEVEL-NUMBER PIC 9(4) COMP SYNC. TGT-ELM-BASE-TOTAL-STMTS PIC 9(8) COMP SYNC. TGT-ELM-BASE-DATE PIC 9(6). TGT-ELM-BASE-TIME PIC 9(4). TGT-ELM-BASE-COMMENT PIC X(40). TGT-ELM-BASE-USERID PIC X(8). TGT-ELM-GEN-USERID PIC X(8). 124 Exits Guide The COBOL Element Master Information Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 TGT-ELM-GEN-DATE PIC 9(6). TGT-ELM-GEN-TIME PIC 9(4). TGT-ELM-FROM-DSN PIC X(44). TGT-ELM-FROM-MEMBER PIC X(10). TGT-ELM-PROCESSOR-FLAG PIC X. FILLER PIC X(3).* TGT-ELM-PROCESSOR-LAST-DATE PIC 9(6). TGT-ELM-PROCESSOR-LAST-TIME PIC 9(4). TGT-ELM-PROCESSOR-USERID PIC X(8). TGT-ELM-PROCESSOR-NAME PIC X(10). TGT-ELM-PROCESSOR-RC PIC 9(4) COMP SYNC. TGT-ELM-PROCESSOR-C1-RC PIC 9(4) COMP SYNC. TGT-ELM-PROCESSOR-LAST-COMMENT PIC X(40). TGT-ELM-LEVEL-COMMENT PIC X(40). TGT-ELM-LEVEL-DATE PIC 9(6). TGT-ELM-LEVEL-TIME PIC 9(4). TGT-ELM-LEVEL-USERID PIC X(8). TGT-ELM-LAST-ACTION PIC X(8). TGT-ELM-LAST-LEVEL-TOTAL PIC 9(8) COMP SYNC. TGT-ELM-MOVE-DATE PIC 9(6). TGT-ELM-MOVE-TIME PIC 9(4). TGT-ELM-MOVE-USERID PIC X(8). TGT-ELM-RETRIEVE-DATE PIC 9(6). TGT-ELM-RETRIEVE-TIME PIC 9(4). TGT-ELM-RETRIEVE-USERID PIC X(8). TGT-ELM-RETRIEVE-COMMENT PIC X(40). TGT-ELM-RETRIEVE-TO-DSN PIC X(44). TGT-ELM-RETRIEVE-TO-MEMBER PIC X(10). FILLER PIC X(30). TGT-ELM-RET-CCID PIC X(12). TGT-ELM-GEN-CCID PIC X(12). TGT-ELM-MOD-ACTION PIC X(8). TGT-ELM-ACTION-CCID PIC X(12). TGT-ELM-ACTION-COMM PIC X(40). TGT-ELM-ACTION-USER PIC X(8). TGT-ELM-ACTION-DATE PIC 9(6). TGT-ELM-ACTIOM-TIME PIC 9(4). TGT-ELM-SIGNOUT-ID PIC X(8). TGT-ELM-LOC-FLAG PIC X. TGT-ELM-FR-ACTION PIC X(8). TGT-ELM-FR-ACT-USERID PIC X(8). TGT-ELM-FR-ACT-DATE PIC 9(6). TGT-ELM-FR-ACT-TIME PIC 9(4). TGT-ELM-FR-SITE PIC X. TGT-ELM-FR-ENV PIC X(8). TGT-ELM-FR-SYS PIC X(8). TGT-ELM-FR-SUBSYS PIC X(8). TGT-ELM-FR-ELEMENT PIC X(10). TGT-ELM-FR-TYPE PIC X(8). Chapter 3: Using Exit Control Blocks 125 The COBOL Element Master Information Block 05 TGT-ELM-FR-STG-NBR 05 TGT-ELM-FR-VER 05 TGT-ELM-FR-LEVEL PIC X. PIC 9(4) COMP SYNC. PIC 9(4) COMP SYNC. * NEW ELEMENT FIELDS FOR E/MVS 3.6 FOLLOW 05 TGT-ELM-UPDATE-MEMBER-NAME PIC X(10). 05 TGT-ELM-BASE-MEMBER-NAME PIC X(10). 05 TGT-ELM-LOWER-LEVEL-IND PIC X(2). 05 TGT-ELM-PCT-PREV-INSERT-DEL PIC X. 05 TGT-ELM-PCT-PREV-DELS-REINS PIC X. 05 TGT-ELM-ESD-FP-NAME-IF-OBJ PIC X(8). 05 TGT-ELM-DELTA-FORMAT PIC X. 88 TGT-ELM-FORWARD-DELTA VALUE 'F'. 88 TGT-ELM-REVERSE-DELTA VALUE 'R'. 05 TGT-ELM-PACKED-INDICATOR PIC X. 88 TGT-ELM-BASE-NOT-PACKED VALUE 'Y'. 05 TGT-ELM-LAST-PROC-VERSION PIC X. 05 TGT-ELM-LAST-PROC-LEVEL PIC X. 05 TGT-ELM-RECORD-FORMAT PIC X. 05 TGT-ELM-CONF-DELTA-MEM-ID PIC X(8). 05 TGT-ELM-CONF-DELTA-VERSION PIC S9(4) COMP SYNC. 05 TGT-ELM-CONF-BASE-TOTAL PIC S9(8) COMP SYNC. 05 TGT-ELM-CONF-LAST-LVL-TOTAL PIC S9(8) COMP SYNC. 05 TGT-ELM-CONF-BASE-LVL-NBR PIC S9(4) COMP SYNC. 05 TGT-ELM-CONF-LAST-LVL-NBR PIC S9(4) COMP SYNC. 05 TGT-ELM-INSERTS-LAST-LEVEL PIC S9(4) COMP SYNC. 05 TGT-ELM-DELETES-LAST-LEVEL PIC S9(4) COMP SYNC. 05 TGT-ELM-CONF-REGRES-INS-PCT PIC S9(4) COMP SYNC. 05 TGT-ELM-CONF-REGRES-DEL-PCT PIC S9(4) COMP SYNC. 05 TGT-ELM-CONF-BASE-DATE PIC 9(6). 05 TGT-ELM-CONF-BASE-TIME PIC 9(4). 05 TGT-ELM-CONF-LAST-LVL-DATE PIC 9(6). 05 TGT-ELM-CONF-LAST-LVL-TIME PIC 9(4). 05 TGT-ELM-CONF-COMP-STAT-FLAG PIC X. 05 TGT-ELM-CONF-DELTA-FORMAT PIC X. 05 TGT-ELM-CONF-DELTA-BASE-FLG PIC X. 88 TGT-ELM-CONF-BASE-IN-DELTA VALUE 'Y'. 05 TGT-ELM-LAST-PROC-PACKAGE PIC X(16). 05 TGT-ELM-PACKAGE-TIMESTAMP1 PIC X(4). 05 TGT-ELM-PACKAGE-TIMESTAMP2 PIC X(4). 05 TGT-ELM-PACKAGE-WITH-OUTPUT PIC X(16). 05 TGT-ELM-OPACKAGE-TIMESTAMP1 PIC X(4). 05 TGT-ELM-OPACKAGE-TIMESTAMP2 PIC X(4). 05 TGT-ELM-PROCESSOR-GROUP PIC X(8). 05 TGT-ELM-PACKAGE-RESERVED PIC X(16). 05 TGT-ELM-PKG-RES-TIMESTAMP1 PIC X(4). 05 TGT-ELM-PKG-RES-TIMESTAMP2 PIC X(4). 05 TGT-ELM-FROM-FILE-TYPE-FLG PIC X. 126 Exits Guide The COBOL Element Master Information Block 88 TGT-ELM-FROM-NA-TYPE VALUE ' '. 88 TGT-ELM-FROM-DSN-TYPE VALUE 'D'. 88 TGT-ELM-FROM-PATH-TYPE VALUE 'P'. 05 TGT-ELM-TO-FILE-TYPE-FLG PIC X. 88 TGT-ELM-TO-NA-TYPE VALUE ' '. 88 TGT-ELM-TO-DSN-TYPE VALUE 'D'. 88 TGT-ELM-TO-PATH-TYPE VALUE 'P'. 05 TGT-ELM-FROM-PATH-AREA-OFFSET PIC S9(4) 05 TGT-ELM-FROM-NAME-AREA-OFFSET PIC S9(4) 05 TGT-ELM-TO-PATH-AREA-OFFSET PIC S9(4) 05 TGT-ELM-TO-NAME-AREA-OFFSET PIC S9(4) 05 TGT-ELM-NAME-AREA-OFFSET PIC S9(4) 05 TGT-ELM-BASE-ELM-VERSION PIC S9(4) 05 TGT-ELM-CONF-LAST-VERSION PIC S9(4) 05 TGT-ELM-NOSOURCE-FLG PIC X. 88 TGT-ELM-NOSOURCE VALUE 'Y' . 05 FILLER PIC X(27). 05 TGT-ELM-AREA-BUFFER PIC X(2320). 05 TGT-ELM-USER-DATA PIC X(80) 05 FILLER PIC X(40) COMP COMP COMP COMP COMP COMP COMP SYNC. SYNC. SYNC. SYNC. SYNC. SYNC. SYNC. SRC-ELEMENT-MASTER-INFO-BLOCK Field Descriptions The following contains brief descriptions of the fields in the SRC-ELEMENT-MASTER-INFO-BLOCK. None of these fields are modifiable by exits. SRC-ELM-LENGTH Size of the Element Master Information block SRC-ELEMENT-MASTER-INFO-BLOCKS), in bytes. SRC-ELM-CURRENT-VERSION Version number to identify the Element Master Information block (SRC-ELEMENT-MASTER-INFO-BLOCK). This should always be 5. SRC-ELM-BLOCK-ID Identifies this as the Element Master Information block. Value is always "$ELM". SRC-ELM-FLAGS Not used. SRC-ELM-ELEMENT-VERSION Version number of the element specified in the action request. This field has the same value as the SRC-ENV-ELEMENT-LEVEL field in the Environment block. Chapter 3: Using Exit Control Blocks 127 The COBOL Element Master Information Block SRC-ELM-ELEMENT-LEVEL The current (highest) level of the element. This field has the same value as the SRC-ENV-ELEMENT-LEVEL field in the Environment block. SRC-ELM-NUMBER-INSERTS Count of statements added to the element source by the last action that invoked source management. SRC-ELM-NUMBER-DELETES Count of statements deleted from the element source by the last action that invoked source management. SRC-ELM-ELEMENT-NAME Name of the MCF element name. Element names longer than 10, or names containing special characters or mixed case characters will have a generated MCF element name. The actual name will be placed in the buffer area. See also SRC-ELM-NAME-ARE-OFFSET. SRC-ELM-CURRENT-CCID Last-specified CCID for the element. SRC-ELM-BASE-LEVEL-NUMBER The base level of the element. SRC-ELM-BASE-TOTAL-STMTS Count of source statements in the base level of the element in the current stage. SRC-ELM-BASE-DATE Base date for the element. SRC-ELM-BASE-TIME Base time for the element. SRC-ELM-BASE-COMMENT Base comment for the element. SRC-ELM-BASE-USERID Base user ID for the element. SRC-ELM-GEN-USERID Generate processor user ID for the element. SRC-ELM-GEN-DATE Generate processor date for the element. SRC-ELM-GEN-TIME Generate processor time for the element. 128 Exits Guide The COBOL Element Master Information Block SRC-ELM-FROM-DSN Name of the data set from which the element was last added, updated, or restored. SRC-ELM-FROM-MEMBER Name of the member from which the element was last added, updated, or restored. Applicable if the source data set was a library; blank otherwise. SRC-ELM-PROCESSOR-FLAG Flag used to describe the last processor run for the element (and related information). This field may reference a delete processor (in the case where a delete processor was the last processor run for the current action). Values are: ■ Value: X'00' – ■ Meaning: No processor has been run yet for the element Value: X'80' – Meaning: The last processor failed ■ Value: X'40' – Meaning: The last processor was a generate processor ■ Value: X'20' – Meaning: The last processor was a move processor ■ Value: X'10' – Meaning: The last processor was a delete processor ■ Value: X'08' – Meaning: The element has been restored but not yet processed. Therefore, processor statistics are unchanged from the archived statistics for the element SRC-ELM-PROCESSOR-LAST-DATE Processor date for the element. SRC-ELM-PROCESSOR-LAST-TIME Processor time for the element. SRC-ELM-PROCESSOR-USERID Processor user ID for the element. SRC-ELM-PROCESSOR-NAME (Element) name of the processor last run for the element. SRC-ELM-PROCESS-RC Processor return code for the element. Chapter 3: Using Exit Control Blocks 129 and DISPLAY. SRC-ELM-LEVEL-TIME Current-level time for the element. SRC-ELM-RETRIEVE-USERID User ID associated with the last retrieve of the element. SRC-ELM-RETRIEVE-TIME Time the element was last retrieved.The COBOL Element Master Information Block SRC-ELM-PROCESSOR-C1-RC CA Endevor SCM return code for the element. SRC-ELM-MOVE-USERID User ID associated with the last move of the element. SRC-ELM-LEVEL-COMMENT Current-level comment for the element. 130 Exits Guide . SRC-ELM-MOVE-TIME Time the element was last moved. SRC-ELM-LEVEL-USERID Current-level user ID for the element. SRC-ELM-RETRIEVE-DATE Date the element was last retrieved. as of the current level. SRC-ELM-LEVEL-DATE Current-level date for the element. Once executed. LIST. Values are: ■ Value: X'10' – ■ Meaning: Processor had a system abend Value: X'20' – Meaning: Processor had a user abend SRC-ELM-PROCESSOR-LAST-COMMENTS Generate processor comment for the element. PRINT. SRC-ELM-MOVE-DATE Date the element was last moved. SRC-ELM-LAST-LEVEL-TOTAL Count of source statements for the element. SRC-ELM-LAST-ACTION Most recent action executed for the element. each action is recorded as the last action--except ARCHIVE. an ADD or UPDATE would modify an element. SRC-ELM-ACTION-CCID CCID associated with the last action that modified the element. SRC-ELM-MOD-ACTION Last action that modified the element. TRANSFER. Chapter 3: Using Exit Control Blocks 131 . blank otherwise. For example. the value X'80' means the flag is set to ON. SRC-ELM-LOC-FLAG Flag used to indicate whether or not there is information in the following fields which describe the FROM information in a MOVE or TRANSFER action. SRC-ELM-ACTION-COMM Comment associated with the last action that modified the element. SRC-ELM-ACTION-TIME Time when the last modifying action was performed. SRC-ELM-RETRIEVE-TO-MEMBER Name of the member to which the element was last retrieved. Either MOVE. A RETRIEVE would not. SRC-ELM-ACTION-DATE Date of last action that modified the element. SRC-ELM-FR-ACTION The last action. SRC-ELM-RET-CCID CCID associated with the last retrieve of the element. SRC-ELM-ACTION-USER User ID of the user who performed the last action that modified an element. For example. SRC-ELM-RETRIEVE-TO-DSN Name of the data set to which the element was last retrieved. SRC-ELM-SIGNOUT-ID ID of the user to whom the modified element is signed out. Applicable if the target data set for the last retrieve request was a library. or RESTORE. SRC-ELM-GEN-CCID CCID associated with the last generate of the element.The COBOL Element Master Information Block SRC-ELM-RETRIEVE-COMMENT Comment associated with the last retrieve of the element. or RETRIEVE. SRC-ELM-FR-TYPE The type of the element in the FROM location. TRANSFER. SRC-ELM-UPDATE-MEMBER-NAME Element name in delta library. or RETRIEVE. TRANSFER. SRC-ELM-LOWER-LEVEL-IND Internal use only. TRANSFER. SRC-ELM-FR-VER The version of the element in the FROM location. or RETRIEVE. TRANSFER. SRC-ELM-FR-SYS The system of the last MOVE. 132 Exits Guide . TRANSFER. SRC-ELM-FR-ENV The environment of the last MOVE. SRC-ELM-BASE-MEMBER-NAME Element name in base library. TRANSFER. SRC-ELM-FR-LEVEL The level of the element in the FROM location. SRC-ELM-FR-STG-NBR The stage number of the element in the FROM location. TRANSFER. SRC-ELM-FR-SITE The site of the last MOVE. or RETRIEVE. or RETRIEVE. or RETRIEVE. SRC-ELM-FR-ACT-TIME The time of the last MOVE. SRC-ELM-FR-ELEMENT The name of the MCF element in the FROM location. or RETRIEVE. SRC-ELM-FR-SUBSYS The subsystem of the last MOVE. SRC-ELM-FR-ACT-DATE The date of the last MOVE.The COBOL Element Master Information Block SRC-ELM-FR-ACT-USERID The user ID of the person performing the last MOVE. Values are as follows: ■ Value: F – – ■ Label: SRC-ELM-FORWARD-DELTA Meaning: Forward format Value: R – – Label: SRC-ELM-REVERSE-DELTA Meaning: Reverse format SRC-ELM-PACKED-INDICATOR Element base is not compressed when value is Y. Y-SRC-ELM-BASE-NOT-PACKED SRC-ELM-LAST-PROC-VERSION Version number of last processor. SRC-ELM-LAST-PROC-LEVEL Level number of last processor. x'25'-Release 2. x'36'-Release 3.6 or greater. SRC-ELM-CONF-DELTA-MEM-ID Component list delta member name.The COBOL Element Master Information Block SRC-ELM-PCT-PREV-INSERT-DEL Percentage of previous inserts deleted. SRC-ELM-ESD-FP-NAME-IF-OBJ Name of footprinted object (ESD) module.6 format ID. SRC-ELM-PCT-PREV-DELS-REINS Percentage of previous deletes reinserted. SRC-ELM-RECORD-FORMAT ID of record format. ■ ■ ■ ■ ■ x'21'-Release 2. SRC-ELM-DELTA-FORMAT Element delta format.5 format ID. x'36'-Current Record format ID. Chapter 3: Using Exit Control Blocks 133 .1 format ID. all elements returned should have the value x'36' in this field.5 format ID. For all releases 3. x'35'-Release 3. SRC-ELM-CONF-BASE-TOTAL Component list base total. SRC-ELM-CONF-LAST-LVL-DATE Component list last level date. SRC-ELM-CONF-LAST-LVL-TIME Component list last level time. SRC-ELM-CONF-LAST-LVL-NBR Component list last level number. SRC-ELM-CONF-BASE-DATE Component list base date.The COBOL Element Master Information Block SRC-ELM-CONF-DELTA-VERSION Component list delta member version number. SRC-ELM-CONF-LAST-LVL-TOTAL Component list last level total. Values are: Value: X'40' – Meaning: Component list built by copy or restore 134 Exits Guide . SRC-ELM-INSERTS-LAST-LEVEL Inserts at last level. SRC-ELM-DELETES-LAST-LEVEL Deletes at last level. SRC-ELM-CONF-BASE-LVL-NBR Component list base level number. SRC-ELM-CONF-REGRES-INS-PCT Component list regression insert percent. ■ Value: X'80' – ■ Meaning: Component list built using MONITOR=COMPONENT statement in processor. SRC-ELM-CONF-BASE-TIME Component list base time. SRC-ELM-CONF-COMP-STAT-FLAG Component list status flag. SRC-ELM-CONF-REGRES-DEL-PCT Component list regression deletes percent. For example. A 4-byte value that is a hexadecimal translation of a decimal time.65). A 4-byte value that is a hexadecimal translation of a decimal date. SRC-ELM-OPACKAGE-TIMESTAMP1 Time stamp on package outputs. SRC-ELM-PACKAGE-TIMESTAMP2 Time stamp on last processed package. Y-SRC-ELM-CONF-BASE-IN-DELTA SRC-LAST-PROC-PACKAGE ID of last packaged processed. A 4-byte value that is a hexadecimal translation of a decimal date. A 4-byte value that is a hexadecimal translation of a decimal date. if the field contains a time stamp of x'01321831' then converting to decimal gives the date 20060209. SRC-ELM-PACKAGE-WITH-OUTPUT Package associated with element outputs. if the field contains a time stamp of x'01321831' then converting to decimal gives the date 20060209. if the field contains a time stamp of x'01321831' then converting to decimal gives the date 20060209. SRC-ELM-PACKAGE-RESERVED Element locked to package SRC-ELM-PKG-RES-TIMESTAMP1 Time stamp when element is locked to the package. if the field contains a time stamp of X'00D71211' then converting to decimal gives the time 14094865 (14:09:48. For example. For example.65). if the field contains a time stamp of X'00D71211' then converting to decimal gives the time 14094865 (14:09:48. SRC-ELM-PACKAGE-TIMESTAMP1 Time stamp on last processed package. A 4-byte value that is a hexadecimal translation of a decimal time. For example. SRC-ELM-OPACKAGE-TIMESTAMP2 Time stamp on package outputs. Chapter 3: Using Exit Control Blocks 135 .The COBOL Element Master Information Block SRC-ELM-CONF-DELTA-FORMAT Component list delta format. For example. SRC-PROCESSOR-GROUP-NAME Processor group name. The COBOL Element Master Information Block SRC-ELM-PKG-RES-TIMESTAMP2 Time stamp when element is locked to the package. the field will contain the offset value to the "FROM" file name area from the beginning of SRC-ELEMENT-MASTER-INFO-BLOCK. The path area is composed of a 2 byte binary path name length. the field will contain the offset value to the "FROM" path name area from the beginning of SRC-ELEMENT-MASTER-INFO-BLOCK. See SRC-ELM-TO-PATH-AREA-OFFSET and SRC-ELM-TO-NAME-AREA-OFFSET. See fields SRC-ELM-RETRIEVE-TO-DSN and SRC-ELM-RETRIEVE-TO-MEMBER. D-Data set is a DSN. SRC-ELM-FROM-NAME-AREA-OFFSET When SRC-ELM-FROM-FILE-TYPE-FLG indicates a path. The path name area is composed of 2 byte binary path name length value. Path and file names are contained in data areas. The name area is composed of a 2 byte binary file name followed by the name. followed by the name. A 4-byte value that is a hexadecimal translation of a decimal time. 136 Exits Guide . For example. See fields SRC-ELM-FROM-DSN and SRC-ELM-FROM-MEMBER. This field will contain the offset value to the "TO" path name area from the beginning of the SRC-ELEMENT-MASTER-INFO-BLOCK. followed by the name. ■ SRC-ELM-TO-FILE-TYPE-FLG "TO" data set flag type ■ ■ Blank-No "TO" data set type P-Data set is a path. Path and file names are contained in data areas. ■ SRC-ELM-FROM-PATH-AREA-OFFSET When SRC-ELM-FROM-FILE-TYPE-FLG indicates a path. See SRC-ELM-FROM-PATH-AREA-OFFSET and SRC-ELM-FROM-NAME-AREA-OFFSET. SRC-ELM-TO-PATH-AREA-OFFSET When SRC-ELM-TO-FILE-TYPE-FLG indicates a path. if the field contains a time stamp of X'00D71211' then converting to decimal gives the time 14094865 (14:09:48. SRC-ELM-FROM-FILE-TYPE-FLG "FROM" data set flag type ■ ■ Blank-No "FROM" data set type P-Data set is a path.65). D-Data set is a DSN. SRC-ELM-USER-DATA This field contains the CURRENT USER DATA contents of the SOURCE element record in the MCF. None of these fields are modifiable be exits. This area contains the true name of the name of the element which can be up to 255 character. The element area is composed of a 2 byte binary element name length value. TGT-ELM-CURRENT-VERSION Version number to identify the Element Master information block (TGT-ELEMENT-MASTER-INFO-BLOCK). followed by the name. The file name area is composed of 2 bytes binary file name length value. This field will contain the offset value to the "TO" file name area from the beginning of SRC-ELEMENT-MASTER-INFO-BLOCK. SRC-ELM-NOSOURCE-FLG Indicates if this is a sourceless element. The value is always "$ELM" Chapter 3: Using Exit Control Blocks 137 . SRC-ELM-NAME-AREA-OFFSET Contains the offset to the element name areas from the beginning of SRC-ELEMENT-MASTER-INFO-BLOCK. SRC-ELM-AREA-BUFFER This buffer area contains the space where all areas are contained. in bytes.The COBOL Element Master Information Block SRC-ELM-TO-NAME-AREA-OFFSET When SRC-ELM-TO-FILE-TYPE-FLG indicates a path. followed by the name. TGT-ELM-LENGTH Size of the Element Master Information block (TGT-ELEMENT-MASTER-INFO-BLOCK). This should always be 5. SRC-ELM-CONF-LAST-VERSION The component last version number. SRC-ELM-BASE-ELM-VERSION The element base version number. TGT-ELM-BLOCK-ID Identifies this as the Element Master Information block. TGT-ELEMENT-MASTER-INFO-BLOCK Field Descriptions The following contains a brief description of the fields in the TGT-ELEMENT-MASTER-INFO-BLOCK control block layout. TGT-ELM-CURRENT-CCID Last-specified CCID for the element. TGT-ELM-NUMBER-DELETES Count of statements deleted from the element source by the last action that invoked source management. TGT-ELM-BASE-COMMENT Base comment for the element. TGT-ELM-NUMBER-INSERTS Count of statements added to the source by the last action that invoked source management. or names containing special characters or mixed case characters will have a generated MCF element name. TGT-ELM-BASE-LEVEL-NUMBER The base level of the element TGT-ELM-BASE-TOTAL-STMTS Count of source statements in the base level of the element in the current stage. TGT-ELM-ELEMENT-NAME Name of the MCF element specified in the current action request. The actual name will be placed in the buffer area. TGT-ELM-BASE-USERID Base user ID for the element. This field has the same value as the TGT-ENV-ELEMENT-LEVEL field in the Environment block. TGT-ELM-ELEMENT-LEVEL The current (highest) level of the element. 138 Exits Guide . This field has the same value as the TGT-ENV-ELEMENT-VERSION field in the Environment block.The COBOL Element Master Information Block TGT-ELM-FLAGS Not used. See also TGT-ELM-NAME-AREA-OFFSET. TGT-ELM-BASE-TIME Base time for the element. TGT-ELM-BASE-DATE Base date for the element. TGT-ELM-ELEMENT-VERSION Version number of the element specified in the action request. Element names longer than 10. TGT-ELM-PROCESSOR-FLAG Flag used to describe the last processor run for the element (and related information). or restored. updated. processor statistics are unchanged from the from the archived statistics for the element. Applicable if the source data set was a library. This field may reference a delete processor (in the case where a delete processor was the last processor run for the current action). TGT-ELM-FROM-MEMBER Name of the member from which the element was last added. TGT-ELM-PROCESSOR-LAST-DATE Processor date for element. or restored. Values are: ■ Value: X'00' – ■ Meaning: No processor has been run yet for the element. TGT-ELM-GEN-DATE Generate processor date for the element. updated. TGT-ELM-GEN-TIME Generate processor time for the element.The COBOL Element Master Information Block TGT-ELM-GEN-USERID Generate processor user ID for the element. Value: X'80' – Meaning: The last processor failed ■ Value: X'40' – Meaning: The last processor was a generate processor ■ Value: X'20' – Meaning: The last processor was a move processor ■ Value: X'10' – Meaning: The last processor was a delete processor ■ Value: X'08' – Meaning: The element has been restored but not yet processed. TGT-ELM-PROCESSOR-LAST-TIME Processor time for element. Therefore. TGT-ELM-FROM-DSN Name of the data set from which the element was last added. blank otherwise. Chapter 3: Using Exit Control Blocks 139 . TGT-ELM-MOVE-USERID User ID associated with the last move of the element. TGT-ELM-LAST-LEVEL-TOTAL Count of source statements for the element. TGT-ELM-MOVE-TIME Time the element was last moved. each action is recorded as the last action-except ARCHIVE. TGT-ELM-PROCESSOR-NAME (Element) name of the processor last run for the element. PRINT. 140 Exits Guide . LIST. Once executed. TGT-ELM-LEVEL-DATE Current-level date for the element. TGT-ELM-PROCESSOR-RC Processor return code for the element. TGT-ELM-LEVEL-TIME Current-level time for the element TGT-ELM-LEVEL-USERID Current-level user ID for the element.The COBOL Element Master Information Block TGT-ELM-PROCESSOR-USERID Processor user ID for element. Values are: ■ Value: X'10' – ■ Meaning: Processor had a system abend Value: X'20' – Meaning: Processor had a user abend TGT-ELM-PROCESSOR-LAST-COMMENT Generate processor comment for the element. TGT-ELM-MOVE-DATE Date the element was last moved. DISPLAY. as of the current level. TGT-ELM-LEVEL-COMMENT Current-level comment for the element. TGT-ELM-LAST-ACTION Most recent action executed for the element. TGT-ELM-PROCESSOR-C1-RC CA Endevor SCM return code for the element. The COBOL Element Master Information Block TGT-ELM-RETRIEVE-DATE Date the element was last retrieved. TGT-ELM-RETRIEVE-COMMENT Comment associated with the last retrieve of the element. TGT-ELM-SIGNOUT-ID ID of the user to whom the modified element is. TGT-ELM-RETRIEVE-TO-MEMBER Name of the member to which the element was last retrieved. Chapter 3: Using Exit Control Blocks 141 . TGT-ELM-RETRIEVE-TIME Time the element was last retrieved. A RETRIEVE would not. TGT-ELM-RET-CCID CCID associated with the last retrieve of the element. an ADD or UPDATE would modify an element. TGT-ELM-ACTION-TIME Time when the last modifying action was performed. TGT-ELM-GEN-CCID CCID associated with the last generate of the element. blank otherwise. TGT-ELM-RETRIEVE-USERID User ID associated with the last retrieve of the element. Applicable if the target data set for the last retrieve request was a library. TGT-ELM-ACTION-DATE Date of last action that modified the element. TGT-ELM-ACTION-CCID CCID associated with the last action that modified the element. TGT-ELM-RETRIEVE-TO-DSN Name of the data set to which the element was last retrieved. TGT-ELM-MOD-ACTION Last action that modified the element. For example. TGT-ELEM-ACTION-COMM User ID of the user who performed the last action that modified an element. or RETRIEVE. TGT-ELM-FR-ELEMENT The name of the MCF element in the FROM location. TRANSFER. TGT-ELM-FR-SITE The site of the last MOVE. TRANSFER. TGT-ELM-FR-ACT-TIME The time of the last MOVE.The COBOL Element Master Information Block TGT-ELM-LOC-FLAG Flag used to indicate whether or not there is information in the following fields which describe the FROM information in a MOVE or TRANSFER action. TGT-ELM-UPDATE-MEMBER-NAME Element name in the delta library. or RETRIEVE. TRANSFER. or RETRIEVE. TRANSFER. TGT-ELM-FR-ACT-DATE The date of the last MOVE. TRANSFER. or RETRIEVE. or RESTORE. TGT-ELM-FR-LEVEL The level of the element in the FROM location. TGT-ELM-FR-VER The version of the element in the FROM location. TGT-ELM-FR-TYPE The type of the element in the from location TGT-ELM-FR-STG-NBR The stage number of the element in the FROM location. TRANSFER. TGT-ELM-FR-ENV The environment of the last MOVE. or RETRIEVE. TGT-ELM-FR-ACT-USERID The user ID of the person performing the last MOVE. TGT-ELM-FR-ACTION The last action. TRANSFER. or RETRIEVE. 142 Exits Guide . For example. TGT-ELM-FR-SUBSYS The subsystem of the last MOVE. TRANSFER. either MOVE. the value of X'80' means the flag is set to ON. TGT-ELM-FR-SYS The system of the last MOVE. or RETRIEVE. TGT-ELM-LAST-PROC-VERSION Version number of last processor. TGT-ELM-ESD-FP-NAME-IF-OBJ Name of footprinted object. TGT-ELM-PCT-PREV-DELS-REINS Percentage of previous deletes reinserted. TGT-ELM-PCT-PREV-INSERT-DEL Percentage of previous inserts deleted. TGT-ELM-DELTA-FORMAT Element delta format. Chapter 3: Using Exit Control Blocks 143 .The COBOL Element Master Information Block TGT-ELM-BASE-MEMBER-NAME Element name in the base library. TGT-ELM-LOWER-LEVEL Internal use only. Values are: ■ Value: F – – ■ Label: TGT-ELM-FORWARD-DELTA Meaning: Forward format. TGT-ELM-PACKED-INDICATOR Element base is not compressed when the value is Y. TGT-ELM-LAST-PROC-LEVEL Level number of last processor. Value: R – – – Label: TGT-ELM-REVERSE-DELTA Meaning: Reverse format. Y-TGT-ELM-BASE-NOT-PACKED. x'36'-Current record format ID.5 format ID. TGT-ELM-CONF-LAST-LVL-NUMBER Component list last level total. x'35'-Release 3. 144 Exits Guide .6 and above.5 format ID. x'25'-Release 2. TGT-ELM-CONF-DELTA-VERSION Component list delta member version number. TGT-ELM-CONF-BASE-DATE Component list base date. For release 3. x'36'-Release 3. ■ ■ ■ ■ ■ x'21'-Release 2. all elements returned should have a value of x'36' in this field. TGT-ELM-CONF-REGRES-DEL-PCT Component list regression deletes percent. TGT-ELM-CONF-BASE-TIME Component list base time.1 format ID.The COBOL Element Master Information Block TGT-ELM-RECORD-FORMAT ID of record format. TGT-ELM-CONF-BASE-TOTAL Component list base total TGT-ELM-CONF-LAST-LVL-TOTAL Component list last level total.6 format ID. TGT-ELM-INSERTS-LAST-LEVEL Inserts at last level TGT-ELM-DELETES-LAST-LEVEL Deletes at last level TGT-ELM-CONF-REGRES-INS-PCT Component list regression insert percent. TGT-ELM-CONF-DELTA-MEM-ID Component list delta member name. TGT-ELM-CONF-LAST-LVL-TIME Component list last level time. Chapter 3: Using Exit Control Blocks 145 . if the field contains a time stamp of X'00D71211' then converting to decimal gives the time 14094865 (14:09:48. TGT-ELM-OPACKAGE-TIMESTAMP1 Time stamp on package outputs. if the field contains a time stamp of X'00D71211' then converting to decimal gives the time 14094865 (14:09:48. For example. TGT-ELM-CONF-COMP-STAT-FLAG Component list flag. A 4-byte value that is a hexadecimal translation of a decimal date. Values are: ■ Value: X'80' – ■ Meaning: Component list built using MONITOR=COMPONENT statement in processor. A 4-byte value that is a hexadecimal translation of a decimal time. Value: X'40' – Meaning: Component list built by copy or restore. For example. TGT-ELM-PACKAGE-WITH-OUTPUT Package associated with element outputs. For example.65). TGT-ELM-CONF-DELTA-FORMAT Component list delta format. TGT-ELM-OPACKAGE-TIMESTAMP2 Time stamp on package outputs. if the field contains a time stamp of x'01321831' then converting to decimal gives the date 20060209. TGT-ELM-PROCESSOR-GROUP Processor group name.65). A 4-byte value that is a hexadecimal translation of a decimal date. For example. Y-TGT-ELM-CONF-BASE-IN-DELTA Comp base in Delta library. if the field contains a time stamp of x'01321831' then converting to decimal gives the date 20060209. TGT-ELM-LAST-PROC-PACKAGE ID of last package processed. A 4-byte value that is a hexadecimal translation of a decimal time. TGT-ELM-PACKAGE-TIMESTAMP1 Time stamp on last processed package.The COBOL Element Master Information Block TGT-ELM-CONF-LAST-LVL-DATE Component list last level date. TGT-ELM-PACKAGE-TIMESTAMP2 Time stamp on last processed package. ■ TGT-ELM-TO-FILE-TYPE-FLG "TO" data set flag type. D-Data set is a DSN. See TGT-ELM-TO-PATH-AREA-OFFSET and TGT-ELM-TO-NAME-AREA-OFFSET. The path area is composed of 2 byte binary path name length value. This field will contain the offset value to the "TO" path name area from the beginning of the TGT-ELMENT-MASTER-INFO-BLOCK. TGT-ELM-TO-PATH-AREA-OFFSET When TGT-ELM-TO-FILE-TYPE-FLG indicates a path. See TGT-ELM-FROM-PATH-AREA-OFFSET and TGT-ELM-FROM-NAME-AREA-OFFSET. The name area is composed of 2 byte binary path name length value. followed by the name. The file name is composed of 2 byte binary path name length value. This field will contain the offset value to the "TO" file name area from the beginning of the TGT-ELMENT-MASTER-INFO-BLOCK. followed by the name. The path name is composed of 2 byte binary path name length value. the offset value to the "FROM" path name area from the beginning of the TGT-ELM-FROM-INFO-BLOCK. Blank-No "TO" data set type P-Data set is a path. followed by the name. TGT-ELM-FROM-NAME-AREA-OFFSET When TGT-ELM-FROM-FILE-TYPE-FLG indicates a path. Path and file names are contained in data areas. TGT-ELM-FROM-PATH-AREA-OFFSET When TGT-ELM-FROM-FILE-TYPE-FLG indicates a path. D-Data set is a DSN. followed by the name.The COBOL Element Master Information Block TGT-ELM-FROM-FILE-TYPE-FLG "FROM" data set flag type ■ ■ Blank-No "FROM" data set type P-Data set is a path. TGT-ELM-TO-NAME-AREA-OFFSET When TGT-ELM-TO-FILE-TYPE-FLG indicates a path file. Path and file names are contained in data areas. the offset value to the "FROM" path name area from the beginning of the TGT-ELMENT-MASTER-INFO-BLOCK. See fields TGT-ELM-RETRIEVE-TO-DSN and TGT-ELM-RETRIEVE-TO-MEMBER. See fields TGT-ELM-FROM-DSN and TGT-ELM-FROM-MEMBER. 146 Exits Guide . H/.IS. It describes the external file used by the current action request: either the source file for an ADD or UPDATE request. followed by the name. followed by the name. This area contains the true name of the element which can be up to 255 characters..The Assembler File Block TGT-ELM-NAME-AREA-OFFSET Contains the offset to the element name areas from the beginning of TGT-ELEMENT-MASTER-INFO-BLOCK. $FILDS DSECT Sample $FILDS DSECT control block is shown: FILLEN DC AL2(FILSIZE) LENGTH OF THE BLOCK FILVERS DC AL2(FIL$VERS) VERSION OF THE BLOCK FIL$VERS EQU 2 VERSION 2 FILID DC CL4'$FIL' BLOCK ID FILDSN DS CL44' ' DATASET NAME FILDSMEM DS CL10' ' MEMBER NAME FILDDN DS CL8 DDNAME FILDSTY DS CL3' ' DATASET TYPE( DA.H$.PSU.HW) Chapter 3: Using Exit Control Blocks 147 . TGT-ELM-CONF-LAST-VERSION The component last version number TGT-ELM-NOSOURCE-FLG Indicates if this is a sourceless element. TGT-ELM-BASE-ELM-VERSION The element base version number. TGT-ELM-USER-DATA This field contains the CURRENT USER DATA contents of the TARGET element record in the MCF.. It is pointed to by each Environment block that describes a location external to CA Endevor SCM (ENVFCBA field).) * FOR HFS (H@. The Assembler File Block CA Endevor SCM passes this block to programs written for exits 2-4. TGT-ELM-AREA-BUFFER This buffer area contains the space where all areas are contained. The element area is composed of a 2 byte binary element name length value.. or the target file for an ARCHIVE or RETRIEVE request.PO. The file name is composed of 2 byte binary path name length value. FILDSMEM Modifiable by exit 4. In order for CA Endevor SCM to recognize the change(s). IF HFS DC CL21' ' ** RESERVED ** FILBFAREA DS XL1027 AREA BUFFER SPACE FILSIZE EQU *-$FILDS LENGTH OF THE $FILDS BLOCK MEND $FILDS DSECT Field Descriptions The following list contains brief descriptions of the fields in the $FILDS DSECT. This should always be 2. in bytes. blank otherwise. 148 Exits Guide . Use the FIL$VERS label to verify that the correct version of this DSECT was passed to your exit. Value is always "$FIL". Applicable when the data set is a library. FILDDN Modifiable by exit 4. and/or FILDSTY fields to be correct for the new DDname. THIS IS THEN * FOLLOWED BY THE NAME. * THE FIRST 2 BYTES IN AREA = THE LENGTH OF THE NAME. exit programs cannot modify these fields. FILDSMEM. You do not have to change the FILDSN.The Assembler File Block SPACE 1 * * OFFSET (FROM BEGINNING OF FILDS) TO THE PATH AND FILE NAME AREAS. If you change this field using exit 4. it is your responsibility to allocate the file (data set name) associated with the new DDname. FILDSN Modifiable by exit 4 programs. FILLEN Size of the File block ($FILDS). you must return a code of 4 ($ECBDS field ECBRTCD). Data set name of the external file used by the current action. DDname associated with the data set named above. FILVERS Version number to identify the File block ($FILDS). IF HFS FILNAOFF DS H FILE NAME AREA OFFSET. Member name of the element for which the action applies. * FILPAOFF DS H PATH AREA OFFSET. Unless otherwise noted. FILID Identifies this as the File Control block. FILSIZE Size of the $FILDS DSECT. FILNAOFF When the data set type is HFS. it contains the offset from $FILDS to the path name area within the buffer space. PSU. Chapter 3: Using Exit Control Blocks 149 . or the target file for an ARCHIVE or RETRIEVE request. Type of data set named by the FILDSN field: DA. FILBFAREA Buffer which contains the path and file areas. It describes the external file used by the current action request: either the source file for an ADD or UPDATE request. PO. The possible values are the same as those that apply for the DSORG JCL parameter. and so forth. The COBOL File Block CA Endevor SCM passes this block to programs written for exits 2-4. The name immediately follows. FILBFAREA. It is pointed to by each Environment block that describes a location external to CA Endevor SCM (field SRC-ENV-FILE-POINTER AND TGT-ENV-FILE-POINTER). see FILBFAREA The first 2 bytes of the area contain the binary length value of file name. it contains the offset from $FILDS to the file name area within the buffer space. FILPAOFF When the data set type is HFS.The COBOL File Block FILDSTY Modifiable by exit 4. The first 2 bytes of the path area contain the binary length value of path name. IS. The name immediately follows. TGT-FIL-CURRENT-VERSION PIC 9(4) COMP SYNC. 150 Exits Guide . TGT-FIL-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. in bytes. 05 SRC-FIL-DATASET-MEMBER PIC X(10). TGT-FIL-BLOCK-ID PIC X(4). TGT-FIL-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. TGT-FIL-DDNAME PIC X(8). SRC-FIL-CURRENT-VERSION Version number to identify the File block (SRC-FILE-CONTROL-BLOCK). 05 SRC-FIL-DATASET-NAME PIC X(44). 05 FILLER PIC X(21). 05 SRC-FIL-AREA-BUFFER PIC X(1027). exit programs cannot modify these fields. TGT-FIL-DATASET-MEMBER PIC X(10). 05 SRC-FIL-DATASET-TYPE PIC X(3). SRC-FIL-LENGTH Size of the File block (SRC-FILE-CONTROL-BLOCK). Use the label to verify that the correct version of this DSECT was passed to your exit. 01 TGT-FILE-CONTROL-BLOCK 05 05 05 05 05 05 05 05 05 05 05 TGT-FIL-LENGTH PIC 9(4) COMP SYNC. TGT-FIL-DATASET-TYPE PIC X(3). 05 SRC-FIL-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 SRC-FIL-LENGTH PIC 9(4) COMP SYNC.The COBOL File Block XXX-FILE-CONTROL-BLOCK Layout Sample The following is a sample XXX-FILE-CONTROL-BLOCK control block layout: 01 SRC-FILE-CONTROL-BLOCK. TGT-FIL-DATASET-NAME PIC X(44). 05 SRC-FIL-BLOCK-ID PIC X(4). SRC-FILE-CONTROL-BLOCK Field Descriptions The following list contains brief descriptions of the fields in the SRC-FILE-CONTROL-BLOCK. Unless otherwise noted. 05 SRC-FIL-DDNAME PIC X(8). Value is always "$FIL". 05 SRC-FIL-PATH-AREA-OFFSET PIC S9(4) COMP SYNC. SRC-FIL-BLOCK-ID Identifies this as the File Control block. This should always be 2. TGT-FIL-AREA-BUFFER PIC X(1027). 05 SRC-FIL-NAME-AREA-OFFSET PIC S9(4) COMP SYNC. FILLER PIC X(21). You do not have to change the SRC-FIL-DATASET-NAME. SRC-FIL-DATASET-TYPE Modifiable by exit 4. SRC-FIL-AREA-BUFFER. see SRC-FIL-AREA-BUFFER. it is your responsibility to allocate the file (data set name) associated with the new DDname. or SRC-FIL-DATASET-TYPE to be correct for the new DDname. Type of data set named by the SRC-FIL-DATASET-NAME field: DA. SRC-FIL-PATH-AREA-OFFSET When the data set type is HFS. it contains the offset from SRC-FILE-CONTROL-BLOCK to the file name area within the buffer space. The first 2 bytes of the area contain the binary length value of file name and the name immediately follows. PO. SRC-FIL-DATASET-MEMBER. The possible values are the same as those that apply for the DSORG JCL parameter. PSU. If you change this field using exit 4. SRC-FIL-DATASET-MEMBER Modifiable by exit 4. you must pass a return code of 4 (EXIT-CONTROL-BLOCK field ECB-RETURN-CODE). Member name of the element for which the action applies. DDname associated with the data set named above. The name immediately follows. In order for CA Endevor SCM to recognize the change(s). SRC-FIL-DDNAME Modifiable by exit 4. Chapter 3: Using Exit Control Blocks 151 . Data set name of the external file used by the current action. and so forth. The first 2 bytes of the path area contain the binary length value of path name. IS.The COBOL File Block SRC-FIL-DATASET-NAME Modifiable by exit 4 programs. SRC-FIL-NAME-AREA-OFFSET When the data set type is HFS. SRC-FIL-AREA-BUFFER Buffer which contains the path and file areas. Applicable when the data set is a library. it contains the offset from SRC-FILE-CONTROL-BLOCK to the path name area within the buffer space. blank otherwise. Type of data set named by the TGT-FIL-DATASET-NAME field: DA. PSU. If you change the field using exit 4. TGT-FIL-DATASET-NAME Modifiable by exit 4 programs. TGT-FIL-DATASET-MEMBER Modifiable by exit 4. TGT-FIL-LENGTH Size of the file block (TGT-FILE-CONTROL-BLOCK). exit programs cannot modify these fields. TGT-FIL-PATH-AREA-OFFSET When the data set type is HFS. Use the label to verify that the correct version of this DSECT was passed to your exit. Member name of the element for which the action applies. TGT-FIL-CURRENT-VERSION Version number to identify the File block (TGT-FILE-CONTROL-BLOCK). You do not have to change the TGT-FIL-DATASET-MEMBER.The COBOL File Block TGT-FILE-CONTROL-BLOCK Field Descriptions The following list contains brief descriptions of the fields in the TGT-FILE-CONTROL-BLOCK. and so forth. In order for CA Endevor SCM to recognize the change(s). This should always be 2. you must return a code of 4 (EXIT-CONTROL-BLOCK field ECB-RETURN-CODE). TGT-FIL-DATASET-TYPE Modifiable by exit 4. TGT-FIL-AREA-BUFFER. blank otherwise. The first 2 bytes of the path area contain the binary length value of path name. IS. or the TGT-FIL-DATASET-TYPE to be correct for the new DDname. TGT-FIL-DDNAME Modifiable by exit 4. DDNAME associated with the data set named above. The possible values are the same as those that apply for the DSORG JCL parameter. it contains the offset from TGT-FILE-CONTROL-BLOCK to the path name area within the buffer space. it is your responsibility to allocate the file (data set name) associated with the new DDname. TGT-FIL-BLOCK-ID Identifies this as the Exit Control block. PO. 152 Exits Guide . Value is always "$FIL". Data set name of the external file used by the current action. Unless otherwise noted. in bytes. The name immediately follows. Applicable when the data set is a library. TGT-FIL-AREA-BUFFER Buffer which contains the path and file areas. and/or to inhibit the writing of the SMF Action Request record. The first 2 bytes of the area contain the binary length value of file name and the name immediately follows.The SMF Action Record TGT-FIL-NAME-AREA-OFFSET When the data set type is HFS. it contains the offset from TGT-FILE-CONTROL-BLOCK to the file name area within the buffer space. The SMF Action Record CA Endevor SCM passes this block to programs written for exit 3. Chapter 3: Using Exit Control Blocks 153 . see TGT-FIL-AREA-BUFFER. if desired. when SMF recording is in effect. It is used to log/record information using SMF. see the Administration Guide. The address list passed to the exit is pointed to by Register 1: 8(R1). Note: For the assembler DSECT layout and field descriptions. . ■ ■ Chapter 4: Using Package Exits 155 . An example of a package action is CREATE or CAST. Exceptions are noted in the text. The Setup call allows users to enable just those package exit points that their exit 7 programs require. Package exit points all share one number--seven (7).Chapter 4: Using Package Exits This section contains the following topics: Package Processing (see page 155) Writing Exit Programs for Package Actions (see page 156) Package Exit Points (see page 157) Enabling Package Exit Points (see page 157) Requests for Data (see page 165) Package Exit Actions (see page 170) Package Processing Package processing consists of several actions that are used throughout the life cycle of the package. CA Endevor SCM only invokes exit processing at those package exit points enabled by the setup call to each exit 7 program. The package exit facility provides an exit point before and after most package actions. Package exit points differ from other user exit points in following ways: ■ ■ Standard CA Endevor SCM exits have a separate number per exit point. CA Endevor SCM calls all programs identified as exit 7 programs. There can be multiple requests for a given exit point. This information is returned to the exit program in a control block. Package exits written in high-level languages do not need to follow the conventions for user exits that are discussed in the section High-Level Language Support. indicating that Setup is in progress. You must include exit programs for package actions in the user exit table just like the other CA Endevor SCM exits. Package exit programs can request data from CA Endevor SCM after they are called. After building the user exit table during initialization. During the session. There is a separate exit point reserved for package exit setup. The CA Endevor SCM Batch Package Facility does not provide ISPF information to the exits. Note: Your program must recognize the Setup call. see Package Exit Points (see page 157). CA Endevor SCM calls all exit modules within the setup function. The following item is applicable only for COBOL: ■ Do not link the utility EPC1UEXT into high-level language exit load modules as you would for a user exit. Otherwise. This information is provided in the main exit control block ($PECBDS in Assembler) and (PACKAGE-EXIT-BLOCK in COBOL). Note: For more information. For more information about Setup. Note: For a list of the functions and subfunctions supported by the package exit facility. CA Endevor SCM does not call it again. Note: For more information. Any exit that relies on ISPF specific fields will have to be modified to execute in a batch environment. Note: For information about executing packages in batch and the CA Endevor SCM Batch Package Facility. when writing exit programs for package functions follow the guidelines provided for standard exit programs. see the SCL Reference Guide. ■ Include request flag and return code logic if you wish to obtain certain information from CA Endevor SCM after the exit is called. see COBOL Request Flags and Return Codes (see page 167). ■ Not assume that you are executing in an ISPF environment.Writing Exit Programs for Package Actions Writing Exit Programs for Package Actions Exit programs for package actions must do the following: ■ Determine which package function has invoked exit processing. ■ Include a routine called Setup. CA Endevor SCM reads the control block returned by the exit 7 program during the setup call to determine which package exit functions the exit enables. If your program does not change the necessary control block fields from N to Y. see Enabling Package Exit Points (see page 157). 156 Exits Guide . see Exits (see page 9). Cast. Note: For more information about writing exit programs for each of these functions and subfunctions. Display (before. and its related functions Build. Ship. Delete. SCL. Enabling Package Exit Points You enable package exit points by setting flags in the Package Exit Control block ($PECBDS) during the Setup call. GENPKGID. Ship.only). and its related functions Build. Copy. Export. Backout. and Define. Utilities. and its related functions Transmit. An exit program receives control once during the Setup call if its name was specified as an “@C1UEXIT EXIT#=7” entry in the user exit table. Execute. Review. Execute. and Display. Backout. Reset. Backin. Review. and its related functions Build. -mid-). and its related functions Approve. Note: For more information. Backout. see Package Exit Actions (see page 170).Package Exit Points Package Exit Points CA Endevor SCM supports exit programs before and after the following package actions and functions: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ Archive. Packages. see How to Identify Exits (see page 14). Cast (before-. Modify. List. Import. after-. Dynamic. Create. Commit. Deny. Confirm. Reports. Chapter 4: Using Package Exits 157 . Import. Edit. Commit. and its related functions Approver. Copy. Edit. Element Summary. Environment TSO (including ISPF) Batch (with no TSO or ISPF services available) Field PECBTSOX PECBBATX The user exit must also indicate to CA Endevor SCM which exit points it can handle by setting the following $PECBDS fields to Y (enable): To enable this exit point Before-archive After-archive Before-backin After-backin Before-backout After-backout Set this field to Y PECBARBE PECBARAF PECBBIBE PECBBIAF PECBBOBE PECBBOAF 158 Exits Guide . The default for TSO is Y(Yes).Enabling Package Exit Points The Setup call occurs only once per session during CA Endevor SCM initialization. When CA Endevor SCM passes the $PECBDS control block during the Setup call. ■ CA Endevor SCM extracts the Package Exit Control block ($PECBDS) values from all defined exit 7 programs at initialization. During the Setup call the exit program must do the following: ■ Indicate whether the exit program can operate under TSO and/or as a batch program (without TSO services). using them to generate a table of enabled package exits. For more information. Setup information is stored for the life of the CA Endevor SCM session. it loads the following values: ■ ■ ■ PECBPKID CL16 'INITIAL' PECBFNNM CL8 'SETUP' PECBFNCD DC H'0000' $PECBDS Fields ■ The user exit must indicate to CA Endevor SCM the operating environments in which the user exit is designed to execute by setting the following $PECBDS fields to Y or N. see the chapter “Introduction.” Specify which of the exit points the exit program is designed to handle. You can set the default for batch with the @C1UEXIT macro. CA Endevor SCM uses this table during the session to determine whether to invoke an exit program at a particular point. Enabling Package Exit Points To enable this exit point Before-cast Mid-cast After-cast Before-collect After-collect Before-commit After-commit Before-create/build After-create/build Before-create/copy After-create/copy Before-create/edit After-create/edit Before-create/import After-create/import Before-delete After-delete Before-display approver Before-display backout Before-display SCL Before-display element summary Before-display packages Before-display reports Before-dynamic/add After-dynamic/add Before-dynamic/update After-dynamic/update Before-dynamic/delete After-dynamic/delete Before-execute Set this field to Y PECBCABE PECBCAMD PECBCAAF PECBCSBE PECBCSAF PECBCOBE PECBCOAF PECBCBBE PECBCBAF PECBCCBE PECBCCAF PECBCEBE PECBCEAF PECBCIBE PECBCIAF PECBDEBE PECBDEAF PECBDABE PECBDABE PECBDSBE PECBDXBE PECBDPBE PECBDRBE PECBD1BE PECBD1AF PECBDUBE PECBDUAF PECBDDBE PECBDDAF PECBEXBE Chapter 4: Using Package Exits 159 . see Package Exit Control Blocks (see page 210).Enabling Package Exit Points To enable this exit point After-execute Before-export After-export Before-GENPKGID After-GENPKGID Before-list After-list Before-modify/build After-modify/build Before-modify/copy After-modify/copy Before-modify/edit After-modify/edit Before-modify/import After-modify/import Before-reset After-reset Before-review/approve After-review/approve Before-review/deny After-review/deny Before-ship/transmit Before-ship/confirm After-ship/transmit After-ship/confirm Set this field to Y PECBEXAF PECBEPBE PECBEPAF PECBGPBE PECBGPAF PECBLTBE PECBLTAF PECBMBBE PECBMBAF PECBMCBE PECBMCAF PECBMEBE PECBMEAF PECBMIBE PECBMIAF PECBRSBE PECBRSAF PECBRABE PECBRAAF PECBRDBE PECBRDAF PECBSXBE PECBSCBE PECBSXAF PECBSCAF Note: For more information about each field. 160 Exits Guide . C'Y' MVI PECBBOAF. it loads the following values: ■ ■ ■ PECB-PACKAGE-ID PECB-FUNCTIONAL-LITERAL PECB-FUNCTIONAL-CODE PIC X(16). Chapter 4: Using Package Exits 161 . the exit program must do the following: ■ Indicate whether the exit program can operate under TSO and/or as a batch program (without TSO services).C'Y' MVI PECBBATX.C'Y' MVI PECBRSBE. An exit program receives control once during the Setup call if its name was specified as an “@C1UEXIT EXIT#=7” entry in the user exit table. Setup information is stored for the life of the CA Endevor SCM session. During the Setup call. When CA Endevor SCM passes the PACKAGE-EXIT-BLOCK control block during the Setup call.C'Y' MVI PECBCAAF. PIC 9(4) COMP SYNC. see How to Identify Exits (see page 14). PIC X(8).Enabling Package Exit Points Sample SETUP Routine The following setup routine enables four exit points: SETUP DS 0H * MVI PECBTSOX. CA Endevor SCM uses this table during the session to determine whether to invoke an exit program at a particular point. using them to generate a table of enabled package exits. Specify which of the exit points the exit program is designed to handle. The default for TSO is Y(Yes). The Setup call occurs only once per session during CA Endevor SCM initialization. Note: For more information.C'Y' MVI PECBEXAF.C'Y' * BR R12 ENABLE ENABLE ENABLE ENABLE ENABLE ENABLE ENABLED FOR TSO EXECUTION ENABLED FOR BATCH EXECUTION AFTER BACKOUT EXIT AFTER CAST EXIT AFTER EXECUTE EXIT BEFORE RESET EXIT COBOL Exit Points You enable package exit points by setting flags in the Package Exit Control block (PACKAGE-EXIT-BLOCK) during the Setup call. You can set the default for batch with the @C1UEXIT macro. ■ CA Endevor SCM extracts the Package Exit Control block (PACKAGE-EXIT-BLOCK) values from all defined exit 7 programs at initialization. Batch (with no TSO or ISPF services available) Field PECB-TSO-EXECUTE PECB-BATCH-EXECUTE The user exit must also indicate to CA Endevor SCM which exit points it can handle by setting the following PACKAGE-EXIT-BLOCK fields to Y (enable): To enable this exit point Before-archive After-archive Before-backin After-backin Before-backout After-backout Before-cast Mid-cast After-cast Before-collect After-collect Before-commit After-commit Before-create/build After-create/build Before-create/copy After-create/copy Before-create/edit After-create/edit Set this field to Y PECB-BEFORE-ARCHIVE PECB-AFTER-ARCHIVE PECB-BEFORE-BACKIN PECB-AFTER-BACKIN PECB-BEFORE-BACKOUT PECB-AFTER-BACKOUT PECB-BEFORE-CAST PECB-MID-CAST PECB-AFTER-CAST PECB-BEFORE-COLLECT PECB-AFTER-COLLECT PECB-BEFORE-COMMIT PECB-AFTER-COMMIT PECB-BEFOR-CREATE-BLD PECB-AFTER-CREATE-BLD PECB-BEFORE-CREATE-COPY PECB-AFTER-CREATE-COPY PECB-BEFORE-CREATE-EDIT PECB-AFTER-CREATE-EDIT 162 Exits Guide .Enabling Package Exit Points PACKAGE-EXIT-BLOCK Fields The user exit must indicate to CA Endevor SCM the operating environments in which the user exit is designed to execute by setting the following PACKAGE-EXIT-BLOCK fields to Y or N: Environment TSO (including ISPF). Enabling Package Exit Points To enable this exit point Before-create/import After-create/import Before-delete After-delete Before-display approver Before-display backout Before-display SCL Before-display element summary Before-display packages Before-display reports Before-dynamic/add After-dynamic/add Before-dynamic/update After-dynamic/update Before-dynamic/delete After-dynamic/delete Before-execute After-execute Before-export After-export Before-GENPKGID After-GENPKGID Before-list After-list Before-modify/build After-modify/build Before-modify/copy After-modify/copy Before-modify/edit After-modify/edit Set this field to Y PECB-BEFORE-CREATE-IMPT PECB-AFTER-CREATE-IMPT PECB-BEFORE-DELETE PECB-AFTER-DELETE PECB-BEFORE-DSPLY-APPR PECB-BEFORE-DSPLY-BKOUT PECB-BEFORE-DSPLY-SCL PECB-BEFORE-DSPLY-ELMSM PECB-BEFORE-DSPLY-PKG PECB-BEFORE-DSPLY-RPT PECB-BEFORE-DYNAMIC-ADD PECB-AFTER-DYNAMIC-ADD PECB-BEFORE-DYNAMIC-UPDATE PECB-AFTER-DYNAMIC-UPDATE PECB-BEFORE-DYNAMIC-DELETE PECB-AFTER-DYNAMIC-DELETE PECB-BEFORE-EXEC PECB-AFTER-EXEC PECB-BEFORE-EXPORT PECB-AFTER-EXPORT PECB-BEFORE-GENPID PECB-AFTER-GENPID PECB-BEFORE-LIST PECB-AFTER-LIST PECB-BEFORE-MOD-BLD PECB-AFTER-MOD-BLD PECB-BEFORE-MOD-CPY PECB-AFTER-MOD-CPY PECB-BEFORE-MOD-EDIT PECB-AFTER-MOD-EDIT Chapter 4: Using Package Exits 163 . 164 Exits Guide . Sample SETUP Routine The following setup routine enables four exit points: PROCEDURE DIVISION USING PACKAGE-EXIT-BLOCK PACKAGE-REQUEST-BLOCK PACKAGE-EXIT-HEADER-BLOCK PACKAGE-EXIT-FILE-BLOCK PACKAGE-EXIT-ACTION-BLOCK PACKAGE-EXIT-APPROVER-MAP PACKAGE-EXIT-BACKOUT-BLOCK PACKAGE-EXIT-SHIPMENT-BLOCK PACKAGE-EXIT-SCL-BLOCK.Enabling Package Exit Points To enable this exit point Before-modify/import After-modify/import Before-reset After-reset Before-review/approve After-review/approve Before-review/deny After-review/deny Before-ship/transmit Before-ship/confirm After-ship/transmit Before-ship/confirm After-ship/confirm Set this field to Y PECB-BEFORE-MOD-IMPT PECB-AFTER-MOD-IMPT PECB-BEFORE-RESET PECB-AFTER-RESET PECB-BEFORE-REVAPP PECB-AFTER-REV-APP PECB-BEFORE-REV-DENY PECB-AFTER-REV-DENY PECB-BEFORE-SHIP-XMIT PECB-BEFORE-SHIP-XMIT PECB-AFTER-SHIP-XMIT PECB-BEFORE-SHIP-CON PECB-AFTER-SHIP-CON Note: For more information about each field. see Package Exit Control Blocks (see page 210). IF SETUP-EXIT-OPTIONS MOVE 'Y' TO PECB-AFTER-BACKOUT MOVE 'Y' TO PECB-AFTER-CAST MOVE 'Y' TO PECB-AFTER-EXEC MOVE 'Y' TO PECB-BEFORE-RESET MOVE ZEROS TO RETURN-CODE GO TO 800-SET-RETURN. The following are types of variable data available to user exits: ■ ■ ■ ■ ■ ■ Element ID records Approver group records Backout records SCL records Shipment records Collection records You control which and how much of a particular type of resource is passed to a program. Also. they are variable in number and existence per package. the package exit facility was designed with a record-level interface that allows the user exit to drive its own resource requirements Note: This process is very different from the other CA Endevor SCM exits in that it allows for multiple calls to a single exit module. CA Endevor SCM encounters an EOF on the request. This interactive process continues per request type until one of the following conditions occurs: ■ ■ The user exit returns to CA Endevor SCM without resetting the request for data flag. sets the request for data return code with the appropriate value. there are groups of records that are created. The Record-Level Interface Throughout the life cycle of a package. clears the USER REQUEST field. updated. The request process is managed through a series of request for data flags and request return codes. the exit driver builds a control block. Assuming that the type of data is available at the exit point. and deleted as a function of package processing. thereby controlling how much storage and processing the user exit requires. Chapter 4: Using Package Exits 165 . and returns to CA Endevor SCM (if any error occurs) or to the user exit. They may or may not be in existence at certain points of the process. Due to the variable aspects of such data.Requests for Data Requests for Data This section describes how the user exit requests data from CA Endevor SCM and how the package exit facility processes the requests. How Requests for Data Work The exit fills in a request for a certain type of data. The package exit facility processes these requests for data serially per exit module called. PECBBODR DC C'N' Request for backout record. The five request flags are used by the user exit to tell CA Endevor SCM that there is a request for a record to be sent. and the hierarchical relationship between standard exit return codes. PECBSCLR DC C'N' Request for SCL record. message processing. the exit program has one chance to process each of the available data types. An error occurs. PECBCOLR DC C'N' Request for collection record. Assembler Request Flags and Return Codes There are six fields in the $PECBDS associated with request for data processing: five request flags (one per type) and one return code field. updating CA Endevor SCM fields.Requests for Data ■ ■ CA Endevor SCM encounters a NOT FOUND condition on the request. the default value is N. PECBACTR DC C'N' Request for element ID record. 166 Exits Guide . The following sections detail return codes and request for data flags. These fields are described next. availability considerations. PECBAPPR DC C'N' Request for approver group record. and REQUEST FOR DATA fields. PECSHPR DC C'N' Request for shipment record. So if you have one exit 7 module. CA Endevor SCM returns this information to the user exit. This field is modified by CA Endevor SCM to inform the user exit of the request for data results. Chapter 4: Using Package Exits 167 . The return code field is described as follows: PEC-REQ-REQUEST-RETURNCODE Request for data return code.Requests for Data After processing the request for data. PECB-REQ-APPROVER-REC Request for approver group record. These fields are described next (note the default value is 'N'): PECB-REQ-ACTION-ID-REC Request for element ID record. The five request flags are used by the user exit to tell CA Endevor SCM that there is a request for a record to be sent. PECB-REQ-BACKOUT-REC Request for backout record. PECB-REQ-SHIP-RECORDS Request for shipment record. CA Endevor SCM sets a return code for the user exit to interrogate. ■ Equates: PECB-SUCCESSFUL-RECORD-SENT – ■ Value: 1 Equates: PECB-END-OF-FILE-FOR-REC-TYPE – Value : 2 ■ Equates: PECB-NO-RECORDS-FOUND – Value: 3 ■ Equates: PECB-SEVERE-ERROR – Value: 12 When an EOF or NFND condition occurs. COBOL Request Flags and Return Codes There are six fields in the PACKAGE-EXIT-BLOCK associated with request for data processing: five request flags (one per type) and one return code field. but does not allows further requests against that data type. PECB-REQ-SCL-RECORDS Request for SCL record. PECBAPPE. CA Endevor SCM sets a return code for the user exit to interrogate. These field names are PECBACTE. CA Endevor SCM issues an error message and the function abends. There is a distinction between an invalid data request and a not found condition: ■ ■ An invalid request is a request for a record type that never exists at the exit point. A not found condition occurs when the data type may exist. 168 Exits Guide . CA Endevor SCM returns this information to the user exit. Use this as a reference while coding exit programs. When an exit program requests a type of data that is not valid at the exit point. This field is modified by CA Endevor SCM to inform the user exit of the request for data results. Not all records are available at all times. but does not allows further requests against that data type. Data Record Availability Five types of records may be available through the request for data facility. but the particular package doesn't use that type of record. Note: For more information about which request blocks are available per exit point. CA Endevor SCM sets three flags in $PECBDS to inform exit programs which types of data exist. see Package Exit Actions (see page 170). These flags are initialized on the first call. Assembler Data Record Availability To assist exit programs in the request for data process. The following describes the return code field: PEC-REQ-REQUEST-RETURNCODE Request for data return code.Requests for Data After processing the request for data. and PECBBODE. ■ Equates: PECB-SUCCESSFUL-RECORD-SENT – ■ Value: 1 Equates: PECB-END-OF-FILE-FOR-REC-TYPE – Value : 2 ■ Equates: PECB-NO-RECORDS-FOUND – Value: 3 ■ Equates: PECB-SEVERE-ERROR – Value: 12 When an EOF or NFND condition occurs. PECB-REQ-COLL-RECORDS (collection records) Chapter 4: Using Package Exits 169 . and PECB-BAC-REC-EXIST-FLAG. These flags are initialized on the first call. Note: CA Endevor SCM sets the PECBRQRC field to 2 for EOF conditions. PECBCOLR (collection records) Once a valid request type has been processed or bypassed (per user exit) the flag is not checked again. PECBAPPR (approver records) 3. If the exit program does not set any request for data flags the first time it returns to CA Endevor SCM. Make sure that your exit programs detect and act on an EOF or NFND condition. PECB-REQ-SCL-RECORDS (SCL records) 5. CA Endevor SCM sets three flags in PACKAGE-EXIT-BLOCKS to inform exit programs which types of data exist. The timing of the request for data is also regulated.Requests for Data The timing of the request for data is also regulated. PECBBODR (backout records) 4. PECB-REQ-ACTION-ID-REC (element ID records) 2. PECB-APP-REC-EXIST-FLAG. an error occurs. Each valid request type is processed once per exit module. PECBACTR (element ID records) 2. Each valid request type is processed once per exit module. PECB-REQ-APPROVER-REC (approver records) 3. It returns once to the exit program with this information. and to 3 for Not Found (NFND) conditions. if the exit attempts to request more data after the EOF or NFND has been set. PECBSCLR (SCL records) 5. CA Endevor SCM does not reinvoke the exit program. The record types are processed in the following order: 1. The five types of record requests are processed sequentially. PECB-SHIP-RECORDS (shipment records) 6. COBOL Data Record Availability To assist exit programs in the request for data process. The five types of record requests are processed sequentially. The record types are processed in the following order: 1. PECB-REQ-BACKOUT-REC (backout records) 4. because. PECBSHPR (shipment records) 6. These field names are PECB-ACT-REC-EXIST-FLAG. 170 Exits Guide . The following section describes each package exit action in terms of the following: ■ ■ ■ Possible uses for the exits. PECBSFCD. function. use before-exit calls to determine if a package action should be cancelled or allowed to continue. and type literals respectively. and type literals respectively. and type. Control blocks passed. and type (before or after). It returns once to the exit program with this information. If the exit program does not set any request for data flags the first time it returns to CA Endevor SCM. Data available to exit programs. and to 3 for Not Found (NFND) conditions. Make sure that your exit programs detect and act on an EOF or NFND condition. All exit points must be explicitly enabled by the Setup exit. and the fields in each control block that exits can modify. Package Exit Actions There is a package exit point before and after each package action or function. function. In Assembler. The control block fields PECB-FUNCTION-CODE. PECB-SUBFUNCTION-CODE and PECB-BEFORE-AFTER-CODE contain numeric codes for action. the control block fields PECB-FUNCTION-CODE. if the exit attempts to request more data after the EOF or NFND has been set. The control block fields PECBFNCD. and PECBBANM contain action. The user exit is responsible for determining action.Package Exit Actions Once a valid request type has been processed or bypassed (per user exit) the flag is not checked again. Note: After-exits can only modify set messages and return codes up to a maximum of 4. CA Endevor SCM does not reinvoke the exit program. function. because. the control block fields PECBFNNM. function and type. PECBSFNM. In general. In COBOL. Note: CA Endevor SCM sets the PECB-REQUEST-RETURN-CODE field to 2 for EOF conditions. an error occurs. and PECBBACD contain numeric codes for action. and PECB-BEF-AFTER-LITERAL contain action. the exit driver will reduce the return code to 4. PECB-SUBFUNC-LITERAL. and after-exit calls for notification and logging purposes. If an exit program sets a return code higher than 4. function. Print messages and cancel the package action. update. 4 8 With the request for data processing. After-archive programs can work with logging and user notification. Print messages. This return code can be passed only by before-exits.Package Exit Actions Package Exit Return Codes All exit programs return the same return codes to the PECBRTCD field in Assembler and PECB-NDVR-EXIT-RC for COBOL in the Package Exit control block. call the next exit program (if any). The before-archive package action can also allow or disallow the DELETE package action. and proceed with package action. and/or message requests. CA Endevor SCM checks to see if a request for data is currently in progress. instead of calling the next exit in the table. The following table describes these return codes: Return Code 0 Description The exit didn't change any action-related data. and proceeds with the package action. CA Endevor SCM treats the exit as a single call exit. However. when CA Endevor SCM receives a control block from an user exit. calls the next exit program (if any). it interrogates the PECBRTCD field in Assembler and PECB-NDVR-EXIT-RC in COBOL. Print messages. check the request update flags in the $PECBDS for Assembler and PACKAGE-EXIT-BLOCK in COBOL and updates the appropriate CA Endevor SCM fields. if so it continues. by user ID. The Archive Package Exit CA Endevor SCM performs the ARCHIVE package action after a package is committed (if backout is enabled) or after a package is executed (if backout is not enabled). The after-action exit will still be invoked. The exit changed one or more control block fields. If there are no request for data flags the first time the user exit returns to CA Endevor SCM. can perform an ARCHIVE. for cancel. CA Endevor SCM passes the following Assembler control blocks to ARCHIVE exit programs: Control Block Package Exit Control Modifiable Fields ■ ■ PECBRTCD PECBMGCD Chapter 4: Using Package Exits 171 . Before-archive programs can restrict who. Package Exit Actions Control Block Modifiable Fields ■ ■ PECBMSG PECBUEXT Package Request Block Package Header Block Package File Block None None ■ ■ PFILDDN PFILMEM CA Endevor SCM passes the following COBOL control blocks to ARCHIVE exit programs: Control Block Package Exit Control Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block Package File Block None None ■ ■ PFIL-DD-NAME PFIL-MEMBER-NAME The following resources are available on request from the user exit: Request Block Package Action Package Approver Package SCL Package SHIP Product COLLECT Availability Before/After Before/After Before/After Before/After Before/After 172 Exits Guide . by user ID. can perform the BACKIN action.Package Exit Actions The Backin Package Exit CA Endevor SCM performs the BACKIN package action when a package that has been previously backed out is being reinstalled. Check an external process to see if backin criteria have been met. After-backin programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks to the BACKIN exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block None Package Header Block None CA Endevor SCM passes the following COBOL control blocks to the BACKIN exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block None Chapter 4: Using Package Exits 173 . Before-backin programs can be used to do the following: ■ ■ Restrict who. by user ID. can perform the BACKOUT action.Package Exit Actions Control Block Package Header Block Modifiable Fields None Backin exit programs can request the following data: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Product Collect Available to these Exits Before/After Before/After Before/After Before/After Before/After Before/After The Backout Package Exit The BACKOUT package action returns all the outputs affected by the execution of a package to their prior state: Before-backout programs can be used to do to the following: ■ ■ Restrict who. Check an external process to see if backout criteria have been met. After-backout programs can be used for the following: ■ ■ ■ Logging Approver notification Distribution CA Endevor SCM passes the following Assembler control blocks to the BACKOUT exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block None 174 Exits Guide . The user can cancel the cast at this point. to validate package components. optionally. Note: The CAST action has a MID exit point. Chapter 4: Using Package Exits 175 . just before returning to the caller.Package Exit Actions Control Block Package Header Block Modifiable Fields None CA Endevor SCM passes the following COBOL control blocks to the BACKOUT exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block None Package Header Block None Backout exit programs can request the following data: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Product Collect Availability Before/After Before/After Before/After Before/After Before/After Before/After The Cast Package Exit CA Endevor SCM performs the CAST package action to freeze the elements included in the package and gather approvers associated with the inventory and. CA Endevor SCM executes it after the CAST is internally complete. and CA Endevor SCM will perform a cleanup. Package Exit Actions Before-cast programs can be used to do the following: ■ ■ ■ Restrict who, by user ID, can perform the CAST action. Check an external process to see if cast criteria have been met. Supply approver groups from an external source (the CA Endevor SCM InfoMan Interface, for example). Mid-cast programs can be used to cancel or allow a cast based on the following: ■ ■ Inventory structure Approvers After-cast programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks to CAST exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT PREQBOEN PREQEWSD PREQEWST PREQEWED PREQEWET Package Request Block ■ ■ ■ ■ ■ Package Header Block Package Approver Request Block (modifiable as before function only) None ■ ■ ■ ■ ■ ■ PAPPGPNM PAPPEVNM PAPPQUOR PAPPAPP# PAPPAPID PAPPAREQ 176 Exits Guide Package Exit Actions Note: If PECB-NDVR-EXIT-RC is set to Return Code 8 during a mid-cast exit, the after cast exit will still be executed. CA Endevor SCM passes the following COBOL control blocks to CAST exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD PREQ-BACKOUT-ENABLED PREQ-EXEC-START-DATE PREQ-EXEC-START-TIME PREQ-EXEC-END-DATE PREQ-EXEC-END-DATE Package Request Block ■ ■ ■ ■ ■ Package Header Block Package Approver Request Block (modifiable as before function only) None ■ ■ ■ ■ ■ ■ PAPP-GROUP-NAME PAPP-ENVIRONMENT PAPP-QUORUM-COUNT PAPP-APPROVER-NUMBER PAPP-APPROVAL-ID PAPP-APPR-REQUIRED Note: If PECB-NDVR-EXIT-RC is set to Return Code 8 during a mid-cast exit, the after cast exit will still be executed. CAST exit programs can request the following data: Request Block Package Action Package Approver Package SCL Availability Mid/After Mid/After Before/Mid/After Note: The before-cast exit function is unique in that the user exit may pass back an approver group record from an external source, to be used by the cast package during the gathering of approvers. Chapter 4: Using Package Exits 177 Package Exit Actions In Assembler, the exit program initiates this task by performing the following actions: ■ ■ Setting the PECBUAPP flag to Y. Filling in the empty $PAPPREQ block that was passed as part of before-cast exit processing. In COBOL, the exit program initiates this task by performing the following actions: ■ ■ Setting the PECB-USENDING-APP-GRPSP flag to Y. Filling in the empty PACKAGE-EXIT-APPROVER-MAP block that was passed as part of before-cast exit processing. When CA Endevor SCM encounters the update request, it performs the following actions: ■ ■ ■ Validates and stores the data from the request block. Clears the request block and flag. Returns to the user exit to see if there are more approver groups to be added. The Commit Package Exit CA Endevor SCM performs the COMMIT package action after a package has been accepted as correct. Once a package is committed, it cannot be backed out. Before-commit programs can be used to restrict who, by user ID, can perform the COMMIT action. After-commit programs in Assembler can be used for logging and approver notification. CA Endevor SCM passes the following Assembler control blocks to Commit exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block None None 178 Exits Guide Package Exit Actions After-commit programs in COBOL can be used for logging and approver notification. CA Endevor SCM passes the following COBOL control blocks to Commit exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block None None The following resources are available on request from the user exit: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Product Collect Availability Before/After Before/After Before Before/After Before/After Before/After The Create Package Exit CA Endevor SCM performs the CREATE package function to create a package either from scratch, from another package, or from an external source. There are four functions with this exit action: BUILD, IMPORT, EDIT, and COPY. Before-create programs can be used to do the following: ■ ■ ■ Restrict who, by user ID, can perform the CREATE action. Check some external process to see if criteria for create has been met. Perform security checking on the external data set. Chapter 4: Using Package Exits 179 Package Exit Actions After-create programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks to CREATE exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT PREQBOEN PREQEWSD PREQEWST PREQEWED PREQEWET PREQCOMM PREQDEL PREQAPD PREQPSHR PREQIPKG (COPY) PFILDDN (IMPORT) PFILMEM(IMPORT) Package Request Block ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ File Information Block ■ ■ Package Header Block None CA Endevor SCM passes the following COBOL control blocks to CREATE exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD 180 Exits Guide Package Exit Actions Control Block Package Request Block Modifiable Fields ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ PREQ-BACKOUT-ENABLED PREQ-EXEC-START-DATE PREQ-EXEC-START-TIME PREQ-EXEC-END-DATE PREQ-EXEC-END-TIME PREQ-PACKAGE-COMMENT PREQ-DELETE-ENABLED PREQ-APPEND-PACKAGE PREQ-SHARE-ENABLED PREQ-SOURCE-PACKAGE (COPY) PFIL-DD-NAME (IMPORT) PFIL-MEMBER-NAME (IMPORT) File Information Block ■ ■ ■ Package Header Block None The following resources are available on request from the user exit: Request Block Package SCL Availability Before/After Chapter 4: Using Package Exits 181 by user ID.Package Exit Actions The Delete Package Exit The DELETE package action is performed to delete a package. After-delete programs can be used for logging and approver notification. CA Endevor SCM passes the following Assembler control blocks with the DELETE exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block None CA Endevor SCM passes the following COBOL control blocks with the DELETE exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block None The following resources are available on request from the user exit: Request Block Package Action Package Approver Package Backout Package Header Availability Before Before Before Before 182 Exits Guide . can perform the DELETE action. Before-delete programs can be used to restrict who. and SCL. No other package exit calls are issued for the Display and List package functions. CA Endevor SCM passes the following Assembler control blocks with the DISPLAY exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block None None CA Endevor SCM passes the following COBOL control blocks with the DISPLAY exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID Chapter 4: Using Package Exits 183 . REPORTS. masking. by user ID. ACTION SUMMARY. Note: A package exit call (list/before) is issued for each package that meets selection criteria (based on package name. BACKOUT. and so on) to determine if the user is authorized to access a package during the process of building a list of packages for DISPLAY or LIST functions. can display certain parts of the packages. There are five functions with the display package exit function: APPROVERS. Before-display programs can be used to restrict or tailor who.Package Exit Actions Request Block Package SCL Package Ship Product Collect Availability Before Before Before The Display Package Exit The DISPLAY package action is used to display packages or parts of packages. Package Exit Actions Control Block Modifiable Fields ■ ■ PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block None None The following resources may be available on request from the user exit: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Product Collect Availability Before Before Before Before/After Before Before The Dynamic Package Exit CA Endevor SCM performs the DYNAMIC package action to either approve or deny a package. by user ID. who can add a dynamic approver group to a package. After-dynamic add programs can be used to do the following: ■ ■ Logging. who can update a dynamic approver group from a package. 184 Exits Guide . by user ID. Check an external process to see if criteria for the addition of a dynamic approver group has been met. Before-dynamic update programs can be used to do the following: ■ ■ Restrict. Before-dynamic add programs can be used to do the following: ■ ■ Restrict. Check an external process to see if criteria for the update of a dynamic approver group has been met. Approver email notification. deletion. who can delete a dynamic approver group from a package. The exit is passed to the Dynamic Approver Group record. After-dynamic delete programs can be used to do the following: ■ ■ Logging. Note: The Approver Group Exit Record maps. A null value will be passed. The exit cannot change fields in the Dynamic Approver Group record. not exist. Approver email notification. in most cases.Package Exit Actions After-dynamic update programs can be used to do the following: ■ ■ Logging. as it currently exists in the package file. For example. the dynamic approver record will not be passed to the exit. CA Endevor SCM passes the following Assembler control blocks with the DYNAMIC exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block Package Approver Request Block (for the Dynamic Approver Group) None None None Chapter 4: Using Package Exits 185 . do not include the new added-by information. if it exists. it can cancel the creation. $PAPPREQ (Assembler) and PACKAGE-EXIT-APPROVER-MAP (COBOL) in the copy member PKGXBLKS. the record will not be passed during the before-add and after-delete exit because the record would. The user's exit should always check for a null value. The exit is not passed a version of the Dynamic Approver Group record with the user's proposed changes. Before-dynamic delete programs can be used to do the following: ■ ■ Restrict. However. by user ID. or update of the record in the before exit. Check an external process to see if criteria for the deletion of a dynamic approver group has been met. In some cases. Note that the record might exist at the after-delete exit if the before-delete exit point had cancelled the delete action. Approver email notification. by user ID. Before-execute programs can be used to do the following: ■ ■ ■ Restrict who. 186 Exits Guide . After-execute programs can be used for the following: ■ ■ Logging Approver notification Notification of external processes in case of an abend in the execute process. Check external requirements. Perform additional SCL validation.Package Exit Actions CA Endevor SCM passes the following COBOL control blocks with the DYNAMIC exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block Package Approver Request Block (for the Dynamic Approver Group) None None None The following resources are available on request from the user exit: Request Block Package Action Package Approver Package SCL Availability Before/After Before/After Before/After The Execute Package Exit CA Endevor SCM uses the EXECUTE package action to execute qualified packages. can execute packages. Package Exit Actions CA Endevor SCM passes the following Assembler control blocks with the EXECUTE exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT PREQEWSD PREQEWST PREQEWED PREQEWET Package Request Block ■ ■ ■ ■ Package Header Block None CA Endevor SCM passes the following COBOL control blocks with the EXECUTE exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD PREQ-EXEC-START-DATE PREQ-EXEC-START-TIME PREQ-EXEC-END-DATE PREQ-EXEC-END-TIME Package Request Block ■ ■ ■ ■ Package Header Block None The following resources are available on request from the user exit: Request Block Package Action Package Approver Availability Before/After Before/After Chapter 4: Using Package Exits 187 . Package Exit Actions Request Block Package Backout Package SCL Availability After Before/After The Export Package Exit CA Endevor SCM uses the EXPORT package action to create an external copy of the package SCL. Before-export programs can be used to do the following: ■ ■ ■ Restrict who, by user ID, can export packages. Check external processes. Perform data set checking. After-export programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks with the EXPORT exit function: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block Package File Block None None ■ ■ PFILDDN PFILMEM 188 Exits Guide Package Exit Actions CA Endevor SCM passes the following COBOL control blocks with the EXPORT exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD PREQ-EXEC-START-DATE PREQ-EXEC-START-TIME PREQ-EXEC-END-DATE PREQ-EXEC-END-TIME Package Request Block ■ ■ ■ ■ Package Header Block None Export exit programs can request the following data: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Product Collect Availability Before/After Before/After Before/After Before/After Before/After Before/After The GENPKGID Exit CA Endevor SCM uses the GENPKGID exit action for package ID generation. CA Endevor SCM invokes this exit function when you create a package and leave the PACKAGE ID field blank. When you press Enter: ■ ■ If the GENPKGID exit point has been enabled, CA Endevor SCM displays a Create/Modify Package panel with a package ID assigned. Otherwise, CA Endevor SCM displays a Package Selection list. Chapter 4: Using Package Exits 189 Package Exit Actions The after-exit point for GENPKGID is after the completion or cancellation of the CREATE process. CA Endevor SCM executes based on whether or not the package ID was generated, and the status of the after-exit flag from the before-GENPKGID call. Before-GENPKGID programs can be used to do the following: ■ ■ Provide CA Endevor SCM with a package ID from an external source. Check external requirements. After-GENPKGID programs can be used for the following: ■ ■ Logging Package ID cancellation CA Endevor SCM passes the following Assembler control blocks with the GENPKGID exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT PECBPKID Package Request Block PREQCOMM CA Endevor SCM passes the following COBOL control blocks with the GENPKGID exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD PECB-PACKAGE-ID Package Request Block PREQ-PACKAGE-COMMENT 190 Exits Guide Package Exit Actions No data blocks can be requested by a user exit. Example This discussion shows how you can use an exit 7 program to automate the generation of valid package IDs that meet your site's naming standards. Note: The example uses COBOL field names. For the equivalent assembler field names, see the chapter “Using Exit Control Blocks.” Using exit 7 to generate a package ID is a three-step process: ■ Write the exit program. A program to generate a package ID must populate the package ID field with a predetermined value if the package ID field is blank. The name of the program is up to you. Compile and link-edit your program, placing it in a CA Endevor SCM authorized library. Add an entry for the program to the C1UEXITS table. Note: For more information about the C1UEXITS table, see How to Identify Exits (see page 14). A sample table entry for the program MYEXIT7 is shown as follows: @C1UEXIT EXIT#=7,NAME=MYEXIT7,ANCHID=_,AUTH=YES ■ ■ Recompile and re-link your C1UEXITS table so CA Endevor SCM can recognize the Exit 7 program. An exit 7 program to generate package IDs must consist of a setup exit options statement and a generate package ID statement. The setup exit options routine is called at CA Endevor SCM initialization time. Your code must set the Generate package ID flag (PECB-BEFORE-GENPID) to a value of 'Y' at this point. If you intend for this exit to be called for batch package actions be sure to also set the PECB-BATCH-EXECUTE flag to a value of 'Y'. The default value is 'N'. Your code should look similar to the following: IF SETUP-EXIT-OPTIONS MOVE 'Y' TO PECB-BATCH-EXECUTE PECB-BEFORE-GENPID MOVE ZEROS TO RETURN-CODE GO TO 900-MAIN-EXIT. Chapter 4: Using Package Exits 191 Package Exit Actions A simple generate package ID routine might read an ID from an external file, increment that ID by one, and then write the new ID back out to the file for use in the next package ID request. This routine is called prior to the execution of the Define/Create package action. The generate package ID is only called if the package ID specified by the user is blank. The following sample code assumes there is a parmlib file that contains the next available package ID. Be sure to set the modifications made flag to a value of 'Y' and set the return code to a value of 0. IF GENERATE-PACKAGE-ID READ PKGID-REC FROM PARMLIB MOVE PRM-NEXT-PKGID TO PECB-PACKAGE-ID MOVE 'Y' TO PECB-MODS-MADE-TO-PECB MOVE _ TO PECB-NDVR-EXIT-RC GO TO 900-MAIN-EXIT. The List Package Exit CA Endevor SCM can invoke LIST exit programs whenever it builds a package selection list. Use them to further tailor the criteria that determines which packages appear on, and can be selected from, that list. To effectively use LIST package exits, it is important to understand how CA Endevor SCM builds package selection lists. CA Endevor SCM determines the content of package selection lists using a two-step process, described as follows: 1. Selects all packages with a status required for the requested action. For example, if you specify the CAST option, CA Endevor SCM first selects all packages with a status of in-edit. 2. Uses the current user ID to further refine this list, based on whether or not the package has been cast. ■ ■ If a package has not been cast, it is included on the list if the user created it, or if it is sharable. If a package has been cast, it is included on the list if the user is an approver for the package. CA Endevor SCM performs these two steps before displaying a selection list, to determine which packages appear on the list, and after a selection is made from the list, to determine if the selection is valid. Before-list and after-list exit programs are invoked for all packages that pass Step 1. If a package does not pass Step 1, exit programs are not invoked for that package. Important! If a user allows a pre-list package exit to override the default CA Endevor SCM processing and allows a package to be put on a list, the user then becomes responsible for the actions that take place. Overriding an exit that is automatically issued by CA Endevor SCM requires the user to further ensure invalid actions do not occur. 192 Exits Guide Package Exit Actions A package exit call (list/before) is issued for each package that meets selection criteria (based on package name, masking, and so on) to determine if the user is authorized to access a package during the process of building a list of packages for DISPLAY or LIST functions. No other package exit calls are issued for the Display and List package functions. Before-list programs can override the second selection list check and control which package IDs are included on a selection list. After-list programs can override the second selection list check and control which package IDs can be selected from a selection list. CA Endevor SCM passes the following Assembler control blocks with the LIST exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBSFNM PECBUEXT Package Request Block Package Header Block None None CA Endevor SCM passes the following COBOL control blocks with the LIST exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-SUBFUNC-LITERAL PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block None None Chapter 4: Using Package Exits 193 Check some external process to see if criteria for modify has been met. by user ID. After-modify programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks with the MODIFY exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT PREQBOEN PREQEWSD PREQEWST PREQEWED PREQEWET Package Request Block ■ ■ ■ ■ ■ 194 Exits Guide . can perform the MODIFY action. and COPY. IMPORT. There are four functions with this exit action: BUILD. Perform security checking on the external data set. EDIT. Before-modify programs can be used to do the following: ■ ■ ■ Restrict who.Package Exit Actions The following resources may be available on request from the user exit: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Availability Before Before Before/After Before/After Before The Modify Package Exit CA Endevor SCM performs the MODIFY package action against an existing package. Package Exit Actions Control Block Modifiable Fields ■ ■ ■ ■ ■ PREQCOMM PREQDEL PREQAPD PREQPSHR PREQIPKG (COPY) PFILDDN (IMPORT) PFILMEM (IMPORT) File Information Block ■ ■ Package Header Block None CA Endevor SCM passes the following COBOL control blocks with the MODIFY exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD PREQ-BACKOUT-ENABLED PREQ-EXEC-START-DATE PREQ-EXEC-START-TIME PREQ-EXEC-END-DATE PREQ-EXEC-END-TIME PREQ-PACKAGE-COMMENT PREQ-DELETE-ENABLED PREQ-APPEND-PACKAGE PREQ-SHARE-ENABLED PREQ-SOURCE-PACKAGE (COPY) PFIL-DD-NAME (IMPORT) PFIL-MEMBER-NAME (IMPORT) Package Request Block ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ File Information Block ■ ■ ■ Package Header Block None Chapter 4: Using Package Exits 195 . Package Exit Actions The following resources may be available on request from the user exit: Request Block Package SCL Availability Before/After The Reset Package Exit The RESET package action is performed to put a package back into a status that can be modified. Approver notification. Check some external process to see if criteria for reset has been met. can perform the RESET action. and re-executed. by user ID. recast. Before-reset programs can be used to do the following: ■ ■ ■ Restrict who. After-reset programs can be used for logging. CA Endevor SCM passes the following Assembler control blocks to RESET exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block None None CA Endevor SCM passes the following COBOL control blocks to RESET exit programs: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD PECB-UEXT 196 Exits Guide . Package Exit Actions Control Block Package Request Block Package Header Block Modifiable Fields None None The following resources may be available on request from the user exit: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Availability Before Before Before Before/After Before The Review Package Exit CA Endevor SCM performs the REVIEW package action to either approve or deny a package. After-review programs can be used for the following: ■ ■ Logging Approver notification CA Endevor SCM passes the following Assembler control blocks with the REVIEW exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block None Chapter 4: Using Package Exits 197 . can perform the REVIEW action. Restrict reapproving a package. Before-review programs can be used to do the following: ■ ■ ■ Restrict who. by user ID. Check some external process to see if criteria for review has been met. Package Exit Actions Control Block Package Header Block Modifiable Fields None CA Endevor SCM passes the following COBOL control blocks with the REVIEW exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block None None The following resources are available on request from the user exit: Request Block Package Action Package Approver Package SCL Availability Before/After Before/After Before/After The Ship Package Exit CA Endevor SCM uses the SHIP action to ship packages to predefined destinations and to confirm transmission of package per destination. 198 Exits Guide . SHIP uses the following functions: ■ ■ XMIT function during the job that builds the transmit deck and performs the transmission. The SHIP action has two functions: XMIT and CONFIRM. Before-ship programs can be used to do the following: ■ ■ Restrict who. by user ID. can perform the SHIP action. Check an external process to see ship criteria have been met. CONFIRM function in a standalone utility that checks for verification from target destinations. CA Endevor SCM passes the following Assembler control blocks with the SHIP exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECBRTCD PECBMGCD PECBMSG PECBUEXT Package Request Block Package Header Block None None CA Endevor SCM passes the following COBOL control blocks with the SHIP exit action: Control Block Package Exit Control Block Modifiable Fields ■ ■ ■ ■ PECB-NDVR-EXIT-RC PECB-MESSAGE-ID PECB-MESSAGE PECB-UEXIT-HOLD-FIELD Package Request Block Package Header Block None None The following resources may be available on request from the user exit: Request Block Package Action Package Approver Package Backout Package SCL Package Ship Availability Before/After Before/After Before/After Before/After After Chapter 4: Using Package Exits 199 . Invoking an external process in case of transmission failure.Package Exit Actions After-ship programs can be used for the following: ■ ■ Operational notification. . Note: The default JOB statement is not edited for syntax when it is made part of the Destination Definition. are passed to C1BMXJCG. see the Packages Guide. The exit (contained in a user-written program named C1BMXJCG) will be invoked if it is found to be present in the STEPLIB or JOBLIB library concatenation or in the link list. The default JOB statement is obtained from the Destination Definition of the remote site. The four lines of the JOB statement. These data sets are built to contain the JCL needed to copy package members into the appropriate remote production libraries. Upon return. The job will copy package members to remote production data sets. Chapter 5: Using the Package Shipment Exit 201 . all four lines are written to the JCL data set being processed. Note: For more information. the JOBLIB data sets. The exit program can be located in the STEPLIB data sets. The JOB statement can be modified in any way desired. or the link list. along with a package-id and user-id. nor is there a syntax check after the JOB statement is modified by C1BMXJCG.Chapter 5: Using the Package Shipment Exit This section contains the following topics: The Package Shipment Exit (see page 201) Assembler Calling Conventions (see page 202) Assembler Example (see page 203) COBOL Calling Conventions Example (see page 204) Additional Exit Design Considerations (see page 205) Sample Exit Program (see page 206) The Package Shipment Exit CA Endevor SCM Package Shipment provides an exit point to allow user modifications to be made to a JOB statement which heads up a JCL stream to be executed at a remote site. The exit program is called prior to writing the remote JOB statement to the AHJOB JCL data set and prior to writing it to the optional CHJOB JCL data set. Register 1 contains an address pointing to three contiguous full words: – – – Parm 1: Points to a 16 character area containing the package id. ■ Register 14 contains the return address. Note: For more information. To return to the calling program: ■ Register 13 must be restored to the value it contained at the time the exit program was entered. Upon entry to C1BMXJCG: Register 13 points to an 18 fullword save area into which C1BMXJCG must save the caller's registers. Register 15 contains the entry point address of C1BMXJCG.Assembler Calling Conventions Assembler Calling Conventions Standard IBM linkage conventions are used in the call to C1BMXJCG. Each contains a single line of the default JOB statement set up in the Destination Definition. then it must provide itself with its own save area and should cross chain the two together. Parm 3: Points to four contiguous 80 character areas. Register 15 can be set to a return code. Parm 2: Points to an 8 character area containing the id of the user executing this shipment. ■ ■ ■ Register 14 contains the caller's return address. see Additional Exit Design Considerations (see page 205). Registers 14 and 0 through 12 must then be restored to their original values (as shown in the RETURN statement next). If C1BMXJCG is designed to CALL other programs. ■ 202 Exits Guide . LINKAGE SECTION. Note: For more information. ■ The JOB statement is now addressable through the LINKAGE SECTION field names and can be modified.MSGCLASS=X. see Additional Exit Design Considerations (see page 205). MOVE LS-USER-ID TO LS-JL2-USER-ID. 10 LS-JL2-USER-ID PIC X(8). 10 FILLER PIC X(11). 05 LS-JOB-LINE-2. 10 LS-JL1-JOBNAME PIC X(8). ■ The PROCEDURE DIVISION statement must "use" the three parms in the same order that they are passed. 05 LS-JOB-LINE-4 PIC X(80). 01 LS-PACKAGE-ID PIC X(16).CLASS=A. 01 LS-JOB-STATEMENT. 05 LS-JOB-LINE-1.Assembler Example Assembler Example Given: The default Destination Definition JOB statements look like this: //JOBNAME (ACCT). 10 FILLER PIC X(61). 01 LS-USER-ID PIC X(8). ■ The LINKAGE SECTION must contain an 01 level data description for each of the three parms passed by the caller. MOVE LS-USER-ID TO LS-JLl-JOBNAME. Chapter 5: Using the Package Shipment Exit 203 .IPACKAGE SHIPMENT'. 10 FILLER PIC X(70). ■ The RETURN-CODE special register can be used to pass a value back to the caller. // NOTIFY=USRNAME /*ROUTE XEQ REMOTE01 //* Required: The exit will change the JOBNAME and USRNAME to the id of the user executing this shipment. 05 LS-JOB-LINE-3 PIC X(80). PROCEDURE DIVISION USING LS-PACKAGE-ID LS-USER-ID LS-JOB-STATEMENT. 10 LS-JL1-SLASH-SLASH PIC XX. ■ The JOB statement is now addressable through the LINKAGE SECTION field names and can be modified. 01 LS-PACKAGE-ID 01 LS-USER-ID 01 LS-JOB-STATEMENT. 204 Exits Guide . LINKAGE SECTION. PIC PIC PIC PIC PIC X(11). PIC X(8). MOVE LS-USER-ID TO LS-JL2-USER-ID. PROCEDURE DIVISION USING LS-PACKAGE-ID LS-USER-ID LS-JOB-STATEMENT. PIC XX. Note: For more information. // NOTIFY=USRNAME /*ROUTE XEQ REMOTE01 //* Required: The exit will change the JOBNAME and USRNAME to the id of the user executing this shipment. ■ The LINKAGE SECTION must contain an 01 level data description for each of the three parms passed by the caller. 10 LS-JL1-SLASH-SLASH 10 LS-JL1-JOBNAME 10 FILLER 05 LS-JOB-LINE-2. X(80).COBOL Calling Conventions Example COBOL Calling Conventions Example Given: The default Destination Definition JOB statements look like this: //JOBNAME (ACCT). 10 FILLER 10 LS-JL2-USER-ID 10 FILLER 05 LS-JOB-LINE-3 05 LS-JOB-LINE-4 PIC X(16). ■ The PROCEDURE DIVISION statement must "use" the three parms in the same order that they are passed. PIC X(8). MOVE LS-USER-ID TO LS-JLl-JOBNAME.MSGCLASS=X.IPACKAGE SHIPMENT'. X(80). PIC X(70).CLASS=A. see Additional Exit Design Considerations (see page 205). 05 LS-JOB-LINE-1. ■ The RETURN-CODE special register can be used to pass a value back to the caller. X(8). X(61). " The return code is displayed as eight hexadecimal digits and is used for reporting purposes only.) The save area is cleared to binary zeros (low values) prior to branching to C1BMXJCG. it will be entered in AMODE 24. (Applicable to Assembler only.Additional Exit Design Considerations Additional Exit Design Considerations The various other points to consider are as follows: ■ ■ C1BMXJCG will be loaded only once during the shipment utility run. The save area and parameters are located below the 16M line. ■ ■ Chapter 5: Using the Package Shipment Exit 205 . The exit need not be re-entrant. but must be serially re-useable. If C1BMXJCG loads below the 16M line. otherwise it will be entered in AMODE 31. data cannot be stored in the save area between calls. Therefore. The message is written to the ClBMXLOG (sysout) data set. The return code passed back in register 15 by Assembler programs and in the RETURN-CODE special register of COBOL programs will be reported as part of message "ClBMX541 C1BMXJCG WAS ENTERED FOR DESTINATION <dest-id> AND RETURNED WITH CODE <return-code>. Sample Exit Program Sample Exit Program The following is a sample exit program: IDENTIFICATION DIVISION. DAVE BERRY. PROGRAM-ID.USER=EV0001 TO THE JOB STATEMENTS. 10 WS-PACKAGE-SERIES PIC X(01). C1BMXJCG. ENVIRONMENT DIVISION. THESE DATASETS ARE BUILT TO * * CONTAIN THE JCL NEEDED TO COPY PACKAGE MEMBERS INTO THE * * DESTINATION DEFINITION OF THE REMOTE SITE. 01-23-95. FILE SECTION. ***************************************************************** * THIS PACKAGE SHIPMENT EXIT ALLOWS USER MODIFICATION * * TO BE MADE TO THE JOB CARD THAT EXECUTES AT THE REMOTE * * SITES (THE IEBCOPY JOB IN THE PRODUCTION DATACENTERS). DATA DIVISION. DATE-WRITTEN. * * * * BASICALLY THIS PROGRAM CHANGES THE JOB CARD FROM WHAT THE * * DESTINATION PANEL JOB CARD SAYS TO WHAT THE EQUIVALENT OF * * WHAT THE PACKAGE EXECUTION JOB CARD SHOULD HAVE BEEN. 05 WS-PACKAGE-NUMBER. 10 WS-PACKAGE-TRAILER PIC X(03). AUTHOR.DJB * * * ***************************************************************** * WORKING-STORAGE SECTION. 05 FILLER PIC X(10). * * * * THE EXIT IS CALLED PRIOR TO WRITING THE REMOTE JOB CARD * * TO THE "AHJOB" JCL DATASET AND PRIOR TO WRITING IT TO THE * * OPTIONAL "CHJOB" JCL DATASET. * 01 WS-PACKAGE-ID. FILE-CONTROL. IT * * ALSO ADDS . . 05 WS-PACKAGE-SYS-ID PIC X(02). INPUT-OUTPUT SECTION. 206 Exits Guide . 10 WS-PROD-SYS-ID PIC X(02). * 01 LS-USER-ID PIC X(08). 10 FILLER PIC X(26). * 01 WS-USER-EQ. ******************************************************************* Chapter 5: Using the Package Shipment Exit 207 . 10 FILLER PIC X(70). * PROCEDURE DIVISION USING LS-PACKAGE-ID LS-USER-ID LS-JOB-STATEMENT. 10 WS-JOB-SPACE PIC X(01). 10 WS-JOB-USER-ID PIC X(06).USER=EV0001'. * 01 LS-JOB-STATEMENT. 05 WS-NON-PROD-JOBNAME REDEFINES WS-PROD-JOBNAME. * 01 LS-PACKAGE-ID PIC X(16).Sample Exit Program * 01 WS-JOB-NAME. 05 FILLER PIC X(12) VALUE '. 05 WS-PROD-JOBNAME. 10 LS-JL1-SLASH-SLASH PIC X(02). 05 LS-JOB-LINE-1. 10 LS-JL2-USER-EQ PIC X(12). 10 WS-JOB-POUND PIC X(01). 10 WS-PROD-TRAILER PIC X(03). ******************************************************************** * PUT DIFFERENT "USER=" ON JOB STATEMENT SO JOB HAS AUTHORIZATION * TO COPY INTO REMOTE DATASETS. 10 WS-PROD-POUND PIC X(01). 1000-MAIN-PROCESS. 10 FILLER PIC X(42). 10 WS-PROD-JOB-EV PIC X(02). * LINKAGE SECTION. 10 LS-JL1-JOBNAME PIC X(08). 05 LS-JOB-LINE-2. Sample Exit Program MOVE WS-USER-EQ TO LS-JL2-USER-EQ. 2000-EXIT. MOVE WS-PACKAGE-SYS-ID TO WS-PROD-SYS-ID. GOBACK. MOVE '#' TO WS-PROD-POUND. MOVE 'EV' TO WS-PROD-JOB-EV. 208 Exits Guide . MOVE WS-NON-PROD-JOBNAME TO LS-JL1-JOBNAME. 1000-EXIT. MOVE '#' TO WS-PROD-POUND. MOVE WS-PACKAGE-TRAILER TO WS-PROD-TRAILER. MOVE SPACES TO WS-JOB-SPACE. EXIT. 3000-EXIT. 2000-PROD-PKG. EXIT. MOVE SPACES TO WS-JOBNAME. IF WS-PACKAGE-NUMBER > '3999' PERFORM 2000-PROD-PKG THRU 2000-EXIT ELSE PERFROM 3000-NON-PROD-PKG THRU 3000-EXIT. MOVE WS-PROD-JOBNAME TO LS-JL1-JOBNAME. MOVE LS-PACKAGE-ID TO WS-PACKAGE-ID. 3000-NON-PROD-PKG. MOVE LS-USER-ID TO WS-JOB-USER-ID. Chapter 6: Using Package Exit Control Blocks This section contains the following topics: Package Exit Control Blocks (see page 210) Control Block Initialization and Availability (see page 214) The Package Exit Control Block (see page 215) The Package Request Control Block (see page 248) The Package Header Control Block (see page 262) The Package File Control Block (see page 273) The Package Action Request Block (see page 276) The Package Approver Request Block (see page 294) The Package Backout Request Block (see page 302) The Package Ship Request Block (see page 307) The Package SCL Request Block (see page 313) The Product Collection Request Block (see page 317) Package Exit Example (see page 321) Chapter 6: Using Package Exit Control Blocks 209 . Register 1 points to an address list. which in turn points to the control blocks.Package Exit Control Blocks Package Exit Control Blocks When a package exit is invoked. CA Endevor SCM formats a series of control blocks with information relevant to the exit action. The following illustration shows the order in which control blocks are always passed to exit programs: 210 Exits Guide . Package Exit Control Blocks Chapter 6: Using Package Exit Control Blocks 211 . message fields. if the control block is not relevant to the package exit action or it doesn't exist. Data set information for external data sets.Package Exit Control Blocks As previously illustrated. General historic package data. system. package options. A source or target ID record extracted from the package file on request from the user exit.CSIQOPTN. comment. The following table shows the information stored in each control block: Control Block (DSECT Name) Package Exit Control Block ($PECBDS) (PACKAGE-EXIT-BLOCK) Contains Information related to the current package action. element ID. return code and message fields. or shipment records. After the record is extracted. function. including the exit action. and so forth. The assembler control blocks are maintained as individual members.iqual. In addition to these fields. This block is relevant to the package exit actions with external data sets. This is the first and primary information block passed to the package exit. This block is available to all exit Package Request Block ($PREQPDS) (PACKAGE-REQUEST-BLOCK) Package Header Block ($PHDRDS) (PACKAGE-EXIT-HEADER-BLOCK) Package File Block ($PFILDS) (PACKAGE-EXIT-FILE-BLOCK) Package Action Request Block ($PACTREQ) (PACKAGE-EXIT-ACTION-BLOCK) 212 Exits Guide . call type literals and codes. and execution history. As a rule. data such as environment. the address in the parameter list is zeros (=F'0'). subsystem and action is placed in this block and the parameter list. These control blocks are located in iprfx. or PACKAGE-EXIT-BLOCK (COBOL). The assembler control blocks are maintained as individual members. all package exit actions can modify the return code fields. cast. It exists and is passed if the package exists. if a package action can modify a field on a panel. then the package exit action can modify the field at the before-exit point. and includes data such as date and time stamps for execution. approval. The COBOL control blocks are all located in one member PKGXBLKS. and the record request flags in the $PECBDS (Assembler). The last six control blocks are filled in if the user requests approver. Information specific to the current package action. backout. special flags. Backout data extracted from the package file on request from the user exit. Package Approver Request Block ($PAPPREQ) (PACKAGE-EXIT-APPROVER-MAP) Approver data extracted from the package file on request from the user exit. SCL statements extracted from the package file on request from the user exit. Each block contains one group per call. This block is also used to gather approver groups from the user exit on the before-cast call. This block is available to certain exit actions only on request. Each block contains one record per call. Ship data extracted from the package file on request from the user exit. This block is available to certain exit actions on request only.Package Exit Control Blocks Control Block (DSECT Name) Contains actions on request only. This block is available to all exit actions on request only. Each block contains one record per call. should the user choose to send such a request. Package Backout Request Block ($PBODREQ) (PACKAGE-EXIT-BACKOUT-BLOCKS) Package Ship Request Block ($PSHPREQ) (PACKAGE-EXIT-SHIPMENT-BLOCKS) Package SCL Request Block ($PSCLREQ) (PACKAGE-EXIT-SCL-BLOCK) Chapter 6: Using Package Exit Control Blocks 213 . This block is available to all exit actions only on request. Each block contains 1 to 10 SCL statements. or M=midway into the action (indicating at some point into the action). 214 Exits Guide . in relation to the action. A=after the action. Request for Data Control blocks have the designation "RDCB" preceding their names.Control Block Initialization and Availability Control Block Initialization and Availability The following matrix summarizes initialized control blocks for each exit point action and request for data control block availability. each control block initialization or request is shown to occur. Initialized Control blocks have the designation "ICB" preceding their names. Also. either B=before the action. SKPDSCT ANOP $PECBDS DS 0F . NE 'YES'). function. Note: PECBUEXIT is the same field as the ECBUEXIT field used for exits 1-6. or until another user exit loads a new value in this field. and exit type. Any value placed in this field remains there until the end of the CA Endevor SCM session. this field is used to store address values read by exit programs from the anchor ID table. and includes the package ID. When you are using anchor IDs.BLOCK TO DESCRIBE THE PACKAGE EXIT INTERFACE * * EXIT CONTROL BLOCK * * * ********************************************************************** PECBLEN DC AL2(PECBSIZE) LENGTH OF THE BLOCK PECBVERS DC AL2(PECB$VER) CURRENT VERSION OF THE BLOCK PECB$VER EQU 3 VERSION 3 PECBID DC CL4'PECB' BLOCK ID PECBPKID DC CL16' ' PACKAGE ID * Chapter 6: Using Package Exit Control Blocks 215 .SKPDSCT $PECBDS DSECT AGO . The Primary Information Block for Assembler Of particular note in this block is the hold area. PECBUEXT. The information in this block relates to the current CA Endevor SCM configuration and processing. and a message area. $PECBDS &DSCT=YES. the package action.SKPEQU . The following is a sample $PECBDS DSECT control block: MACRO &NAME. an area for the exit to pass back a return code.The Package Exit Control Block The Package Exit Control Block This is the first and primary information block passed to the exit.SKPEQU ANOP ********************************************************************** * * * $PECBDS . AIF ('&DSCT'. * * CODES * PECBFNCD DC H'0' PACKAGE FUNCTION CODE * * EQUATES FOR THE PACKAGE FUNCTION CODE * * EQU 0 SETUP EXIT OPTIONS * EQU 1 BACK-IN PACKAGE * EQU 2 BACK-OUT PACKAGE * EQU 3 CAST PACKAGE * EQU 4 COMMIT PACKAGE * EQU 5 CREATE PACKAGE * EQU 6 DELETE PACKAGE * EQU 7 DISPLAY PACKAGE * EQU 8 EXECUTE PACKAGE * EQU 9 EXPORT PACKAGE * EQU 10 GENERATE PACKAGE ID * EQU 11 LIST GENERATION * EQU 12 REPLACE SCL * EQU 13 RESET PACKAGE * EQU 14 REVIEW PACKAGE * EQU 15 SHIP THE PACKAGE * EQU 16 ARCHIVE THE PACKAGE * EQU 17 COLLECT PRODUCT (DISTRIBULINK) * EQU 18 DYNAMIC APPROVER RECORD ACTIONS ********************************************************************* *PECBSFCD DC H'0' PACKAGE SUB FUNCTION CODE * * EQUATES FOR THE PACKAGE SUB FUNCTION CODE * * * EQU 0 APPROVE (REVIEW) * EQU 1 DENY (REVIEW) * EQU 2 BUILD (CREATE/MODIFY) * EQU 3 COPY (CREATE/MODIFY) * EQU 4 EDIT (CREATE/MODIFY) * EQU 5 IMPORT (CREATE/MODIFY) * EQU 6 APPROVER (DISPLAY) * EQU 7 BACKOUT (DISPLAY) * EQU 8 SCL (DISPLAY) * EQU 9 PACKAGE (DISPLAY) * EQU 10 ELMSUM (DISPLAY) * EQU 11 REPORTS (DISPLAY) * EQU 12 XMIT (SHIP ) 216 Exits Guide .The Package Exit Control Block * THE FOLLOWING SIX FIELDS ARE FILLED IN BY CA Endevor SCM. * THEY CONTAIN THE FUNCTION CODE AND LITERAL NECESSARY FOR A USER * EXIT TO DETERMINE THE CALLING EXIT POINT. AFTER AND MID CODES * * EQU 00 BEFORE * EQU 01 AFTER * EQU 02 MIDDLE * ********************************************************************* * * LITERALS * PECBFNNM DC CL8' ' PACKAGE FUNCTION LITERAL PECBSFNM DC CL8' ' SUBFUNCTION LITERAL PECBBANM DC CL8' ' BEFORE/AFTER LITERAL * * THE FOLLOWING FIELDS ARE USED EXCLUSIVELY DURING SETUP PROCESSING. * THE USER EXIT SHOULD MODIFY THESE FIELDS TO ENABLE EXIT POINTS. * THIS SETUP IS DONE ONCE PER CA Endevor SCM SESSION. * Chapter 6: Using Package Exit Control Blocks 217 .The Package Exit Control Block * EQU 13 CONFIRM (SHIP ) * EQU 14 BUILD (LIST ) * EQU 15 CAST (LIST ) * EQU 16 REVIEW (LIST ) * EQU 17 EXECUTE (LIST ) * EQU 18 SHIP (LIST ) * EQU 19 BACK-OUT (LIST ) * EQU 20 COMMIT (LIST ) * EQU 21 UTILITY (LIST ) * EQU 22 DISPLAY (LIST ) * EQU 23 COLLECT (LIST ) * EQU 24 STAGE (COLLECT) * EQU 25 CORRINFO (DISPLAY) * EQU 26 ARCHIVE (LIST) * EQU 27 CONFIRM (COLLECT) * EQU 28 INSPECT (LIST) * EQU 29 BACK-OUT PACKAGE * EQU 30 BACKIN PACKAGE * EQU 31 DELETE PACKAGE * EQU 32 EXPORT PACKAGE * EQU 33 RESET PACKAGE * EQU 34 CAST PACKAGE * EQU 35 COMMIT PACKAGE * EQU 36 EXECUTE PACKAGE * EQU 37 ADD DYNAMIC APPROVER RECORD * EQU 38 UPDATE DYNAMIC APPROVER RECORD * EQU 39 DELETE DYNAMIC APPROVER RECORD * ********************************************************************* PECBBACD DC H'0' PACKAGE BEFORE/MID/AFTER CODE * * EQUATES FOR THE BEFORE. PECBARBE. PECBBATX.7 FIELDS (PECBTSOX.The Package Exit Control Block * N_O_T_E: RELATED RELEASE 3. * AND PECBARAF) APPEAR AT THE END OF THE DSECT. * PECBBIBE DC C'N' BEFORE BACKIN EXIT PECBBIAF DC C'N' AFTER BACKIN EXIT * PECBBOBE DC C'N' BEFORE BACKOUT EXIT PECBBOAF DC C'N' AFTER BACKOUT EXIT * PECBCABE DC C'N' BEFORE CAST EXIT PECBCAMD DC C'N' MID CAST EXIT PECBCAAF DC C'N' AFTER CAST EXIT * PECBCOBE DC C'N' BEFORE COMMIT EXIT PECBCOAF DC C'N' AFTER COMMIT EXIT * PECBCBBE DC C'N' BEFORE CREATE / BUILD EXIT PECBCBAF DC C'N' AFTER CREATE / BUILD EXIT * PECBCCBE DC C'N' BEFORE CREATE / COPY EXIT PECBCCAF DC C'N' AFTER CREATE / COPY EXIT * PECBCEBE DC C'N' BEFORE CREATE / EDIT EXIT PECBCEAF DC C'N' AFTER CREATE / EDIT EXIT * PECBCIBE DC C'N' BEFORE CREATE / IMPORT EXIT PECBCIAF DC C'N' AFTER CREATE / IMPORT EXIT * PECBDEBE DC C'N' BEFORE DELETE EXIT PECBDEAF DC C'N' AFTER DELETE EXIT * PECBDABE PECBDBBE * PECBDSBE PECBDXBE PECBDPBE PECBDRBE * PECBEXBE PECBEXAF * PECBEPBE PECBEPAF * DC DC DC DC DC DC DC DC DC DC C'N' C'N' C'N' C'N' C'N' C'N' C'N' C'N' C'N' C'N' BEFORE DISPLAY APPROVER BEFORE DISPLAY BACKOUT BEFORE BEFORE BEFORE BEFORE DISPLAY DISPLAY DISPLAY DISPLAY SCL ELMSUM PACKAGES REPORTS BEFORE EXECUTE EXIT AFTER EXECUTE EXIT BEFORE EXPORT EXIT AFTER EXPORT EXIT PECBGPBE DC PECBGPAF DC C'N' C'N' BEFORE GENPKGID EXIT AFTER GENPKGID EXIT 218 Exits Guide . MOVE A C'Y' INTO THE APPROPRIATE FIELD. *** Chapter 6: Using Package Exit Control Blocks 219 . * *** *** THE FOLLOWING THREE FIELDS ARE INFORMATIONAL FIELDS FOR THE USER *** EXIT TO VERIFY WHETHER OR NOT A REQUEST TYPE IS AVAILABLE. *** CHECK USER DOC TO MAKE SURE THAT THE DATA REQUESTED EXISTS AT *** THE POINT AT WHICH THE REQUEST IS BEING MADE. *** PECBACTE DC C'N' ACTION RECORD EXISTENCE FLAG PECBAPPE DC C'N' APPROVER RECORD EXISTENCE FLAG PECBBODE DC C'N' BACKOUT RECORD EXISTENCE FLAG *** *** *** THE FOLLOWING FIELDS ARE REQUEST FOR DATA FLAGS. *** THESE FLAGS ARE SET BY CA Endevor SCM EXIT PROCESSING PRIOR TO INVOKING *** THE FIRST USER EXIT MODULE. TO REQUEST *** A RECORD BE SENT.The Package Exit Control Block * PECBLTBE DC C'N' BEFORE LIST EXIT PECBLTAF DC C'N' AFTER LIST EXIT * PECBMBBE DC C'N' BEFORE MODIFY / BUILD EXIT PECBMBAF DC C'N' AFTER MODIFY / BUILD EXIT * PECBMCBE DC C'N' BEFORE MODIFY / COPY EXIT PECBMCAF DC C'N' AFTER MODIFY / COPY EXIT * PECBMEBE DC C'N' BEFORE MODIFY / EDIT EXIT PECBMEAF DC C'N' AFTER MODIFY / EDIT EXIT * PECBMIBE DC C'N' BEFORE MODIFY / IMPORT EXIT PECBMIAF DC C'N' AFTER MODIFY / IMPORT EXIT * PECBRSBE DC C'N' BEFORE RESET EXIT PECBRSAF DC C'N' AFTER RESET EXIT * PECBRABE DC C'N' BEFORE REVIEW / APPROVE EXIT PECBRAAF DC C'N' AFTER REVIEW / APPROVE EXIT * PECBRDBE DC C'N' BEFORE REVIEW / DENY EXIT PECBRDAF DC C'N' AFTER REVIEW / DENY EXIT * PECBSXBE DC C'N' BEFORE SHIP / XMIT EXIT PECBSXAF DC C'N' AFTER SHIP / XMIT EXIT * PECBSCBE DC C'N' BEFORE SHIP / COMFIRM EXIT PECBSCAF DC C'N' AFTER SHIP / CONFIRM EXIT * * THE FOLLOWING FIELDS PERTAIN TO REQUEST FOR DATA PROCESSING. *** THESE FIELDS ARE ONLY APPLICABLE FOR AFTER CALLS. *** *** PECBNDRC DC H'0' NDVR HIGH RETURN CODE PECBNDAB DC CL6' ' NDVR ABEND CODE PECBNDMG DC CL133' ' NDVR MSGTEXT PECBNDML DC H'0' NDVR MSGTEXT LENGTH PECBRTCD DC F'0' RETURN CODE FROM EXIT PECB$OK EQU 0 RETURN 0 ALL O. PECB$MOK EQU 4 RETURN 4 ALL O. RECORD SENT PECBREOF EQU 2 END OF FILE FOR RECORD TYPE PECBRNFD EQU 3 NO RECORDS FOUND FOR KEY PECBRERR EQU 12 SEVERE ERROR *** *** *** THE PECBNDXX FIELDS ARE USED BY CA Endevor SCM TO TELL USER EXIT *** ABOUT HIGH RETURN CODES. WITH MODS PECB$CAN EQU 8 RETURN 8 ABORT PECBUSER DC CL8' ' TSO USER/BATCH JOBNAME PECBMODE DC CL1' ' MODE FOR ONLINE(TSO) OR BATCH PECB$TSO EQU C'T' TSO MODE PECB$BAT EQU C'B' BATCH MODE PECBMGCD DC CL4' ' MESSAGE ID FOR ERROR MESSAGE * MESSAGE CODE WILL BE C1XNNNNS PECBMGLN DC H'0' LENGTH OF ERROR MESSAGE PECBMGSZ EQU 132 SIZE IS 132 PECBMSG DC CL(PECBMGSZ)' ' MESSAGE PECBCALR DC CL1' ' CALLERS ORIGIN PECB$NDV EQU C'E' CA Endevor SCM PECB$QE EQU C'Q' QUICK-EDIT PECBENPK DC CL1'N' ENTERPRISE PKG FLAG (Y/N) PECBUEXT DC F'0' USER EXIT HOLD FIELD PECBHIRC DC F'0' HIGHEST RC SET BY PREVIOUS EXITS *** *** *** THE FOLLOWING FIELDS ARE UPDATE FLAGS FOR THE USER CONTROL *** BLOCKS. 220 Exits Guide .K. ERROR TEXT. AND ABEND CODES. THE USER EXIT MUST SET THESE FLAGS TO 'Y' TO INDICATE *** TO CA Endevor SCM THAT THESE BLOCKS HAVE BEEN MODIFIED.The Package Exit Control Block PECBACTR DC C'N' USER REQUESTS ACTION ID REC PECBAPPR DC C'N' USER REQUESTS APPROVER REC PECBBODR DC C'N' USER REQUESTS BACKOUT REC PECBSHPR DC C'N' USER REQUESTS SHIP RECORDS PECBSCLR DC C'N' USER REQUESTS SCL RECORDS *** *** THE PECBRQRC FIELD IS USED BY CA Endevor SCM TO TELL USER EXIT WHAT *** THE RESULT OF THE REQUEST FOR DATA ATTEMPT *** PECBRQRC DC H'0' USER REQUEST FOR DATA RETURN CODE PECBRROK EQU 1 READ WAS SUCCESSFUL.K. The Package Exit Control Block *** *** PECBUECB DC C'N' MODS WHERE MADE TO THE PECBDS PECBUREQ DC C'N' MODS WHERE MADE TO THE PREQPDS PECBUFIL DC C'N' MODS WHERE MADE TO THE PFILDS PECBUAPP DC C'N' EXIT SENDING APPR GROUPS:$PAPPREQ * * CA Endevor SCM ACKNOWLEDGEMENT OF THE NUMBER OF $PAPPREQ BLOCKS * RECEIVED FROM THE USER EXIT * PECB#APG DC H'0' NDVR ACK: # OF $PAPPREQ BLKS REC'D * * ARCHIVE PACKAGE EXIT ENABLE/DISABLE FLAGS * PECBARBE DC C'N' BEFORE ARCHIVE PECBARAF DC C'N' AFTER ARCHIVE * * * THE FOLLOWING FIELDS ARE USED EXCLUSIVELY DURING SETUP PROCESSING. * AT SETUP TIME. * PECBTSOX DC C'Y' INVOKE EXIT IF RUNNING UNDER TSO PECBBATX DC C'N' INVOKE EXIT IF BATCH (NO TSO) * * COLLECT PRODUCT EXIT ENABLE/DISABLE FLAGS (USED IN SETUP PROCESSING) * PECBCSBE DC C'N' BEFORE COLLECT / STAGING EXIT PECBCSAF DC C'N' AFTER COLLECT / STAGING EXIT * * COLLECT PRODUCT REQUEST FOR DATA FLAG * PECBCOLR DC C'N' USER REQUESTS COLLECTION RECORDS * * DYNAMIC APPROVER ACTIONS EXIT ENABLE/DISABLE (USED IN SETUP) * PECBD1BE DC C'N' BEFORE DYNAMIC APPRS ADD/ EXIT PECBD1AF DC C'N' AFTER DYNAMIC APPRS ADD/ EXIT PECBDUBE DC C'N' BEFORE DYNAMIC APPRS UPDATE/ EXIT PECBDUAF DC C'N' AFTER DYNAMIC APPRS UPDATE/ EXIT PECBDDBE DC C'N' BEFORE DYNAMIC APPRS DELETE/ EXIT PECBDDAF DC C'N' AFTER DYNAMIC APPRS DELETE/ EXIT * PECBRSV1 DC CL1' ' RESERVED FOR INTERNAL USE PECBSIZE EQU *-$PECBDS LENGTH OF $PECBDS BLOCK MEND Chapter 6: Using Package Exit Control Blocks 221 . THE INITIAL VALUES ARE AS SHOWN UNLESS OVERRIDDEN * IN THE C1UEXITS TABLE (@C1UEXIT TYPE=START.XIT7BATX=Y). and type codes. Note: The next six fields contain the action. PECBVERS Version number to identify the Exit control block ($PECBDS) written by the exit handler. Not modifiable by any exits. It is not modifiable by exits. Value is always "PECB. 0 Setup exit options 1 Back in package 2 Back out package 3 Cast package 4 Commit package 5 Create package 6 Delete package 222 Exits Guide . User exits use these values to determine which package exit has been invoked. PECBID Identifies this DSECT as the Exit control block." Not modifiable by any exits. in bytes. This should always be 2.The Package Exit Control Block $PECBDS DSECT Field Descriptions The fields in the $PECBDS DSECT are described briefly as follows: PECBLEN Size of the Exit control block ($PECBDS). function. Use the PECB$VER label to verify that the correct version of this DSECT was passed to your exit. Acceptable values are 0-18. PECBFNCD Package action code. PECBPKID Current CA Endevor SCM package ID. Acceptable values are 0-39.The Package Exit Control Block 7 Display package 8 Execute package 9 Export package 10 Generate package ID 11 Generate list 12 Modify package 13 Reset package 14 Review package 15 Ship package 16 Archive package 17 Collect Product 18 Dynamic Approver PECBSFCD Package function code. 0 Approve Related Action: Review 1 Deny Related Action: Review Chapter 6: Using Package Exit Control Blocks 223 . The Package Exit Control Block 2 Build Related Action: Create & Modify 3 Copy Related Action: Create & Modify 4 Edit Related Action: Create & Modify 5 Import Related Action: Create & Modify 6 Approver Related Action: Display 7 Backout Related Action: Display 8 SCL Related Action: Display 9 Package Related Action: Display 10 ELMSUM Related Action: Display 11 Reports Related Action: Display 12 XMIT Related Action: Ship 224 Exits Guide . The Package Exit Control Block 13 Confirm Related Action: Ship 14 Build Related Action: List 15 Cast Related Action: List 16 Review Related Action: List 17 Execute Related Action: List 18 Ship Related Action: List 19 Back out Related Action: List 20 Commit Related Action: List 21 Utility Related Action: List 22 Display Related Action: List Chapter 6: Using Package Exit Control Blocks 225 . The Package Exit Control Block 23 Collect Related Action: List 24 Stage Related Action: Collect 25 Corrinfo Related Action: Display 26 Archive Related Action: List 27 Confirm Related Action: Collect 28 Inspect Related Action: List 29 Back-out Related Action: Package 30 Backin Related Action: Package 31 Delete Related Action: Package 32 Export Related Action: Package 33 Reset Related Action: Package 226 Exits Guide . 00 Before 01 After 02 Mid-cast PECBFNNM Literal for requested package action. Chapter 6: Using Package Exit Control Blocks 227 . PECBSFNM Literal for requested package function. For example. IMPORT. For example. CREATE.The Package Exit Control Block 34 Cast Related Action: Package 35 Commit Related Action: Package 36 Execute Related Action: Package 37 Add Related Action: Dynamic Approver Record 38 Update Related Action: Dynamic Approver Record 39 Delete Related Action: Dynamic Approver Record PECBBACD Package before/mid-cast/after code. Acceptable values are N (not enabled for this operating environment) and Y (enabled). The Setup call allows an exit program to indicate whether it is designed to handle calls while operating under TSO and/or as a batch program (without TSO services) and also allows the exit program to enable those exit points which it was designed to process. both the proper operating environment setup flag and the exit point setup flag must be Y. MID (for mid-cast exits) or AFTER (for after-exits). Note: The following fields are used during Setup. Field (Set to Y) PECBTSOX PECBBATX To Operate Under TSO Batch (no TSO) Default Value Y N The user exit must indicate which exit points are enabled. For an exit to get control. Acceptable values for exit point setup flags are N (not enabled: default) and Y (enabled). Field (Set to Y) PECBARBE PECBARAF PECBBIBE PECBBIAF PECBBOBE PECBBOAF PECBCABE PECBCAMD PECBCAAF PECBCSBE PECBCSAF PECBCOBE PECBCOAF PECBCBBE To Invoke this Exit Point Before-archive After-archive Before-backin After-backin Before-backout After-backout Before-cast Mid-cast After-cast Before-collect After-collect Before-commit After-commit Before-create/build 228 Exits Guide . The user exit must indicate which operating environments it can handle.The Package Exit Control Block PECBBANM Values are either BEFORE (for before-exits). The Package Exit Control Block Field (Set to Y) PECBCBAF PECBCCBE PECBCCAF PECBCEBE PECBCEAF PECBCIBE PECBCIAF PECBDEBE PECBDEAF PECBDABE PECBDBBE PECBDSBE PECBDXBE PECBDPBE PECBDRBE PECBD1BE PECBD1AF PECBDUBE PECBDUAF PECBDDBE PECBDDAF PECBEXBE PECBEXAF PECBEPBE PECBEPAF PECBGPBE PECBGPAF PECBLTBE PECBLTAF PECBMBBE To Invoke this Exit Point After-create/build Before-create/copy After-create/copy Before-create/edit After-create/edit Before-create/import After-create/import Before-delete After-delete Before-display approver Before-display backout Before Display SCL Before Display element summary Before Display packages Before Display reports Before-dynamic approver add After-dynamic approver add Before-dynamic approver update After-dynamic approver update Before-dynamic approver delete After-dynamic approver delete Before Execute After Execute Before Export After Export Before GENPKGID After GENPKGID Before List After List Before Modify/Build Chapter 6: Using Package Exit Control Blocks 229 . PECBAPPE Approver group records exist. data set records exist. PECBBODE Backout records exist. element.The Package Exit Control Block Field (Set to Y) PECBMBAF PECBMCBE PECBMCAF PECBMEBE PECBMEAF PECBMIBE PECBMIAF PECBRSBE PECBRSAF PECBRABE PECBRAAF PECBRDBE PECBRDAF PECBSXBE PECBSCBE PECBSXAF PECBSCAF To Invoke this Exit Point After Modify/Build Before Modify/Copy After Modify/Copy Before Modify/Edit After Modify/Edit Before Modify/Import After Modify/Import Before Reset After Reset Before Review/Approve After Review/Approve Before Review/Deny After Review/Deny Before Ship transmit Before Ship confirm After Ship transmit After Ship confirm Note: The following fields pertain to the requests for data. CA Endevor SCM sets the five existence flags before calling the user exit. The user exit should check these fields before setting request for data flags: PECBACTE Action. 230 Exits Guide . This field is modified by CA Endevor SCM to inform the user exit of the request for data results. PECBAPPR Request for approver group record. PECBRQRC Request for data return code. CA Endevor SCM returns this information to the user exit. PECBNDRC CA Endevor SCM high return code. Chapter 6: Using Package Exit Control Blocks 231 . An exit can request only one data block each time it returns to CA Endevor SCM. PECBNDML CA Endevor SCM message length. PECBNDMG CA Endevor SCM message text. Therefore the user exit must reset the request flag each time it requests a record. PECBBODR Request for backout record. ■ ■ ■ ■ 1-PECBRROK 2-PECBREOF 3-PECBNFD 12-PECBRERR When an EOF or NFND condition occurs. CA Endevor SCM clears a flag each time the user exit returns to CA Endevor SCM. PECBSCLR Request for SCL record. data set records. PECBSHPR Request for ship record. PECBACTR Request for action element. but does not allow further requests against that data type. PECBCOLR Request for collection record.The Package Exit Control Block The next five fields are the request for data flags. PECBNDAB CA Endevor SCM abend code. ■ ■ T-PECB$TSO.The Package Exit Control Block PECBRTCD Return code. 8. Successful. Modifiable by all exit programs. The message is preceded in that report with an error code (C1UNNNNs format. Not modifiable by exits. and S is a severity code associated with PECBRTCD (W. E. but the exit modified some control block data. or S. PECBMGSZ Error message size. Successful. 8-PECB$CAN. This is blank on entry and modifiable by all exit points. ■ ■ E-Labeled as PECB$NDV. indicates exit is running under Quick-Edit. respectively for return codes 4. 232 Exits Guide . 4-PECB$MOK. the error code is formatted as C1UNNNNs. PECBCALR Exit is executing under CA Endevor SCM or Quick-Edit. Action requested in foreground. B-PECB$BAT. If there is a message in this field when the program returns from the user exit. indicates the exit is running under CA Endevor SCM. PECBMGLN Length of the error message. PECBUSER User ID associated with the current processing. The default is 0000. the exit handler records the message in the CA Endevor SCM Execution Report. where NNNN is defined by this field. C. A message code precedes each message written to the report. For messages produced by user exits. Q-Labeled as PECB$QE. PECBMODE Indicates whether the current action was requested in foreground or batch. Stop package processing. described further above for the PECBMGCD field). ■ ■ ■ 0-PECB$OK. Action requested in batch. PECBMSG Error message associated with the current activity. and 16). Used to construct the message code written to the CA Endevor SCM Execution Report for the current action. This return code can only be bypassed by before-exits. PECBMGCD Modifiable by all exits. 12. and applies if the PECBMSG field contains a non-blank value. The Package Exit Control Block PECBUEXT User field. PECBUAPP Update Approver Group Records (value Y/N). When this flag is set. Not modifiable by exits. When this flag is set. PECBUFIL Update CA Endevor SCM fields related to fields in the PFILDS (value Y/N). Chapter 6: Using Package Exit Control Blocks 233 . used to save (and pass) information between user exits. Modifiable by all exit points. PECBUREQ Update CA Endevor SCM fields related to fields in the PREQPDS (value Y/N). CA Endevor SCM copies the PFILDS fields to the correlating CA Endevor SCM control block fields. this field is used to store address values read by exit programs from the anchor ID table. Note: PECB-UEXIT-HOLD-FIELD is the same field as the ECB-UEXIT-HOLD-FIELD field used for exits 1-6. Any value placed in this field remains there until the end of the CA Endevor SCM session. The Primary Information Block for COBOL Of particular note in this block is the hold area PECB-UEXIT-HOLD-FIELD. CA Endevor SCM copies the PECBDS fields to the correlating CA Endevor SCM control block fields. this field contains an address that points to a block of user data. Generally. PECBHIRC Highest return code set by previously executed system and user package exit for this action/function and before/after code. or until another user exit loads a new value in this field. When this flag is set. PECB#APG Number of approver groups sent. PECBUECB Update CA Endevor SCM fields related to fields in the PECBDS (value Y/N). Valid only for before-cast exit call. PECBSIZE Size of the $PECBDS DSECT. When you are using anchor IDs. CA Endevor SCM copies the PREQPDS fields to the correlating CA Endevor SCM control block fields. BLOCK TO DESCRIBE THE PACKAGE EXIT * * INTERFACE EXIT CONTROL BLOCK * ***************************************************************** 01 PACKAGE-EXIT-BLOCK. 88 SHIP-THE-PACKAGE VALUE 15.The Package Exit Control Block The following is a sample PACKAGE-EXIT-BLOCK control block: EJECT ***************************************************************** * PACKAGE-EXIT-BLOCK . 88 DISTRIB-COLLECT VALUE 17. 88 EXPORT-PACKAGE VALUE 9. 88 GENERATE-PACKAGE-ID VALUE 10. * 234 Exits Guide . * 05 PECB-FUNCTION-CODE PIC 9(4) COMP SYNC. 88 DELETE-PACKAGE VALUE 6. 88 REVIEW-PACKAGE VALUE 14. 88 RESET-PACKAGE VALUE 13. 88 CREATE-PACKAGE VALUE 5. 88 COMMIT-PACKAGE VALUE 4. * * EQUATES FOR THE PACKAGE FUNCTION CODE * 88 SETUP-EXIT-OPTIONS VALUE 0. 05 PECB-CURRENT-VERSION PIC 9(4) COMP SYNC. 88 EXECUTE-PACKAGE VALUE 8. * THEY CONTAIN THE FUNCTION CODE AND LITERAL NECESSARY FOR * A USER EXIT TO DETERMINE THE CALLING EXIT POINT. 05 PECB-LENGTH PIC 9(4) COMP SYNC. 05 PECB-SUBFUNCTION-CODE PIC 9(4) COMP SYNC. * ***************************************************************** * THE FOLLOWING SIX FIELDS ARE FILLED IN BY CA Endevor SCM. 88 LIST-GENERATION VALUE 11. 88 DYNAMIC-APPROVER VALUE 18. 05 PECB-PACKAGE-ID PIC X(16). 88 ARCHIVE-PACKAGE VALUE 16. 88 BACK-IN-PACKAGE VALUE 1. 88 BACK-OUT-PACKAGE VALUE 2. 88 CAST-PACKAGE VALUE 3. 05 PECB-BLOCK-ID PIC X(4). 88 DISPLAY-PACKAGE VALUE 7. 88 REPLACE-SCL VALUE 12. 88 PECB-PKG-BACKIN VALUE 30. 88 PECB-DISP-REPORTS VALUE 11. 88 PECB-DISP-ELMSUM VALUE 10. * * EQUATES FOR THE PACKAGE BEFORE-MID-AFTER CODE * 88 PECB-BEFORE VALUE 0. 88 PECB-DISP-APPRVER VALUE 6. 88 PECB-LIST-COLLECT VALUE 23. 88 PECB-SHIP-XMIT VALUE 12. 88 PECB-PKG-RESET VALUE 33. 88 PECB-PKG-EXECUTE VALUE 36. 88 PECB-DISP-BACKOUT VALUE 7. 88 PECB-BUILD VALUE 2. 88 PECB-DISP-SCL VALUE 8. 88 PECB-LIST-ARCHIVE VALUE 26. 88 PECB-IMPORT VALUE 5. 88 PECB-LIST-SHIP VALUE 18. 88 PECB-PKG-EXPORT VALUE 32. 88 PECB-DYNAMIC-ADD VALUE 37. 88 PECB-AFTER VALUE 1. 88 PECB-LIST-EXECUTE VALUE 17. 88 PECB-MID VALUE 2. 88 PECB-EDIT VALUE 4. 88 PECB-PKG-CAST VALUE 34. 88 PECB-LIST-BACKOUT VALUE 19. 88 PECB-LIST-CAST VALUE 15. 88 PECB-PKG-BACKOUT VALUE 29. 88 PECB-DYNAMIC-UPDATE VALUE 38. 88 PECB-DISP-PKG VALUE 9. 88 PECB-SHIP-CONFIRM VALUE 13. 88 PECB-PKG-COMMIT VALUE 35. 88 PECB-DISP-CORRINFO VALUE 25. 88 PECB-DYNAMIC-Delete VALUE 39.The Package Exit Control Block * EQUATES FOR THE PACKAGE SUB-FUNCTION CODE * 88 PECB-APPROVE VALUE 0. 05 PECB-BEFORE-AFTER-CODE PIC 9(4) COMP SYNC. 88 PECB-COPY VALUE 3. Chapter 6: Using Package Exit Control Blocks 235 . 88 PECB-LIST-UTILITY VALUE 21. 88 PECB-PKG-DELETE VALUE 31. 88 PECB-LIST-INSPECT VALUE 28. 88 PECB-LIST-REVIEW VALUE 16. 88 PECB-COLLECT-STAGE VALUE 24. 88 PECB-LIST-COMMIT VALUE 20. 88 PECB-COLL-CONFIRM VALUE 27. 88 PECB-DENY VALUE 1. 88 PECB-LIST-DISPLAY VALUE 22. 88 PECB-LIST-BUILD VALUE 14. 05 PECB-SUBFUNC-LITERAL PIC X(8). 05 PECB-BEFORE-DSPLY-APPR PIC X(1). 05 PECB-BEFORE-DSPLY-ELMSM PIC X(1). 05 PECB-AFTER-GENPID PIC X(1). TO DISABLE AN EXIT POINT. 05 PECB-BEFORE-DSPLY-BKOUT PIC X(1). 05 PECB-BEFORE-CREATE-COPY PIC X(1). THESE FLAGS FOLLOW. 05 PECB-AFTER-EXPORT PIC X(1). 05 PECB-BEFORE-BACKOUT PIC X(1). 05 PECB-BEFORE-CREATE-EDIT PIC X(1). 05 PECB-BEFORE-MOD-BLD PIC X(1). 05 PECB-BEFORE-EXEC PIC X(1). 05 PECB-BEFORE-DSPLY-PKG PIC X(1). 05 PECB-AFTER-BACKOUT PIC X(1). * 05 PECB-BEFORE-BACKIN PIC X(1). THE USER EXIT SHOULD MODIFY THESE FIELDS TO * DISABLE EXIT POINTS. 05 PECB-AFTER-CREATE-BLD PIC X(1). 236 Exits Guide . 05 PECB-BEFORE-LIST PIC X(1). 05 PECB-AFTER-LIST PIC X(1). 05 PECB-AFTER-COMMIT PIC X(1). 05 PECB-MID-CAST PIC X(1). 05 PECB-AFTER-EXEC PIC X(1). 05 PECB-AFTER-BACKIN PIC X(1). 05 PECB-BEFORE-CAST PIC X(1).The Package Exit Control Block 05 PECB-FUNCTION-LITERAL PIC X(8). 05 PECB-AFTER-CAST PIC X(1). 05 PECB-BEFORE-CREATE-BLD PIC X(1). THIS SETUP IS DONE ONCE PER CA Endevor SCM * SESSION. 05 PECB-AFTER-DELETE PIC X(1). 05 PECB-AFTER-CREATE-EDIT PIC X(1). * ***************************************************************** * THE FOLLOWING FIELDS ARE USED EXCLUSIVELY DURING SETUP * PROCESSING. 05 PECB-AFTER-CREATE-COPY PIC X(1). 05 PECB-BEFORE-CREATE-IMPT PIC X(1). 05 PECB-AFTER-MOD-CPY PIC X(1). 05 PECB-BEFORE-DSPLY-RPT PIC X(1). 05 PECB-BEFORE-DSPLY-SCL PIC X(1). 05 PECB-BEFORE-EXPORT PIC X(1). 05 PECB-BEFORE-DELETE PIC X(1). 05 PECB-BEFORE-GENPID PIC X(1). 05 PECB-BEFORE-MOD-EDIT PIC X(1). PUT AN 'N' IN THE * APPROPIATE FLAG. 05 PECB-BEF-AFTER-LITERAL PIC X(8). 05 PECB-BEFORE-COMMIT PIC X(1). 05 PECB-BEFORE-MOD-CPY PIC X(1). 05 PECB-AFTER-CREATE-IMPT PIC X(1). 05 PECB-AFTER-MOD-BLD PIC X(1). PECB-AFTER-MOD-IMPT PIC X(1). CHECK USER DOC TO MAKE SURE THAT THE *** DATA REQUESTED EXISTS AT THE POINT THE REQUEST IS BEING *** MADE. * ***************************************************************** *** THE FOLLOWING FIVE FIELDS ARE REQUESTS FOR DATA FLAGS. 88 88 88 88 * PECB-SUCCESSFUL-RECORD-SENT VALUE 1. PECB-BEFORE-MOD-IMPT PIC X(1). 05 PECB-REQ-SHIP-RECORDS PIC X(1). * *** THE FOLLOWING THREE FIELDS ARE INFORMATIONAL FIELDS FOR *** THE USER EXIT TO VERIFY WHETHER OR NOT A REQUEST TYPE IS *** AVAILABLE. PECB-BEFORE-REV-APPR PIC X(1). 05 PECB-BAC-REC-EXIST-FLAG PIC X(1). * * THE PECB-REQUEST-RETURNCODE IS USERD BY CA Endevor SCM TO TELL THE * USER EXIT OF THE RESULT OF THE REQUEST FOR DATA ATTEMPT * 05 PECB-REQUEST-RETURNCODE PIC 9(4) COMP SYNC. * 05 PECB-REQ-ACTION-ID-REC PIC X(1).The Package Exit Control Block 05 05 05 05 05 05 05 05 05 05 05 05 05 PECB-AFTER-MOD-EDIT PIC X(1). PECB-SEVERE-ERROR VALUE 12. PECB-AFTER-REV-DENY PIC X(1). * 05 PECB-ACT-REC-EXIST-FLAG PIC X(1). 05 PECB-REQ-SCL-RECORDS PIC X(1). PECB-AFTER-REV-APPR PIC X(1). *** TO REQUEST A RECORD TO BE SENT. PECB-AFTER-SHIP-XMIT PIC X(1). 05 PECB-APP-REC-EXIST-FLAG PIC X(1). Chapter 6: Using Package Exit Control Blocks 237 . PECB-AFTER-SHIP-CON PIC X(1). 05 PECB-REQ-APPROVER-REC PIC X(1). PECB-BEFORE-SHIP-CON PIC X(1). THESE FLAGS ARE SET BY CA Endevor SCM EXIT *** PROCESSING PRIOR TO INVOKING THE FIRST USER EXIT MODULE. PECB-BEFORE-REV-DENY PIC X(1). MOVE A 'Y' INTO THE *** APPROPIATE FIELD. PECB-BEFORE-SHIP-XMIT PIC X(1). PECB-END-OF-FILE-FOR-REC-TYP VALUE 2. 05 PECB-REQ-BACKOUT-REC PIC X(1). PECB-AFTER-RESET PIC X(1). PECB-BEFORE-RESET PIC X(1). PECB-NO-RECORDS-FOUND VALUE 3. * ***************************************************************** * THE FOLLOWING FIELDS PERTAIN TO REQUEST FOR DATA PROCESSING. * * ARCHIVE PACKAGE EXIT ENABLE/DISABLE FLAGS * * 05 PECB-BEFORE-ARCHIVE PIC X(1). 88 CALLER-CA Endevor SCM VALUE 'E'. 05 PECB-NBR-APPR-GRPS-SENT PIC S9(4) COMP. THE INITIAL VALUES ARE AS SHOWN * UNLESS OVERRIDDEN IN THE C1UEXITS TABLE * (@C1UEXIT TYPE=START. * * THE FOLLOWING FIELDS ARE USED EXCLUSIVELY DURING SETUP * PROCESSING AT SETUP TIME. AND ABEND * CODES. 88 PECB-ALL-IS-OK VALUE 0. * * THE FOLLOWING TWO FIELDS ARE UDPATE FLAGS FOR THE USER * CONTROL BLOCKS. 05 PECB-USER-BATCH-JOBNAME PIC X(8).The Package Exit Control Block * THE PECB-NDVR-XXXX FIELDS ARE USED BY CA Endevor SCM TO TELL THE * USER EXIT ABOUT HIGH RETURN CODES. 88 PECB-TSO-MODE VALUE 'T'. * 238 Exits Guide . 88 PECB-ENTERPRISE-PKG-FLAG-NO VALUE 'N'. 05 PECB-NDVR-MESSTEXT-LEN PIC S9(4) COMP SYNC.XIT7BATX=Y). ERROR TEXT. * 05 PECB-MODS-MADE-TO-PECB PIC X(1). 05 PECB-NDVR-EXIT-RC PIC 9(8) COMP SYNC. 05 PECB-ERROR-MESS-LENGTH PIC S9(4) COMP SYNC. 88 PECB-ABORT-RC VALUE 8. 05 PECB-AFTER-ARCHIVE PIC X(1). 88 PECB-ALL-IS-OK-WITH-MODS VALUE 4. 05 PECB-MODS-MADE-TO-PREQ PIC X(1). 05 PECB-NDVR-ABEND-CODE PIC X(6). 88 PECB-BATCH-MODE VALUE 'B'. 05 PECB-MESSAGE-ID PIC X(4). THESE FLAGS REPLACE THE RETURN CODE OF * ($MOK) ($) IN THE OLD EXITS. 05 PECB-NDVR-MESSAGE-TEXT PIC X(133). 05 PECB-MODE PIC X(1). 05 PECB-ENTERPRISE-PKG-FLAG PIC X(1). 88 PECB-ENTERPRISE-PGK-FLAG-YES VALUE 'Y'. 05 PECB-UEXIT-HOLD-FIELD PIC S9(8) COMP SYNC. 05 PECB-CALLER-ORIGIN PIC X(1). 05 PECB-MESSAGE PIC X(132). THESE FIELDS ARE ONLY APPLICABLE FOR AFTER CALLS. * 05 PECB-NDVR-HIGH-RC PIC S9(4) COMP SYNC. 05 PECB-MODS-MADE-TO-PFIL PIC X(1). 05 PECB-HIGH-PREV-RC PIC S9(8) COMP SYNC. 05 PECB-USENDING-APP-GRPS PIC X(1). 88 CALLER-QUICKEDIT VALUE 'Q'. This should always be 2. PECB-BLOCK-ID Identifies this DSECT as the Exit control block. 05 PECB-AFTER-COLLECT PIC X(1). PECB-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-BLOCK) written by the exit handler.The Package Exit Control Block 05 PECB-TSO-EXECUTE 05 PECB-BATCH-EXECUTE PIC X(1)." Not modifiable by any exits. * * COLLECT PRODUCT REQUEST FIR DATA FLAG * 05 PECB-REQ-COLL-RECORDS PIC X(1). EJECT PACKAGE-EXIT-BLOCK Field Descriptions Brief descriptions of the fields in the PACKAGE-EXIT-BLOCK control block layout follow: PECB-LENGTH Size of the Exit control block (PACKAGE-EXIT-BLOCK). PIC X(1). 05 PECB-BEFORE-DYNAMIC-DELETE PIC X(1). 05 PECB-AFTER-DYNAMIC-UPDATE PIC X(1). 05 PECB-BEFORE-DYNAMIC-UPDATE PIC X(1). * * DYNAMIC APPROVER EXIT ENABLE/DISABLE FLAGS * * 05 PECB-BEFORE-DYNAMIC-ADD PIC X(1). 05 PECB-AFTER-DYNAMIC-DELETE PIC X(1). Chapter 6: Using Package Exit Control Blocks 239 . * * COLLECT PRODUCT EXIT ENABLE/DISABLE FLAGS * (USED IN SETUP PROCESSING) * 05 PECB-BEFORE-COLLECT PIC X(1). It is not modifiable by exits. Not modifiable by any exits. * * RESERVED FOR INTERNAL USE * 05 PECB-RSV1 PIC X(1). in bytes. Value is always "PECB. 05 PECB-AFTER-DYNAMIC-ADD PIC X(1). PECB-PACKAGE-ID Current CA Endevor SCM package ID. and type codes. Acceptable values are 0-18. They are listed according to value and meaning: Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Equates SETUP-EXIT-OPTION BACK-IN-PACKAGE BACK-OUT-PACKAGE CAST-PACKAGE COMMIT-PACKAGE CREATE-PACKAGE DELETE-PACKAGE DISPLAY-PACKAGE EXECUTE-PACKAGE EXPORT-PACKAGE GENERATE-PACKAGE-ID LIST-GENERATION REPLACE-SCL RESET-PACKAGE REVIEW-PACKAGE SHIP-THE-PACKAGE ARCHIVE-PACKAGE DISTRIB-COLLECT DYNAMIC APPROVER Meaning Setup exit options Backin package Backout package Cast package Commit package Create package Delete package Display package Execute package Export package Generate package ID Generate list Modify package Reset package Review package Ship package Archive package Collect product Dynamic Approver PECB-SUBFUNCTION-CODE Package function code. User exits use these values to determine which package exit has been invoked. PECB-FUNCTION-CODE Package action code. Equates 0 1 2 Value PECB-APPROVE PECB-DENY PECB-BUILD Meaning Approve Deny Build Related Action Review Review Create & Modify 240 Exits Guide .The Package Exit Control Block Note: The next six fields contain the action. function. The Package Exit Control Block Equates 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Value PECB-CREATE PECB-EDIT PECB-IMPORT PECB-DISP-APPRVER PECB-DISP-BACKOUT PECB-DISP-SCL PECB-DISP-PKG PECB-DISP-ELMSUM PECB-DISP-REPORTS PECB-SHIP-XMIT PECB-SHIP-CONFIRM PECB-LIST-BUILD PECB-LIST-CAST PECB-LIST-REVIEW PECB-LIST-EXECUTE PECB-LIST-SHIP PECB-LIST-BACKOUT PECB-LIST-COMMIT PECB-LIST-UTILITY PECB-LIST-DISPLAY PECB-LIST-COLLECT PECB-COLLECT-STAGE PECB-DISP-CORRINFO PECB-LIST-ARCHIVE PECB-COLL-CONFIRM PECB-LIST-INSPECT PECB-PKG-BACKOUT PECB-PKG-BACKIN PECB-PKG-DELETE PECB-PKG-EXPORT Meaning Copy Edit Import Approver Backout SCL Package ELMSUM Reports XMIT Confirm Build Cast Review Execute Ship Back out Commit Utility Display Collect Stage Corrinfo Archive Confirm Inspect Back-out Backin Delete Export Related Action Create & Modify Create & Modify Create & Modify Display Display Display Display Display Display Ship Ship List List List List List List List List List List Collect Display List Collect List Package Package Package Package Chapter 6: Using Package Exit Control Blocks 241 . Note: The following fields are used during Setup. The Setup call allows an exit program to indicate whether it is designed to handle calls while operating under TSO and/or as a batch program (without TSO services) and also allows the exit program to enable those exit points which it was designed to process. PECB-BEF-AFTER-LITERAL Values are either BEFORE (for before-exits). Field (Set to Y) PECB-TSO-EXECUTE PECB-BATCH-EXECUTE To Operate Under TSO Batch (no TSO) Default Value Y N 242 Exits Guide . (not enabled for this operating environment) and Y. For example. The user exit must indicate which operating environments it can handle. For example. (enabled). PECB-SUBFUNC-LITERAL Literal for requested package function. Acceptable values are N.The Package Exit Control Block Equates 33 34 35 36 37 38 39 Value PECB-PKG-RESET PECB-PKG-CAST PECB-PKG-COMMIT PECB-PKG-EXECUTE PECB-DYNAMIC PECB-DYNAMIC PECB-DYNAMIC Meaning Reset Cast Commit Execute Add Update Delete Related Action Package Package Package Package Record Record Record PECB-FUNCTION-LITERAL Literal for requested package action. MID (for mid-cast exits) or AFTER (for after-exits). CREATE. IMPORT. Acceptable values for exit point setup flags are N (not enabled: default) and Y (enabled). both the proper operating environment setup flag and the exit point setup flag must be Y. Field (Set to Y) PECB-BEFOR-ARCHIVE PECB-AFTER-ARCHIVE PECB-BEFORE-BACKIN PECB-AFTER-BACKIN PECB-BEFORE-BACKOUT PECB-AFTER-BACKOUT PECB-BEFORE-CAST PECB-MID-CAST PECB-AFTER-CAST PECB-BEFORE-COLLECT PECB-AFTER-COLLECT PECB-BEFORE-COMMIT PECB-AFTER-COMMIT PECB-BEFORE-CREATE-BLD PECB-AFTER-CREATE-BLD PECB-BEFORE-CREATE-COPY PECB-AFTER-CREATE-COPY PECB-BEFORE-CREATE-EDIT PECB-AFTER-CREATE-EDIT PECB-BEFORE-CREATE-IMPT PECB-AFTER-CREATE-IMPT PECB-BEFORE-DELETE PECB-AFTER-DELETE PECB-BEFORE-DSPLY-APPR PECB-BEFORE-DSPLY-BKOUT PECB-BEFORE-DSPLY-SCL PECB-BEFORE-DSPLY-ELMSM To Invoke this Exit Point Before-archive After-archive Before-backin After-backin Before-backout After-backout Before-cast Mid-cast After-cast Before-collect After-collect Before-commit After-commit Before-create/build After-create/build Before-create/copy After-create/copy Before-create/edit After-create/edit Before-create/import After-create/import Before-delete After-delete Before-display approver Before-display backout Before Display SCL Before Display element summary Chapter 6: Using Package Exit Control Blocks 243 .The Package Exit Control Block The user exit must indicate which exit points are enabled. For an exit to get control. The Package Exit Control Block Field (Set to Y) PECB-BEFORE-DSPLY-PKG PECB-BEFORE-DSPLY-RPT PECB-BEFORE-DYNAMIC-ADD PECB-AFTER-DYNAMIC-ADD PECB-BEFORE-DYNAMIC-UPDATE PECB-AFTER-DYNAMIC-UPDATE PECB-BEFORE-DYNAMIC-DELETE PECB-AFTER-DYNAMIC-DELETE PECB-BEFORE-EXEC PECB-AFTER-EXEC PECB-BEFORE-EXPORT PECB-AFTER-EXPORT PECB-BEFORE-GENPID PECB-AFTER-GENPID PECB-BEFORE-LIST PECB-AFTER-LIST PECB-BEFORE-MOD-BLD PECB-AFTER-MOD-BLD PECB-BEFORE-MOD-CPY PECB-AFTER-MOD-CPY PECB-BEFORE-MOD-EDIT PECB-AFTER-MOD-EDIT PECB-BEFORE-MOD-IMPT PECB-AFTER-MOD-IMPT PECB-BEFOR-RESET PECB-AFTER-RESET PECB-BEFORE-REV-APPR PECB-AFTER-REV-APPR PECB-BEFORE-REV-DENY PECB-AFTER-REV-DENY To Invoke this Exit Point Before Display packages Before Display reports Before-dynamic approver add After-dynamic approver add Before-dynamic approver update After-dynamic approver update Before-dynamic approver delete After-dynamic approver delete Before Execute After Execute Before Export After Export Before GENPKGID After GENPKGID Before List After List Before Modify/Build After Modify/Build Before Modify/Copy After Modify/Copy Before Modify/Edit After Modify/Edit Before Modify/Import After Modify/Import Before Reset After Reset Before Review/Approve After Review/Approve Before Review/Deny After Review/Deny 244 Exits Guide . CA Endevor SCM sets the five existence flags before calling the user exit. PECB-REQ-BACKOUT-REC Request for backout record. The user exit should check these fields before setting request for data flags: PECB-ACT-REC-EXIST-FLAG Action. PECB-APP-REC-EXIST-FLAG Approver group records exist. PECB-REQ-COLL-RECORDS Request for collection record. The next six fields are the request for data flags. element. data set records exist. PECB-REQ-SHIP-RECORDS Request for ship record. PECB-REQ-SCL-RECORDS Request for SCL record. An exit can request only one data block each time it returns to CA Endevor SCM. PECB-REQ-ACTION-ID-REC Request for action element. data set records. PECB-REQ-APPROVER-REC Request for approver group record. PECB-BAC-REC-EXIST-FLAG Backout records exist. CA Endevor SCM clears a flag each time the user exit returns to CA Endevor SCM. Chapter 6: Using Package Exit Control Blocks 245 .The Package Exit Control Block Field (Set to Y) PECB-BEFORE-SHIP-XMIT PECB-AFTER-SHIP-XMIT PECB-BEFORE-SHIP-CON PECB-AFTER-SHIP-CON To Invoke this Exit Point Before Ship transmit Invoke Ship confirm After Ship transmit After Ship confirm Note: The following fields pertain to the requests for data. Therefore the user exit must reset the request flag each time it requests a record. PECB-NDVR-MESSAGE-TEXT CA Endevor SCM message text.The Package Exit Control Block PECB-REQ-REQUEST-RETURNCODE Request for data return code. This return code can only be bypassed by before-exits. CA Endevor SCM returns this information to the user exit. ■ PECB-ABORT-RC – – Value: 8 Meaning: Stop package processing. but the exit modified some control block data. PECB-NDVR-MESSTEXT-LEN CA Endevor SCM message length. This field is modified by CA Endevor SCM to inform the user exit of the request for data results. Equates: PECB-ALL-IS-OK-WITH-MODS – – Value: 4 Meaning: Successful. ■ Equates: PECB-ALL-IS-OK – – ■ Value: 0 Meaning: Successful. PECB-NDVR-HIGH-RC CA Endevor SCM high return code. PECB-NDVR-EXIT-RC Return code. but does not allow further requests against that data type. PECB-NDVR-ABEND-CODE CA Endevor SCM abend code. 246 Exits Guide . ■ Equates: PECB-SUCCESSFUL-RECORD-SENT – ■ Value: 1 Equates: PECB-END-OF-FILE-FOR-REC-TYPE – Value: 2 ■ ■ ■ Equates: PECB-NO-RECORDS-FOUND Value: 3 Equates: PECB-SEVERE-ERROR – Value: 12 When an EOF or NFND condition occurs. Modifiable by all exit programs. PECB-MESSAGE-ID Modifiable by all exits. and 16). The default is 0000. the error code is formatted as C1UNNNNs. 8. Equates: PECB-BATCH-MODE – – Value: B Meaning: Action requested in batch. or S. A message code precedes each message written to the report. described further above for the PECB-MESSAGE-ID field). E. If there is a message in this field when the program returns from the user exit. C. respectively for return codes 4. PECB-CALLER-ORIGIN Exit is executing under CA Endevor SCM or Quick-Edit. where NNNN is defined by this field. PECB-ERROR-MESS-LENGTH Length of the error message. Used to construct the message code written to the CA Endevor SCM Execution Report for the current action. and applies if the PECBMSG field contains a non-blank value. the exit handler records the message in the CA Endevor SCM Execution Report. ■ Equates: CALLER-CA Endevor SCM – – ■ Value: E Meaning: Exit is running under CA Endevor SCM Equates: CALLER-QUICK-EDIT – – Value: T Meaning: Exit is running under QUICK-EDIT Chapter 6: Using Package Exit Control Blocks 247 . This is blank on entry and modifiable by all exit points. PECB-MESSAGE Error message associated with the current activity. Not modifiable by exits. The message is preceded in that report with an error code (C1UNNNNs format. 12. For messages produced by user exits. ■ Equates: PECB-TSO-MODE – – ■ Value: T Meaning: Action requested in foreground.The Package Exit Control Block PECB-USER-BATCH-JOBNAME User ID associated with the current processing. PECB-MODE Indicates whether the current action was requested in foreground or batch. and S is a severity code associated with PECBRTCD (W. PECB-NBR-APPR-GRPS-SENT Number of approver groups sent. When this flag is set. PECB-USENDING-APP-GRPS Update Approver Group Records (value Y/N). The Package Request Control Block This is the second information block passed to the exit. 248 Exits Guide . and is pointed to by Register 1: 4(R1). used to save (and pass) information between user exits. Generally. When this flag is set. CA Endevor SCM copies the PACKAGE-EXIT-BLOCK fields to the correlating CA Endevor SCM control block fields. CA Endevor SCM copies the PACKAGE-REQUEST-BLOCK fields to the correlating CA Endevor SCM control block fields. PECB-HIGH-PREV-RC Highest return code set by previously executed system and user package exit for this action/function and before/after code. PECB-MODS-MADE-TO-PREQ Update CA Endevor SCM fields related to fields in the PREQPDS (value Y/N). Modifiable by all exit points. PECB-MODS-MADE-TO-PECB Update CA Endevor SCM fields related to fields in the PECBDS (value Y/N). When this flag is set. this field contains an address that points to a block of user data. PECB-MODS-MADE-TO-PFIL Update CA Endevor SCM fields related to fields in the PACKAGE-EXIT-FILE-BLOCK (value Y/N).The Package Request Control Block PECB-UEXIT-HOLD-FIELD User field. The information in this block relates to the package options associated with the current package ID. Valid only for before-cast exit call. CA Endevor SCM copies the PACKAGE-EXIT-FILE-BLOCK fields to the correlating CA Endevor SCM control block fields. The Package Request Control Block $PREQPDS DSECT The following is a sample $PREQPDS DSECT control block: MACRO $PREQPDS &DSCT=YES.SKPEQU ANOP ********************************************************************** * * * $PREQPDS .SKPDSCT $PREQPDS DSECT AGO .BLOCK FOR REQUEST PARMS ASSOCIATED WITH A * * PACKAGE 7/15/90 * * * ********************************************************************** PREQLEN DC AL2(PREQSIZE) LENGTH OF THE BLOCK PREQVERS DC AL2(PREQ$VER) CURRENT VERSION OF THE BLOCK PREQ$VER EQU 1 VERSION OF THE BLOCK PREQID DC CL4'PREQ' BLOCK ID PREQCOMM DC CL50' ' PACKAGE COMMENT PREQFLAG DC F'0' SPECIAL FLAGS PREQBOEN DC CL1' ' BACKOUT ENABLED FOR PACKAGE PREQ$BYS EQU C'Y' YES PREQ$BNO EQU C'N' NO PREQDEL DC CL1' ' DELETE ENABLED FOR PACKAGE PREQ$DYS EQU C'Y' YES PREQ$DNO EQU C'N' NO PREQPSHR DC CL1' ' SHARE ENABLED FOR PACKAGE PREQ$SYS EQU C'Y' YES PREQ$SNO EQU C'N' NO PREQPAPD DC CL1' ' APPEND PACKAGE ? PREQ$PYS EQU C'Y' YES PREQ$PNO EQU C'N' NO PREQEWSD DC CL7' ' EXECUTION WINDOW START DATE PREQEWST DC CL5' ' EXECUTION WINDOW START TIME PREQEWED DC CL7' ' EXECUTION WINDOW END DATE PREQEWET DC CL5' ' EXECUTION WINDOW END TIME &NAME. NE 'YES').SKPDSCT ANOP $PREQPDS DS 0F . 00010000 00020000 00030000 00040000 00050000 00060000 00070000 00071000 00080000 00090000 00100000 00110001 00130000 00140000 00160000 00170000 00180000 00190000 00192000 00200000 00210001 00211003 00212003 00210001 00211003 00212003 00210001 00211003 00212003 00210001 00211003 00212003 Chapter 6: Using Package Exit Control Blocks 249 .SKPEQU . AIF ('&DSCT'. CONFIRMATION RESULT (CNF) EXECUTED (RC NOT AVAILABLE) ABENDED (RC NOT AVAILABLE) RC GREATER THAN PREQSRCV * LESS THAN * EQUAL * GREATER THAN OR EQUAL * LESS THAN OR EQUAL SHIP .SDSBAPI RETURN CODE (AFT) CL20' ' COLLECT .COPIED TO PRODUCTION SHIP .CONF RETURN CODE VALUE (CNF) NO RC IF PREQ$EXEC/PREQ$ABND OVERRIDE APPROVER GROUP OVERRIDE APPROVER ID CL1' ' DELETE PACKAGE WITH ARCHIVE C'Y' YES C'N' NO CL1' ' PACKAGE NOTES C'Y' YES C'N' NO CL1' ' PROMOTION PACKAGE C'Y' YES C'N' NO CL1' ' COMMIT/DELETE PROMOTION HISTORY C'Y' YES C'N' NO CL1' ' COMPONENT VALIDATION SETTING (Y/N/W) CL8' ' COLLECT .TRANSMITTED REMOTE .PRODUCT NAME (BEF/AFT) F'0' *** RESERVED *** *-$PREQPDS LENGTH OF $PREQPDS BLOCK 00211003 00212003 00540000 00550000 250 Exits Guide .SOURCE PACKAGE ID SHIP .The Package Request Control Block PREQIPKG PREQDEST PREQSTYP PREQS$PKG PREQS$BKO PREQSCMP PREQS$CO PREQS$NC PREQSCNF PREQ$HXMT PREQ$RCPY PREQSRES PREQ$EXEC PREQ$ABND PREQ$RCGT PREQ$RCLT PREQ$RCEQ PREQ$RCGE PREQ$RCLE PREQSRCV PREQ$NONE PREQAPGP PREQAPID * PREQDARC PREQ$AYS PREQ$ANO PREQNOTE PREQ$NYS PREQ$NNO PREQPROM PREQ$PROY PREQ$PRON PREQCDPH PREQ$CDPY PREQ$CDPN PREQCVAL PREQCONN PREQCTYP PREQC$PKG PREQC$BKO PREQCRCV PREQPROD PREQSIZE MEND DC DC DC EQU EQU DC EQU EQU DC EQU EQU DC EQU EQU EQU EQU EQU EQU EQU DC EQU DC DC DC EQU EQU DC EQU EQU DC EQU EQU DC EQU EQU DC DC DC EQU EQU DC DC DC EQU CL16' ' C CL3' ' C'P' C'B' CL3' ' C'Y' C'N' CL4' ' C'HXMT' C'RCPY' CL2' ' C'EX' C'AB' C'GT' C'LT' C'EQ' C'GE' C'LE' CL4' ' C'*' CL16' ' CL8' ' COPY SUBFUNC .COMPLEMENTS (BEF/AFT) YES = COMPLEMENTS REQUESTED NO = NO COMPLEMENT FILES SHIP .CONNECTION (BEF/AFT) CL3' ' COLLECT .SHIPMENT TYPE (BEF/AFT) PKG = PACKAGE SHIPMENT BKO = BACKOUT SHIPMENT SHIP .COLLECTN TYPE (BEF/AFT) C'P' PKG = PACKAGE COLLECT C'B' BKO = BACKOUT COLLECT CL4' ' COLLECT .CONFIRMATION TYPE (CNF) HOST .DESTINATION (BEF/AFT/CONF) SHIP . The Package Request Control Block $PREQPDS DSECT Field Descriptions The fields in the $PREQPDS DSECT control block are described briefly as follows: PREQLEN Size of the Exit control block ($PREQPDS). in bytes. PREQID Code that identifies this as the Exit control block. PREQBOEN Backout enabled flag for package. Value are: ■ ■ Y-PREQ$BYS. Use the PREQ$VERS label to verify that the correct version of this DSECT was passed to your exit. N-PREQ$BNO. Value are: ■ ■ Y-PREQ$SYS. This should always be 1. Delete is enabled. Modifiable by create and modify package exits. Share is enabled. Backout is not enabled. for use in rapid identification when you are scanning your modules visually. Chapter 6: Using Package Exit Control Blocks 251 ." Not modifiable by any exit point. Backout is enabled. PREQFLAG Not used. Not modifiable by any exits. PREQDEL ■ ■ ■ Delete enabled flag for package. Share is not enabled. It is not modifiable by exits. PREQCOMM Comments associated with the current package ID. PREQVERS Version number to identify the Exit control block ($PREQPDS) written by the exit handler. N-PREQ$SNO. N-PREQ$DNO. Delete is not enabled. Value are: Y-PREQ$DYS. PREQPSHR Share enabled flag for package. Value is always "PREQ. N-PREQ$PNO. Format ddmmmyy. Backout shipment. ■ ■ HXMT-PREQ$HXMT. RCPY-PREQ$RCPY.The Package Request Control Block PREQPAPD Append SCL enabled flag for package. Format ddmmmyy. PREQDEST Destination ID. Format hh:mm. PREQIPKG Source package ID. 252 Exits Guide . Package shipment. Copied from staging to production data sets at remote site. Possible values are: ■ ■ PKG-PREQS$PKG. NO-PREQS$NC. PREQEWED Execution window end date. SHIP action only. Complementary data sets not requested. PREQSCNF Type of confirmation. ■ ■ YES-PREQS$CO. PREQEWST Execution window start time. Transmitted from host to remote site. PREQSCMP Indicates whether complementary data sets are to be shipped. Append SCL is enabled. Format hh:mm. COPY function only. ■ ■ Y-PREQ$PYS. PREQSTYP Shipment type. PREQEWET Execution window end time. Complementary data sets requested. BKO-PREQS$BKO. Append SCL is not enabled PREQEWSD Execution window start date. (Approver groups can only be overridden from the before-cast exit point. ■ ■ Y-PREQNYS. Shipment executed (return code not available). Notes are not enabled. ■ ■ ■ ■ ■ ■ ■ EX-PREQ$EXEC. No return code if values returned in the PREQ$EXEC or PREQ$ABND fields. Shipment executed with return code equal to PREQSRCV value. Shipment abended (return code not available). Shipment executed with return code less than PREQSRCV value. GT-PREQ$RCGT. PREQSRCV Threshold return code value for shipment confirmation. Notes are enabled. LT-PREQ$RCLT. Values are: ■ ■ Y-PREQ$AYS. Delete is enabled N-PREQ$ANO. Modifiable by archive package exit. Chapter 6: Using Package Exit Control Blocks 253 . GE-PREQ$RCGE. Delete is not enabled PREQNOTE Package notes. (Approver groups can only be overridden from the before-cast exit point.) PREQDARC Delete package after successful archive. Shipment executed with return code less than or equal to PREQSRCV value. LE-PREQ$RCLE. AB-PREQ$ABND. N-PREQNNO. Shipment executed with return code greater than or equal to PREQSRCV value.The Package Request Control Block PREQSRES Shipment results.) PREQAPID Override approver ID. *-PREQ$NONE. Shipment executed with return code greater than PREQSRCV value. EQ-PREQ$RCEQ. PREQAPGP Override approver group. PREQCONN DistribuLink connection ID. Not modifiable by any exit. PREQSIZE Size of the $PREQPDS DSECT. Option is not enabled PREQCVAL Component validation setting (Y/N/W).PREQCDPY. PREQCRCV DistribuLink API (SDSBAPI) return code value. Option is not enabled. Possible values are: ■ ■ PKG-PKEQC$PKG. BKO-PREQC$BKO. PREQCTYP Collection type. 254 Exits Guide .The Package Request Control Block PREQPROM Promotion packages. Promotion package. PREQCDPH Commit action. N-PREQPRON. delete promotion history. ■ ■ Y . ■ ■ Y-PREQPROY. Package collection. Backout collection. Delete promotion history N -PREQCDPN. 88 PREQ-BACKOUT-YES VALUE 'Y'. * ***************************************************************** 01 PACKAGE-REQUEST-BLOCK. 05 PREQ-SHARE-ENABLED PIC X(1). 05 PREQ-EXEC-START-DATE PIC X(7). 05 PREQ-EXEC-END-DATE PIC X(7). 05 PREQ-BLOCK-ID PIC X(4). 05 PREQ-SPECIAL-FLAGS PIC S9(8) COMP SYNC. 05 PREQ-CURRENT-VERSION PIC 9(4) COMP SYNC. 88 PREQ-BACKOUT-NO VALUE 'N'. 05 PREQ-BACKOUT-ENABLED PIC X(1). Chapter 6: Using Package Exit Control Blocks 255 . 88 PREQ-BACKOUT-SHIP VALUE 'B'. 05 PREQ-SHIP-DESTINATION PIC X(8). 05 PREQ-EXEC-END-TIME PIC X(5). 10 FILLER PIC X(1). 05 PREQ-EXEC-START-TIME PIC X(5). 88 PREQ-DELETE-YES VALUE 'Y'. 88 PREQ-APPEND-NO VALUE 'N'. 05 PREQ-PACKAGE-COMMENT PIC X(50). 10 FILLER PIC X(2). 05 PREQ-DELETE-ENABLED PIC X(1). 88 PREQ-SHARED-YES VALUE 'Y'.The Package Request Control Block PACKAGE-REQUEST-BLOCK Layout The following is a sample PACKAGE-REQUEST-BLOCK control block: ***************************************************************** * PACKAGE-REQUEST-BLOCK . 05 PREQ-SHIPMENT-TYPE. 88 PREQ-APPEND-YES VALUE 'Y'. 88 PREQ-PACKAGE-SHIP VALUE 'P'.BLOCK FOR REQUEST PARMS * * ASSOCIATED WITH A PACKAGE. 88 PREQ-DELETE-NO VALUE 'N'. 05 PREQ-APPEND-PACKAGE PIC X(1). 05 PREQ-SOURCE-PACKAGE PIC X(16). 05 PREQ-LENGTH PIC 9(4) COMP SYNC. 88 PREQ-SHARED-NO VALUE 'N'. 05 PREQ-COLLECT-PRODUCT-NAME PIC X(20). 05 FILLER PIC X(2). 05 PREQ-PROMPKG PIC X(1). 05 PREQ-COMMIT-DELPH PIC X(1). 10 FILLER PIC X(1). 05 PREQ-NOTES PIC X(1). 10 FILLER PIC X(2). 88 ARCHIVE-NO-DELETE VALUE 'N'. 88 PREQ-PROMPKG-NO VALUE 'N'. VALUE 'B'. 05 FILLER PIC X(4). 05 PREQ-COLLECT-BEF-AFT PIC X(8). EJECT 256 Exits Guide . 88 PREQ-SHIP-NO-RC VALUE '*'.The Package Request Control Block 05 PREQ-SHIP-COMPLEMENTS. 88 PREQ-NOTES-NO VALUE 'N'. 88 PREQ-COMMIT-DELPH-NO VALUE 'N'. 88 PREQ-PROMPKG-YES VALUE 'Y'. 88 PREQ-SHIP-EXECUTED VALUE 'EX'. 88 PREQ-NO-COMPLEMENTS VALUE 'N'. 05 PREQ-DELETE-PKG-ARCH PIC X(1). 88 PREQ-COLLECT-PKG 88 PREQ-COLLECT-BACKOUT VALUE 'P'. 88 PREQ-COMMIT-DELPH-YES VALUE 'Y'. 05 PREQ-COLLECT-TYPE PIC X(1). 88 PREQ-SHIP-EQUAL VALUE 'EQ'. 05 PREQ-SHIP-COMPLE-TYPE PIC X(4). 88 PREQ-REMOTE-COPIED VALUE 'RCPY'. 88 PREQ-COMPLEMENTS VALUE 'Y'. 88 PREQ-SHIP-ABENDED VALUE 'AB'. 10 FILLER PIC X(3). 88 PREQ-SHIP-LESS-THAN VALUE 'LT'. 88 ARCHIVE-WITH-DELETE VALUE 'Y'. 88 PREQ-SHIP-MORE-EQUA VALUE 'GE'. 88 PREQ-SHIP-LESS-EQUA VALUE 'LE'. 88 PREQ-SHIP-GT-SRVC VALUE 'GT'. 88 PREQ-NOTES-YES VALUE 'Y'. 10 FILLER PIC X(1). 05 PREQ-OVERRIDE-APPR-GRP PIC X(16). 05 PREQ-OVERRIDE-APPR-ID PIC X(8). 05 PREQ-SHIP-CONFIRM-RESUL PIC X(2). 05 PREQ-SHIP-CONF-RETURN-CODE. 88 PREQ-HOST-TRANSMIT VALUE 'HXMT'. 05 PREQ-COLLECT-SDSBAPI-RC PIC X(4). PREQ-BACKOUT-ENABLED Backout enabled flag for package. It is not modifiable by exits. Not modifiable by any exits. PREQ-SPECIAL-FLAGS Not used. Value is always "PREQ. in bytes. Equates: PREQ-DELETE-NO – – Value: N Meaning: Delete is not enabled Chapter 6: Using Package Exit Control Blocks 257 . PREQ-BLOCK-ID Code that identifies this as the Exit control block. PREQ-DELETE-ENABLED Delete enabled flag for package. Equates: PREQ-BACKOUT-NO – – Value: N Meaning: Backout is not enabled. for use in rapid identification when you are scanning your modules visually. PREQ-PACKAGE-COMMENT Comments associated with the current package ID. This should always be 1. PREQ-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-REQUEST-BLOCK) written by the exit handler. Values are: ■ Equates: PREQ-BACKOUT-YES – – ■ Value: Y Meaning: Backout is enabled. Modifiable by create and modify package exits.The Package Request Control Block PACKAGE-REQUEST-BLOCK Field Descriptions The fields in the PACKAGE-REQUEST-BLOCK control block layout are described briefly as follows: PREQ-LENGTH Size of the Exit control block (PACKAGE-REQUEST-BLOCK). Values are: ■ Equates: PREQ-DELETE-YES – – ■ Value: Y Meaning: Delete is enabled." Not modifiable by any exit point. PREQ-EXEC-END-TIME Execution window end time. PREQ-EXEC-START-TIME Execution window start time. Format hh:mm. PREQ-SOURCE-PACKAGE Source package ID. PREQ-EXEC-END-DATE Execution window end date. Equates: PREQ-SHARED-NO – – Value: N Meaning: Share is not enabled PREQ-APPEND-PACKAGE Append SCL enabled flag for package. Format hh:mm. PREQ-EXEC-START-DATE Execution window start date. 258 Exits Guide . ■ Equates: PREQ-APPEND-YES – – ■ Value: Y Meaning: Append SCL is enabled. Format ddmmmyy. SHIP action only. Format ddmmmyy. COPY function only. PREQ-SHIP-DESTINATION Destination ID. Values are: ■ Equates: PREQ-SHARED-YES – – ■ Value: Y Meaning: Share is enabled.The Package Request Control Block PREQ-SHARE-ENABLED Share enabled flag for package. Equates: PREQ-APPEND-NO – – Value: N Meaning: Append SCL is not enabled. Equates: PREQ-NO-COMPLEMENTS – – Value: N Meaning: Complementary data sets not requested. ■ Equates: PREQ-SHIP-EXECUTED – – ■ Value: EX Meaning: Shipment executed (return code not available). ■ Equates: PREQ-HOST-TRANSMIT – – ■ Value: HXMT Meaning: Transmitted from host to remote site. Possible values are: ■ Equates: PREQ-PACKAGE-SHIP – – ■ Value: P Meaning: Package Shipment Equates: PREQ-BACKOUT-SHIP – – Value: B Meaning: Backout Shipment PREQ-SHIP-COMPLEMENTS Indicates whether complementary data sets are to be shipped. PREQ-SHIP-COMPLE-TYPE Type of confirmation. Equates: PREQ-SHIP-ABENDED – – Value: AB Meaning: Shipment abended (return code not available). ■ Equates: PREQ-COMPLEMENTS – – ■ Value: Y Meaning: Complementary data sets requested. PREQ-SHIP-CONFIRM-RESUL Shipment results.The Package Request Control Block PREQ-SHIPMENT-TYPE Shipment type. Chapter 6: Using Package Exit Control Blocks 259 . Equates: PREQ-REMOTE-COPIED – – Value: RCPY Meaning: Copied from staging to production data sets at remote site. ■ Equates: PREQ-SHIP-LESS-EQUA – – Value: LE Meaning: Shipment executed with return code less than or equal to PREQ-SHIP-CONF-RETURN-CODE value. PREQ-SHIP-CONF-RETURN-CODE Threshold return code value for shipment confirmation. ■ Equates: PREQ-SHIP-EQUAL – – Value: EQ Meaning: Shipment executed with return code equal to PREQ-SHIP-CONF-RETURN-CODE value. ■ Equates: PREQ-SHIP-MORE-EQUA – – Value: GE Meaning: Shipment executed with return code greater than or equal to PREQ-SHIP-CONF-RETURN-CODE value.) PREQ-OVERRIDE-APPR-ID Override approver ID. (Approver groups can only be overridden from the before-cast exit point.) 260 Exits Guide . PREQ-OVERRIDE-APPR-GRP Override approver group. (Approver groups can only be overridden from the before-cast exit point. ■ Equates: PREQ-SHIP-NO-RC – – Value: * Meaning: No return code if values returned in the PREQ-SHIP-EXECUTED or PREQ-SHIP-ABENDED fields.The Package Request Control Block ■ Equates: PREQ-SHIP-GT-SRVC – – Value: GT Meaning: Shipment executed with return code greater than ■ Equates: PREQ-SHIP-LESS-THAN – – Value: LT Meaning: Shipment executed with return code less than PREQ-SHIP-CONF-RETURN-CODE value. delete promotion history.The Package Request Control Block PREQ-DELETE-PKG-ARCH Delete package after successful archive. ■ Equates: PREQ-COMMIT-DELPH-YES – – ■ Value:Y Meaning: Delete promotion history Equates: PREQ-COMMIT-DELPH-NO – – Value:N Meaning: Option is not enabled Chapter 6: Using Package Exit Control Blocks 261 . ■ Equates: PREQ-NOTES-YES – – ■ Value: Y Meaning: Notes are enabled Equates: PREQ-NOTES-NO – – Value: N Meaning: Notes are not enabled PREQ-PROMPKG Promotion packages. Values are: ■ Equates: ARCHIVE-WITH-DELETE – – ■ Value: Y Meaning: Delete is enabled Equates: ARCHIVE-NO-DELETE – – Value: N Meaning: Delete is not enabled PREQ-NOTES Package notes. ■ Equates: PREQ-PROMPKG-YES – – ■ Value: Y Meaning: Promotion package Equates: PREQ-PROMPKG-NO – – Value: N Meaning: Option is not enabled PREQ-COMMIT-DELPH Commit action. Modifiable by archive package exit. etc.The Package Header Control Block The Package Header Control Block This is the third information block passed to the exit. and is pointed to by Register 1: 8(R1). The information in this block is general package data such as cast date/time. $PHDRDS DSECT The following is a sample $PHDRDS DSECT control block: $PHDRDS DSECT PHDRLEN DS AL2(PHDRSIZE) PHDRVERS DS AL2(PHDR$VER) PHDR$VER EQU 1 PHDRID DC CL4'PHRD' PHDRTYPE DS CL10 PHDRSTAT DS CL12 PHDRBOST PHDRCRD PHDRCRT PHDRXRC PHDRPUD PHDRPUT PHDRCD PHDRCT PHDRAD PHDRAT PHDRWSD PHDRWST PHDRWED PHDRWET PHDRXD PHDRXT PHDRCMD PHDRCMT PHDRBOD PHDRBOT PHDRBID PHDRBIT PHDREEXD PHDREEXT PHDREEXT DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS CL10 CL7 CL5 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL7 CL5 CL5 LENGTH OF PACKAGE HEADER BLOCK VERSION OF PACKAGE HEADER BLOCK VERSION 1 PACKAGE EXIT HDR BLK BLOCK ID PACKAGE TYPE (EMERGENCY/STD) PACKAGE STATUS PACKAGE BACK-OUT STATUS PACKAGE CREATION DATE PACKAGE CREATION TIME EXEC RETURN CODE (READ-ONLY) DATE OF LAST UPDT TO PKG SCL TIME OF LAST UPDT TO PKG SCL CAST DATE CAST TIME FINAL APPROVAL/DENIAL DATE FINAL APPROVAL/DENIAL TIME EXECUTION WINDOW START DATE EXECUTION WINDOW START TIME EXECUTION WINDOW END DATE EXECUTION WINDOW END TIME EXECUTION DATE EXECUTION TIME COMMIT DATE COMMIT TIME PACKAGE BACK-OUT DATE PACKAGE BACK-OUT TIME PACKAGE BACK-IN DATE PACKAGE BACK-IN TIME END EXECUTION DATE END EXECUTION TIME END EXECUTION TIME 262 Exits Guide . None of the fields are modifiable by the package user exits. execution status. The Package Header Control Block PHDRCRUS PHDRUPUS PHDRCAUS PHDREXUS PHDRBOUS PHDRBIUS PHDRCMUS PHDR#NOTES PHDRNOTE1 PHDRNOTELEN PHDRNOTE2 PHDRNOTE3 PHDRNOTE4 PHDRNOTE5 PHDRNOTE6 PHDRNOTE7 PHDRNOTE8 PHDRMXNOTES PHDRNOTE PHDRNOTES PHDRCVAL PHDRPSHR PHDR$ SHR PHDR$ NSHR PHDRPROM PHDR$PROMY PHDR$PROMN PHDROPKGID PHDRPPKGID PHDRENV PHDRSTGID PHDRSIZE DS DS DS DS DS DS DS DS DS CL8 CL8 CL8 CL8 CL8 CL8 CL8 H H PACKAGE CREATE USERID PACKAGE UPDATE USERID PACKAGE CAST USERID PACKAGE EXEC USERID PACKAGE BACKOUT USERID PACKAGE BACKIN USERID PACKAGE COMMIT USERID NUMBER OF PKG NOTES WITH DATA RESERVED DS CL60 CAST/REVIEW NOTES SECTION EQU *-PHDRNOTE1 LENGTH OF A NOTE DS CL60 DS CL60 DS CL60 DS CL60 DS CL60 DS CL60 DS CL60 EQU (*-PHDRNOTE1)/PHDRNOTELEN MAX NOTES ORG PHDRNOTE1 DS CL60 NOTE ARRAY "CURSOR" ORG PHDRNOTE1 DS CL(PHDRNOTELEN*PHDRMXNOTES) NOTE ARRAY ORG DS CL1 COMPVAL SETTING AT TIME OF CAST DS CL1 PACKAGE EDIT/CAST SHARE OPTION EQU C'Y' ANYONE MAY EDIT/CAST PACKAGE EQU C'N' ONLY OWNER MAY EDIT/CAST PACKAGE DS CL1 PROMOTION PACKAGE INIDCATOR EQU C'Y' PROMOTION PACKAGE EQU DS DS DS DS DS EQU C'N' CL16 CL16 CL8 CL1 CL8 *-$PHDRDS NOT A PROMOTION PACKAGE ORIGINAL PKG ID (PROMOTION PKG) PREVIOUS PKG ID (PROMOTION PKG) "TARGET LOC" ENV NAME "TARGET LOC" STAGE ID ** RESERVED ** Chapter 6: Using Package Exit Control Blocks 263 . for use in rapid identification when you are scanning your modules visually. in bytes. This is a formatted literal field with the following possible values: ■ ■ ■ ■ ■ ■ ■ ■ IN-EDIT IN-APPROVAL DENIED APPROVED IN-EXECUTION EXEC-FAILED EXECUTED COMMITTED PHDRBOST Package backout status. PHDRCRD Package creation date. Not modifiable by any exits. Use the PHDR$VER label to verify that the correct version of this DSECT was passed to your exit. PHDRID Code that identifies this as the Package Header Exit control block. This should always be 1. Format ddmmmyy. Value is always PHDR. PHDRTYPE Package type (emergency/standard). 264 Exits Guide . This is a formatted character field with values of either blank or BACKED-OUT. PHDRVERS Version number to identify the Exit control block ($PHDRDS) written by the exit handler.The Package Header Control Block $PHDRDS DSECT Field Descriptions The fields in the $PHDRDS DSECT control block are described briefly as follows: PHDRLEN Size of the Exit control block ($PHDRDS). PHDRSTAT Package status. Not modifiable by any exit. PHDRBOD Backout date. PHDRCMT Commit time. PHDRXRC Package execution return code. Format ddmmmyy. Chapter 6: Using Package Exit Control Blocks 265 . PHDRBIT Backin time. PHDRBOT Backout time. Format hh:mm. Format ddmmmyy. PHDRAD Final approval/denial date. PHDRBID Backin date. Format ddmmmyy. Format hh:mm. Format ddmmmyy. PHDRCT Cast time. Format hh:mm. Format hh:mm. Format ddmmmyy. PHDRCD Cast date. Format ddmmmyy. Format hh:mm. PHDRXD Execution date. PHDRPUD Date of last update to package SCL. Format hh:mm. PHDRAT Final approval/denial time. Format hh:mm. Format hh:mm.The Package Header Control Block PHDRCRT Package creation time. Format ddmmmyy. PHDRCMD Commit date. PHDRXT Execution time. PHDRPUT Time of last update to package SCL. Format ddmmmyy. PHDRCAUS Package cast user ID.The Package Header Control Block PHDREEXD End execution date. PHDRCRUS Package create user ID. PHDREEXT End execution time. Format hh:mm. PHDRCMUS Package commit user ID. 266 Exits Guide . PHDRSIZE Size of the $PHDRDS DSECT. This value is set at cast time and will not change unless the package is reset. After cast. PHDR#NOTES Number of note fields containing data. Y-Component validation was or is active and unconditional. N-Component validation was or is not active. PHDRNOTE1 through PHDRNOTE8 Eight note fields with cast or review notes. this field will contain the component validation setting at the time the package was cast. PHDREXUS Package exec user ID. PHDRCVAL Selected component validation setting. this field will contain blanks. Before cast. PHDRBOUS Package backout user ID. PHDRUPUS Package modify user ID. W-Component validation was or is active but in warn mode. Possible values: ■ ■ ■ ■ blank-Package has not been cast. PHDRBIUS Package backin user ID. or after reset. PHDRPROM Promotion Package Indicator. PHDRPPKGID Previous (historic) package ID. Note: The target fields in the $PACTREQ DSECT are not used. Available for promotion packages. PHDRWED Execution window end date. PHDRSTGID TARGET LOC stage id. Available for promotion packages. Available for promotion packages.The Package Header Control Block PHDRWSD Execution window start date. Chapter 6: Using Package Exit Control Blocks 267 . PHDRWST Execution window start time. Available for promotion packages. PHDRENV TARGET LOC environment name.Package is a promotion package N -. PHDRWET Execution window end time. Values are: ■ ■ Y -.Package is not a promotion package PHDROPKGID Original (parent) package ID. 05 PHDR-PKG-CREATE-USER PIC X(8). The information in this block is general package data such as cast date/time. 05 PHDR-PKG-COMMIT-TIME PIC X(5). etc. 05 PHDR-PKG-CAST-DATE PIC X(7). The following is a sample PACKAGE-EXIT-HEADER-BLOCK control block: ************************************************************************ * PACKAGE-EXIT-HEADER-BLOCK . 05 PHDR-PKG-FIN-APPR-DATE PIC X(7). 05 PHDR-PKG-END-EXEC-TIME PIC X(5). 05 PHDR-PKG-EXEC-END-DATE PIC X(7). execution status. 05 PHDR-PKG-BACKOUT-TIME PIC X(5). 05 PHDR-BLOCK-ID PIC X(4).PACKAGE EXIT HEADER CONTROL * * BLOCK. * ***************************************************************** 01 PACKAGE-EXIT-HEADER-BLOCK. 05 PHDR-PKG-EXEC-RC PIC X(5). 05 PHDR-PKG-EXEC-END-TIME PIC X(5). 05 PHDR-PSCL-LAST-UPD-DATE PIC X(7). 05 PHDR-PKG-CAST-TIME PIC X(5). 05 PHDR-PACKAGE-TYPE PIC X(10). None of the fields are modifiable by the package user exits. 05 PHDR-PSCL-LAST-UPD-TIME PIC X(5). 05 PHDR-PKG-CREATION-DATE PIC X(7). 05 PHDR-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 PHDR-PKG-EXECUTION-TIME PIC X(5). 05 PHDR-PKG-BACKIN-TIME PIC X(5). 05 PHDR-PKG-BACKOUT-STATUS PIC X(10). 05 PHDR-PKG-EXEC-STRT-DATE PIC X(7). 05 PHDR-PKG-EXECUTION-DATE PIC X(7).The Package Header Control Block PACKAGE-EXIT-HEADER-BLOCK Layout This is the third information block passed to the exit. 05 PHDR-PKG-CREATION-TIME PIC X(5). 05 PHDR-PKG-END-EXEC-DATE PIC X(7). 05 PHDR-PKG-COMMIT-DATE PIC X(7). 05 PHDR-PKG-BACKOUT-DATE PIC X(7). 05 PHDR-PKG-EXEC-STRT-TIME PIC X(5). 05 PHDR-PACKAGE-STATUS PIC X(12). 05 PHDR-LENGTH PIC 9(4) COMP SYNC. 05 PHDR-PKG-BACKIN-DATE PIC X(7). 268 Exits Guide . 05 PHDR-PKG-FIN-APPR-TIME PIC X(5). in bytes. PIC X(01). PIC X(8). VALUE 'N'. This should always be 1. Not modifiable by any exits. PIC X(08). PIC X(60). PIC X(60). PHDR-CURRENT-VERSIONS Version number to identify the Exit control block (PACKAGE-EXIT-HEADER-BLOCK) written by the exit handler. PIC X(08). PIC X(60). PIC X(8). PIC X(16). PIC 9(4). VALUE 'Y'. PIC X(8). PACKAGE-EXIT-HEADER-BLOCK Field Descriptions Brief descriptions of the fields in the PACKAGE-EXIT-HEADER-BLOCK control block layout follow: PHDR-LENGTH Size of the Exit control block (PACKAGE-EXIT-HEADER-BLOCK). VALUE 'N'. PIC X(1).The Package Header Control Block 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 PHDR-PKG-UPDATE-USER PHDR-PKG-CAST-USER PHDR-PKG-EXEC-USER PHDR-PKG-BACKOUT-USER PHDR-PKG-BACKIN-USER PHDR-PKG-COMMIT-USER PHDR-PKG-NOTE-WDATA-CT FILLER PHDR-PKG-NOTE1 PHDR-PKG-NOTE2 PHDR-PKG-NOTE3 PHDR-PKG-NOTE4 PHDR-PKG-NOTE5 PHDR-PKG-NOTE6 PHDR-PKG-NOTE7 PHDR-PKG-NOTE8 PHDR-PKG-CAST-COMPVAL PHDR-PKG-SHR-OPTION 88 PHDR-PKG-SHR 88 PHDR-PKG-NONSHR 05 PHDR-PKG-SHR-OPTION 88 PHDR-PKG-SHR 88 PHDR-PKG-NONSHR 05 PHDR-PKG-PROMOTION 88 PHDR-PKG-PROMY 88 PHDR-PKG-PROMN 05 PHDR-PKG-ORIG-PKGID 05 PHDR-PKG-PREV-PKGID 05 PHDR-PKG-ENV 05 PHDR-PKG-STGID 05 FILLER EJECT PIC X(8). PIC X(60). PIC X(16). PIC 9(4). PIC X(8). PIC X(1). PIC X(60). Chapter 6: Using Package Exit Control Blocks 269 . PIC X(1). PIC X(60). PIC X(1). PIC X(8). VALUE 'Y'. PIC X(60). VALUE 'Y'. VALUE 'N'. PIC X(60). PHDR-PSCL-LAST-UPD-TIME Time of last update to package SCL. Format ddmmmyy. for use in rapid identification when you are scanning your modules visually. PHDR-PSCL-LAST-UPD-DATE Date of last update to package SCL. PHDR-PKG-CAST-TIME Cast time. Format hh:mm. PHDR-PACKAGE-TYPE Package type (emergency/standard). PHDR-PKG-CREATION-TIME Package creation time. Value is always PHDR. Format ddmmmyy. This is a formatted literal field with the following possible values: ■ ■ ■ ■ ■ ■ ■ ■ IN-EDIT IN-APPROVAL DENIED APPROVED IN-EXECUTION EXEC-FAILED EXECUTED COMMITTED PHDR-PKG-BACKOUT-STATUS Package backout status. Format ddmmmyy.The Package Header Control Block PHDR-BLOCK-ID Code that identifies this as the Package Header Exit control block. Format hh:mm. PHDR-PACKAGE-STATUS Package status. Not modifiable by any exit. 270 Exits Guide . PHDR-EXEC-RC Package execution return code. This is a formatted character field with values of either blank or BACKED-OUT. Format hh:mm. PHDR-PKG-CREATION-DATE Package creation date. PHDR-PKG-CAST-DATE Cast date. Format hh:mm. PHDR-PKG-CREATE-USER Package create user ID. Format hh:mm. PHDR-PKG-END-EXEC-TIME End execution time. PHDR-PKG-FIN-APPR-TIME Final approval/denial time. PHDR-PKG-UPDATE-USER Package modify user ID.The Package Header Control Block PHDR-PKG-FIN-APPR-DATE Final approval/denial date. PHDR-PKG-CAST-USER Package cast user ID. PHDR-PKG-END-EXEC-DATE End execution date. Format ddmmmyy. Format ddmmmyy. Format hh:mm. Format ddmmmyy. PHDR-PKG-EXEC-STRT-DATE Execution date. Format ddmmmyy. Format hh:mm. Format hh:mm. PHDR-PKG-EXEC-USER Package exec user ID. Format ddmmmyy. Format hh:mm. PHDR-PKG-BACKOUT-TIME Backout time. PHDR-PKG-COMMIT-TIME Commit time. Format ddmmmyy. Chapter 6: Using Package Exit Control Blocks 271 . PHDR-PKG-BACKIN-DATE Backin date. PHDR-PKG-BACKOUT-DATE Backout date. PHDR-PKG-EXEC-STRT-TIME Execution time. PHDR-PKG-COMMIT-DATE Commit date. PHDR-PKG-BACKIN-TIME Backin time. PHDR-PKG-CAST-COMPVAL Selected component validation setting. Before cast.Package is not a promotion package PHDR-PKG-ORIG-PKGID Original (parent) package ID. Available for promotion packages. this field will contain the component validation setting at the time the package was cast. Available for promotion packages. PHDR-PKG-PREV-PKGID Previous (historic) package ID.Package is a promotion package N -. PHDR-PKG-COMMIT-USER Package commit user ID. This value is set at cast time and will not change unless the package is reset. Available for promotion packages. Available for promotion packages.The Package Header Control Block PHDR-PKG-BACKOUT-USER Package backout user ID. Possible values: ■ ■ ■ ■ blank-Package has not been cast. 272 Exits Guide . After cast. N-Component validation was or is not active. PHDR-PKG-NOTE-WDATA-CT Number of note fields containing data. PHDR-PKG-NOTE1 through PHDR-PKG-NOTE8 Eight note fields with cast or review notes. Values are: ■ ■ Y -. W-Component validation was or is active but in warn mode. Y-Component validation was or is active and unconditional. this field will contain blanks. or after reset. PHDR-PKG-ENV TARGET LOC environment name. PHDR-PKG-PROMOTION Promotion Package Indicator. PHDR-PKG-BACKIN-USER Package backin user ID. PHDR-PKG-STGID TARGET LOC stage ID. Use the PFIL$VER label to verify that the correct version of this was passed to your exit..HW) DC CL21' ' ** RESERVED ** SPACE 1 * OFFSET (FROM THE BEGINNING OF $PFILDS) TO THE PATH AND FILE NAME AREAS. $PFILDS DSECT The following is a sample $PFILDS DSECT control block: $PFILDS DSECT PFILLEN DC AL2(PFILSIZE) LENGTH OF THE BLOCK PFILVERS DC AL2(PFIL$VER) VERSION OF THE BLOCK PFIL$VER EQU 2 VERSION 2 PFILID DC CL4'PFIL' BLOCK ID PFILDSN DS CL44' ' DATASET NAME PFILMEM DS CL10' ' MEMBER NAME PFILDDN DS CL8 DDNAME PFILDSTY DS CL3' ' DATASET TYPE( DA. in bytes. THIS IS THEN * FOLLOWED BY THE NAME. Chapter 6: Using Package Exit Control Blocks 273 .) FOR HFS (H@. * PFILPAOFF DS H PATH AREA OFFSET PFILNAOFF DS H NAME AREA OFFSET PFILBFAREA DS XL1027 AREA BUFFER SPACE PFILSIZE EQU *-$PFILDS LENGTH OF THE $FILDS BLOCK MEND $PFILDS DSECT Field Descriptions The fields in the $PFILDS DSECT control block are described briefly as follows: PFILLEN Size of the Exit control block ($PFILDS). H/. The information in this block includes external data set and DDnames. Not modifiable by any exits.. PFILVERS Version number to identify the Exit control block ($PFILDS) written by the exit handler. Not modifiable by any exits. This should always be 2. * THE FIRST 2 BYTES IN THE AREA = THE LENGTH OF THE NAME.The Package File Control Block The Package File Control Block This is the fourth information block passed to the exit.. H4.IS.PO.PSU. 274 Exits Guide . The space is taken out of the PFILBFAREA buffer. for use in rapid identification when you are scanning your modules visually. PFILDSN Data set name associated with the external file used by the current package. a 2 byte binary file name length value. a 2 byte binary path name length value. PFILDSTY Type of data set named by the PFILDSN field. Not modifiable by any exit. DA. PFILBFAREA Contains space for $PFILDS areas. PFILPAOFF If the data set type is HFS. IS and so forth. PFILMEM Member name associated with the element for which the action applies. this field will contain a binary offset value from $PFILDS to a path name area. The area is composed of 2 parts. followed by it's name. PFILSIZE Size of the $PFILDS DSECT. the exit program must allocate the file (data set name) associated with the new DDname. followed by a name. this field will contain a binary offset value from $PFILDS to a file name area. If you change this field.The Package File Control Block PFILID Code that identifies this as the File Exit control block. PSU. The space is taken out of the PFILBFAREA buffer. within the above data set. Applicable when data set is a library. Value is always PFIL. PFILNAOFF If the data set type is HFS. PFILDDN DDname associated with the data set named above. The area is composed of 2 parts. PO. blank otherwise. 05 PFIL-MEMBER-NAME PIC X(10). 05 PFIL-DATASET-TYPE PIC X(3). 05 PFIL-DATASET-NAME PIC X(44).The Package File Control Block PACKAGE-EXIT-FILE-BLOCK Layout The following is a sample PACKAGE-EXIT-FILE-BLOCK control block: ***************************************************************** * PACKAGE-EXIT-FILE-BLOCK .FOR INFORMATION ASSOCIATED WITH * * PACKAGE FUNCTIONS. 05 PFIL-AREA-BUFFER PIC X(1027). PFIL-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-FILE-BLOCK) written by the exit handler. EJECT PACKAGE-EXIT-FILE-BLOCK Field Descriptions The fields in the PACKAGE-EXIT-FILE-BLOCK control block are described briefly as follows: PFIL-LENGTH Size of the Exit control block (PACKAGE-EXIT-FILE-BLOCK). Not modifiable by any exits. 05 PFIL-DD-NAME PIC X(8). in bytes. 05 PFIL-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 FILLER PIC X(21). 05 PFIL-NAME-AREA-OFFSET PIC 9(4) COMP SYNC. ***************************************************************** * OFFSET (FROM BEGINNING OF PACKAGE-EXIT-FILE-BLOCK) TO THE * * PATH AND FILE NAME AREA. * * THE NAME VALUE THEN FOLLOWS * ***************************************************************** 05 PFIL-PATH-AREA-OFFSET PIC 9(4) COMP SYNC. 05 PFIL-LENGTH PIC 9(4) COMP SYNC. This should always be 2. * ***************************************************************** 01 PACKAGE-EXIT-FILE-BLOCK. Not modifiable by any exits. Chapter 6: Using Package Exit Control Blocks 275 . * * THE FIRST 2 BYTES IN AN AREA = THE LENGTH OF THE NAME. 05 PFIL-BLOCK-ID PIC X(4). None of the fields are modifiable by user exits. The space is taken out of the PFIL-AREA-BUFFER buffer. Applicable when data set is a library. blank otherwise. The block contains target and source element data such as action. the exit program must allocate the file (data set name) associated with the new DDname. The space is taken out of the PFILBFAREA buffer. a 2 byte binary file name length value. for use in rapid identification when you are scanning your modules visually. The area is composed of 2 parts. version and level numbers of the elements involved. The area is composed of 2 parts.The Package Action Request Block PFIL-BLOCK-ID Code that identifies this as the File Exit control block. a 2 byte binary path name length value. PSU. If you change this field. etc. this field will contain a binary offset value from PACKAGE-EXIT-FILE-BLOCK to a file name area. 276 Exits Guide . Not modifiable by any exit. this field will contain a binary offset value from PACKAGE-EXIT-FILE-BLOCK to a path name area. IS and so forth. PFIL-DD-NAME DDname associated with the data set named above. This block is built only on request from the user exit. PFIL-DATASET-NAME Data set name associated with the external file used by the current package. PFIL-AREA-BUFFER Contains space for PACKAGE-EXIT-FILE-BLOCK areas. Value is always PFIL. PFIL-DATASET-TYPE Type of data set named by the PFILDSN field. followed by it's name. and is pointed to by Register 1: 16(R1). PFIL-PATH-NAME-OFFSET If the data set type is HFS. DA. followed by a name. PFIL-MEMBER-NAME Member name associated with the element for which the action applies. The Package Action Request Block This is the fifth information block passed to the exit. PO. within the above data set. PFIL-PATH-AREA-OFFSET If the data set type is HFS. DSCT1 ANOP $PACTREQ DSECT . Chapter 6: Using Package Exit Control Blocks 277 . EQ 'YES').START1 ANOP *** *** BLOCK INITIALIZATION DATA *** PACTLEN DC AL2(PACTSIZE) BLOCK SIZE PACTVERS DC AL2(PACT$VER) BLOCK VERSION PACT$VER EQU 1 PACTID DC CL4'PACT' BLOCK ID *** *** BLOCK TOTAL DATA *** PACTSEQ# DS H SEQ NUM OF THIS ENTRY *** *** FORMATTED ACTION FIELDS *** PACTACTN DS CL8 C1 ACTION PACTCCID DS CL12 ACTION CCID PACTCOMM DS CL40 ACTION COMMENT PACTNDRC DS CL5 HIGH CA Endevor SCM/MVS RETURN CODE PACTPRRC DS CL5 HIGH PROCESSOR RETURN CODE PACTBEXD DS CL7 BEGIN EXECUTION DATE PACTBEXT DS CL5 BEGIN EXECUTION TIME PACTEEXD DS CL7 END EXECUTION DATE PACTEEXT DS CL5 END EXECUTION TIME *** *** SOURCE ELEMENT/MEMBER ID FIELDS *** PACTSSIT DS CL1 SITE ID PACTSENV DS CL8 ENVIRONMENT PACTSSYS DS CL8 SYSTEM PACTSSBS DS CL8 SUBSYSTEM PACTSELM DS CL10 ELEMENT PACTSTYP DS CL8 TYPE PACTSSTG DS CL8 STAGE NAME PACTSSTI DS CL1 STG ID (TEMPORARY) SPACE .START1 . AIF ('&DSCT'.The Package Action Request Block $PACTREQ DSECT The following is a sample $PACTREQ DSECT control block: MACRO $PACTREQ &DSCT=YES.DSCT1 $PACTREQ DS 0D AGO . The Package Action Request Block PACTSVL DS CL5 VERSION. *** *** EXTERNAL DATA SET ID FIELDS *** PACTSDSN DS CL44 EXTERNAL DATA SET NAME PACTSMBR DS CL10 EXTERNAL MEMBER NAME SPACE .LEVEL NUMBER PACTSDD DS CL7 DELTA DATE (OR BASE IF LVL 0) PACTSDT DS CL5 DELTA TIME (OR BASE IF LVL 0) PACTSGD DS CL7 GENERATE DATE PACTSGT DS CL5 GENERATE TIME PACTSPD DS CL7 LAST PROCESS DATE PACTSPT DS CL5 LAST PROCESS TIME SPACE . PACTT41 DS CL41 *** ID FIELDS SITE ID ENVIRONMENT SYSTEM SUBSYSTEM ELEMENT TYPE STAGE NAME STG ID (TEMPORARY) RESERVED FOR FUTURE USE 278 Exits Guide . PACTSPPI DS CL16 PREV PKG ID ASSOCIATED W/SRC PACTSCTS DS FL8 CAST TIMESTAMP ASSOCIATED W/TGT SPACE 2 * ************************************ * ** PACKAGE TARGET ID FIELDS ** * ************************************ *** *** TARGET ELEMENT/MEMBER *** PACTTSIT DS CL1 PACTTENV DS CL8 PACTTSYS DS CL8 PACTTSBS DS CL8 PACTTELM DS CL10 PACTTTYP DS CL8 PACTTSTG DS CL8 PACTTSTI DS CL1 SPACE . DSN. * PACTSEAOFF DS H SRC ELEMENT AREA OFFSET PACTSPAOFF DS H SRC PATH AREA OFFSET PACTSNAOFF DS H SRC FILE NAME AREA OFFSET SPACE 1 PACTTEAOFF DS H TGT ELEMENT AREA OFFSET PACTTPAOFF DS H TGT PATH AREA OFFSET PACTTNAOFF DS H TGT FILE NAME AREA OFFSET SPACE 1 PACTBFAREA DS XL2600 AREA BUFFER SPACE PACTSIZE EQU *-$PACTREQ LENGTH OF BLOCK MEND Chapter 6: Using Package Exit Control Blocks 279 .N/A (NONE) PACTTF_DSN EQU C'D' . SEE PACTSDSN & PACTSMBR PACTTF_PATH EQU C'P' .PATH.PATH. INFO IN PATH AREA * PACTTFLAG DS CL1 TGT FILE TYPE INDICATOR PACTTF_NA EQU C' ' . * THE DATA FOLLOWS IMMEDIATELY AFTER THE LENGTH FIELD. * * FIRST TWO BYTES W/IN THE AREA = THE HEX LENGTH OF THE DATA.N/A (NONE) PACTSF_DSN EQU C'D' . SEE PACTSDSN & PACTSMBR PACTSF_PATH EQU C'P' .DSN. INFO IN PATH AREA * * OFFSET ARE CALCULATED FROM THE BEGINNING OF $PACTREQ * OFFSET VALUE + $PACTREQ ADDRESS = AREA ADDRESS.The Package Action Request Block *** EXTERNAL DATA SET ID FIELDS *** PACTTDSN DS CL44 EXTERNAL DATA SET NAME PACTTMBR DS CL10 EXTERNAL MEMBER NAME PACTTPPI DS CL16 PREV PKG ID ASSOCIATED W/TGT PACTTCTS DS FL8 CAST TIMESTAMP ASSOCIATED W/TGT *** *** SOURCE AND TARGET AREA OFFSET FIELDS *** PACTSFLAG DS CL1 SRC FILE TYPE INDICATOR PACTSF_NA EQU C' ' . Not modifiable by any exits. This should always be 1. Not modifiable by any exits. Not modifiable by any exit. PACTID Code that identifies this as the Package Action request block. Use the PACT$VER label to verify that the correct version of this DSECT was passed to your exit. PACTVERS Version number to identify the Exit control block ($PACTREQ) written by the exit handler. 280 Exits Guide .The Package Action Request Block $PACTREQ DSECT Field Descriptions The fields in the $PACTREQ DSECT control block are described as follows: PACTLEN Size of the Exit control block ($PACTREQ). PACTSEQ# Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. for use in rapid identification when you are scanning your modules visually. Value is always PACT. in bytes. Not modifiable. Output only. PACTSSBS Subsystem of source element. PACTCCID CA Endevor SCM action CCID. Source element/member ID fields: PACTSSIT Site ID of source element. PACTBEXD Beginning execution date for this element. Format hh:mm. Format hh:mm. PACTPRRC High processor return code. PACTEEXT Ending execution time for this element. Format ddmmmyy. Format ddmmmyy. PACTBEXT Beginning execution time for this element. PACTSSYS System name of source element. PACTSELM Source element name. Chapter 6: Using Package Exit Control Blocks 281 .The Package Action Request Block Action fields PACTACTN CA Endevor SCM action literal. PACTSTYP Type name of source element. PACTSENV Environment of source element. PACTCOMM CA Endevor SCM action comment. PACTEEXD Ending execution date for this element. PACTNDRC High CA Endevor SCM return code. PACTSVL Version and level number of the source element. PACTSGT Time the source element was last generated. Format ddmmmyy. The 8-byte time stamps are 2 4-byte values.The Package Action Request Block PACTSSTG Stage name of source element. if the field contains a timestamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. PACTSDD Delta date of source element. PACTSPD Last process date of source element.65). PACTSGD Date the source element was last generated. PACTSSTI Stage ID of source element. Format hh:mm. 282 Exits Guide . PACTSPT Last process time of source element. Format hh:mm. PACTSDT Delta time of source element. Format ddmmmyy. PACTSCTS Cast time stamp associated with source element. PACTSDSN External data set name associated with source element. PACTSMBR External member name associated with source element. For example. PACTSPPI Previous package ID associated with source element. Each 4-byte value is a hexadecimal translation of a decimal date or time. Format hh:mm. Chapter 6: Using Package Exit Control Blocks 283 .65). PACTTSTG Stage name of target element. PACTTCTS Cast time stamp associated with target element.The Package Action Request Block Target element/member ID fields: PACTTSIT Site ID of target element. PACTTDSN External data set name associated with target element. PACTTPPI Previous package ID associated with target element. PACTTTYP Type name of target element. Each 4-byte value is a hexadecimal translation of a decimal date or time. PACTTMBR External member name associated with target element. PACTTSBS Subsystem of target element. PACTTSYS System name of target element. PACTTELM Target element name. PACTT41 Reserved for future use. For example. PACTTSTI Stage ID of source element. The 8-byte time stamps are 2 4-byte values. PACTTENV Environment of target element. if the field contains a timestamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. see path and file name areas: PACTSPAOFF and PACTSNAOFF. ■ ■ ■ Blank-None D-Data set fields: see fields PACTTDSN and PACTTMBR. immediately followed by the name. see path and file name areas: PACTTPAOFF and PATTNAOFF. PACTTNAOFF Target file name area binary offset from beginning of $PACTREQ. immediately followed by the name. immediately followed by the name. 284 Exits Guide . a binary name length value. PACTTEAOFF Target element area binary offset from beginning of $PACTREQ. Area composed of 2 parts. PACTTPAOFF Target path area binary offset from beginning of $PACTREQ. PACTBFAREA Space where all area is built PACTSIZE Size of the $PACTREQ. P-Path. Area composed of 2 parts. a binary name length value. a binary name length value. PACTSNAOFF Source file name area binary offset from beginning of $PACTREQ. PACTSPAOFF Source path area binary offset from beginning of $PACTREQ. a binary name length value. immediately followed by the name. immediately followed by the name. ■ ■ ■ Blank-None D-Data set fields: see fields PACTSDSN and PACTSMBR. Area composed of 2 parts. PACTSEAOFF Source element area binary offset from beginning of $PACTREQ. immediately followed by the name. a binary name length value. P-Path. a binary name length value. Area composed of 2 parts. Area composed of 2 parts.The Package Action Request Block PACTSFLAG Source file type indicator. Area composed of 2 parts. PACTTFLAG Target file type indicator. This block is built only on request from the user exit. 05 PACT-S-ELEMENT PIC X(10). 05 PACT-S-ENVIRONMENT PIC X(8). 05 PACT-HIGH-NDVR-RC PIC X(5). 05 PACT-COMMENT PIC X(40). 05 PACT-END-EXEC-TIME PIC X(5). 05 PACT-S-SYSTEM PIC X(8). 05 PACT-LENGTH PIC 9(4) COMP SYNC. None of the fields are modifiable by user exits. version and level numbers of the elements involved. 05 PACT-BLOCK-ID PIC X(4). * * FORMATTED ACTION FIELDS * 05 PACT-C1-ACTION PIC X(8). etc. 05 PACT-S-STAGE-NAME PIC X(8). 05 PACT-BEGIN-EXEC-TIME PIC X(5). 05 PACT-S-TYPE PIC X(8).The Package Action Request Block PACKAGE-EXIT-ACTION-BLOCK Layout This is the fifth information block passed to the exit. 05 PACT-ACTION-CCID PIC X(12). Chapter 6: Using Package Exit Control Blocks 285 . 05 PACT-END-EXEC-DATE PIC X(7). The block contains target and source element data such as action. * * BLOCK TOTAL DATA * 05 PACT-SEQ-NBR-FOR-ENTRY PIC S9(4) COMP SYNC. 05 PACT-S-SUBSYSTEM PIC X(8). ******************************************* * SOURCE ELEMENT/MEMBER ID FIELDS * ******************************************* 05 PACT-S-SITE-ID PIC X(1). 05 PACT-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 PACT-BEGIN-EXEC-DATE PIC X(7). The following is a sample PACKAGE-EXIT-ACTION-BLOCK control block is shown as follows: ***************************************************************** * PACKAGE-EXIT-ACTION-BLOCK * ***************************************************************** 01 PACKAGE-EXIT-ACTION-BLOCK. 05 PACT-HIGH-PROCESSOR-RC PIC X(5). 05 PACT-T-SYSTEM PIC X(8). PACT-S-GENERATE-TIME PIC X(5). 05 PACT-T-STAGE-ID PIC X(1). PACT-S-LST-PROCESS-TIME PIC X(5). PACT-S-LST-PROCESS-DATE PIC X(7). PACT-S-DELTA-TIME PIC X(5). 05 PACT-S-PREV-PKG-ASSOC PIC X(16). PIC X(10). 05 PACT-T-ELEMENT PIC X(10). 05 PACT-T-ENVIRONMENT PIC X(8). ******************************************* * TARGET ELEMENT/MEMBER ID FIELDS * ******************************************* 05 PACT-T-SITE-ID PIC X(1). 05 PACT-T-STAGE-NAME PIC X(8). PACT-S-VERSION-LEVEL PIC X(5). 05 PACT-T-TYPE PIC X(8). EXTERNAL DATASET ID FIELDS 05 PACT-S-DATASET-NAME 05 PACT-S-MEMBER-NAME PIC X(44). PACT-S-GENERATE-DATE PIC X(7).The Package Action Request Block 05 05 05 05 05 05 05 05 * * * PACT-S-STAGE-ID PIC X(1). PACT-S-DELTA-DATE PIC X(7). 05 FILLER PIC X(41). 286 Exits Guide . 05 PACT-S-CAST-TIMESTAMP PIC X(8). 05 PACT-T-SUBSYSTEM PIC X(8). 88 PACT-SF-DSN VALUE 'D'. 05 PACT-T-PREV-PKG-ASSOC PIC X(16). 05 PACT-T-FILE-TYPE 88 PACT-TF-NONE 88 PACT-TF-DSN 88 PACT-TF-PATH PIC VALUE VALUE VALUE X(1). * * 05 PACT-T-LST-PROCESS-TIME PIC X(5). 'D'. Chapter 6: Using Package Exit Control Blocks 287 . ' '. 05 PACT-T-CAST-TIMESTAMP PIC X(8). 'P'. 05 PACT-T-MEMBER-NAME PIC X(10). 88 PACT-SF-NONE VALUE ' '. NOR ARE THEY USED IN THE CODE * **************************************************************** * 05 PACT-T-VERSION-LEVEL PIC X(5). * * 05 PACT-T-DELTA-DATE PIC X(7). * * 05 PACT-T-LST-PROCESS-DATE PIC X(7). * * 05 PACT-T-DELTA-TIME PIC X(5). **************************************************************** * SOURCE AND TARGET AREA OFFSET FIELDS * **************************************************************** 05 PACT-S-FILE-TYPE PIC X(1). * * 05 PACT-T-GENERATE-TIME PIC X(5).The Package Action Request Block **************************************************************** * THE FOLLOWING FIELDS WERE REMOVED AS THEY DO NOT EXIST IN * * THE ASSEMBLER VERSION. 88 PACT-SF-PATH VALUE 'P'. * * 05 PACT-T-GENERATE-DATE PIC X(7). * **************************************************************** * * EXTERNAL DATASET ID FIELDS * 05 PACT-T-DATASET-NAME PIC X(44). Not modifiable. Use the PACT$VER label to verify that the correct version of this DSECT was passed to your exit. 05 PACT-SRC-PATH-AREA-OFFSET PIC 9(4) COMP SYNC. Not modifiable by any exits. PACT-SEQ-NBR-FOR-ENTRY Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. 05 PACT-TGT-ELM-AREA-OFFSET PIC 9(4) COMP SYNC. Action fields: PACT-C1-ACTION CA Endevor SCM action literal. PACT-ACTION-CCID CA Endevor SCM action CCID. 05 PACT-AREA-BUFFER PIC X(2600). This should always be 1.The Package Action Request Block **************************************************************** * OFFSETS ARE CALCULATED FROM THE BEGINNING OF * * PACKAGE-EXIT-ACTION-BLOCK. Value is always PACT. in bytes. 288 Exits Guide . PACT-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-ACTION-BLOCK) written by the exit handler. 05 PACT-TGT-PATH-AREA-OFFSET PIC 9(4) COMP SYNC. for use in rapid identification when you are scanning your modules visually. Not modifiable by any exits. * * OFFSET VALUE + PACKAGE-EXIT-ACTION-BLOCK ADDRESS = AREA ADDR. 05 PACT-SRC-NAME-AREA-OFFSET PIC 9(4) COMP SYNC.* * * * FIRST TWO BYTES W/IN AREA = THE BINARY LENGTH OF THE DATA. PACT-BLOCK-ID Code that identifies this as the Package Action request block. * * THE DATA FOLLOWS IMMEDIATELY AFTER THE LENGTH FIELD. 05 PACT-TGT-NAME-AREA-OFFSET PIC 9(4) COMP SYNC. Not modifiable by any exit. Output only. * **************************************************************** 05 PACT-SRC-ELM-AREA-OFFSET PIC 9(4) COMP SYNC. EJECT $PACTREQ DSECT Field Descriptions The fields in the $PACTREQ DSECT control block are described as follows: PACT-LENGTH Size of the Exit control block (PACKAGE-EXIT-ACTION-BLOCK). Format hh:mm. PACT-BEGIN-EXEC-DATE Beginning execution date for this element. PACT-END-EXEC-DATE Ending execution date for this element. Chapter 6: Using Package Exit Control Blocks 289 .The Package Action Request Block PACT-COMMENT CA Endevor SCM action comment. PACT-BEGIN-EXEC-TIME Beginning execution time for this element. PACT-END-EXEC-TIME Ending execution time for this element. Format ddmmmyy. Format hh:mm. PACT-HIGH-NDVR-RC High CA Endevor SCM return code. Format ddmmmyy. PACT-HIGH-PROCESSOR-RC High processor return code. PACT-S-ELEMENT Source element name. PACT-S-TYPE Type name of source element. PACT-S-STAGE-NAME Stage name of source element. PACT-S-STAGE-ID Stage ID of source element. PACT-S-ENVIRONMENT Environment of source element. PACT-S-DELTA-DATE Delta date of source element.The Package Action Request Block Source element/ member ID fields: PACT-S-SITE-ID Site ID of source element. PACT-S-SYSTEM System name of source element. Format hh:mm. PACT-S-DELTA-TIME Delta time of source element. PACT-S-VERSION-LEVEL Version and level number of the source element. PACT-S-SUBSYSTEM Subsystem of source element. 290 Exits Guide . Format hh:mm. PACT-S-PREV-PKG-ASSOC Previous package ID associated with source element. PACT-S-MEMBER-NAME External member name associated with source element. Chapter 6: Using Package Exit Control Blocks 291 . if the field contains a timestamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48. Format hh:mm. The 8-byte time stamps are 2 4-byte values.65). PACT-S-DATASET-NAME External data set name associated with source element. PACT-S-LST-PROCESS-DATE Last process date of source element. Each 4-byte value is a hexadecimal translation of a decimal date or time. PACT-S-LST-PROCESS-TIME Last process time of source element. PACT-S-CAST-TIMESTAMP Cast time stamp associated with source element. PACT-S-GENERATE-TIME Time the source element was last generated.The Package Action Request Block PACT-S-GENERATE-DATE Date the source element was last generated. Format ddmmmyy. For example. Format ddmmmyy. PACT-T-SUBSYSTEM Subsystem of target element. PACT-T-TYPE Type name of target element. PACT-T-ELEMENT Target element name. PACT-T-PREV-PKG-ASSOC Previous package ID associated with target element. 292 Exits Guide . PACT-T-DATASET-NAME External data set name associated with target element. PACT-T-MEMBER-NAME External member name associated with target element.The Package Action Request Block Target element/ member ID fields: PACT-T-SITE-ID Site ID of target element. PACT-T-SYSTEM System name of target element. PACT-T-STAGE-ID Stage ID of target element. PACT-T-ENVIRONMENT Environment of target element. PACT-T-STAGE-NAME Stage name of target element. PACT-T-FILE-TYPE Target file type indicator. Area composed of 2 parts. a binary name length value. PATTNAOFF. PACT-SRC-NAME-AREA-OFFSET Source file name area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. a binary name length value. immediately followed by the name. a binary name length value. immediately followed by the name. PACT-SRC-PATH-AREA-OFFSET Source path area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. immediately followed by the name. Area composed of 2 parts. Area composed of 2 parts. ■ ■ ■ Blank-None D-Data set fields: see fields PACT-S-DATASET-NAME and PACT-S-MEMBER-NAME. a binary name length value. PACT-SRC-ELM-AREA-OFFSET Source element area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. see path and file name areas: PACT-TGT-PATH-AREA-OFFSET AND PACT-TGT-NAME-AREA-OFFSET. a binary name length value. Area composed of 2 parts. immediately followed by the name. P-Path. PACT-TGT-PATH-AREA-OFFSET Target path area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. PACT-TGT-ELM-AREA-OFFSET Target element area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. immediately followed by the name. Chapter 6: Using Package Exit Control Blocks 293 . P-Path. PACT-TGT-NAME-AREA-OFFSET Target file name area binary offset from beginning of PACKAGE-EXIT-ACTION-BLOCK. see path and file name areas: PACT-SRC-PATH-AREA-OFFSET and PACT-SRC-NAME-AREA-OFFSET. Area composed of 2 parts. ■ ■ ■ Blank-None D-Data set fields: see fields PACT-T-DATASET-NAME and PACT-T-MEMBER-NAME.The Package Action Request Block PACT-S-FILE-TYPE Source file type indicator. a binary name length value. Area composed of 2 parts. immediately followed by the name. these will be marked with an "(RI)"-required input.The Package Approver Request Block PACT-AREA-BUFFER Space where all areas are built.DSCT1 $PAPPREQ DS 0D AGO . The Package Approver Request Block This is the sixth information block passed to the exit. The 8-byte time stamps are 2 4-byte values. For example. The block contains internal approver group record information. certain fields are required. As an input block. There can be 1 group and up to 16 internal approver IDs per group. In both cases the block is used only on the request of the user exit. PACT-T-CAST-TIME-STAMP Cast time stamp associated with target element. if the field contains a timestamp of x'01321831' and X'00D71211' then converting to decimal gives the date 20060209 and the time 14094865 (14:09:48.START1 ANOP * ************************************ * ** BLOCK INTIALIZATION FIELDS ** * ************************************ PAPPLEN DC AL2(PAPPSIZE) PAPPVERS DC AL2(PAPP$VER) PAPP$VER EQU 1 PAPPID DC CL4'PAPP' 294 Exits Guide .65). Note: These blocks do not contain the added-by information that is present in the Dynamic Approver records. * ************************************ * ** PACKAGE EXIT APPROVER MAP ** * ************************************ AIF ('&DSCT'. $PAPPREQ DSECT The following is a sample $PAPPREQ DSECT control block: MACRO $PAPPREQ &DSCT=YES.DSCT1 ANOP $PAPPREQ DSECT . Each 4-byte value is a hexadecimal translation of a decimal date or time. This block is used both as an input block (before-cast) and as a output block (request for data).START1 . EQ 'YES'). The Package Approver Request Block * ************************************ * ** BLOCK TOTAL DATA ** * ************************************ PAPPSEQ# DS H SEQUENTIAL NUMBER OF THIS ENTRY * ************************************ * ** APPROVER RECORD FIELDS ** * ************************************ SPACE 1 PAPPGPNM DS CL16 GROUP NAME PAPPEVNM DS CL8 ENVIRONMENT NAME PAPPQUOR DS H REQUIRED APPROVER QUORUM COUNT PAPPFLAG DS CL8 OVERALL PACKAGE APPROVER FLAG PAPPGTYP DS CL1 INT/EXT APPR GRP FLAG (I/E) PAPPFILL DS CL7 UNUSED (EXPANSION BYTES) PAPPAPP# DS H NBR OF APPROVERS IN THE GROUP ** ** THE FOLLOWING FIELDS OCCUR PAPPAPP# TIMES. ** THE RECURRING FIELDS ARE INDIVIDUALLY LABELED SO THAT THEY DEFI0290 ** WILL SHOW UP IN THE EXIT TRACE. DEFI0290 ** PAPPAPID DS CL8 APPROVER ID PAPPAPDA DS CL7 APPROVAL/DENIAL DATE PAPPAPTI DS CL5 APPROVAL/DENIAL TIME PAPPAFLG DS CL8 INDIVIDUAL APPROVER FLAG PAPPAREQ DS CL8 APPROVER'S APPROVAL REQUIRED PAPPAPLN EQU *-PAPPAPID LNG OF INDIVIDUAL APPR SEGMENT * PAPPID02 DS CL8 APPROVER ID PAPPDT02 DS CL7 APPROVAL/DENIAL DATE PAPPTI02 DS CL5 APPROVAL/DENIAL TIME PAPPFL02 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ02 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID03 DS CL8 APPROVER ID PAPPDT03 DS CL7 APPROVAL/DENIAL DATE PAPPTI03 DS CL5 APPROVAL/DENIAL TIME PAPPFL03 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ03 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID04 DS CL8 APPROVER ID PAPPDT04 DS CL7 APPROVAL/DENIAL DATE PAPPTI04 DS CL5 APPROVAL/DENIAL TIME PAPPFL04 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ04 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID05 DS CL8 APPROVER ID PAPPDT05 DS CL7 APPROVAL/DENIAL DATE Chapter 6: Using Package Exit Control Blocks 295 . The Package Approver Request Block PAPPTI05 PAPPFL05 PAPPRQ05 * PAPPID06 PAPPDT06 PAPPTI06 PAPPFL06 PAPPRQ06 * PAPPID07 PAPPDT07 PAPPTI07 PAPPFL07 PAPPRQ07 * PAPPID08 PAPPDT08 PAPPTI08 PAPPFL08 PAPPRQ08 * PAPPID09 PAPPDT09 PAPPTI09 PAPPFL09 PAPPRQ09 * PAPPID10 PAPPDT10 PAPPTI10 PAPPFL10 PAPPRQ10 * PAPPID11 PAPPDT11 PAPPTI11 PAPPFL11 PAPPRQ11 * DS CL5 DS CL8 DS CL8 DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS DS CL8 CL7 CL5 CL8 CL8 CL8 CL7 CL5 CL8 CL8 CL8 CL7 CL5 CL8 CL8 CL8 CL7 CL5 CL8 CL8 CL8 CL7 CL5 CL8 CL8 CL8 CL7 CL5 CL8 CL8 APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED APPROVER ID APPROVAL/DENIAL DATE APPROVAL/DENIAL TIME INDIVIDUAL APPROVER FLAG APPROVER'S APPROVAL REQUIRED 296 Exits Guide . The Package Approver Request Block PAPPID12 DS CL8 APPROVER ID PAPPDT12 DS CL7 APPROVAL/DENIAL DATE PAPPTI12 DS CL5 APPROVAL/DENIAL TIME PAPPFL12 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ12 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID13 DS CL8 APPROVER ID PAPPDT13 DS CL7 APPROVAL/DENIAL DATE PAPPTI13 DS CL5 APPROVAL/DENIAL TIME PAPPFL13 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ13 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID14 DS CL8 APPROVER ID PAPPDT14 DS CL7 APPROVAL/DENIAL DATE PAPPTI14 DS CL5 APPROVAL/DENIAL TIME PAPPFL14 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ14 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID15 DS CL8 APPROVER ID PAPPDT15 DS CL7 APPROVAL/DENIAL DATE PAPPTI15 DS CL5 APPROVAL/DENIAL TIME PAPPFL15 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ15 DS CL8 APPROVER'S APPROVAL REQUIRED * PAPPID16 DS CL8 APPROVER ID PAPPDT16 DS CL7 APPROVAL/DENIAL DATE PAPPTI16 DS CL5 APPROVAL/DENIAL TIME PAPPFL16 DS CL8 INDIVIDUAL APPROVER FLAG PAPPRQ16 DS CL8 APPROVER'S APPROVAL REQUIRED * DS 0D PAPPAP$L EQU *-PAPPAPID LENGTH OF APPROVER LIST PAPPSIZE EQU *-$PAPPREQ PHYSICAL RECORD LENGTH *********************************************************************** ** E N D O F $ P A P P T B L ** *********************************************************************** MEND Chapter 6: Using Package Exit Control Blocks 297 . PAPPVERS Version number to identify the Exit control block ($PAPPREQ) written by the exit handler. PAPPQUOR Required approval quorum count (RI). PAPPID Code that identifies this as the Approver request block. Not modifiable by any exits. 298 Exits Guide . Output only. PAPPFLAG Overall package approver flag. Not modifiable by any exit point. PAPPGPNM Approver group name (RI). Use the PAPP$VER label to verify that the correct version of this DSECT was passed to your exit. This should always be 1. PAPPGTYP Indicates if the approver group is internal or external. Not modifiable. Possible values are I and E. PAPPAPP# Number of approvers in the group (RI). in bytes. Value is always PAPP. for use in rapid identification when you are scanning your modules visually. PAPPEVNM Environment associated with approver group (RI).The Package Approver Request Block $PAPPREQ DSECT Field Descriptions Brief descriptions of the fields in the $PAPPREQ DSECT control block follow: PAPPLEN Size of the Exit control block ($PAPPREQ). Not modifiable by any exits. PAPPSEQ# Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. PAPPAPID02-PAPPAPID16 Second through sixteenth occurrence of PAPPAPID. PAPPAPTI Approval/denial time. Format ddmmmyy. PAPPAPDA Approval/denial date. PAPPTI02-PAPPTI16 Second through sixteenth occurrence of PAPPAPTI. Chapter 6: Using Package Exit Control Blocks 299 . PAPPSIZE Size of $PAPPREQ DSECT. PAPPAP$L Length of approver list data. PAPPAFLG Individual approver's flag. Not modifiable. PAPPAREQ Approver's approval required flag (RI). PAPPFL02-PAPPFL16 Second through sixteenth occurrence of PAPPAFLG.The Package Approver Request Block Fields that occur for each approver in group: PAPPAPID Approver ID (RI). PAPPDT02-PAPPDT16 Second through sixteenth occurrence of PAPPAPDA. Format hh:mm. PAPPAPLN Length of individual approver segment. PAPPRQ02-PAPPRQ16 Second through sixteenth occurrence of PAPPAREQ. 10 PAPP-APPROVAL-FLAG PIC X(8). 05 PAPP-GROUP-NAME PIC X(16). 05 PAPP-APPROVER-FLAG PIC X(8). 05 PAPP-ENVIRONMENT PIC X(8). 10 PAPP-APPR-DEN-TIME PIC X(5). 05 PAPP-APPROVER-NUMBER PIC S9(4) COMP SYNC. 05 PAPP-CURRENT-VERSION PIC 9(4) COMP SYNC. 05 PAPP-BLOCK-ID PIC X(4). 10 PAPP-APPROVAL-ID PIC X(8). 10 PAPP-APPR-REQUIRED PIC X(8). 300 Exits Guide . 05 PAPP-APPROVAL-DATA OCCURS 0 TO 16 TIMES DEPENDING ON PAPP-APPROVER-NUMBER. 05 PAPP-LENGTH PIC 9(4) COMP SYNC. 05 PAPP-QUORUM-COUNT PIC S9(4) COMP SYNC.The Package Approver Request Block PACKAGE-EXIT-APPROVER-MAP Layout The following is a sample PACKAGE-EXIT-APPROVER-MAP control block layout: 01 PACKAGE-EXIT-APPROVER-MAP. 05 PAPP-SEQUENCE-NUMBER PIC S9(4) COMP SYNC. 05 PAPP-APPR-GRP-TYPE PIC X(1) 05 PAPP-FILLER PIC X(7). 10 PAPP-APPR-DEN-DATE PIC X(7). PAPP-SEQUENCE-NUMBER Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. PAPP-ENVIRONMENT Environment associated with approver group (RI). PAPP-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-APPROVER-MAP) written by the exit handler. Not modifiable by any exits. This should always be 1. Output only. Not modifiable by any exit point. PAPP-QUORUM-COUNT Required approval quorum count (RI). Value is always PAPP. Chapter 6: Using Package Exit Control Blocks 301 . PAPP-BLOCK-ID Code that identifies this as the Approver request block.The Package Approver Request Block PACKAGE-EXIT-APPROVER-MAP Field Descriptions The fields in the PACKAGE-EXIT-APPROVER-MAP control block are described as follows: PAPP-LENGTH Size of the Exit control block (PACKAGE-EXIT-APPROVER-MAP). Not modifiable by any exits. PAPP-GROUP-NAME Approver group name (RI). for use in rapid identification when you are scanning your modules visually. in bytes. Not modifiable. PAPP-APPROVAL-FLAG Individual approver's flag. This block is only built on request from the user exit. PAPP-APPROVAL-DATA Number of approvers in the group (RI). Fields that occur for each approver in group: PAPP-APPROVAL-ID Approver ID (RI). Format hh:mm. The Package Backout Request Block This is the seventh information block passed to the exit. None of the fields are modifiable by exit programs. PAPP-APPR-GRP-TYPE Indicates if the approver group is external or internal.The Package Backout Request Block PAPP-APPROVER-FLAG Overall package approver flag. PAPP-APP-DEN-TIME Approval/denial time. PAPP-APPR-REQUIRED Approver's approval required flag (RI). Possible values are E and I. PAPP-APP-DEN-DATE Approval/denial date. Format ddmmmyy. This block contains backout data set information. 302 Exits Guide . O. * PBODSIZE EQU *-$PBODREQ LNG OF BOD TABLE ENTRY Chapter 6: Using Package Exit Control Blocks 303 . REC ASSOC W/ACTION SOURCE PBOD$TRG EQU 2 B.O. REC ASSOC W/ACTION TARGET PBODFLG2 DS H BACKOUT FLAG PBOD$BKO EQU 1 MEMBER HAS BEEN BACKED-OUT PBOD$BKI EQU 2 MEMBER HAS BEEN BACKED-IN * PBODDSN DS CL44 DATA SET NAME PBODCMBR DS CL8 CURRENT MEMBER PBODNMBR DS CL8 NEW MEMBER (BLANK IF DELETED) PBODSMBR DS CL8 SAVE MEMBER (BLANK IF NEW MBR) * SPACE .The Package Backout Request Block $PBODREQ DSECT The following is a sample $PBODREQ DSECT control block: $PBODREQ DSECT * ********************************************** * * BLOCK INITIALIZATION DATA * * ********************************************** PBODLEN DC AL2(PBODSIZE) LENGTH OF BOD TABLE ENTRY PBODVERS DC AL2(PBOD$VER) VERSION OF BOD TABLE BLK PBOD$VER EQU 1 RELEASE 1 PBODID DC CL4'PBOD' ID OF CONTROL BLOCK * ********************************************** * * BLOCK TOTAL DATA * * ********************************************** PBODSEQ# DS H SEQUENTIAL # OF THIS ENTRY * ********************************************** * * BACKOUT DATA FIELDS * * ********************************************** PBODFLG1 DS H BACKOUT FLAG PBOD$SRC EQU 1 B. Value is always PBOD. Backout record is associated with action source. Values are: ■ ■ 1-PBOD$SRC. This should always be 1. Use the PBOD$VER label to verify that the correct version of this DSECT was passed to your exit. PBODFLG1 Backout source flag. Not modifiable by any exit point. Not modifiable by any exits. PBODSEQ# Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested.The Package Backout Request Block $PBODREQ DSECT Field Descriptions The fields in the $PBODREQ DSECT control block are described as follows: PBODLEN Size of the Exit control block ($PBODREQ). 304 Exits Guide . PBODVERS Version number to identify the Exit control block ($PBODREQ) written by the exit handler. in bytes. Backout record associated with action target. for use in rapid identification when you are scanning your modules visually. Not modifiable by any exits. PBODID Code that identifies this as the Backout request block. 2-PBOD$TRG. 88 PBOR-MEMBER-BEEN-BACKED-OUT VALUE 1. PACKAGE-EXIT-BACKOUT-BLOCK Layout The following is a sample PACKAGE-EXIT-BACKOUT-BLOCK control block layout: 01 PACKAGE-EXIT-BACKOUT-BLOCK. 05 PBOR-LENGTH PIC 9(4) COMP SYNC. 88 PBOR-BO-REC-ASSOC-WITH-TARGET VALUE 2. PBODNMBR New member (blank if deleted). 2-PBOD$BKI. Values are: 1-PBOD$BKO. PBOR-SAVE-MEMBER PIC X(8). Chapter 6: Using Package Exit Control Blocks 305 . 05 PBOR-BACKOUT-FLAG1 PIC 9(4) COMP.The Package Backout Request Block PBODFLG2 ■ ■ ■ Backout history flag. Member has been backed out. PBODCMBR Current member. 05 PBOR-SEQUENCE-NUMBER PIC S9(4) COMP. 05 PBOR-CURRENT-VERSION PIC 9(4) COMP SYNC. PBODDSN Backout data set name. 05 PBOR-BACKOUT-FLAG2 PIC 9(4) COMP. PBOR-CURRENT-MEMBER PIC X(8). PBODSMBR Save member (blank if new member) PBODSIZE Size of $PBODREQ DSECT. PBOR-NEW-MEMBER PIC X(8). 88 PBOR-MEMBER-BEEN-BACKED-IN VALUE 2. Member has been backed in. 88 PBOR-BO-REC-ASSOC-WITH-SOURCE VALUE 1. 05 PBOR-BLOCK-ID PIC X(4). 05 05 05 05 PBOR-DATASET-NAME PIC X(44). Equates: PBOR-BO-REC-ASSOC-WITH-TARGET – – Value: 2 Meaning: Backout record associated with action target. Values are: ■ Equates: PBOR-BO-REC-ASSOC-WITH-SOURCE – – ■ Value: 1 Meaning: Backout record is associated with action source. PBOR-BLOCK-ID Code that identifies this as the Backout request block. Not modifiable by any exits. for use in rapid identification when you are scanning your modules visually. Values are: ■ Equates: PBOR-MEMBER-BEEN-BACKED-OUT – – ■ Value: 1 Meaning: Member has been backed out. Not modifiable by any exit point. 306 Exits Guide . PBOR-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-BACKOUT-BLOCK) written by the exit handler. This should always be 1. in bytes. Value is always PBOD. PBOR-BACKOUT-FLAG1 Backout source flag. PBOR-SEQUENCE-NUMBER Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. PBOR-BACKOUT-FLAG2 Backout history flag. Equates: PBOR-MEMBER-BEEN-BACKED-IN – – Value: 2 Meaning: Member has been backed in. Not modifiable by any exits.The Package Backout Request Block PACKAGE-EXIT-BACKOUT-BLOCK Field Descriptions Brief descriptions of the fields in the PACKAGE-EXIT-BACKOUT-BLOCK control block layout follow: PBOR-LENGTH Size of the Exit control block (PACKAGE-EXIT-BACKOUT-BLOCK). PBOR-SAVE-MEMBER Save member (blank if new member) The Package Ship Request Block This is the eighth information block passed to the exit.The Package Ship Request Block PBOR-DATASET-NAME Backout data set name. PBOR-NEW-MEMBER New member (blank if deleted). PBOR-CURRENT-MEMBER Current member. Chapter 6: Using Package Exit Control Blocks 307 . This block is only built on request from the user exit. This block contains backout data set information. None of the fields are modifiable by exit programs. R=#### * * CANCELLED BY EXIT: XC=## .X=#### * * ABEND DETECTED: S/### .XC=### .U#### * * GENERIC COMPLETION: EXEC'D .RC=### .ABEND * *-----------------------------------* 308 Exits Guide .The Package Ship Request Block $PSHPREQ DSECT The following is a sample $PSHPREQ DSECT control block: $PSHPREQ DSECT * ********************************************** * * BLOCK INITIALIZATION DATA * * ********************************************** PSHPLEN DC AL2(PSHPSIZE) LENGTH OF BOD TABLE ENTRY PSHPVERS DC AL2(PSHP$VER) VERSION OF BOD TABLE BLK PSHP$VER EQU 1 RELEASE 1 PSHPID DC CL4'PSHP' ID OF CONTROL BLOCK * ********************************************** * * BLOCK TOTAL DATA * * ********************************************** PSHPSEQ# DS H SEQUENTIAL # OF THIS ENTRY * ********************************************** * * SHIPMENT DATA FIELDS * * ********************************************** PSHPPKID PSHPDSUB PSHPTSUB PSHP#DST DS DS DS DS CL16 CL7 CL5 H ID OF PACKAGE SHIPPED DATE SUBMITTED (DDMONYY) TIME SUBMITTED (HH:MM) # OF DESTINATIONS IN RECORD *** *** THE FOLLOWING FIELDS OCCUR PSHP#DST TIMES *** PSHPDEST DS CL8 SHIPMENT DESTINATION PSHPTYPE DS CL3 SHIPMENT TYPE PSHP$PKG EQU C'P' PKG = PACKAGE SHIPPED PSHP$BKT EQU C'B' BKO = BACKOUT SHIPPED PSHPCOMP DS CL3 COMPLEMENTARY FILES INDICATOR PSHPC$YS EQU C'Y' YES = COMPLEMENT FILES REQ'ED PSHPC$NO EQU C'N' NO = NO COMPLEMENTARY FILES * *-----------------------------------* * COMPLETION CODES: * * FUNCTION COMPLETED: RC=## . Chapter 6: Using Package Exit Control Blocks 309 . for use in rapid identification when you are scanning your modules visually.The Package Ship Request Block PSHPC$RC EQU C'R' PSHPC$XX EQU C'X' PSHPC$SA EQU C'S' PSHPC$UA EQU C'U' PSHPC$EX EQU C'E' PSHPC$AB EQU C'A' PSHPCCST DS CL6 PSHPCCTR DS CL6 PSHPCCRM DS CL6 DS 3CL6 ** PSHPD$LN EQU *-PSHPDEST DS 9CL(PSHPD$LN) PSHP$TLN EQU *-PSHPDEST * SPACE . PSHPPKID Package ID associated with the ship record. * PSHPSIZE EQU *-$PSHPREQ CC IS A RETURN CODE CC IS AN EXIT CANCELLATION CC IS A SYSTEM ABEND CC IS A USER ABEND FUNCTION EXEC'D (RC UNAVAILABLE) FUNCTION ABND'D (RC UNAVAILABLE) SHIPMENT STAGING COMPLETION CODE SHIPMENT TRANSMISSION COMPL CODE REMOTE COPY/DELETE COMPL'TN CODE RESERVED ** LENGTH OF A SINGLE DEST ENTRY UP TO NINE MORE ENTRIES IN LIST TOTAL LENGTH OF DEST INFO LIST LNG OF BOD TABLE ENTRY $PSHPREQ DSECT Field Descriptions The fields in the $PSHPREQ DSECT control block are described as follows: PSHPLEN Size of the Exit control block ($PSHPREQ). PSHPSEQ# Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. Not modifiable by any exits. This should always be 1. Value is always PSHP. PSHPVERS Version number to identify the Exit control block ($PSHPREQ) written by the exit handler. in bytes. PSHPID Code that identifies this as the Ship request block. Use the PSHP$VER label to verify that the correct version of this DSECT was passed to your exit. Not modifiable by any exits. Not modifiable by any exits. The Package Ship Request Block PSHPDSUB Date SHIP request was submitted. Label values are: ■ ■ P-PSHP$PKG. The label that follows the field identifies the value in the field. PSHPCCST Completion code for shipment staging. Format ddmmmyy. value is a user abend. Package shipped B-PSHP$BKT. the value is a return code X-PSHPC$XX. U-PSHPC$UA. Do not ship complementary files. Label values are: ■ ■ ■ ■ ■ ■ R-PSHPC$RC. action abended but return code is unavailable. PSHPDEST Shipment destination. PSHPTSUB Time SHIP request was submitted. S-PSHPC$SA. E-PSHPC$EX. Labels and acceptable values are the same as for PSHPCCST. Ship complementary files N-PSHPC$NO. value is an exit cancellation. PSHPTYPE Shipment type. A-PSHPC$AB. Format hh:mm. PSHPCCTR Completion code for shipment transmission. 310 Exits Guide . Backout shipped PSHPCOMP ■ ■ ■ Complementary file indicator. Labels and acceptable values are the same as for PSHPCCST. value is a system abend. action was executed but return code is unavailable. Label values are: Y-PSHPC$YS. PSHPCCRM Completion code for remote copy delete. PSHPSIZE Size of $PSHPREQ DSECT. 10 FILLER PIC X(18). 10 PSHP-REMOTE-CPY-DEL-CODE PIC X(6). 20 FILLER PIC X(2). 05 PSHP-DATE-SUBMITTED PIC X(7). 88 PSHP-CC-IS-A-USER-ABEND VALUE 'U'. 88 PSHP-CC-IS-A-SYSTEM-ABEND VALUE 'S'. 20 FILLER PIC X(2).R=#### * CANCELLED BY EXIT: XC=## . 05 PSHP-CURRENT-VERSION PIC 9(4) COMP SYNC. 88 PSHP-CC-IS-AN-EXIT-CANCEL VALUE 'X'. 05 PSHP-LENGTH PIC 9(4) COMP SYNC. 05 PSHP-DESTINATION-NUMBER PIC S9(4) COMP. 05 PSHP-SEQUENCE-NUMBER PIC S9(4) COMP. EJECT Chapter 6: Using Package Exit Control Blocks 311 . 88 PSHP-PACKAGE-SHIPPED VALUE 'P'.XC=### = X=#### * GENERIC COMPLETION: EXEC'D .The Package Ship Request Block PACKAGE-EXIT-SHIPMENT-BLOCK Layout The following is a sample PACKAGE-EXIT-SHIPMENT-BLOCK control block layout: ***************************************************************** * PACKAGE-EXIT-SHIPMENT-BLOCK. 88 PSHP-BACKOUT-SHIPPED VALUE 'B'. 05 PSHP-DESTINATION-DATA OCCURS 0 TO 10 TIMES DEPENDING ON PSHP-DESTINATION-NUMBER. 05 PSHP-PACKAGE-ID PIC X(16). 88 PSHP-FUNCTION-ABENDED VALUE 'A'. 05 PSHP-BLOCK-ID PIC X(4). * ***************************************************************** 01 PACKAGE-EXIT-SHIPMENT-BLOCK. 05 PSHP-TIME-SUBMITTED PIC X(5). 10 PSHP-SHIP-DESTINATION PIC X(8).ABEND * 10 PSHP-STAGING-COMPL-CODE PIC X(6). 88 PSHP-NO-COMPLEMENT-REQUIRED VALUE 'N'. * * COMPLETION CODES: * * FUNCTION COMPLETED: RC=## .RC=### . 88 PSHP-COMPLEMENT-REQUIRED VALUE 'Y'. 10 PSHP-SHIPMENT-TYPE. 88 PSHP-FUNCTION-EXECUTED VALUE 'E'. 10 PSHP-TRANSMI-COMPL-CODE PIC X(6). 20 FILLER PIC X(1). 20 FILLER PIC X(1). 10 PSHP-COMPLEMENT-FILES-FLAG. 88 PSHP-CC-IS-A-RETURN-CODE VALUE 'R'. PSHP-BLOCK-ID Code that identifies this as the Ship request block. Label values are: Y-PSHP-COMPLEMENT-REQUIRED: Ship complementary files N-PSHP-NO-COMPLEMENT-REQUIRED: Do not ship complementary files. Not modifiable by any exits. Not modifiable by any exits. Format hh:mm. PSHP-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-SHIPMENT-BLOCK) written by the exit handler. 312 Exits Guide . PSHP-SHIPMENT-TYPE Shipment type. Value is always PSHP. Label values are: ■ ■ P-PSHP-PACKAGE-SHIPPED: Package shipped B-PSHP-BACKOUT-SHIPPED: Backout shipped PSHP-COMPLEMENT-FILES-FLAG ■ ■ ■ Complementary file indicator. Not modifiable by any exits. PSHP-TIME-SUBMITTED Time SHIP request was submitted. PSHP-SHIP-DESTINATION Shipment destination. PSHP-SEQUENCE-NUMBER Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. Format ddmmmyy. for use in rapid identification when you are scanning your modules visually. in bytes. This should always be 1. PSHP-PACKAGE-ID Package ID associated with the ship record.The Package Ship Request Block PACKAGE-EXIT-SHIPMENT-BLOCK Field Descriptions The fields in the PACKAGE-EXIT-SHIPMENT-BLOCK control block are described briefly as follows: PSHP-LENGTH Size of the Exit control block (PACKAGE-EXIT-SHIPMENT-BLOCK). PSHP-DATE-SUBMITTED Date SHIP request was submitted. The Package SCL Request Block PSHP-STAGING-COMPL-CODE Completion code for shipment staging. This block is only built on request from the user exit. Chapter 6: Using Package Exit Control Blocks 313 . Label values are: ■ ■ ■ ■ ■ ■ R-PSHP-CC-IS-A-RETURN-CODE: the value is a return code X-PSHP-CC-IS-AN-EXIT-CANCEL: value is an exit cancellation. A-PSHP-FUNCTION-ABENDED: action abended but return code is unavailable. The label that follows the field identifies the value in the field. E-PSHP-FUNCTION-EXECUTED: action was executed but return code is unavailable. Labels and acceptable values are the same as for PSHP-STAGING-COMPL-CODE. None of the fields are modifiable by exit programs. Labels and acceptable values are the same as for PSHP-STAGING-COMPL-CODE. PSHP-REMOTE-CPY-DEL-CODE Completion code for remote copy delete. PSHP-TRANSMI-COMPL-CODE Completion code for shipment transmission. S-PSHP-CC-IS-A-SYSTEM-ABEND: value is a system abend. The Package SCL Request Block This is the ninth information block passed to the exit. U-PSHP-CC-IS-A-USER-ABEND: value is a user abend. This block contains package SCL information. The Package SCL Request Block $PSCLREQ DSECT The following is a sample $PSCLREQ DSECT control block: * ************************************ * ** PACKAGE EXIT SCL RECORD ** * ************************************ $PSCLREQ DSECT * ************************************* * ** BLOCK INITIALIZATION FIELDS ** * ************************************* PSCLLEN DC AL2(PSCLSIZE) PSCLVERS DC AL2(PSCL$VER) PSCL$VER EQU 1 PSCLID DC CL4'PSCL' * ************************************ * ** BLOCK TOTAL DATA ** * ************************************ PSCLSEQ# DS H SEQUENTIAL NUMBER OF THIS ENTRY * ************************************ * ** SCL RECORDS ** * ************************************ SPACE 1 PSCL#SMT DS H NBR OF SCL STATEMENTS IN RECORD ** ** THE FOLLOWING FIELDS OCCUR PSCL#SMT TIMES ** PSCLSTMT DS CL80 SCL STATEMENT PSCLSLNG EQU *-PSCLSTMT LNG OF INDIVIDUAL SCL SEG DS 9XL(PSCLSLNG) ROOM FOR NINE MORE STATEMENTS DS 0D PSCLSC$L EQU *-PSCLSTMT LENGTH OF SCL STATEMENT LIST PSCLSIZE EQU *-$PSCLREQ PHYSICAL RECORD LENGTH *********************************************************************** ** E N D O F $ P A P P T B L ** *********************************************************************** 314 Exits Guide . PSCLSLNG Length of the SCL statement.The Package SCL Request Block $PSCLREQ DSECT Field Descriptions The following describes the fields in the $PSCLREQ DSECT control block: PSCLLEN Size of the Exit control block ($PSCLREQ). This should always be 1. Chapter 6: Using Package Exit Control Blocks 315 . in bytes. for use in rapid identification when you are scanning your modules visually. PSCLID Code that identifies this as the SCL request block. Use the PSCLVER label to verify that the correct version of this DSECT was passed to your exit. Value is always PSCL. PSCLSEQ# Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. PSCL#STM Number of SCL statements in request block. PSCLSIZE Size of the $PSCLREQ DSECT. PSCLSC$L Length of SCL statement list. The following four fields occur once for each SCL statement: PSCLSTMT Actual SCL statement. PSCLVERS Version number to identify the Exit control block ($PSCLREQ) written by the exit handler. Not modifiable by any exits. Not modifiable by any exits. Not modifiable by any exits. The block is large enough to hold 36 statements. Maximum is 36 statements. The block is large enough to hold 36 statements. The following field occurs once for each SCL statement: PSCL-STATEMENT Actual SCL statement. PSCL-CURRENT-VERSION Version number to identify the Exit control block (PACKAGE-EXIT-SCL-BLOCK) written by the exit handler. PSCL-SEQUENCE-NUMBER Sequential number set by CA Endevor SCM to tell the user exit the number of records it has requested. * ***************************************************************** 01 PACKAGE-EXIT-SCL-BLOCK. 05 PSCL-SCL-STATEMENT-NBR PIC S9(4) COMP. in bytes. EJECT PACKAGE-EXIT-SCL-BLOCK Field Descriptions The following describes the fields in the PACKAGE-EXIT-SCL-BLOCK control block: PSCL-LENGTH Size of the Exit control block (PACKAGE-EXIT-SCL-BLOCK). for use in rapid identification when you are scanning your modules visually. 10 PSCL-STATEMENT PIC X(80). This should always be 1. PSCL#STM Number of SCL statements in request block. Not modifiable by any exits. PSCL-BLOCK-ID Code that identifies this as the SCL request block. 05 PSCL-SCL-DATA OCCURS 0 TO 10 TIMES DEPENDING ON PSCL-SCL-STATEMENT-NBR. Maximum is 36 statements.The Package SCL Request Block PACKAGE-EXIT-SCL-BLOCK Layout The following is a sample PACKAGE-EXIT-SCL-BLOCK control block: ***************************************************************** * PACKAGE-EXIT-SCL-BLOCK. 05 PSCL-LENGTH PIC 9(4) COMP SYNC. Not modifiable by any exits. 05 PSCL-SEQUENCE-NUMBER PIC S9(4) COMP. Value is always PSCL. Not modifiable by any exits. 05 PSCL-BLOCK-ID PIC X(4). 316 Exits Guide . 05 PSCL-CURRENT-VERSION PIC 9(4) COMP SYNC. The Product Collection Request Block The Product Collection Request Block This is the tenth information block passed to the exit. None of the fields are modifiable by exit programs. Chapter 6: Using Package Exit Control Blocks 317 . This block is only built on request form the user exit. This block contains DistribuLink product collection information. X=#### * * ABEND DETECTED: S/### .RC=### .XC=### .U#### * *-----------------------------------* PCOLCCST DS CL6 COLLECTION STAGING COMPL CODE PCOLCCCR DS CL6 COLLECTION REQUEST COMPL CODE PCOLC$RC EQU C'R' CC IS A RETURN CODE PCOLC$XX EQU C'X' CC IS AN EXIT CANCELLATION PCOLC$SA EQU C'S' CC IS A SYSTEM ABEND PCOLC$UA EQU C'U' CC IS A USER ABEND *-----------------------------------* PCOLDSUB DS CL7 PCOLTSUB DS CL5 PCOLCONN DS CL8 PCOLSTARTD DS CL8 PCOLSTARTT DS CL8 PCOLDLNAME DS CL20 PCOLDLDESC DS CL30 PCOLDLVERS DS CL15 PCOLDLNUMB DS CL15 DATE SUBMITTED (DDMONYY) TIME SUBMITTED (HH:MM) CONNECTION ID DISTRIBULINK START COLLECT DATE DISTRIBULINK START COLLECT TIME DISTRIBULINK PRODUCT NAME DISTRIBULINK PRODUCT DESCRIPTION DISTRIBULINK PRODUCT VERSION DISTRIBULINK PRODUCT NUMBER 318 Exits Guide .The Product Collection Request Block $PCOLREQ DSECT The following is a sample $PCOLREQ DSECT control block: $PCOLREQ DSECT * ********************************************** * * BLOCK INITIALIZATION DATA * * ********************************************** PCOLLEN DC AL2(PCOLSIZE) LENGTH OF BOD TABLE ENTRY PCOLVERS DC AL2(PCOL$VER) VERSION OF BOD TABLE BLK PCOL$VER EQU 1 RELEASE 1 PCOLID DC CL4'PCOL' ID OF CONTROL BLOCK * ********************************************** * * BLOCK TOTAL DATA * * ********************************************** PCOLSEQ# DS H SEQUENTIAL # OF THIS ENTRY *-----------------------------------* PCOLPKID DS CL16 ID OF PACKAGE COLLECTED PCOLTYPE DS CL3 TYPE OF PACKAGE COLLECTED PCOL$PKG EQU C'P' PKG = PACKAGE COLLECTED PCOL$BKT EQU C'B' BKO = BACKOUT COLLECTED *-----------------------------------* * COMPLETION CODES: * * FUNCTION COMPLETED: RC=## .R=#### * * CANCELLED BY EXIT: XC=## . * PCOLSIZE EQU *-$PCOLREQ MEND DISTRIBULINK PRODUCT VENDOR DISTRIBULINK PRODUCT OP SYS DISTRIBULINK PRODUCT ESCAPE CHAR DISTRIBULINK PRODUCT TYPE . EXTERNAL . NORMAL DISTRIBULINK "INSTALLED WHEN" .The Product Collection Request Block PCOLDLVEND DS CL15 PCOLDLOPSY DS CL15 PCOLDLESCP DS CL1 PCOLDLTYPE DS CL1 PCOLDL$EXT EQU C'E' PCOLDL$GEN EQU C'G' PCOLDL$NOR EQU C'N' PCOLDLINST DS CL1 PCOLDL$DELD EQU C'D' PCOLDL$INST EQU C'I' * SPACE . GENERATION . DELIVERED . INSTALLED LNG OF BOD TABLE ENTRY Chapter 6: Using Package Exit Control Blocks 319 . 320 Exits Guide . 05 PCOL-PACKAGE-ID PIC X(16). 05 PCOL-TYPE-COLLECTD PIC X(3). 05 PCOL-CURRENT-VERSION PIC 9(4) COMP SYNC.U#### * ***************************************************************** 05 PCOL-STAGING-COMP-CODE PIC X(6). 88 PCOL-CC-RETURN-CODE VALUE 'R'. 05 PCOL-COLLECT-PRODUCT-VENDOR PIC X(15). 05 PCOL-COLLECT-PRODUCT-NUMBER PIC X(15). 05 PCOL-BLOCK-ID PIC X(4). 88 PCOL-PROD-DELIVERED VALUE 'D'. 05 PCOL-COLLECT-PRODUCT-DESC PIC X(20). 05 PCOL-CONNECT-ID PIC X(8). 88 PCOL-BACKOUT-COLLECTD VALUE 'B'. 05 PCOL-START-COLLECT-DATE PIC X(8). 88 PCOL-PROD-TYPE-EXTERNAL VALUE 'E'. 88 PCOL-CC-SYSTEM-ABEND VALUE 'S'. 88 PCOL-PROD-INSTALLED VALUE 'I'. 88 PCOL-CC-EXIT-CANCELLD VALUE 'X'. 05 PCOL-COLLECT-PRODUCT-TYPE PIC X(1). 05 PCOL-TIME-SUBMITTED PIC X(5). ***************************************************************** * COMPLETION CODES: * * FUNCTION COMPLETED: RC=## . 05 PCOL-COLLECT-PRODUCT-VERSION PIC X(15). 88 PCOL-PACKAGE-COLLECTD VALUE 'P'. 05 PCOL-REQUEST-COMP-CODE PIC X(6).RC=### . 05 PCOL-COLLECT-PRODUCT-OPSYS PIC X(15). 88 PCOL-PROD-TYPE-GENERATN VALUE 'G'.X=#### * * ABEND DETECTED: S/### . 05 PCOL-COLLECT-PRODUCT-WHEN PIC X(1). 05 PCOL-DATE-SUBMITTED PIC X(7). 05 PCOL-COLLECT-PRODUCT-NAME PIC X(8).XC=### .R=#### * * CANCELLED BY EXIT: XC=## . 88 PCOL-PROD-TYPE-NORMAL VALUE 'N'. 05 PCOL-LENGTH PIC 9(4) COMP SYNC. 88 PCOL-CC-USER-ABEND VALUE 'U'. * ***************************************************************** 01 PACKAGE-EXIT-COLLECT-BLOCK. 05 PCOL-COLLECT-PRODUCT-ESC-TYPE PIC X(1). 05 PCOL-START-COLLECT-TIME PIC X(8).The Product Collection Request Block PACKAGE-EXIT-COLLECT-BLOCK Layout The following is a sample PACKAGE-EXIT-COLLECT-BLOCK control block: ***************************************************************** * PACKAGE-EXIT-COLLECT-BLOCK. 05 PCOL-SEQUENCE-NUMBER PIC S9(4) COMP. is a sample exit program that can be used for after-cast notification of approvers. Each approver in Group G3 that there is a package to approve. Example: Package Signoff Consider an organization that requires three approver groups to sign off on all packages.CSIQAUTH. Note: Program BC1PAPNT. QA (Group G2). The organization also requires that Group G1 must approve the package before Group G2. ■ Writes after-review exits to notify: – – ■ Each approver in Group G2 that there is a package to approve. and that Group G2 must approve the package before Group G3. the site administrator does the following: ■ Writes an after-cast exit that notifies each approver in Group G1 that there is a package to review. To implement this approval procedure. These approver groups are Programmers (Group G1). Chapter 6: Using Package Exit Control Blocks 321 .iqual. and Production (Group G3). in iprfx. Writes List exits to build the lists for each approver group.Package Exit Example Package Exit Example You can use package exits to streamline the package approval process. . created by @CCIDTBL. Four components are used by this example. CCIDTBL Table of CCID rules. and exit 6 deletes the CCID table built by the @CCIDTBL macro. Each CCID is qualified by environment and system. and CCID specified for that action. The logic here examines each ADD/UPDATE action request to determine the environment. Chapter 7: Exit Program Examples 323 . The logic here deletes the CCID table at job termination. C1UEXT06 Exit 6 (job termination) program. system. If it finds a match on environment and system but not on CCID. In this example. exit 2 enforces the use of specific CCIDs for ADD or UPDATE action requests.Chapter 7: Exit Program Examples This section contains the following topics: Exits 2 and 6 (see page 323) Notification Utility Exit Programs (see page 332) Exits 2 and 6 This example illustrates exits 2 and 6. all of which are supplied at installation in the CA Endevor SCM source library. If it finds a match based on all three fields--or if it does not find the environment/system combination at all--exit 2 returns to CA Endevor SCM with a return code of zero (0). then scans the CCID rule table for a match. exit 2 returns an error (return code 8) to CA Endevor SCM. C1UEXT02 Exit 2 program. @CCIDTBL Macro that creates a table of CCIDs that are valid for ADD/UPDATE requests. .. GT 8). MEXIT RTN200 ANOP DC CL4'CCID'. NE 0). ********************************************************************** * CHECK IF ENTRY= SPECIFIED * ********************************************************************** AIF ('&ENTRY'. EQ 0 OR K'&ENV. EQ 0 OR K'&CCID.ERR101 AIF (K'&SYSTEM.CL8'&SYSTEM'.ERR100 ********************************************************************** * VALIDATE PARAMETERS * ********************************************************************** AIF (K'&ENV. EQ 'END').RTN100 &FIRST.ERR101 AIF (K'&CCID.&CCID=.ERR101 ********************************************************************** * FIRST TIME LOGIC * ********************************************************************** AIF (&FIRST).CL12'&CCID'.&ENTRY=.CL8'&ENV'..RTN200 AIF (K'&ENTRY. GT 12). GT 8).'ENV= PARAMETER MUST BE 1 TO 8 CHARACTERS' MEXIT 324 Exits Guide .. GBLB &FIRST..'ENTRY=END MUST BE SPECIFIED AS LAST CARD IN TABLE' MEXIT ERR101 ANOP MNOTE 12. SETB 1 CCIDTBL CSECT ********************************************************************** * GENERATE CCID TABLE * ********************************************************************** RTN100 ANOP DC CL4'CCID'.XL28'00' END OF TABLE INDICATOR END MEXIT ********************************************************************** * ERRORS * ********************************************************************** ERR100 ANOP MNOTE 12. MACRO @CCIDTBL &ENV=. EQ 0 OR K'&SYSTEM.&SYSTEM=.Exits 2 and 6 Building the CCID Table for Exit 2 The @CCIDTBL macro builds the CCID table that will be used by exit 2 to ensure that a user has permission to perform the requested action. Exits 2 and 6 ERR102 ANOP MNOTE 12.PETERSON ENV=BST.'CCID= PARAMETER MUST BE 1 TO 12 CHARACTERS' MEND This table gives the rules for the CCID table.CCID=G.CCID=F.BONNA ENV=BST. @CCIDTBL @CCIDTBL @CCIDTBL @CCIDTBL @CCIDTBL ENV=BST.'SYSTEM= PARAMETER MUST BE 1 TO 8 CHARACTERS' MEXIT ERR103 ANOP MNOTE 12.CCID=T.SYSTEM=TESTXXXX.CCID=O.FALCON ENV=BST.SYSTEM=TESTXXXX. It is created by macro @CCIDTBL.SMIRNOF ENTRY=END Chapter 7: Exit Program Examples 325 .SYSTEM=TESTXXXX.SYSTEM=TESTXXXX. if no CCID has been entered. The program cancels the action if it does not find a match. then searches it for a match on environment name. The program loads a table called CCIDTBL (see preceding section). system name. If it does not find an environment/system entry for a CCID. it considers that CCID valid. C1UEXT02 TITLE 'CA Endevor SCM EXIT 2 EXAMPLE' *********************************************************************** * REGISTERS ON ENTRY: * * 0(R1) --> $ECBDS EXIT CONTROL BLOCK * * 4(R1) --> $ENVDS ENVIRONMENT BLOCK * * REGISTER USAGE: * * R3 -> STATUS INDICATOR * * R5 -> CCIDS * * R6 -> $ENDVS * * R7 -> $ECBDS * * R8 -> $REQPDS * * R12 -> BASE PROGRAM * * R13 -> STACK USED FOR STANDARD IBM USAGE * *********************************************************************** TITLE '$ECBDS : EXIT CONTROL BLOCK' *********************************************************************** * EXIT CONTROL BLOCK * *********************************************************************** $ECBDS TITLE '$ENVDS : ENVIRONMENT BLOCK' *********************************************************************** * ENVIRONMENT BLOCK * *********************************************************************** $ENVDS TITLE '$REQPDS: REQUEST INFORMATION BLOCK' *********************************************************************** * REQUEST INFORMATION BLOCK * *********************************************************************** $REQPDS TITLE 'CCIDDS : CCID TABLE' *********************************************************************** * DSECT FOR LOADMODULE CCIDTBL * *********************************************************************** 326 Exits Guide . Program C1UEXT06 (termination exit) deletes the table during termination. the program considers the CCID valid. and CCID name.Exits 2 and 6 Sample Exit 2 Program This program checks to see if the CCID associated with an action has been defined. Likewise. R5 XR R3. IF NECESSARY * *********************************************************************** Chapter 7: Exit Program Examples 327 .12).R12 L R7.R15 POINT AT THIS PROGRAM USING C1UEXT02. EXIT IN SUCCESS SPACE *********************************************************************** * LOAD THE CCIDTBL.R6 L R8.'EXAMPLE OF EXIT 2' LR R12.BLANKS Q: WAS CCID SPECIFIED ? BE MAINEXIT A: NO..4(R1) POINT AT $ENVDS #1 USING $ENVDS.Exits 2 and 6 CCIDS CCIDEYE CCIDENV CCIDSYS CCIDCCID CCIDSLN DSECT DS CL4 EYECATCHER 'CCID' DS CL4 ENVIRONMENT NAME DS CL4 SYSTEM NAME DS CL4 CCID NAME EQU *-CCIDS DSECT LENGTH TITLE 'REGISTER EQUATES' *********************************************************************** * REGISTER EQUATES * *********************************************************************** R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R12 EQU 14 R15 EQU 15 TITLE 'MAIN : MAINLINE LOGIC' *********************************************************************** * MAINLINE LOGIC * *********************************************************************** C1UEXT02 CSECT SAVE (14.ECBREQA POINT AT $REQPDS#1 USING $REQPDS.R7 L R6.0(R1) POINT AT $ECBDS USING $ECBDS.R3 CLEAR CCID-MUST-MATCH INDICATOR CLC REQCCID.R8 USING CCIDS. ECBUEXT Q: TABLE ALREADY BEEN LOADED? BNZ MAIN0100 A: YES. SPACE *********************************************************************** * POINT R6 AT THE TARGET $ENVDS BLOCK : ENVNEXT * *********************************************************************** MAIN0100 DS 0H L R6. CHECK FOR CCID MATCH LOAD EP=CCIDTBL. BAD TABLE CLI CCIDENV. CHECK ENVNEXT B MAINEXIT OTHERWISE EXIT.X'00' Q: LAST TABLE ENTRY BNE MAIN0110 A: NO.R5) POINT TO NEXT ENTRY CLC CCIDEYE.=A(ECB$ADD) Q: IS THE ACTION "ADD" ? BE MAIN0100 A: YES. CHECK NEXT TABLE ENTRY CLC ENVSYSTM.=CL4'CCID' Q: IS TABLE ENTRY VALID? BNE MAIN0810 A: NO.R0 AND IN R5 SPACE *********************************************************************** * VALIDATE CCID ONLY FOR ADD AND UPDATE ACTIONS * *********************************************************************** CLC CCIDEYE. BAD TABLE CLC ECBFUNC.B'1111'.ERRET=MAIN0800 ST R0.CCIDCCID Q: CCID MATCH? BE MAINEXIT A: YES. CHECK IF MATCH MUST OCCUR * *********************************************************************** LTR R3.1 SAY CCID MATCH MUST OCCUR MAIN0120 DS 0H AND READ NEXT LA R5.CCIDENV Q: ENVIRONMENT NAME MATCH? BNE MAIN0120 A: NO.=A(ECB$UPD) Q: IS THE ACTION "UPDATE" ? BE MAIN0100 A: YES. CHECK NEXT TABLE ENTRY CLC REQCCID.ENVNEXT POINT AT $ENVDS #2 00038000 SPACE 00039000 *********************************************************************** * LOOP THROUGH CCID TABLE LOOKING FOR MATCH * *********************************************************************** MAIN0110 DS 0H CLC ENVENVM.R3 Q: MUST MATCH OCCUR ? BZ MAINEXIT A: NO. CHECK NEXT TABLE ENTRY SPACE *********************************************************************** * ALL ENTRIES HAVE BEEN REVIEWED.CCIDSYS Q: SYSTEM NAME MATCH? BNE MAIN0120 A: NO. ALLOW ACTION TO OCCUR B MAIN0820 DO NOT ALLOW ACTION TO OCCUR 328 Exits Guide . CCID IS VALID LA R3.CCIDSLN(.=CL4'CCID' Q: IS TABLE ENTRY VALID? BNE MAIN0810 A: NO.ECBUEXT AVE THE TABLE ADDR IN THE ECB LR R5.Exits 2 and 6 ICM R5. CHECK ENVNEXT CLC ECBFUNC. ERROR3 INVALID TABLE ENTRY MVC ECBMSGCD.R15 CLEAR R15 FOR NEATNESS RETURN (0.=A(ECB$FAIL) TELL NDVR NOT TO PERFORM ACTION B MAINEXIT AND RETURN SPACE *********************************************************************** * INVALID CCID REQUEST FOR ACTION .CCID NOT FOUND IN TABLE CCIDTBL * *********************************************************************** MAIN0820 DS 0H MVC ECBMSG(L'ERROR3).ERROR1 LOAD FAILURE FOR MODULE CCIDTBL MVC ECBMSGCD.=CL4'0003' SET LOAD FAILURE INDICATOR MVC ECBRTCD.ERROR2 INVALID TABLE ENTRY MVC ECBMSGCD.=CL4'0001' SET LOAD FAILURE INDICATOR MVC ECBRTCD.=CL4'0002' SET LOAD FAILURE INDICATOR MVC ECBRTCD.=A(ECB$FAIL) TELL NDVR NOT TO PERFORM ACTION B MAINEXIT AND RETURN SPACE *********************************************************************** * RETURN TO CALLER * *********************************************************************** MAINEXIT DS 0H XR R15.12) AND RETURN SPACE TITLE 'PROGRAM CONSTANTS' *********************************************************************** * PROGRAM CONSTANTS * *********************************************************************** BLANKS DC CL80' ' ERROR1 DC C'LOAD FAILURE FOR MODULE CCIDTBL ' ERROR2 DC C'CCIDTBL NOT PROPERLY DEFINED ' ERROR3 DC C'INVALID CCID REQUESTED FOR THIS ENV/SYS ' END Chapter 7: Exit Program Examples 329 .Exits 2 and 6 SPACE *********************************************************************** * LOAD FAILURE FOR MODULE CCIDTBL * *********************************************************************** MAIN0800 DS 0H MVC ECBMSG(L'ERROR1).=A(ECB$FAIL) TELL NDVR NOT TO PERFORM ACTION B MAINEXIT AND RETURN SPACE *********************************************************************** * MODULE CCIDTBL CONTAINS INVALID ENTRY * *********************************************************************** MAIN0810 DS 0H MVC ECBMSG(L'ERROR2). * * * * REGISTERS ON ENTRY: * * 0(R1) -> $ECBDS EXIT CONTROL BLOCK * * * * REGISTERS USAGE: * * R6 -> $CCIDS CCID TABLE * * R7 -> $ECBDS EXIT CONTROL BLOCK * * r14 -> BASE PROGRAM * * R13 -> STACK USED FOR STANDARD IBM LINKAGE * * * *********************************************************************** TITLE '$ECBDS: EXIT CONTROL BLOCK' *********************************************************************** * EXIT CONTROL BLOCK * *********************************************************************** $ECBDS TITLE 'CCIDDS: CCID TABLE' *********************************************************************** * DSECT FOR LOAD MODULE CCIDTBL * *********************************************************************** CCIDS DSECT CCIDEYE DS CL4 EYECATCHER 'CCID' CCIDENV DS CL8 ENVIRONMENT NAME CCIDSYS DS CL8 SYSTEM NAME CCIDCCID DS CL12 CCID NAME CCIDSLN EQU *-CCIDS DSECT LENGTH TITLE 'REGISTER EQUATES' 330 Exits Guide . REVIEW C1UEXT02 FOR MORE * * INFORMATION. C1UEXT06 TITLE 'CA Endevor SCM for EXIT 6 EXAMPLE' *********************************************************************** * DESCRIPTION: THIS PROGRAM WILL DELETE THE CCID TABLE LOADED BY * * EXIT 2 (C1UEXT02).Exits 2 and 6 Sample Exit 6 Program Exit 6 deletes the CCID table built by the @CCIDTBL macro at job termination. RETURN TO CALLER USING CCIDS.0(.12).R15 CLEAR R15 FOR NEATNESS RETURN (14.ECBUEXT CLEAR CCID TABLE ADDRESS SPACE MAINEXIT DS 0H XR R15.ECBUEXT Q: HAS TABLE BEEN LOADED? BZ MAINEXIT A: NO.12) RETURN TO CALLER END Chapter 7: Exit Program Examples 331 .'EXAMPLE OF EXIT 6' LR r14.R6 CLC CCIDEYE.R7 ICM R6.R1) POINT AT $ECBDS USING $ECBDS.r14 L R7..R15 POINT AT THIS PROGRAM USING C1UEXT06. DO NOT DELETE TABLE DELETE EP=CCIDTBL DELETE THE CCID LOAD MODULE XC ECBUEXT.B'1111'.=CL4'CCID' Q: IS THIS THE CCID TABLE? BNE MAINEXIT A: NO.Exits 2 and 6 *********************************************************************** * REGISTER EQUATES * *********************************************************************** R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 r14 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 TITLE 'MAIN: MAINLINE LOGIC' *********************************************************************** * MAINLINE LOGIC * *********************************************************************** C1UEXT06 CSECT SAVE (14. CSIQJCL.Notification Utility Exit Programs Notification Utility Exit Programs Several exit programs are provided with CA Endevor SCM for use with the Notification utility.iqual. Both control blocks are found in the iprfx. which is XIT7NTFC) XIT2NTFY 332 Exits Guide . For those users who write their own exit programs. After tailoring them to meet the requirements of your site. The sample exits programs provided with CA Endevor SCM include the following: ■ ■ ■ ■ ■ XIT7MAIL CALLMLIF XIT7APNT (and the COBOL version.iqual.iqual. your own programs. these exit programs can be used in place of. JCL to assemble and link the exit programs is also included with CA Endevor SCM and is located in the iprfx.CSIQOPTN library.CSIQOPTN library. which is XIT7APNC) XIT7NTFY (and the COBOL version. The control blocks to use when writing your own exit programs are $NOTIFY for assembler and NOTIFYDS for COBOL. or in addition to. The source for all of the exit programs is located in the iprfx. the samples provided with CA Endevor SCM can serve as examples of the kinds of programs you would need to write. If a match is found. in addition to emails to users defined in the table.CSIQOPTN. an email is addressed to the email ID associated with the approver group or approver. BC1JTABL. Ensure that the ANCHID is unique among the exit 7 exit programs. Also. Email notification also is sent to newly added Dynamic Approvers when their user ID is added to the Dynamic Approver package approver record. iprfx.iqual. as an EXIT#=7 entry. To prevent multiple emails from being sent to the same recipient. If there are more than 255 approvers associated with a package. When a package that requires approval is successfully cast. the recipient can access the Login Page with a single click. If no match is found on approver groups. CA Endevor SCM builds a list of up to 255 approver IDs. To activate this option.com and sally02@yourco. for example peter01 and sally02.C'Y' ENABLE ENABLE ENABLE ENABLE BEFORE DYNAMIC ADd AFTER DYNAMIC Add BEFORE DYNAMIC UPD AFTER DYNAMIC UPD Chapter 7: Exit Program Examples 333 . delete the following lines of code before assembling and linking the XIT7MAIL module: MVI MVI MVI MVI PECBD1BE. CA Endevor SCM will send an email to peter01@yourco. only one email notification is sent to that approver. Note: If an approver is a member of multiple internal approver groups and is listed in ESMTPTBL by his individual mainframe ID. If your ESMTPTBL includes the DFTID=USERID parameter. By including the URL of CA CM Enterprise Workbench in the email. multiple emails may be sent.C'Y' PECBD1AF. provided their user ID is in the ESMTPTBL or the ESMTPTBL includes the DFTID=USERID parameter. if an approver is a member of multiple approver groups that are mapped to email groups. XIT7MAIL is provided as a source member in CA Endevor SCM's source library. and is called when a package is cast.iqual. the user will receive an email for every email group of which she or he is a member. If no match is found. add XIT7MAIL to user exits table.com.Notification Utility Exit Programs XIT7MAIL XIT7MAIL sends an email notification to CA Endevor SCM package approvers. the program searches the ESMTPTBL table for a match on approver groups associated with the package.CSIQJCL can be used to assemble it. when a package is cast requiring an approval from one or more users not defined in the table. If you want to disable the notification of newly added Dynamic Approvers.C'Y' PECBDUAF. then the program scans for a match on individual approver mainframe IDs. JCL member.C'Y' PECBDUBE. C1UEXITS. found in iprfx. no email is sent. The delivered XIT7MAIL source sends multiple chained variable length records. make sure you comment out the other options.CAI. However. but to use this option instead.CAI.COM. where USER01 is the contents of PECBUSER and HOSTNAME=USABC01 DOMAIN=CAI. the "FROM" location looks like this: from ENDEVOR email notify 334 Exits Guide .Notification Utility Exit Programs XIT7MAIL also allows you to do the following: Query ESMTPTBL To find out if a specific user ID is referenced in ESMTPTBL. SCANRUTN will call BC1PNTFY with function SMTPF to query ESMTPTBL.COM ■ User choice. If the specified user ID was not found. Using multiple options is not supported. The options you do not want to use must be commented out. As delivered. From (Sender) Address Options Emails generated by XIT7MAIL use a default from (sender) address. To control the readability of emails.com – If you specify =CL38'from ENDEVOR email notify '. only the default is not commented out. For example. the "FROM" location location looks like this: GOL1234@ca. You can edit the XIT7MAIL program to use one of the other optional from address formats. no changes to the XIT7MAIL program are needed. you have to use similar logic as used by subroutine SCANRUTN in XIT7MAIL. instead of a single variable record. the "FROM:" location looks like: USER01@USABC01. Improve Readability Your emails may be easier to read if you use strings of variable records.COM ■ Use the PECBUSER field. if you uncomment out the other options. the return code will tell you whether or not DFTID=USERID is defined in ESMTPTBL.COM: CAEndevorSoftwareChangeManager@USABC01. use the sample program CALLMLIF described in the following section. For example: – If you specify =CL38'GOL1234@ca. The return code of BC1PNTFY will inform SCANRUTN if the user ID was found. As delivered. Change the value within the apostrophes to any preferred value.com '. The following three options are available: ■ Use the default. the default "FROM:" location looks like the following where HOSTNAME=USABC01 DOMAIN=CAI. For example. and then decide not to use them. To use this utility.Notification Utility Exit Programs CALLMLIF A sample COBOL email program. formats the message. BC1PMLIF gets the email address from ESMTPTBL. you cannot make use of the exit block information the way it is done in the supplied sample program. and sends it to the email server. Chapter 7: Exit Program Examples 335 . When BC1PMLIF is called in a processor. BC1PMLIF formats the required internal control blocks and calls the existing CA Endevor SCM email interface modules. you do not need an in-depth knowledge of the $NOTIFY block or the ESMTP table lookup. Your email program can call BC1PMLIF with an easy to use parameter list. BC1PMLIF is an interface program that allows you to write simple email programs to be called at exit points or in processors. Note: For more information about the BC1PMLIF utility. CALLMLIF that makes use of BC1PMLIF is provided in the installation SOURCE library. see the Utilities Guide. 01 MYSMTP-FROM PIC X(50). *----------------------------------------------------------------LINKAGE SECTION. 05 MYSMTP-LINE PIC X(133) OCCURS 99. C1UEXT03. *----------------------------------------------------------------* * NOTE: PROGRAM-ID Name must match the expected exit number * C1UEXTnn irrespective of the name that is given to the * final load module. IBM-S390. 01 MYSMTP-URL PIC X(1) VALUE 'Y'. 01 MYSMTP-USERID PIC X(8). 01 MYSMTP-MESSAGE PIC X(80). IBM-S390. *----------------------------------------------------------------01 PGM PIC X(8). provided in the installation SOURCE library is shown next. *----------------------------------------------------------------PROCEDURE DIVISION USING EXIT-CONTROL-BLOCK REQUEST-INFO-BLOCK SRC-ENVIRONMENT-BLOCK SRC-ELEMENT-MASTER-INFO-BLOCK SRC-FILE-CONTROL-BLOCK TGT-ENVIRONMENT-BLOCK TGT-ELEMENT-MASTER-INFO-BLOCK TGT-FILE-CONTROL-BLOCK. 01 MYSMTP-SUBJECT PIC X(50). 03 MYSMTP-COUNTER PIC 9(2). * *----------------------------------------------------------------PROGRAM-ID. ENVIRONMENT DIVISION. AUTHOR. see CSIQJCL member BC1JEXIT. For sample JCL to compile and link a COBOL exit. SOURCE-COMPUTER. 01 MYSMTP-TEXT. OBJECT-COMPUTER. 336 Exits Guide . *----------------------------------------------------------------WORKING-STORAGE SECTION. *----------------------------------------------------------------COPY EXITBLKS. 03 MYSMTP-MSG-TEXT. CONFIGURATION SECTION.Notification Utility Exit Programs The sample COBOL email program. CALLMLIF. CA. DATA DIVISION. *----------------------------------------------------------------IDENTIFICATION DIVISION. *----------------------------------------------------------------INITIALIZE MYSMTP-MESSAGE MYSMTP-USERID MYSMTP-FROM MYSMTP-SUBJECT MYSMTP-TEXT *----------------------------------------------------------------* Use CA Endevor SCM userid (caller) as person to receive message. Subsystem.' TO MYSMTP-LINE(2) MOVE 'This is a sample email generated from CASCMM Exit 3. * And provide retrun address and email subject *----------------------------------------------------------------MOVE ECB-USER-ID TO MYSMTP-USERID MOVE 'SAMPMLIF_CASCMM_eMail' TO MYSMTP-FROM MOVE 'Sample EXIT3 calling BC1PMLIF to send email.' TO MYSMTP-LINE(7) MOVE 'Element. System.' TO MYSMTP-LINE(12) MOVE 15 TO MYSMTP-COUNTER Chapter 7: Exit Program Examples 337 .Notification Utility Exit Programs *----------------------------------------------------------------MAIN SECTION.' TO MYSMTP-SUBJECT *----------------------------------------------------------------* Build message lines as needed (Up to 99 lines possible) * Remember to set the counter to actual number of lines required *----------------------------------------------------------------MOVE 'Dear CASCMM User. Trailing blanks/' TO MYSMTP-LINE(11) MOVE 'nulls will stripped in the final email. CCID etc. and up to 99 lines. up to 133' TO MYSMTP-LINE(10) MOVE 'Characters. ' TO MYSMTP-LINE(4) MOVE 'It has full access to the CASCMM exit blocks (where' TO MYSMTP-LINE(6) MOVE 'it can get information about the current Action.' TO MYSMTP-LINE(8) MOVE 'Message text can be written line by line.). *----------------------------------------------------------------P-NOTIFY-MAIL. *----------------------------------------------------------------MOVE 'BC1PMLIF' TO PGM CALL PGM USING MYSMTP-MESSAGE MYSMTP-USERID MYSMTP-FROM MYSMTP-SUBJECT MYSMTP-TEXT MYSMTP-URL EVALUATE TRUE WHEN RETURN-CODE = 0 EXIT WHEN OTHER DISPLAY 'CALL BC1PMLIF RC = ' RETURN-CODE DISPLAY MYSMTP-MESSAGE END-EVALUATE EXIT. 338 Exits Guide .Notification Utility Exit Programs *----------------------------------------------------------------* Send mail and exit *----------------------------------------------------------------PERFORM P-NOTIFY-MAIL GOBACK. External approvers cannot be notified. Note: For more information about sending messages. see the Utilities Guide. XIT7APNC The COBOL version of XIT7APNT. post-execution.Notification Utility Exit Programs Other Sample Exit Programs These sample programs are also provided in CA Endevor SCM's iprfx. XIT7NTFY A package exit program that sends notification to users via the TSO protocol. or XMIT protocol by modifying the source. pre-reset. TPX.You can choose whether you want to send the notification using the TSO. XIT7NTFC The COBOL version of XIT7NTFY.and post-action exit points. You can also choose to send the notification using either the TPX or XMIT protocol by modifying the source. You can also choose to send the notification using either the TPX or XMIT protocol by modifying the source. because they are unknown to CA Endevor SCM.iqual. XIT2NTFY An exit program for pre. Chapter 7: Exit Program Examples 339 .CSIQOPTN library. It can be called from the pre. It can be called from any of CA Endevor SCM's exit points. XIT7APNT Extracts internal approver groups and notifies each user via the Notification utility.and post-action exits that notifies users via the TSO protocol. It can be called from the post-cast. and post-backout exit points. . 111 $ENVDS DSECT • 92. 305 extracting • 214 set information • 305 dataset information • 307 Building a CCID table in exit 2 • 324 messages • 42 Index 341 . 37 Collecting statistics • 40 Collection data • 214 Control block layouts (COBOL) ELEMENT-MASTER-INFO-BLOCK • 121 EXIT-CONTROL-BLOCK • 67 PACKAGE-EXIT-ACTION-BLOCK • 285 PACKAGE-EXIT-APPROVER-MAP • 300 PACKAGE-EXIT-BACKOUT-BLOCK • 305 PACKAGE-EXIT-BLOCK • 239 PACKAGE-EXIT-FILE-BLOCK • 275 PACKAGE-EXIT-SCL-RECORD • 316 PACKAGE-EXIT-SHIPMENT-BLOCK • 311 PACKAGE-REQUEST-BLOCK • 255 REQUEST-INFO-BLOCK • 80 SRC-ENVIRONMENT-BLOCK • 99 XXX-ENVIRONMENT-BLOCK • 96 XXX-FILE-CONTROL-BLOCK • 149 Control blocks exit passing order (diagram) • 210 for exit 1 • 23 for exit 3 • 31 for exit 4 • 37 for exit 5 • 39 for exit 6 • 40 initialized (matrix) • 214 package • 215. 34. 262 exit • 215 header • 262 primary information block • 214 A Action codes. 75 C C1BMXJCG • 202 C1UEXT06 • 326 Cancel an action • 25 CCID table (CCIDTBL) in exit 2 & 6 • 323 Changing DDname • 35 input to action • 25 COBOL control blocks • 214 for exit 1 • 24 for exit 3 • 33 list and explanation of • 214 Fields source & target • 30. in COBOL • 239 Anchor IDs using • 215.Index $ $ECBDS DSECT • 47 $ELMDS DSECT • 106. 233 Approver data • 214 notification sample package exits & XIT7APNT • 339 Assembler calling conventions • 202 control blocks for exit 1 • 23 for exit 2 • 25. 148 $PACTREQ DSECT • 277 $PAPPREQ DSECT • 294 $PBODREQ DSECT • 303 $PFILDS DSECT • 273 $PHDRDS DSECT • 262 $PREQPDS DSECT • 249 $PSCLREQ DSECT • 314 $PSHPREQ DSECT • 308 $REQPDS DSECT • 74. 93 $FILDS DSECT • 147. 26 for exit 3 • 31 for exit 4 • 36 for exit 5 • 39 for exit 6 • 40 ENVFCBA fields • 27 B Backout data • 214. 111 $ENVDS • 92. 75 SMF Action Record • 153 F Field descriptions Assembler $PACTREQ • 280 $PAPPREQ • 298 $PBODREQ • 304 $PECBDS DSECT • 222 $PFILDS • 273 $PREQPDS • 251 $PSCLREQ • 315 ECBDS • 49 ELMDS • 111 ENVDS • 93 FILDS • 148 REQPDS • 75 COBOL EXIT-CONTROL-BLOCK • 67 PACKAGE-EXIT-ACTION-BLOCK • 288 PACKAGE-EXIT-APPROVER-MAP • 301 PACKAGE-EXIT-BACKOUT-BLOCK • 306 PACKAGE-EXIT-BLOCK • 239 PACKAGE-EXIT-FILE-BLOCK • 275 PACKAGE-EXIT-HEADER-BLOCK • 269 PACKAGE-EXIT-REQUEST-BLOCK • 257 PACKAGE-EXIT-SHIPMENT-BLOCK • 312 REQUEST-INFO-BLOCK • 82 SRC-ELEMENT-MASTER-INFO-BLOCK • 127 SRC-ENVIRONMENT-BLOCK • 99 SRC-FILE-CONTROL-BLOCK • 150 TGT-ELEMENT-MASTER-INFO-BLOCK • 137 TGT-ENVIRONMENT-BLOCK • 102 TGT-FILE-CONTROL-BLOCK • 152 File blocks • 30.D Data flags • 222. 239 DDnames.suppressing SMF records using • 67 4 . 121 Environment block assembler • 91 COBOL • 96 SRC-ENVIRONMENT-BLOCK • 34 target & source fields • 27 TGT-ENVIRONMENT-BLOCK • 34 EOF conditions • 222 Error messages ECB-MESSAGE-CODE • 67 in current activity • 239 Examples of package exits • 321 Exit control block descriptions • 257. block • 80 3 . 149 Foreground execution • 25 Function codes. 34 Element master information block • 106. 93 $FILDS • 147.in security violation • 67 2 . 306.request info. 280 $PAPPREQ • 294 $PBODREQ • 302. 303 $PFILDS • 273 $PHDRDS • 262 $PREQPDS • 249 $PSCLREQ • 314 $PSHPREQ • 308 $REQPDS • 74. 316 entry & return • 67 program 1 . 273 DSECTS $ECBDS • 47 $ELMDS • 106. 148 $PACTREQ • 277. changing • 35. in COBOL • 239 E ECB-RETURN-CODE exit point 3 • 35 exit point 4 • 38 Element master block • 30. 34. 312.& DDname • 148 EXIT-CONTROL-BLOCK • 67 H Historic package data • 214 I Indicating enabled exit points • 222 operating environments • 222 Information blocks assembler eighth passed • 308 fifth passed • 277 fourth passed • 273 342 Exits Guide . 301. in COBOL • 239 Ship data. 67 N NFND conditions • 222 notification utility sample exits program • 332 S Sample internal approver notification • 339 sample exit • 332 SCL request block • 313 statements • 214 Security checks • 23 violation • 67 Setup call in TSO & batch program (assembler) • 222 fields. sample • 339 PREQPDS • 239 Primary information block assembler • 47. 262. 233 PROCEDURE DIVISION statement • 203 R Record extraction • 214 Register 1 • 210.ninth passed • 314 second passed • 249 seventh passed • 303 sixth passed • 294 third passed • 262 COBOL eighth passed • 311 fifth passed • 285 fourth passed • 275 ninth passed • 316 second passed • 255 seventh passed • 306 primary • 215 Issuing a message • 42 page=start Savearea • 202 Post-action exits. 80 Return codes • 67 assembler exit 1 • 24 exit 2 • 31 exit 3 • 35 exit 4 • 38 exit 5 • 39 exit 6 • 41 COBOL exit point 3 • 35 exit point 4 • 38 exit point 5 • 39 returning to. 277 Remote production data sets • 201 Request for data flags (assembler) • 222 for data flags (COBOL) • 239 REQUEST-INFO-BLOCK • 67. 215 COBOL • 49. extracting • 214 SMF action Record • 153 action request record • 31 interface • 24 P Package action codes • 239 approver request block • 294 Backout Request Block ($PBODREQ) • 302 exit actions • 210 ID • 255 SCL request block • 313 ship request block ($PSHPREQ) • 307 Package exits example • 321 page=end Savearea • 205 Index 343 . calling area • 202 J JCL stream • 201 JOB statement • 201 JOBLIB library • 201 L Logging & recording in SMF • 153 activity • 40 M Message codes & handling • 41. 34.security & interface • 24 Source fields • 30. sample package exit • 339 V Validating return codes • 23 X XIT2NTFY • 339 XIT7APNT approver notification • 339 XIT7NTFY • 339 XXX-ENVIRONMENT-BLOCK • 96 344 Exits Guide . in COBOL • 239 U User exit enabled exit points • 239 operating environments • 239 request flags • 239 saving and passing info. 34 Type codes. 34 target & source fields • 30 Termination exit • 326 TGT-ENVIRONMENT-BLOCK • 30. • 239 notification. 34. 99 Standard linkage conventions • 202 STEPLIB • 201 Storage of address values • 233 Suppressing SMF record writing • 67 T Target fields • 30. 37 Target fields • 37 SRC-ENVIRONMENT-BLOCK • 30.