Exit Routines
Exit Routines
Version 14
Exit Routines
(Quality Partnership Program)
IBM Confidential
ZES1-3165-00
IMS
Version 14
Exit Routines
(Quality Partnership Program)
IBM Confidential
ZES1-3165-00
IBM Confidential
Note
Before using this information and the product that it supports, be sure to read the general information under “Notices” on
page 781.
This edition applies to IMS 14 (program number 5635-A05), and to all subsequent releases and modifications until
otherwise indicated in new editions.
© Copyright IBM Corporation 1974, 2014.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
IBM Confidential
Contents
About this information . . . . . . . . vii Sample Extended Program Communication Block
Prerequisite knowledge . . . . . . . . . . vii (XPCB) . . . . . . . . . . . . . . . 76
How new and changed information is identified . . vii Sample Extended Segment Data Block (XSDB) . . 78
Accessibility features for IMS 14 . . . . . . . viii Data conversion user exit routine (DFSDBUX1) . . 80
How to send your comments . . . . . . . . viii Data Entry Database Partition Selection exit routine
(DBFPSE00) . . . . . . . . . . . . . . 82
Sample data entry database randomizing routines
Part 1. IMS control region exit (DBFHDC40 / DBFHDC44) . . . . . . . . . 85
routines . . . . . . . . . . . . . . 1 Sample DEDB randomizing routines
(DBFHDC40) . . . . . . . . . . . . . 89
Chapter 1. Guidelines for writing IMS Extended call interface (XCI) option . . . . . 89
exit routines . . . . . . . . . . . . . 3 Data Entry Database Resource Name hash routine
(DBFLHSH0) . . . . . . . . . . . . . . 92
Introduction to IMS exit routines . . . . . . . 3
Sample hashing routine result format . . . . . 95
Exit routine naming conventions. . . . . . . 3
Data Entry Database Sequential Dependent Scan
Changeable interfaces and control blocks . . . . 4
utility exit routine (DBFUMSE1) . . . . . . . 95
IMS standard user exit parameter list . . . . . 4
Sample DEDB Sequential Dependent Scan utility
Using the ISWITCH macro . . . . . . . . 7
exit routine (DBFUMSE1) . . . . . . . . . 97
Routine binding restrictions . . . . . . . . 8
HALDB Partition Selection exit routine (DFSPSE00) 99
Writing IMS routines that access control blocks . . 9
Sample partition selection exit routine
Extended Terminal Option (ETO) exit routines . . 9
(DFSPSE00) . . . . . . . . . . . . . 103
APPC/IMS exit routines . . . . . . . . . 9
Partition exit communication area mapping
Registers and save areas . . . . . . . . . 10
(DFSPECA) . . . . . . . . . . . . . 103
Cross-memory considerations . . . . . . . 10
Partition definition area mapping (DFSPDA) 104
Exit routine performance recommendations . . . 11
HDAM and PHDAM randomizing routines
IMS callable services . . . . . . . . . . . 12
(DFSHDC40) . . . . . . . . . . . . . 105
Types of callable services . . . . . . . . . 12
Sample HDAM and PHDAM generalized
Exit routines eligible for callable services . . . 12
randomizing routine (DFSHDC40) . . . . . 110
Using callable services . . . . . . . . . . 13
Secondary Index Database Maintenance exit routine 111
Callable services . . . . . . . . . . . . 14
Sample Secondary Index Database Maintenance
IMS Callable Storage Services . . . . . . . 19
exit routine . . . . . . . . . . . . . 115
IMS Callable Control Block Services requests . . 22
Segment edit/compression exit routines . . . . 116
IMS Callable AOI Services . . . . . . . . 27
Description of sample segment
Callable services return and reason codes . . . . 28
compression/expansion modules . . . . . . 127
Return codes (CSPLRTRN) . . . . . . . . 28
Hardware data compression support . . . . 131
Callable service interface reason codes
Sequential Buffering Initialization exit routine
(CSPLRESN) . . . . . . . . . . . . . 29
(DFSSBUX0) . . . . . . . . . . . . . . 136
Function-specific parameter list reason codes
Sample SB initialization routines . . . . . . 139
(CSPLRESN) . . . . . . . . . . . . . 29
Callable services request example . . . . . . . 35
Control block usage . . . . . . . . . . . 37 Chapter 3. Transaction Manager exit
Customization exit routines . . . . . . . . . 40 routines . . . . . . . . . . . . . . 141
[Link] data set . . . . . . . . . . 42 2972/2980 Input edit routine (DFS29800) . . . . 141
4701 Transaction Input Edit routine (DFS36010) . . 143
Chapter 2. Database Manager exit Build Security Environment user exit (BSEX) . . . 144
routines . . . . . . . . . . . . . . 45 Conversational Abnormal Termination exit routine
(DFSCONE0) . . . . . . . . . . . . . 149
Batch application exit routine (DFSISVI0) . . . . 45
Destination Creation exit routine (DFSINSX0) . . 154
Catalog Definition exit routine (DFS3CDX0) . . . 46
DFSINSX0 when extended terminal option is
CCTL exit routines . . . . . . . . . . . . 49
active . . . . . . . . . . . . . . . 158
Coordinator controller routine attributes . . . . 49
DFSINSX0 when shared queues are active . . . 160
Suspend exit routine . . . . . . . . . . 49
DFSINSX0 when dynamic resource definition is
Resume exit routine . . . . . . . . . . 50
enabled . . . . . . . . . . . . . . 161
Control exit routine. . . . . . . . . . . 50
Fast Path Input Edit/Routing exit routine
Status exit routine . . . . . . . . . . . 57
(DBFHAGU0) . . . . . . . . . . . . . 164
Data Capture exit routine. . . . . . . . . . 58
Front-End Switch exit routine (DFSFEBJ0) . . . . 168
Sample Data Capture exit routine . . . . . . 70
Terminal input processing . . . . . . . . 171 Signon/off Security exit routine (DFSCSGN0) . . 289
IBE input processing . . . . . . . . . . 172 Time-Controlled Operations (TCO) Communication
Front-end interface block . . . . . . . . 172 Name Table (CNT) exit routine (DFSTCNT0) . . . 292
Input and output fields . . . . . . . . . 175 Time-Controlled Operations (TCO) exit routine
Routing information . . . . . . . . . . 177 (DFSTXIT0) . . . . . . . . . . . . . . 294
Message expansion . . . . . . . . . . 178 TM and MSC Message Routing and Control User
Timer facility . . . . . . . . . . . . 179 exit routine (DFSMSCE0) . . . . . . . . . 298
FEIBRPQ1 indicator . . . . . . . . . . 179 Transaction Authorization exit routine (DFSCTRN0) 311
Example of the front-end switch exit routine Transaction Code (Input) edit routine (DFSCSMB0) 315
(DFSFEBJ0) . . . . . . . . . . . . . 179 Sample transaction code (input) edit routine
Global Physical Terminal (Input) edit routine (DFSCSMB0) . . . . . . . . . . . . 318
(DFSGPIX0) . . . . . . . . . . . . . . 183
Greeting Messages exit routine (DFSGMSG0) . . . 187 Chapter 4. IMS system exit routines 319
IMS Adapter for REXX exit routine (DFSREXXU) 189 Buffer Size Specification facility (DSPBUFFS) . . . 319
IMS CQS event exit routine. . . . . . . . . 191 Example of specifying buffers . . . . . . . 320
IMS CQS structure event exit routine . . . . . 193 Command Authorization exit routine (DFSCCMD0) 321
Initialization exit routine (DFSINTX0) . . . . . 194 DBRC Command Authorization exit routine
Input Message Field edit routine (DFSME000) . . 199 (DSPDCAX0) . . . . . . . . . . . . . 325
Calling the Input Message Field edit routine . . 201 DBRC SCI registration exit routine (DSPSCIX0) . . 328
Defining edit routines . . . . . . . . . 201 Sample DBRC SCI registration exit routine . . 330
Performance considerations. . . . . . . . 202 Dependent Region Preinitialization routines . . . 331
Input Message Segment edit routine (DFSME127) 202 Dump Override Table (DFSFDOT0) . . . . . . 333
Calling the Input Message Segment edit routine 206 Sample Dump Override Table (DFSFDOT0) . . 335
Defining edit routines . . . . . . . . . 206 ESAF In-Doubt Notification exit routine
Performance considerations. . . . . . . . 207 (DFSFIDN0) . . . . . . . . . . . . . . 336
Logoff exit routine (DFSLGFX0) . . . . . . . 207 ESAF subsystem exit routines . . . . . . . . 338
Logon exit routine (DFSLGNX0) . . . . . . . 210 Exit routine interface control blocks . . . . . 340
Selecting a logon descriptor . . . . . . . 213 Control block mapping . . . . . . . . . 341
LU 6.2 Edit exit routine (DFSLUEE0) . . . . . 214 Abort Continue exit routine . . . . . . . 343
Message Control/Error exit routine (DFSCMUX0) 219 Command exit routine . . . . . . . . . 344
Rerouting messages . . . . . . . . . . 222 Commit Continue exit routine . . . . . . . 346
Message Control/Error Exit Interface Block Commit Prepare exit routine . . . . . . . 347
(MSNB) . . . . . . . . . . . . . . 224 Commit Verify exit routine . . . . . . . . 348
Valid flags and default actions. . . . . . . 229 Create Thread exit routine . . . . . . . . 350
Message Switching (Input) edit routine Echo exit routine . . . . . . . . . . . 352
(DFSCNTE0) . . . . . . . . . . . . . 230 Identify exit routine . . . . . . . . . . 353
Using the sample message switching edit Initialization exit routine . . . . . . . . 356
routine (DFSCNTE0) . . . . . . . . . . 231 Normal Call exit routine. . . . . . . . . 358
Non-Discardable Messages user exit (NDMX) . . 232 Resolve Indoubt exit routine . . . . . . . 360
OTMA Destination Resolution user exit Signoff exit routine . . . . . . . . . . 363
(OTMAYPRX) . . . . . . . . . . . . . 241 Signon exit routine . . . . . . . . . . 364
OTMA Input/Output Edit user exit (OTMAIOED) 245 Subsystem Not Operational exit routine . . . 366
| OTMA User Data Formatting user exit Subsystem Termination exit routine . . . . . 370
| (OTMAYDRU) . . . . . . . . . . . . . 249 Terminate Identify exit routine . . . . . . 372
OTMA Resume TPIPE Security user exit Terminate Thread exit routine . . . . . . . 373
(OTMARTUX) . . . . . . . . . . . . . 256 ESAF synchronous exit routines . . . . . . . 375
Physical Terminal (Input) edit routine (DFSPIXT0) 259 Log Service exit routine . . . . . . . . . 376
Sample Physical Terminal (Input) edit routine Message Service exit routine . . . . . . . 378
(DFSPIXT0) . . . . . . . . . . . . . 262 Subsystem Startup Service exit routine . . . . 380
Physical Terminal (Output) edit routine Subsystem Termination Service exit routine . . 382
(DFSCTTO0). . . . . . . . . . . . . . 263 IMS Command Language Modification facility
Sample Physical Terminal (Output) edit routine (DFSCKWD0) . . . . . . . . . . . . . 383
(DFSCTTO0). . . . . . . . . . . . . 266 Sample IMS Command Language Modification
Queue Space Notification exit routine facility. . . . . . . . . . . . . . . 386
(DFSQSPC0/DFSQSSP0). . . . . . . . . . 267 IMS Initialization and Termination user exit . . . 386
Security Reverification exit routine (DFSCTSE0) 273 Language Environment User exit routine
Shared Printer exit routine (DFSSIML0). . . . . 276 (DFSBXITA) . . . . . . . . . . . . . . 388
Signoff exit routine (DFSSGFX0) . . . . . . . 277 Large System Definition Sort/Split Input exit
Signon exit routine (DFSSGNX0) . . . . . . . 281 routine (DFSSS050) . . . . . . . . . . . 389
User descriptor selection . . . . . . . . 286 Large System Definition Sort/Split Output exit
Providing queue (LTERM) data . . . . . . 287 routine (DFSSS060) . . . . . . . . . . . 392
iv Exit Routines
IBM Confidential
Log Archive exit routine. . . . . . . . . . 395 Sample DBRC Security Exit Routine . . . . . 544
Sample Log Archive exit routine . . . . . . 397 RECON I/O exit routine . . . . . . . . . 544
Log edit user exit (LOGEDIT) . . . . . . . . 404 Sample RECON I/O exit routine . . . . . . 554
Log Filter exit routine (DFSFTFX0) . . . . . . 409 DBRC statistics . . . . . . . . . . . . . 555
Logger user exit (LOGWRT) . . . . . . . . 413
Partner Product exit routine (DFSPPUE0) . . . . 420 Chapter 8. BPE-based CQS
Restart exit routine . . . . . . . . . . . 422 user-supplied exit routines . . . . . 559
RECON I/O exit routine (DSPCEXT0) . . . . . 424
CQS initialization-termination user-supplied exit
Minimizing impact to system performance . . 434
routine . . . . . . . . . . . . . . . 560
Resource Access Security user exit (RASE). . . . 435
CQS client connection user-supplied exit routine 561
System Definition Preprocessor exit routine (input
CQS Queue overflow user-supplied exit routine 563
phase) (DFSPRE60) . . . . . . . . . . . 440
CQS structure statistics user-supplied exit routine 565
Sample system definition preprocessor exit
CQS structure event user-supplied exit routine . . 576
routine . . . . . . . . . . . . . . 442
CQS statistics available through the BPE statistics
System Definition Preprocessor exit routine (name
user-supplied exit . . . . . . . . . . . . 583
check complete) (DFSPRE70) . . . . . . . . 442
Type 1 Automated Operator exit routine
(DFSAOUE0) . . . . . . . . . . . . . 444 Chapter 9. Common Service Layer exit
AO functions and how to implement them . . 457 routines . . . . . . . . . . . . . . 585
Setting up the exit registers. . . . . . . . 463 CSL ODBM user exit routines . . . . . . . . 585
User Exit Header Block (UEHB) . . . . . . 466 CSL ODBM Initialization and Termination user
| Type 2 Automated Operator user exit (AOIE). . . 472 exit . . . . . . . . . . . . . . . . 585
Types of messages passed to this routine . . . 479 CSL ODBM Input user exit routine . . . . . 587
User Message table (DFSCMTU0) . . . . . . 483 CSL ODBM Output user exit routine . . . . 593
Sample user message table and routine . . . . 485 CSL ODBM Client Connect and Disconnect user
XRF Hardware Reserve Notification exit routine 490 exit routine . . . . . . . . . . . . . 595
CSL ODBM statistics available through BPE
statistics user exit . . . . . . . . . . . 597
Part 2. Base Primitive CSL OM user exit routines . . . . . . . . . 599
Environment-based exit routines . 493 CSL OM client connection user exit . . . . . 600
CSL OM Initialization/termination user exit . . 601
Chapter 5. BPE user-supplied exit CSL OM input user exit . . . . . . . . . 603
routine interfaces and services. . . . 495 CSL OM output user exit . . . . . . . . 605
Calling subsequent exit routines in BPE . . . . 498 CSL OM Security user exit . . . . . . . . 610
BPE user-supplied exit routine environment . . . 499 CSL OM statistics available through BPE
BPE user exit routine performance considerations 500 statistics user exit . . . . . . . . . . . 612
Abends in BPE user-supplied exit routines . . . 500 CSL RM user exit routines . . . . . . . . . 616
BPE user-supplied exit routine callable services . . 501 CSL RM client connection user exit . . . . . 616
BPEUXCSV get storage service . . . . . . 506 CSL RM initialization/termination user exit . . 618
BPEUXCSV free storage service . . . . . . 508 CSL RM statistics available through BPE
BPEUXCSV load module service . . . . . . 509 statistics user exit . . . . . . . . . . . 620
BPEUXCSV delete module service . . . . . 511 BPE-based CSL SCI user exit routines . . . . . 624
BPEUXCSV create named storage service . . . 512 CSL SCI Client Connection user exit . . . . . 624
BPEUXCSV retrieve named storage service . . 513 CSL SCI Initialization/termination user exit . . 626
BPEUXCSV destroy named storage service . . 514 CSL SCI statistics available through BPE
BPE callable service example: Sharing data among statistics user exit . . . . . . . . . . . 628
exit routines . . . . . . . . . . . . . . 515
Part 3. CQS client exit routines 633
Chapter 6. Base Primitive
Environment customization exit
routines . . . . . . . . . . . . . . 521
BPE Initialization-Termination user-supplied exit
routine . . . . . . . . . . . . . . . 521
BPE Statistics user-supplied exit routine . . . . 523
BPE system statistics area . . . . . . . . 525
Contents v
IBM Confidential
Chapter 10. Client CQS Event exit IMS Connect User Initialization exit routine
routine . . . . . . . . . . . . . . 635 (HWSUINIT) sample JCL . . . . . . . . 686
IMS Connect DB Routing user exit routine
(HWSROUT0) . . . . . . . . . . . . . 687
Chapter 11. CQS Client Structure IMS Connect DB security user exit routine
Event exit routine . . . . . . . . . 639 (HWSAUTH0) . . . . . . . . . . . . . 689
Using the IMS Connect DB security user exit
Chapter 12. CQS Client Structure routine . . . . . . . . . . . . . . 691
Inform exit routine . . . . . . . . . 649 IMS Connect sample OTMA User Data Formatting
exit routine (HWSYDRU0) . . . . . . . . . 692
IMS Connect sample OTMA User Data
Part 4. CSL SCI IMSplex member Formatting (HWSYDRU0) sample JCL . . . . 694
exit routines . . . . . . . . . . . 651 z/OS TCP/IP IMS Listener security exit
(IMSLSECX) . . . . . . . . . . . . . . 694
Chapter 13. CSL SCI Input exit routine 653 IMS Connect Event Recorder exit routine
(HWSTECL0) . . . . . . . . . . . . . 695
Modifying the HWSTECL0 user exit. . . . . 698
Chapter 14. CSL SCI Notify Client exit Event types . . . . . . . . . . . . . 699
routine . . . . . . . . . . . . . . 657 Event record formats . . . . . . . . . . 707
Control blocks and DSECTS for event recording 757
Part 5. IMS Connect exit routines 661 Terminating HWSTECL0 . . . . . . . . 765
IMS Connect Password Change exit routine
(HWSPWCH0) . . . . . . . . . . . . . 766
Chapter 15. IMS Connect user
message exit routines . . . . . . . 663
User message exit routines HWSSMPL0 and Part 6. TSO SPOC user exit
HWSSMPL1 . . . . . . . . . . . . . . 663 routines . . . . . . . . . . . . . 769
HWSSMPL0 sample JCL. . . . . . . . . 665
HWSSMPL1 sample JCL. . . . . . . . . 666 Chapter 17. EXITPGM user exit . . . . 771
IMS TM Resource Adapter user message exit
routine (HWSJAVA0) . . . . . . . . . . . 666
Chapter 18. EXITCMD user exit . . . . 773
HWSJAVA0 sample JCL . . . . . . . . . 667
SOAP Gateway exit routine (HWSSOAP1). . . . 667
IBM WebSphere DataPower message exit routine Chapter 19. Variables in the ISPF
(HWSDPWR1) . . . . . . . . . . . . . 668 shared pool . . . . . . . . . . . . 775
IMS Control Center exit routines (HWSCSLO0 and
HWSCSLO1) . . . . . . . . . . . . . 668 Chapter 20. REXX program example
IMS Connect Port Message Edit exit routine . . . 669 using the EXITCMD exit routine . . . 777
IMS Connect communications with user message
exits . . . . . . . . . . . . . . . . 672
INIT subroutine . . . . . . . . . . . 673 Part 7. Appendixes . . . . . . . . 779
READ subroutine . . . . . . . . . . . 675
XMIT subroutine . . . . . . . . . . . 679 Notices . . . . . . . . . . . . . . 781
TERM subroutine . . . . . . . . . . . 680 Programming interface information . . . . . . 783
EXER subroutine . . . . . . . . . . . 682 Trademarks . . . . . . . . . . . . . . 783
Macros that support IMS Connect user message Privacy policy considerations . . . . . . . . 784
exits . . . . . . . . . . . . . . . . 683
Bibliography . . . . . . . . . . . . 785
Chapter 16. IMS Connect
function-specific exit routines . . . . 685 Index . . . . . . . . . . . . . . . 787
IMS Connect User Initialization exit routine
(HWSUINIT) . . . . . . . . . . . . . 685
vi Exit Routines
IBM Confidential
Prerequisite knowledge
Before using this book, you should have knowledge of either IMS Database
Manager (DB) or IMS Transaction Manager (TM), including the access methods
used by IMS. You should also understand basic z/OS® and IMS concepts, your
installation's IMS system, and have general knowledge of the tasks involved in
project planning.
You can learn more about z/OS by visiting the “z/OS basic skills education” topics
in IBM Knowledge Center.
IBM offers a wide variety of classroom and self-study courses to help you learn
IMS. For a complete list of courses available, go to the IMS home page at
[Link]/ims and link to the Training and Certification page.
Revision markers do not necessarily indicate all the changes made to the
information because deleted text and graphics cannot be marked with revision
markers.
Accessibility features
The following list includes the major accessibility features in z/OS products,
including IMS 14. These features support:
v Keyboard-only operation.
v Interfaces that are commonly used by screen readers and screen magnifiers.
v Customization of display attributes such as color, contrast, and font size.
Keyboard navigation
You can access IMS 14 ISPF panel functions by using a keyboard or keyboard
shortcut keys.
For information about navigating the IMS 14 ISPF panels using TSO/E or ISPF,
refer to the z/OS TSO/E Primer, the z/OS TSO/E User's Guide, and the z/OS ISPF
User's Guide Volume 1. These guides describe how to navigate each interface,
including the use of keyboard shortcuts or function keys (PF keys). Each guide
includes the default settings for the PF keys and explains how to modify their
functions.
See the IBM Human Ability and Accessibility Center at [Link]/able for more
information about the commitment that IBM has to accessibility.
2 Exit Routines
IBM Confidential
You can write or include additional routines to customize your IMS system.
Many sample exit routines with default settings are provided in the [Link]
and [Link] libraries.
Related Reading: For information on how to prevent your exit routines from
impacting z/OS system integrity, see z/OS MVS Programming: Authorized Assembler
Services Guide.
You can replace a default exit routine that does not meet your needs by writing
one of your own. If you use IMS macros in your exit routine, you must reassemble
the routine with the current release level macro library.
Using standard z/OS conventions, each routine can have any name up to 8
characters in length. Be sure that this name is unique and that it does not conflict
with the existing members of the data set into which you place the routine.
Because most IMS-supplied routines begin with the prefix “DFS”, “DBF”, “DSP”,
“DXR”, “BPE”,“ CQS”, or “CSL”, do not choose a name that begins with these
letters, unless the specific routine requires it. Also, specify one entry point for the
routine.
Naming requirements or exceptions that are specific to an exit routine are noted in
the “Naming the Routine” topic of each exit routine section.
There are currently two active versions of the IMS standard user exit parameter
list: version 1 and the current version. The Version 6 standard exit parameter list is
the current version. In general, IMS exit routines that do not use the Version 1
standard exit parameter list use the Version 6 standard exit parameter list. Refer to
the information for each individual exit routine.
The version 1 parameter list contains only pointers to the version number and the
function-specific parameter list. The following table shows the content of the
Version 1 standard exit parameter list. When the user exit routine is called, IMS
passes it the address of this list in register 1.
Table 1. Version 1 standard exit parameter list (mapped by DFSSXPL)
Field Offset Length Description
SXPL X'00' N/A DSECT label for the IMS standard user exit
parameter list
SXPLVER X'00' X'04' Address of fullword containing version number
of standard exit parameter list
SXPLATOK X'04' X'04' Reserved
SXPLAWRK X'08' X'04' Reserved
4 Exit Routines
IBM Confidential
The following user exit routines use the Version 1 parameter list:
v “Command Authorization exit routine (DFSCCMD0)” on page 321
v “Fast Path Input Edit/Routing exit routine (DBFHAGU0)” on page 164
v “Greeting Messages exit routine (DFSGMSG0)” on page 187
v “Initialization exit routine (DFSINTX0)” on page 194
v “Logoff exit routine (DFSLGFX0)” on page 207
v “Logon exit routine (DFSLGNX0)” on page 210
v “Destination Creation exit routine (DFSINSX0)” on page 154
v “Signoff exit routine (DFSSGFX0)” on page 277
v “Signon exit routine (DFSSGNX0)” on page 281
This version is the current version of the parameter list. The Version 6 standard
exit parameter list contains additional fields beyond those in version 1 of the
parameter list. The following table shows the layout of the parameter list. When a
user exit routine is called, IMS passes the address of this parameter list to the exit
routine module in register 1.
Table 2. Version 6 standard exit parameter list (mapped by DFSSXPL)
Field Offset Length Description
SXPL X'00' N/A DSECT label for the IMS standard user exit
parameter list
SXPLVER X'00' X'04' Address of fullword containing version number
of standard exit parameter list
SXPLATOK X'04' X'04' 0 or the address of a fullword containing the
callable services token for this instance of the
routine
SXPLAWRK X'08' X'04' Address of a 512-byte work area for use by the
user exit routine. Some user exits receive the
same work area every time that they are called,
so they can store information in this area from
call to call. Some user exits receive a different
work area every time that they are called. Refer
to the documentation for a specific user exit to
determine whether the work area for that exit is
permanently assigned or not.
SXPLFSPL X'0C' X'04' Address of the function-specific parameter list
SXPLINTX X'10' X'04' Address of the user data table loaded by
DFSINTX0 at IMS initialization time. This field is
valid only in IMS environments where
DFSINTX0 is called. It will be X'80000000' in any
other environment.
SXPLASCD X'14' X'04' Address of the IMS SCD
6 Exit Routines
IBM Confidential
If an exit routine is written to use a parameter that was added in a later version,
and the exit routine can execute in an environment in which earlier versions of the
parameter list could be received, the exit routine should check the version of the
parameter list it receives to ensure that the data is available to the exit routine.
Related reference:
“Initialization exit routine (DFSINTX0)” on page 194
ISWITCH must have addressability to the SCD and, for the following figure, to the
PST. The address of the SCD is obtained from the PSTSCDAD field in the PST.
ISWITCH example
ISWITCH TO=DLI,ECB=PSTDECB
SLR R1,R1 Get a zero
ST R1,PSTDECB Clean ECB after target memory post
LTR R15,R15 Successful?
BNZ ERR1 No
When a Fast Path exit routine issues an ISWITCH to the control region, it must
issue a second ISWITCH call specifying TO=DEP to return to the dependent region
before returning to the caller of the exit routine. This is done only in an exit
routine that is entered from a Fast Path module.
The following is an example of the second ISWITCH call needed for Fast Path:
ISWITCH TO=DEP,ECB=PSTDECB
SLR R1,R1 Get a zero
ST R1,PSTDECB Clean ECB after target memory post
LTR R15,R15 Successful?
BNZ ERR1 No
Exit routines should not use ISWITCH TO=RET, because unpredictable results
might occur. (ISWITCH TO=RET could be used in previous IMS releases.) Ensure
that all instances of ISWITCH TO=RET are changed to ISWITCH TO=DEP.
Most modules receive control and must return control in AMODE=31, and must be
able to execute in cross-memory and TASK modes.
Recommendations:
v RMODE=ANY is recommended.
v All TM exit routines can be entered simultaneously by multiple dispatchable
tasks. Therefore, it is highly recommended that all TM exit routines are coded as
reentrant (RENT).
All routines receive control and must return control in 31-bit addressing mode
(AMODE 31) and must be able to execute in RMODE ANY and AMODE 31.
If you bind an exit routine as reentrant (RENT), it must be truly reentrant (for
example, it cannot depend on any information from a previous iteration and it
cannot store into itself).
If you bind an exit routine as reusable (REUSE), it must be truly reusable (it cannot
depend on any information in itself from a previous iteration), but it can depend
on information that it saves in the specific block passed to it. If you bind a routine
that is serially reusable, it must be used for a single database only.
If you bind an exit routine as neither RENT nor REUSE, it can store into itself and
depend on the information saved in the block that is passed to it.
Specific requirements and exceptions are noted in each topic. Refer to the topic on
“Binding the Routine” included in each exit routine section.
8 Exit Routines
IBM Confidential
If your routine accesses IMS control blocks, you can find DSECTs for these blocks
in the following macros:
Macro DSECT
ISCD System content directory (SCD)
DFSDDIR
DMB Directory entry (DDIR)
DFSPDIR
PSB Directory entry (PDIR)
DFSDMB
Data management block (DMB)
DFSPSB
Program specification block (PSB)
DBFESCD
Extended system content directory (ESCD)
DBFRCTE
Routing code table entry (RCTE)
IAPS Scheduler message block (SMB)
Some exit routines are loaded at initialization if ETO=Y. (If this is the case, it is
noted in each in the topic on Binding or including the routine.) Although these exit
routines are loaded only if the ETO feature is used, they are available for use by
static and dynamic ACF/VTAM terminals.
Related Reading: For more information about ETO, see IMS Version 14
Communications and Connections.
The LU 6.2 Edit exit routine (DFSLUEE0) is available only to LU 6.2 devices. The
following exit routines also support LU 6.2 devices:
v Message Control Error exit routine (DFSCMUX0)
There are two types of save areas that exit routines use to save registers:
v A prechained save area passed to the exit routine by IMS or the calling
application
v A single save area used by exit routines that use the Version 5 standard user exit
parameter list
IMS or the application that calls the exit routine passes a prechained save area to
the exit. The routine must step forward to the next save area in the save area set
before processing any data.
The save area address given to the exit routine has a prechained forward save area
pointer at offset 8 and a prechained backward pointer at offset 4. The exit routine
can use the forward save area pointed to by offset 8 but must not alter the first
three words of the save area.
Before returning control to IMS, the routine must step back to the original save
area and restore IMS registers.
When an exit routine uses the version 5 standard user exit parameter list, it does
not receive a prechained save area. Instead, the routine points to a single save area
in register 13. The exit routine must use this save area to save registers from IMS
or the calling application.
If the exit routine calls other applications or routines, including IMS callable
services, the routine must provide an additional save area. The 512-byte dynamic
work area passed to exit routines that use the Version 6 standard exit parameter
list can be used as one or more save areas.
Before returning control to IMS, the exit routine must restore the registers to IMS
or the calling application.
Related reference:
“IMS standard user exit parameter list” on page 4
Cross-memory considerations
Restrictions exist which should be considered when writing an IMS exit routine
that will perform while in cross-memory mode.
10 Exit Routines
IBM Confidential
If the routine runs in the DL/I address space and you need to perform a function
that cannot be done in cross-memory mode, issue an ISWITCH TO=DLI to exit
cross-memory. Because of the overhead in performing a task switch from the
dependent address space to the IMS control program, use ISWITCH infrequently.
ISWITCH TO=DLI is not valid for TM exit routines.
If you are not using the DL/I address space option, execution after the ISWITCH
continues in the control address space. With LSO=S, execution continues in the
DL/I address space. TO=DLI on ISWITCH performs the correct switching in all
environments.
With LSO=S, DL/I exits cannot address data in the control address space.
Most terminal-related control blocks are not addressable from the DL/I address
space.
Most routines are called from the IMS control region and get control in key 7
supervisor state. Some routines might be called from mainline processing code
running under the IMS Control Region task. Other units of work that must wait to
run under a task currently in use by an exit routine can also be affected. An abend
in an exit routine that gets control in the IMS control region can cause the IMS
control region to abend.
Recommendations:
v Code user-written routines in ways that minimize path length and processing
time as much as possible.
v Use services such as OS WAITs, SVCs, and I/O sparingly. When an IMS callable
service exists, use it rather than the z/OS equivalent. The IMS callable service is
optimized to perform more efficiently in an IMS subdispatching environment.
v Write IMS exit routines in assembly language rather than high-level languages.
IMS does not support exit routines running under Language Environment® for
z/OS.
The following table shows the exit routines that are eligible for callable services
and the types of callable service that they can use. See the topic for each exit
routine for more information on how it uses callable services.
Table 3. Exit routines and associated callable services.
Callable services
Exit name or user
exit type Storage Control block AOI
BSEX X
DBFHAGU0 X X
DFSAOE00 X X
DFSAOUE0 X X
DFSCCMD0 X X
DFSCMLR1 X X
12 Exit Routines
IBM Confidential
Repeat steps 3 through 5 as many times as necessary while your exit routine has
control.
Not all exit routines perform all five of the preceding steps. See the section called
“Using IMS callable services ” in the description of the specific exit routine you are
coding to see which steps apply.
Callable services
To use IMS callable services, an exit routine must invoke one of two IMS callable
services entry points in AMODE 31. The exit routine will receive a control block
and a callable services parameter list.
The callable services interface module DFSCSI00 contains two entry points that
your exit routine can invoke: DFSCSII0 and DFSCSIF0.
Entry point DFSCSIF0 invokes one of the callable services. To invoke a callable
service, issue CALL DFSCSIF0 with the appropriate information specified. You
must tell IMS which service to invoke. You do this by initializing two parameter
lists. The first list, the callable services parameter list, contains information needed
by callable services to route the request to the appropriate service. The second list,
the function-specific parameter list, defines which service is to be used and
provides information required by that service.
When your exit routine receives control back from callable services, register 15
contains a return code indicating whether the call was successful. The callable
services parameter list contains a return code and a reason code if the call did not
complete successfully. The function-specific parameter list can contain data from a
specific callable service.
To generate parameter list DSECTs, you can use the following assembler macros in
your exit routine.
Macro Description
14 Exit Routines
IBM Confidential
DFSCSIPL
Generates the DFSCSPL, DFSCSTRG, DFSCCBLK, and DFSAOI parameter
list DSECTs for an exit routine.
DFSCSPL
Generates the callable services parameter list DSECT (CSPARMS).
DFSCSTRG
Generates the storage services function-specific parameter list DSECT
(CSSTRG).
DFSCCBLK
Generates the control block services function-specific parameter list DSECT
(CSBLK).
DFSAOI
Generates the AOI services function-specific parameter list DSECT
(DFSAOI).
Automatic linking
Manual linking
To use callable services, you must manually link these exit routines to DFSCSI00.
Exit routines or user exit types to be Exit routines or user exit types to be
manually linked to DFSCSI00 manually linked to DFSCSI00
DFSAOE00 DFSINTX0
DFSAOUE0 DFSLGFX0
BSEX DFSLGNX0
DFSCCMD0 DFSMSCE0
DFSCSMB0 NDMX
DFSCTSE0 PPUE
DFSGMSG0 DFSSGFX0
Exit routines or user exit types to be Exit routines or user exit types to be
manually linked to DFSCSI00 manually linked to DFSCSI00
DFSGPIX0 DFSSGNX0
DFSINSX0 LOGWRT
Typically, you must manually link DFSCSI00 if your exit routine is a stand-alone
module (not linked as part of another IMS load module). When you perform this
binding, include an ENTRY bind control statement that specifies the entry point of
your exit routine. The statement ensures that your exit routine, and not DFSCSI00,
receives control when IMS calls it.
Exit routines that do not receive the IMS standard user exit parameter list
(DFSSXLP) in register 1 on entry, or that do receive DFSSXPL but with a zero value
for field SXPLATOK, must initialize IMS callable services.
Exit routines that receive DFSSXLP in register 1 with a non-zero value for field
SXPLATOK do not need to initialize callable services. These routines should use
the callable services token referenced in SXPLATOK for all calls to IMS callable
services. A routine that receives a token can use the work area pointed to in
SXPLAWRK to get the callable services parameter list.
The callable services token is used to request a specific callable service through a
subsequent call to entry point DFSCSIF0.
The parameter list that is returned in register 1, contains the callable services
token. You need to extract the token and save it, so it does not get overlaid. Then
the parameter list can be formatted for your callable service request. The parameter
list is large enough to contain the parameter lists that accompany your request.
IMS uses the entry registers, parameter list, and exit registers to communicate with
your exit routine. The contents of register 0 are not preserved on entry and exit.
The following two tables list the content of registers on entry and return to and
from DFSCSII0.
Register Content
1 ECB Address.
On entry, IMS gives the address of an ECB to each exit routine that can issue
callable service requests. The ECB address must be passed on the DFSCSII0
initialization call. See the section for each exit routine to determine where to
find the ECB address for that exit routine.
13 Address of save area for use by DFSCSII0.
14 Caller's return address.
16 Exit Routines
IBM Confidential
Register Content
15 DFSCSII0 entry point address.
Register Content
1 Address of parameter list
Offset Description
0 Callable services token, which is four bytes long.
15 Return code
Return code
Meaning
0 Request was successful.
4 Callable services are unavailable.
8 Callable services are unavailable. Initialization failed due to
insufficient storage.
12 Callable services are unavailable. Initialization failed due to errors in
IMS control blocks.
Initialize the parameter list with the callable services token and the code of the
callable service you want to use (storage services, control block services, or AOI
services). All other fields should be cleared. If the exit routine issues multiple calls,
you can save the callable services token in a register and restore it to CSPLTOKN
on subsequent calls.
The following tables list the content of registers on entry and exit to and from
DFSCSIF0.
Table 4. Content of registers on entry to DFSCSIF0
Register Content
1 Address of two-word parameter list built by CALL macro.
Offset Description
0 Callable services parameter list address
4 Function-specific parameter list address
13 Address of save area for use by DFSCSIF0
15 DFSCSIF0 entry point address
Register Content
15 Return code
Return code
Meaning
0 Request successful
4 Request unsuccessful
If the request is unsuccessful, refer to the return (CSPLRTRN) and reason code
(CSPLRESN) fields in the callable services parameter list described in the following
table.
Table 5. Content of registers on return from DFSCSIF0
Field Description
CSPLRTRN Return code set with error codes defined in DFSCSPL. For a list of these
codes, refer to “Return codes (CSPLRTRN)” on page 28.
CSPLRESN Reason code set with error codes defined in DFSCSPL. For a complete
description of the reason codes, see one of the following sections:
Reason code
Reference
4 See “Callable service interface reason codes (CSPLRESN)” on
page 29.
8 See “Function-specific parameter list reason codes
(CSPLRESN)” on page 29.
18 Exit Routines
IBM Confidential
The function-specific parameter list contains the information that storage services
need to perform the function you requested (get or free storage, load or delete a
module). The function-specific parameter list is also used to return data to the exit
routine.
You must initialize the function-specific parameter list for storage services before
calling DFSCSIF0 to activate storage services. All fields that are not used as input
to DFSCSIF0 should be cleared.
The storage can be obtained in private storage or CSA with either doubleword or
page boundary alignment. The storage can be requested above (31-bit) or below
(24-bit) the 16 MB line.
To request the GET storage function, initialize the following fields in the
function-specific parameter list (CSSTRG):
The following field (in CSSTRG) is returned from the GET storage function:
The requestor specifies the address of the storage service. The storage subpool
(private or CSA) specified on the FREE request must be the same value specified
on the GET request.
To request the FREE storage function, initialize the following fields in the
function-specific parameter list (CSSTRG):
The module can be loaded in private storage or CSA. The module can be loaded
above (31-bit) or below (24-bit) the 16 MB line. The name of the module must be
specified. If the module was loaded previously but you want a new copy of the
module, you can request a load of a new copy.
The LOAD module function can be requested by callers running in cross memory
mode. In this case, the LOAD module function determines if the primary address
space is either CTL or DLI/SAS, and ensures that the call executes in the proper
address space in non-cross memory mode. The LOAD module function restores the
cross memory environment before returning control to the caller.
There might be a noticeable performance impact for cross memory callers issuing
the LOAD module function, because this call requires that the environment be
switched from cross memory mode to non-cross memory mode and then restored.
Use of the LOAD module function should be kept to a minimum for mainline path
exit routines.
To use the LOAD module function, initialize the following fields in the
function-specific parameter list (CSSTRG):
20 Exit Routines
IBM Confidential
The following fields are returned from the LOAD module function:
The requester specifies either the module name or module address. If more than
one copy of the module was loaded, the address should be used instead of the
name to ensure that the correct copy is deleted. The module storage subpool
(private or CSA) specified on the DELETE request must be the same value
specified on the LOAD request.
There might be a noticeable performance impact for cross memory callers issuing
the DELETE module function, because this call requires that the environment be
switched from cross memory mode to non-cross memory mode and then restored.
Use of the DELETE module function should be kept to a minimum for mainline
path exit routines.
To request the DELETE module function, initialize the following fields in the
function-specific parameter list (CSSTRG):
The function-specific parameter list contains the information control block services
need to perform the function you requested (find or scan a control block). The
function-specific parameter list is also used to return data to the exit routine.
You must initialize the function-specific parameter list for control block services
before calling DFSCSIF0 to activate control block services. All fields that are not
used as input to DFSCSIF0 should be cleared.
The search type identifies the type of control block to locate. A search type can
include more than one type of control block. A list of the search types is in the
description of the CSFDTYPE field in the following table. The control block name
or identifier is used to find a specific instance of the control block.
22 Exit Routines
IBM Confidential
Depending on the type of block you want to find, you must initialize the following
fields:
Depending on the type of search specified, one of the following is returned in the
CSFDBLKA field in the function-specific parameter list:
The first time the SCAN function is activated, the current control block address
should be 0. SCAN returns the first control block that meets the search criteria. The
SCAN function an be subsequently activated to locate additional control blocks.
Subsequent searches start where the previous scan left off.
On subsequent SCAN requests, the current block address is passed back to the
service. The search starts with the current control block to locate the next control
block meeting the criteria. The blocks are not retrieved in alphabetic sequence.
Subsections:
v “Qualifying the scan”
v “Initializing the function-specific parameter list for SCAN” on page 25
v “Output returned from SCAN Control Block Services” on page 26
To further qualify the scan, a generic name or a name containing wild cards can be
specified for CNT, LNB, RCNT, SPQB, and VTCB control block types.
v A generic name consists of one or more characters of the name followed by an
asterisk. Generic names must be padded with blanks.
For example, assume valid names are DFSAAAAA, DFSZZZZZ, and
DFSABBBB. Multiple scan requests using the generic name 'DFSA*' can be used
to obtain the control block addresses for DFSAAAAA and DFSABBBB. In this
case, DFSZZZZZ would not be returned to the requester.
24 Exit Routines
IBM Confidential
v A wild card character is represented by the '%' character. One or more wild
cards can replace characters within the name when that position in the name can
be any character.
For example, assume valid names are DFSAABBB, DFSZZBBB, and DFSABCDE.
Multiple scan requests using the name DFS%%BBB containing wild card
characters in positions 4 and 5 would return control block addresses for
DFSAABBB and DFSZZBBB. DFSABCDE would not be returned to the requester.
You must initialize the function-specific parameter list before calling DFSCSIF0 to
activate control block services. All fields that are not used as input to DFSCSIF0
should be cleared.
To request a SCAN and search type, you always need to initialize the first two
fields as follows:
Depending on the type of search you want, you might also need to initialize one
or more of the following fields in the function-specific parameter list.
To scan Initialize
CCB Specify whether you want to scan for the first CCB or to start the
scan at the current CCB.
CSSCCBLK = Current CCB address or zero
CNT or LNB Specify whether you want to scan for the first CNT or LNB or to
start the scan at the current CNT or LNB. Use the LTERM name to
narrow the scope of the scan. If the LTERM name is not used, clear
the field.
CSSCCBLK = Current CNT or LNB address or zero
CSSCNAME = LTERM name
To scan Initialize
RCNT Specify whether you want to scan for the first RCNT or to start the
scan at the current RCNT. Use the LTERM name to narrow the
output of the scan. If the LTERM name is not used, clear the field.
CSSCCBLK = Current RCNT address or zero
CSSCNAME = LTERM name
CNT, LNB, or RCNT Specify whether you want to scan for the first CNT, LNB, or RCNT,
or to start the scan at the current CNT, LNB, or RCNT. Use the
LTERM name to narrow the output of the scan. If the LTERM name
is not used, clear the field.
CSSCCBLK = Current CNT, LNB, or RCNT address,
or zero
CSSCNAME = LTERM name
SPQB Specify whether you want to scan for the first SPQB or to start the
scan at the current SPQB. Specify the USER name to narrow the
output of the scan. If the USER name is not specified, clear the field.
CSSCCBLK = Current SPQB address or zero
CSSCNAME = USER name
VTCB Specify whether you want to scan for the first VTCB or to start the
scan at the current CLB. Specify either the NODE name alone, or
the NODE and USER name to narrow the output of the scan. If the
name fields are not specified, clear the fields.
CSSCCBLK = Current CLB address or zero
CSSCNODE = NODE name
CSSCUSER = USER name
LOGON Descriptor Specify whether you want to scan for the first LOGON descriptor or
to start the scan at the current LOGON descriptor.
CSSCCBLK = Current LOGON descriptor address
or zero
USER Descriptor Specify whether you want to scan for the first USER descriptor or to
start the scan at the current USRD.
CSSCCBLK = Current USRD address or zero
Depending on the type of scan specified, one of the following is returned in the
CSSCNBLK field in the function-specific parameter list:
26 Exit Routines
IBM Confidential
The function-specific parameter list contains the information that AOI services
needs to perform the function you requested (insert, enqueue, or cancel a
message). The function-specific parameter list is also used to return data to your
exit routine.
You must initialize this function-specific parameter list before calling DFSCSIF0 to
activate AOI callable services. All fields that are not used as input to DFSCSIF0
should be cleared.
INSERT function
The INSERT function inserts the first, or a subsequent, message segment into a
message buffer. The message segments are not available to the AO application until
an enqueue is issued specifying an AOI token.
ENQUEUE function
The ENQUEUE function inserts the last or only message segment into the message
buffer, enqueues this message segment to the AOI token the requester has
specified, and then makes the entire message available to the AO application.
CANCEL function
The CANCEL function cancels messages that have been inserted into the message
buffer but not yet enqueued to the AOI token. Canceled messages are not made
available to the application program.
Callable services return and reason codes provide reasons for why function-specific
parameter list, interface, and service processing errors occurred. These codes are in
hexadecimal format.
28 Exit Routines
IBM Confidential
Return codes are in field CSPLRTPN in the callable services parameter list.
Following are the return codes indicating why the request did not complete
successfully:
Following are the reason codes for GET function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Invalid subpool parameter. The field CSGTSP in the function-specific
parameter list DFSCSTRG contains an invalid subpool value.
X'8' Invalid location parameter. The field CSGTLOC in the function-specific
parameter list DFSCSTRG contains an invalid storage location value.
X'C' Invalid boundary parameter. The next CSGTBNDY in the function-specific
parameter list DFSCSTRG contains an invalid storage boundary value.
X'10' Length parameter not specified. The field CSGTLEN in the function-specific
parameter list DFSCSTRG is 0.
When CSPLRTRN = 20
If you receive any reason code not listed in the following table, contact IBM
Software Support.
Following are the reason codes for FREE function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Invalid subpool parameter. The field CSFRSP in the function-specific
parameter list DFSCSTRG contains an invalid subpool value.
X'8' Address parameter not specified. The field CSFRSTAD in the
function-specific parameter list DFSCSTRG is 0.
X'C' Length parameter not specified. The field CSFRLEN in the function-specific
parameter list DFSCSTRG is 0.
When CSPLRTRN = 20
If you receive any reason code not listed in the following table, contact IBM
Software Support.
30 Exit Routines
IBM Confidential
Following are the reason codes for LOAD function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Invalid subpool parameter. The field CSLDSP in the function-specific
parameter list DFSCSTRG contains an invalid subpool value.
X'8' Invalid location parameter. The field CSLDLOC in the function-specific
parameter list DFSCSTRG contains an invalid module location value.
X'C' Invalid use parameter. The field CSLDUSE in the function-specific parameter
list DFSCSTRG contains an invalid module reuse value.
X'10' Name parameter not specified. The field CSLDNAME in the function-specific
parameter list DFSCSTRG does not contain a module name.
X'14' The caller is running in cross memory mode, and the primary address space
is not CTL or DLI.
When CSPLRTRN = 20
If you receive any reason code not listed in the following table, contact IBM
Software Support.
Following are the reason codes for DELETE function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Invalid subpool parameter. The field CSDLSP in the function-specific
parameter list DFSCSTRG contains an invalid subpool value.
X'8' Name and address was not specified. The field CSDLNAME in the
function-specific parameter list DFSCSTRG does not contain a module name,
and CSDLEP does not contain a module address.
X'C' The caller is running in cross memory mode, and the primary address space
is not CTL or DLI.
When CSPLRTRN = 20
If you receive any reason code not listed in the following table, contact IBM
Software Support.
Following are the reason codes for FIND function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' FIND type was not specified. The field CSFDTYPE in the function-specific
parameter list DFSCCBLK is 0.
X'8' FIND type was invalid. The field CSFDTYPE in the function-specific
parameter list DFSCCBLK does not contain a valid control block search type
value. The search type value is too large.
X'C' CCBID was not specified. The field CSFDEIB in the function-specific
parameter list DFSCSTRG does not contain an EBCDIC CCB identifier, and
CSFDBID does not contain a binary CCB identifier.
X'10' Control block name was not specified. The field CSFDNAME in the
function-specific parameter list DFSCCBLK does not contain a name.
When CSPLRTRN = 20
Following are the reason codes you might get when searching CCB, CNT, LNB,
RCNT, SPQB, CNT, descriptor and USER descriptor control block types:
Following are the reason codes you might get when searching VTCB and LOGON
descriptor control block types:
32 Exit Routines
IBM Confidential
The following are the reason codes that can be encountered when searching for a
transaction control block type.
Following are the reason codes for SCAN function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
SCAN type was not specified. The field CSSTYPE in the function-specific
X'4' parameter list DFSCCBLK is 0.
SCAN type was invalid. The field CSSCTYPE in the function-specific
parameter list DFSCCBLK does not contain a valid control block search type
X'8' value. The search type value is too large or is a reserved function.
When CSPLRTRN = 20
Following are the reason codes you might get when searching CCB, CNT, LNB,
RCNT, SPQB, and USER descriptor control block types:
Following are the reason codes you might get when searching VTCB and LOGON
descriptor control block types:
Following are the reason codes for INSERT function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Directed message token was 0.
X'8' Directed message token was invalid.
X'C' Message segment address was 0.
X'10' Message segment length (LL field) was 0.
When CSPLRTRN = 20
Reason code Meaning
X'4' IMS could not get the storage required to process the call.
Following are the reason codes for ENQUEUE function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Directed message token was 0.
X'8' Directed message token was invalid.
X'10' Message segment address was specified, but segment length (LL field) was 0.
X'14' AOI token count field was 0.
X'18' AOI list token address was 0.
X'1C' One or more tokens was processed successfully.
X'20' No tokens were processed successfully.
Following are the reason codes for CANCEL function parameter errors:
When CSPLRTRN = 8
Reason code Meaning
X'4' Directed message token was 0.
X'8' Directed message token was invalid.
X'C' No message exists to cancel.
34 Exit Routines
IBM Confidential
The following example depicts how an exit routine could use IMS callable services.
In the example, the storage returned from DFSCSII0 is divided into three areas.
These areas are for the parameter lists used for the call to DFSCSIF0. The first area
is used for the z/OS CALL parameter list, the second for the IMS callable service
parameter list, and the third for the function specific parameter list. The labels,
CSICLLEN and CSPLPLEN, used in the examples are defined as EQU statements
in the macro DFSCSIPL. These labels represent the length of the z/OS parameter
list built by the CALL macro and the length of the IMS callable services parameter
list.
***********************************************************************
* *
* -------------------------------- *
* GETSTOR - GET STORAGE SUBROUTINE *
* -------------------------------- *
* *
* THIS SUBROUTINE INVOKES IMS callable services TO *
* GET WORKING STORAGE. THE CALLER PASSES THE REQUIRED *
* STORAGE LENGTH. THE SUBROUTINE THEN OBTAINS PRIVATE, *
* 31-BIT STORAGE ON A DOUBLEWORD BOUNDARY. *
* *
* *
* INPUT REGISTERS: *
* R8 = REQUESTED STORAGE LENGTH *
* R9 = ECB ADDRESS *
* R10 = LINKAGE REGISTER *
* CALLED BY BAL 10,GETSTOR *
* *
* OUTPUT REGISTERS: *
* R1 = STORAGE ADDRESS *
* R9 = ECB ADDRESS *
* R10 = LINKAGE REGISTER *
* R15 = RETURN CODE *
* 0 - CALL COMPLETED SUCCESSFULLY *
* NON-ZERO - STORAGE REQUEST FAILED *
* RETURN CODE FROM IMS CALLABLE STORAGE *
* SERVICES - GET STORAGE FUNCTION *
* *
* REGISTER USAGE: *
* R0 = WORK REGISTER *
* R1 = WORK REGISTER *
* R2 = IMS CALLABLE SERVICE TOKEN *
* R3 = IMS callable services PARAMETER LIST *
* R4 = IMS STORAGE SERVICES PARAMETER LIST *
* R5 = z/OS CALL PARAMETER LIST *
* R8 = REQUESTED STORAGE LENGTH *
* R9 = ECB ADDRESS *
* R14 = WORK REGISTER *
* R15 = WORK REGISTER *
* *
***********************************************************************
GETSTOR DS 0H
SPACE
***********************************************************************
* INVOKE CALLABLE SERVICES INITIALIZATION ENTRY POINT *
* DFSCSII0, TO OBTAIN THE CALLABLE SERVICE TOKEN AND *
* PARAMETER LIST STORAGE. *
***********************************************************************
LR 1,9 ECB ADDRESS
CALL DFSCSII0 INVOKE INIT ENTRY POINT
LTR 15,15 CALL SUCCESSFUL?
36 Exit Routines
IBM Confidential
SPACE
LA 0,CSGT31B 31-BIT STORAGE INDICATOR
ST 0,CSGTLOC INIT STORAGE LOCATION PARAMETER
SPACE
LA 0,CSGTDBLW DOUBLE WORD BOUNDARY INDICATOR
ST 0,CSGTBNDY INIT STORAGE BOUNDARY PARAMETER
SPACE
***********************************************************************
* THE CALLABLE SERVICES PARAMETER LIST HAS BEEN INITIALIZED *
* TO INVOKE IMS STORAGE SERVICES. THE STORAGE SERVICES *
* PARAMETER LIST HAS BEEN INITIALIZED TO OBTAIN USER STORAGE. *
* ISSUE THE IMS CALLABLE SERVICE REQUEST TO OBTAIN STORAGE. *
***********************************************************************
CALL DFSCSIF0,((3),(4)),MF=(E,(5))
LTR 15,15 STORAGE REQUEST SUCCESSFUL?
BNZ GSTREXIT NO, RETURN TO CALLER
SPACE
L 1,CSGTADDR STORAGE ADDRESS
SPACE
***********************************************************************
* RETURN TO CALLER *
***********************************************************************
GSTREXIT DS 0H
BR 10 RETURN TO CALLER
LTORG
DFSCSIPL
If only certain fields within a control block are intended for your use, they are
listed next to the control block name in the following table. If a field does not
appear next to the control block name, it is not intended for your use. Unless
otherwise specified, the only information that is part of the interface for exit
routines is the control block name and any specific fields associated with that
control block. For a field that is part of the interface, the only information that is
part of the interface for exit routines is the named field.
The following control blocks and their associated fields and flags, shown in the
following table, are intended for use as, or as part of, a product-sensitive interface.
Flags are enclosed in parenthesis next to their associated fields.
Table 6. Control blocks and associated fields and flags
Control block name Fields and flags intended for use
CCB CCBNUMB
CIB CIBMNAME, CIBDTYP (CIBDNDS)
CLB CLBNAME, CLBCURR, CLBCNTQB
CNT, LNB CNTDEQCT, CNTENQCT, CNTNAME, CNTDQCT, CNTCTBPT,
CNTCNTPT
CTB CTBCTT, CTBTERM, CTBFLAG1 (CTB1SIGN, CTB1PRES),
CTBFLAG2 (CTB2LOCK, CTB2TEST, CTB2EXCL), CTBFLAG3
(CTB3SEG1), CTBACTL (CTBAEOM, CTBAINC), CTBFEAT,
CTBINCT, CTBOUTCT, CTBCNT, CTBCIBPT, CTBPRSTN,
CTBCNTPT, CTBFLAG6 (CTB6SDON, CTB6TRNI), CTBUSID,
CTBOUSID
The following table provides a list, by exit, of the control blocks that are intended
for use as, or as part of, a product-sensitive interface:
Table 7. Exit routines and associated control blocks
Exit name or type Associated control blocks
DBFHAGU0 SCD
DBFHDC40 none
DBFHDC44 none
DBFUMSE1 none
DBFLHSH0 none
DFSAOEE0 none
38 Exit Routines
IBM Confidential
The location of the sample exit routines and programs are listed in the following
table.
Table 8. Exit routines and their location
Exit routine or user exit type Location
DBFHAGU0 [Link]
DBFHC40/ DBFHDC44 [Link]
DBFLHSH0 [Link]
DBFUMSE1 No sample
DFSAOUE0 [Link]
DFSAOE00 [Link]
BSEX No sample
DFSCCMD0 [Link]
DFSCKWD0 [Link]
DFSCMPX0 [Link]
DFSCMTU0 No sample
DFSCMUX0 [Link]
DFSCNTE0 [Link]
DFSCONE0 [Link]
DFSCSGN0 [Link]
DFSCSMB0 [Link]
DFSCTRN0 [Link]
DFSCTSE0 No sample
DFSCTTO0 [Link]
DFSFDOT0 [Link]
40 Exit Routines
IBM Confidential
42 Exit Routines
IBM Confidential
44 Exit Routines
IBM Confidential
Subsections:
v “About this routine”
v “Communicating with IMS”
The Batch Application exit routine is applicable to IMS DB and IMS TM batch
environments, and batch types DBB, DLI, and ULU. The exit routine is called if it
is available in [Link].
You can link-edit the exit routine as needed, and will process in TASK mode. The
exit routine's addressing mode can be either 24 or 31. It is given control in its
defined AMODE and can return control to IMS in either 24- or 31-bit addressing
mode.
Table 10. Batch application exit routine attributes
Attribute Description
IMS environments DB Batch, TM Batch.
Naming convention Must be named DFSISVI0.
Link editing After you compile your routine, include it into [Link] or
into any operating system-partitioned data set to which access is
provided by using a JOBLIB or STEPLIB JCL statement.
Including the routine No special steps required.
IMS callable services This exit routine is not eligible to use IMS callable services.
Sample routine No sample exit routine is provided.
location
IMS communicates with this routine through the entry registers, a parameter list,
and the exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Address of the exit parameter list.
13 Address of a single, standard save area.
14 Return address to IMS.
15 Entry point of this exit routine.
Parameter list
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains the return code. A return code of 12 indicates that the
exit does not want IMS processing to continue.
Related reference:
“Routine binding restrictions” on page 8
46 Exit Routines
IBM Confidential
The following example JCL shows how to bind the exit routine
module into [Link].
//LINKIT JOB 1,MSGLEVEL=1
//LINK EXEC PGM=IEWL,PARM=RENT
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(20,20))
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link].,DISP=SHR
//OBJIN DD DSN=[Link].,DISP=SHR
//SYSLIN DD *
INCLUDE OBJIN(DFS3CDX0)
MODE AMODE(31),RMODE(ANY)
NAME DFS3CDX0(R)
/*
Including the routine No special steps required.
IMS callable services This exit routine is not eligible to use IMS callable services.
Sample routine [Link].
location Note: You must customize the sample exit routine before you can
compile it.
IMS communicates with this routine through the entry registers, a parameter list,
and the exit registers. The exit routine must save all registers with the provided
save area on entry.
Table 12. Contents of registers on entry
Register Content
1 Address of the Version 6 standard exit parameter list.
13 Address of the exit save area. The exit routine must not change the first three
words of the save area. This save area is not chained to any other save area.
14 Return address.
15 Entry point of this exit routine.
Register 1 contains the address of the Version 6 standard exit parameter list. The
standard exit parameter list contains the field SXPLFSPL which is the address of
the function-specific parameter list for the Catalog Definition exit. Some fields in
the parameter list are directly equivalent to parameters in the DATABASE and
CATALOG sections of the DFSDFxxx member of the [Link] data set. The
function-specific parameter list is mapped by macro DFS3DXP and contains the
following fields:
Table 13. Catalog Definition exit routine function-specific parameter list
Equivalent
Field Offset Length Description DFSDFxxx parameter
DXPL_PVER X’00’ X’04’ Parameter list version
number
DXPL_FUNC X’04’ X’04’ Function code: CATALOG=YES
(required)
1 Enable catalog
DXPL_LEN X’08’ X’04’ Parameter list length
DXPL_RGNTYPE X’0C’ X’04’ Region type:
1 Batch region
DXPL_URCATL X’10’ X’04’ Unregistered catalog UNREGCATLG
name list (optional)
DXPL_RETNUM X’18’ X’02’ Number of catalog RETENTION
record copies to retain VERSIONS (optional)
DXPL_RETPD X’1A’ X’02’ Record retention RETENTION DAYS
period in days (optional)
DXPL_ALIAS X’1C’ X’04’ Alias name prefix ALIAS (required)
X’20’ X’08’ Reserved None
DXPL_DATC X’28’ X’08’ Data class DATACLAS (optional)
DXPL_MGTC X’30’ X’08’ Management class MGMTCLAS
(optional)
DXPL_STGC X’38’ X’08’ Storage class STORCLAS (optional)
DXPL_1PCT X’40’ X’02’ Primary data set SPACEALLOC
space allocation PRIMARY (optional)
percentage
DXPL_2PCT X’42’ X’02’ Secondary data set SPACEALLOC
space allocation SECONDARY
percentage (optional)
X’44’ X’04’ Reserved
X’48’ X’04’ Reserved
X’4C’ X’04’ Reserved
X’50’ X’04’ Reserved
X’54’ X’04’ Reserved
X’58’ X’02’ SMS volume count SMSVOLCT (optional)
DXPL_VOL X’5A’ X’06’ Non-SMS primary or IXVOLSER (required
secondary index when the catalog data
volume sets are not managed
by SMS)
The exit routine must restore all registers before returning control to IMS.
Related reference:
DFSDFxxx member of the IMS PROCLIB data set (System Definition)
48 Exit Routines
IBM Confidential
If the CCTL passes an address (in the INIT request) of zero for a particular routine,
the DRA uses a default exit routine.
All CCTL exit routines called by the database resource adapter (DRA) have control
passed to them in 31-bit addressing mode and must return to the DRA in the same
mode. Since much of the DRA has RMODE=31, registers 13 and 14 can point to
locations above the 16 MB line. When the DRA calls the Control exit routine, the
PAPL that it passes can also be above the line.
On entry to a CCTL exit routine, the PAPLTTOK and PAPLUSER fields are the
same as they were when DFSPRRC0 first received the PAPL. (For more
information on these fields, see IMS Version 14 System Programming APIs.) The
CCTL uses the PAPLUSER field to pass information to the exit routines (for
example, the address of the control blocks).
If you want the DRA to use the default exit routines supplied with IMS DB, pass a
value of binary 0 as the address of the exit routine in the INIT request. For more
information, see the topic “INIT request” in IMS Version 14 System Programming
APIs.
To use the default Suspend exit routine and Resume exit routine, each DRA request
must have the field PAPLTECB set with the address of a CCTL ECB is waited or
posted.
The Suspend exit routine can execute before or after the Resume exit routine.
The Suspend exit routine executes in the CCTL's environment. The contents of the
registers on entry are:
Register
Contents
1 Address of the PAPL
14 Return address
15 Entry point address
This routine can use a PAPL 16-word save area (PAPLSREG) to save the DRA's
registers The DRA does not expect any output from this routine.
This routine can execute before or after the Suspend exit routine executes.
This routine receives control whenever a request has completed its process. The
contents of the registers on entry are:
Register
Contents
1 Address of the PAPL
13 Address of an 18-word save area that this routine can use to save DRA
registers
14 Return address
15 Entry point address
The DRA does not expect any output from this routine.
This routine receives control whenever the DRA must notify the CCTL of the
following events:
v The DRA successfully identifies itself to IMS DB.
v The identify attempt to IMS DB fails.
v The CCTL's INIT request is canceled.
v The DRA fails.
v IMS DB fails.
v IMS DB terminates normally using the /CHECKPOINT FREEZE command.
v The DRA terminates due to a Control exit routine request.
The Control exit routine uses a PAPL that belongs to the DRA, never a CCTL PAPL
that is a DRA request.
For all of these events (except the last one), the CCTL must tell the DRA what
action to execute next. This is done using a return code that the CCTL places in the
PAPLRETC field prior to passing the PAPL back to the DRA. The DRA then acts
accordingly.
50 Exit Routines
IBM Confidential
A list of possible events about which the DRA notifies the CCTL follows. With each
event, the contents of the PAPL are listed with possible actions for the CCTL to
take.
Subsections:
v “The DRA successfully identifies itself to IMS DB”
v “The identify attempt to IMS DB fails” on page 52
v “The CCTL's INIT request is canceled” on page 53
v “The DRA fails” on page 54
v “IMS DB fails” on page 54
v “IMS DB terminates normally using the /CHECKPOINT FREEZE command” on
page 55
v “The DRA terminates due to a Control exit routine request” on page 56
After the DRA successfully identifies to IMS DB, the contents of the PAPL passed
to the CCTL are:
Field Contents
PAPLFUNC
Resync function code, PAPLRSYN
PAPLRSLT
Resync list address, list of recovery tokens of indoubt UORs. First 4 bytes
in the list is the number of tokens in the list. Following this number are the
actual tokens, each being 16 bytes.
PAPLUSER
User data (passed on the INIT request).
PAPLDBCT
IMS DB identifier.
PAPLMTCB
Minimum thread count specified in the startup table or INIT request.
PAPLJOBN
IMS DB jobname.
PAPLCRC
IMS DB command recognition character.
PAPLIDTK
IMS DB identify token (unique store clock value representing the time the
CCTL identified with IMS DB).
PAPLDSID
IMS DB address space ID (ASID).
PAPLRSEN
DBRSE (IMS DB warm standby name, =DBRSENM, IMS DB execution
parameter). See IMS Version 14 System Definition for more information.
PAPLRGTY
IMS region type. The possible region types are:
PAPLDBCX
DB/DC with XRF.
PAPLDBCO
DB/DC only.
PAPLDBCL
IMS DB
After the routine has completed analyzing the PAPL, it can insert the following
return codes in the PAPLRETC field to notify the DRA of the next action to take:
Code Returned
Meaning
0 IMS DB environment OK.
4 Terminate the DRA (the Control exit routine is not called again during this
DRA session).
After the identify to IMS DB fails, the contents of the PAPL passed to the CCTL
are:
Field Contents
PAPLFUNC
Failure function code
PAPLSFNC
Identify request failed subfunction code
PAPLUSER
User data (passed on the INIT request)
PAPLDBCT
IMS DB identifier
PAPLRETC
Code returned from subsystem interface or IMS DB
PAPLRCOD
Reason code. The possible reason codes are:
PAPLNTUP
Subsystem exists but is not up
PAPLNOSS
Subsystem does not exist
PAPLINT
IMS DB is in initialization process
PAPLRSTN
IMS DB waiting for restart command
PAPLRST
In restart process
PAPLBRST
DB/DC XRF backup in tracking mode
PAPLTKOV
Backup in takeover mode
52 Exit Routines
IBM Confidential
After the routine analyzes the PAPL, it can insert the following data in the output
fields in the PAPL to notify the DRA of the next action to take:
Field Contents
PAPLDBCN
New IMS DB identifier
PAPLRETC
Code returned from the CCTL to the DRA. PAPLRETC is passed to the
Control exit routine and must be reset.
Code Returned
Meaning
0 Issue a DFS0690A message and try to identify IMS DB again.
4 Proceed with DRA termination (the Control exit routine will not be called
again).
8 Reidentify with new IMS DB identifier (in the PAPLDBCN field).
After the DRA INIT request is canceled by a cancel response to the DRF690
message, the contents of the PAPL passed to the CCTL are:
Field Contents
PAPLFUNC
Failure function code
PAPLSFNC
Cancelled INIT request subfunction code
PAPLUSER
User data (from the INIT request).
PAPLDBCT
IMS DB identifier.
PAPLRETC
Code returned from IMS DB.
PAPLRCOD
Reason code. The possible reason codes are:
PAPLDBNZ
IMS DB rejected identify request.
PAPLOPC
Operator responded cancel to DFS690 message.
After the routine has completed analyzing the PAPL, it can insert the following
return codes in the PAPLRETC field to tell the DRA what to do next:
Code Returned
Meaning
0 Wait for a DRA TERM request.
4 Proceed with DRA termination (the Control exit routine will not be called
again).
When the DRA fails, the contents of the PAPL passed to the CCTL are:
Field Contents
PAPLFUNC
Failure function code
PAPLDRAF
DRA failure subfunction code.
PAPLUSER
User data.
PAPLDBCT
IMS DB identifier.
PAPLRCOD
Reason code
The reason codes possible are:
PAPLGMF
GETMAIN failed.
PAPLSSF
Subsystem interface failure.
PAPLDRAA
DRA abend.
PAPLESTF
Unable to establish DRA ESTAE.
The DRA expects no return code in PAPLRETC. The DRA fails and the Control exit
routine is not called when the failure occurs while processing a TERM request. In
this case, the PAPL return code of the returned TERM PAPL contains the failure
code.
IMS DB fails
When IMS DB fails, the DRA first issues a U002 abend to all DRA thread TCBs. In
some cases, the DRA itself can also get a U002 abend and call the Control exit
routine as in the previous failure event. Otherwise, the contents of the PAPL
passed to the CCTL are:
Field Contents
PAPLFUNC
Failure function code.
PAPLDBCF
IMS DB failure subfunction code.
PAPLUSER
User data.
PAPLDBCT
IMS DB identifier.
PAPLRETC
Code returned from IMS DB.
54 Exit Routines
IBM Confidential
PAPLRCOD
Reason code. The reason code is:
PAPLABND
IMS DB abend.
After the exit routine analyzes the PAPL, it can insert the following identifier and
return codes in the output fields of the PAPL to notify the DRA of the next action
to take:
Field Contents
PAPLDBCN
New IMS DB identifier.
PAPLRETC
Code returned.
After the exit routine analyzes the PAPL, it can insert the following identifier and
return codes in the output fields of the PAPL to notify the DRA of the next action
to take:
Field Contents
PAPLDBCN
IMS DB identifier.
PAPLRETC
Code returned.
Code Returned
Meaning
0 Allow the DRA to shut itself down.
4 Terminate DRA immediately.
8 The current DRA threads are allowed to complete all current calls and are
then terminated. The DRA then reidentifies with the new IMS DB
identifier.
After the CCTL sets the return code equal to 0, the DRA follows the rules of the
/CHECK FREEZE command (for example, it allows the current threads to complete
their units of work). After the last thread completes, the DRA terminates. The
invocation of the Control exit routine signals the completion of the DRA shutdown
process.
Since the DRA terminated, the CCTL does not pass any return codes to IMS DB.
Control is passed to this exit routine at the end of the DRA cleanup when the DRA
termination is due to a previous Control exit routine request. For example, after
being notified of a IMS DB failure or a /CHE FREEZE command, the Control exit
routine terminates the DRA.
56 Exit Routines
IBM Confidential
The database resource adapter (DRA) passes control to the Status exit routine
when a task control block (TCB) for a DRA thread in a scheduled state is
collapsing.
The scheduled state is the time between the DRA's successful processing of a
schedule request and the DRA's successful processing of one of the following
thread function requests:
ABTTERM
Abort unit of work.
COMTERM
Commit unit of work.
TERMTHRD
Terminate thread.
Related Reading: Refer to the section on CCTL DRA function requests in IMS
Version 14 System Programming APIs for a description of the thread functions.
When a DRA thread successfully processes a schedule request, the address of the
storage that IMS DB acquired in the CCTL's private storage is returned to the
CCTL. The storage is acquired and initialized with the user's PCBLIST and PCBs.
The CCTL thread uses the PCBLIST and PCBs to make DL/I requests and to
receive the results of the requests. The storage is referred to as user private storage
(UPSTOR).
Related Reading: See the topic on CCTL DRA function requests in IMS Version 14
System Programming APIs for PAPL fields returned to CCTL when the schedule
request is completed.
The CCTL thread has access to UPSTOR for the duration of the thread's scheduled
state. When the scheduled state terminates normally by a request from the CCTL,
IMS DB manages UPSTOR storage.
Reference to UPSTOR by the CCTL thread after the normal end of a scheduled
state can result in a z/OS S0C4 abend if IMS DB has freed the storage. If IMS DB
allocated the same storage to another thread, reference to UPSTOR can overlay the
second thread's data.
When the thread terminates abnormally during the scheduled state, the Status exit
routine notifies the CCTL. The CCTL is responsible for freeing UPSTOR. The
responsibility for freeing UPSTOR is assigned to the CCTL to ensure that UPSTOR
is freed at the proper time.
The UPSTOR area is acquired using the GETMAIN macro by DRA thread TCBs
out of subpool 0 (subpool 132 if the CCTL application is running with the public
key option set).
The default Status exit routine provided by the DRA frees UPSTOR. If the CCTL
chooses the default exit routine, it can incur a program check abend trying to
access that storage because the CCTL might execute after the DRA has freed the
storage.
If DRA thread termination occurs during processing of a CCTL request, the CCTL's
PAPL is passed to the Status exit routine. Otherwise, the DRA builds a PAPL.
The contents of the PAPL that are significant for the call are:
Field Contents
PAPLUSR3
The value CCTL passed in PAPLUSR3 on the INIT request.
PAPLTOKT
The thread token set up by the CCTL. This is the token which the CCTL
passed, in PAPLTTOK, on the SCHED request.
PAPLUPSA
Address of UPSTOR.
PAPLUPSL
Length of UPSTOR.
58 Exit Routines
IBM Confidential
Application
(Full-function
databases or
DEDBs)
Data Capture
exit routine
DB2
You might want to capture changed data so that you can replicate that data to a
DB2® for z/OS database as shown in the previous figure.
The following table describes data capture support for IMS environments for both
full-function and DEDB databases.
Table 14. Data capture support for IMS environments
CICS® CICS IMS IMS
DB/CTL Batch Batch IMS IFP BMP IMS MPP
1
Data Capture Exit No Yes Yes Yes Yes Yes
EXIT=exit_name
Asynchronous Data Yes Yes1 Yes Yes Yes Yes
Capture EXIT= *, LOG
Note: 1BATCH is a pure IMS batch environment that is available with CICS DB/CTL (no
CICS code executing).
Subsections:
v “About this routine” on page 60
v “Communicating with IMS” on page 63
v “Extended Program Communication Block (XPCB)” on page 64
v “Extended Segment Data Block (XSDB)” on page 66
v “Writing the routine in supported languages” on page 67
v “Storage requirements for Data Capture” on page 68
v “Storage failure” on page 69
v “Data security and integrity” on page 69
The main purpose of capturing updated data and making it available to an exit
routine is to propagate the IMS data to the relational environment of DB2 for
z/OS. You can write your own exit routine, use a separate product, use IBM IMS
DataPropagator for z/OS, or write a IMS DataPropagator-supported exit routine. If
you write your own exit routine, you can code it to perform tasks other than data
propagation. The sample Data Capture exit routine provided at the end of this
topic only propagates data.
Restriction: This exit routine cannot be used with CICS, because it conflicts with
CICS architecture. (Asynchronous Data Capture does work with DBCTL.) Even
though the exit routine works with captured IMS data, CICS cannot use it.
Regardless of its function, you must write the routine in assembly language, C
language, COBOL, or PL/I. Routines written in high-level languages running
under Language Environment for z/OS are not supported. Sample exit routines are
provided in COBOL and PL/I.
Running Data Capture exit routines under Language Environment for z/OS might
result in performance problems unless the dependent region that is running the
application that causes the Data Capture exit routine to execute is pre-initialized in
the Language Environment for z/OS. This can be done with the preinitialization
list. Otherwise, every execution of the application in a dependent region causes the
Language Environment for z/OS to be initialized each time the application is
invoked and stopped each time the application terminates.
If you bind the exit routine as either RENT or REUSE, it remains in storage until
the region terminates as if the exit routine was preloaded. However, non-REUSE
exit routines must be loaded each time, because they are deleted from storage after
each call.
IMS loads the exit routine the first time IMS calls it; preloading the exit routine is
not necessary. However, runtime library routines used by high-level languages
should be preloaded. After abnormal termination in an IMS Fast Path region (IFP)
or in a message processing region (MPP), the exit routine is deleted and must be
reloaded. The exit routine must be reloaded when:
v A pseudo or standard abend of the application that is running in the region
occurs (regardless of whether the region itself abends along with the
application).
v The data capture routine gets an XPCB return code of 16.
In addition to the necessary control information, you can have the following data
passed to your exit routine. The data is chained together using pointers.
Physical concatenated key
The fully concatenated key of each segment in the physical hierarchy,
60 Exit Routines
IBM Confidential
The data is in the same format that was returned to the application program,
excluding PSB field sensitivity. For logical children, the segment data follows the
logical parent concatenated key. For segments with compression/edit exit routines
defined for them, the data is in its expanded or encoded form. For variable-length
segments, the first two bytes contain the length ('LL') for the segment.
Additional guidelines
The Data Capture exit routine is called whenever a segment is updated that has
the exit routine defined, regardless of the execution environment. The exit routine
use the INQY ENVIRON call to identify the execution environment (batch or
online) and determine what functions are available.
The exit routine can issue any DL/I calls allowed by the PSB using the AIB
Interface (AIBTDLI). However, any updates that the exit routine makes are not
captured and do not call an exit routine.
For data propagation, all DL/I updates must be passed to the exit routine to
determine whether to propagate the change to DB2 for z/OS or not. Both the IMS
data and DB2 for z/OS data must be available and on the same z/OS system for
either update to occur.
The Data Capture exit routine is called based on specification in the DBD rather
than in the PSB. The exit routine is always called. It is also a global exit routine:
once implemented for any segment, all activity in that segment causes IMS to call
the exit routine, regardless of which PSB is active. Any performance impact that
the exit routine causes occurs across the entire system.
The Data Capture exit routine is specified for a particular segment during
DBDGEN. Failure to locate the exit routine during processing results in an
application program abend.
DBDGEN supports the parameter, EXIT=, on the DBD and SEGM statements. If
specified on the DBD statement, the parameter applies to all segments within the
physical database structure. If specified on the SEGM statement, you can override
the specification on the DBD, or can limit the parameter so that only selected
segments are propagated when updated. As a SEGM parameter, EXIT= does not
apply to other segments; physical children do not inherit the parameters of any of
their parents.
You can specify multiple exit routine names, each with different data options, on a
single DBD or SEGM statement.
A single DL/I call might call your exit routine more than once or it might call
more than one exit routine. Multiple exit routines are called when there are:
v Multiple exit routines per segment
v Path calls
v Cascade deletes
Multiple exit routines are called in succession before returning to the application
program. The sequence depends on the reason multiple exit routines are called:
v Multiple exit routines are defined.
When multiple exit routines are defined for a single physical segment, the
routines are called based on DBDGEN definition order. The first exit routine
listed in the DBD or SEGM statement is called, followed by each subsequent exit
routine defined for that segment.
v Multiple segments are updated.
When multiple physical segments are updated in a single call, the routines are
called in hierarchical order. IMS calls the exit routines for the segments in the
same order that the segments were physically updated:
– Top-down for path inserts and path replaces:
Parents must be inserted before dependents. The exit routine for the parent
segment must be called before the dependent segment's exit routine.
– Bottom-up for cascade deletes:
The dependent segment's exit routine is called before the parent's exit routine.
The root segment's exit routine is called last. If the dependent segment has
several exit routines defined for it, they are all called at this time. Calling the
exit routines in bottom-up order allows propagation to DB2 for z/OS without
requiring referential integrity.
For each segment type, multiple segment occurrences might be deleted as
part of the cascade delete. Each exit routine is called once for each segment
occurrence that is deleted. The order the exit is called is the same order in
which DL/I deleted the segments.
62 Exit Routines
IBM Confidential
Each segment that is passed in a dependent region and has the Data Capture exit
routine defined for it has two control blocks available for its use. Both the
Extended Program Communication Block (XPCB) and the Extended Segment Data
Block (XSDB) reside in private storage and have key 8. They are passed to the exit
routine according to the AMODE of the exit: above the 16MB line for AMODE 31,
and below the 16 MB line for AMODE 24.
The order in which the control blocks receive control depends on the type of data
updated and passed to the Data Capture exit routine. The following figure shows
how control flows between the XPCB and the XSDB.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the XPCB address
13 Address of save area
14 Return address to IMS
15 Entry point of exit routine
Before returning to IMS, the exit routine must restore all registers. Return and
reason codes are placed in the XPCB.
The XPCB contains fields for the exit routine to communicate its status to IMS.
These fields are initialized to binary zeros. The return code set by the exit routine
defines the type of condition encountered; the higher the number, the more severe
the error. You can also assign a reason code to return codes of 8 or greater. The
reason code is for your use; IMS uses only the return code.
The following table outlines the return and reason codes that the exit routine
returns and places in the XPCB. If the return code placed in the XPCB is invalid,
an abend occurs and an invalid return code indicator is set.
Table 15. XPCB return codes
Return Description Action DFS3314
code message
0 Good return. Normal completion of exit No
routine.
4 Indicates the exit routine wants Exit routine is not called for No
to ignore the DL/I call. any additional segments for
this DL/I call.
8 Exit routine encountered an DL/I call is terminated Yes
error during the DL/I call and without calling any other exit
wants to return to the routines and control is
application. returned to application
program.
12 This copy of the exit routine is Exit routine is deleted from Yes
not to be called again. (Used storage.
with a “dummy” exit routine.)
16 Abend the exit routine and the Application program is Yes
application program. abended with a U3314.
20 Do not call the Data Capture exit Terminate data capture for Yes
routine. this region.
After an abend in an IFP or MPP region with return code 12 or 20, the interface
control blocks are reinitialized and the exit work area is reset. The exit routine can
then be called again.
The XPCB identifies the segment and call functions, provides the address of a
work area, and contains additional information that is passed to the exit routine.
Every XPCB identifies the physical function performed by DL/I (insert, replace, or
delete) and points to the updated data that is passed to the exit routine. The
following two tables describe the contents of the XPCB.
For reentrant exit routines, the address of a 256-byte work area is passed in the
XPCB. The exit routine can use the work area to save information. One work area
exists for each exit routine, and it is initialized to binary zeros the first time the
exit routine is given control.
Table 16. XPCB by offset
Offset Field name Offset Field name Offset Field name
0 Eye catcher 4 Version 6 Release
64 Exit Routines
IBM Confidential
The XPCB points to the first XSDB. For path data, subsequent XSDBs are chained
together. The XSDB points to the updated data that is passed to the exit routine. It
contains additional information that is also passed. The following two tables
describe the contents of the XSDB.
Table 18. XSDB by offset
Offset Field name Offset Field name Offset Field name
0 Eye catcher 4 Version 6 Release
8 Next_Ptr 12 Database_Name 20 Segment_Name
28 Physical_Path 29 reserved 32 Segment_Level
34 Key_Length 36 Key_Ptr 40 LP_Key_Length
42 Segment_Length 44 Segment_Ptr 48 reserved
66 Exit Routines
IBM Confidential
Although the Data Capture exit routine can be written in assembler, C, COBOL, or
PL/I, you must follow certain guidelines depending on which language you use.
This topic presents those guidelines.
Assembler
The exit routine is entered in primary mode, but the access registers can be
nonzero.
C does not support variable-length character strings using integer lengths, such as
those passed in the XPCB and XSDB. Key and segment data passed to the exit
routine is terminated by “null” (binary zero) values. Any null value in the data
itself might result in an invalid string length.
The following declarations and statements are used to locate the XPCB. Declare
XPCB_TYPE_PTR as a pointer to the XPCB structure.
XPCB_TYPE_PTR *TPTR;
TPTR = (XPCB_TYPE_PTR *) __sysplist;
XPCB = *TPTR;
The exit routine must be defined as a main program with the PLIST(IMS) and
ENV(IMS) options specified. Use the following format to specify these options:
#pragma runopt(env(IMS), plist(IMS))
COBOL
The exit routine operates under a separate run unit from the application program.
The method used to establish the run unit depends on the compiler or on the
RES/NORES compiler option. For all COBOL programs compiled with newer
compilers, and older COBOL programs compiled with resident (RES), the exit
routine is given control by LINK. For older COBOL programs compiled with
nonresident (NORES), it is given control directly.
Recommendation: Use a compiler with RES and code the exit routine as reentrant
(RENT) and AMODE 31. With older compilers and NORES, the routine must be
AMODE 24 and it must not be reentrant.
Attention: You can use GOBACK to terminate the exit routine run unit and
return to the application program, but do not use STOP RUN and EXIT
PROGRAM because they are not supported and might cause unpredictable results
or abends.
PL/I
The exit routine must be compiled as a main program. The entry point can be
PLICALLA, so that the exit routine can use the assembler interface or use PL/I
compile-time option SYSTEM(IMS)
As your application program issues a DL/I call to update the database, the
updates are stored as required for use by the Data Capture exit routine or the
Asynchronous Data Capture. Because the amount of storage required can be
significant for update functions like a cascade delete, a data space is acquired for
each dependent region that uses the exit routine. The attributes of the data space
vary for online and batch-dependent regions, as illustrated in the following table.
Table 20. Data space characteristics (Data Capture exit routine and Asynchronous Data Capture)
Attribute Online Dependent Region Batch Dependent Region
Number of data spaces 1 per dependent region 1
Data space name SYSDFS01 @SYSDFS1
Storage key Key 7, not fetch protected to allow access from Key 8
dependent region in key 8
Storage size By region controller By region controller. Default
size used if space requested
violates total size of key 8
data spaces.
Storage obtained During region initialization During region initialization
if exit routines are defined
Storage owned By region controller TCB By batch TCB
Added to access list Dependent region address space, for access by program Batch TCB
controller TCB in message regions. Control regions SAS
address space for access by DL/I in an IMS DB/DC
system when data capture is required. DEDB capture
runs under program controller TCB.
Deleted from access list Dependent region always accessed. Deleted from control Not deleted
region SAS access list during thread termination if added
to access list by data capture.
Data space cleared During normal thread termination for message regions if Not cleared
data space storage was referenced.
68 Exit Routines
IBM Confidential
Table 20. Data space characteristics (Data Capture exit routine and Asynchronous Data Capture) (continued)
Attribute Online Dependent Region Batch Dependent Region
Data space deleted At region termination. At z/OS job termination
You can control the use of data spaces with the SMF IEFUSI Step Initiation exit
routine for key 8 batch regions. This exit routine determines the number and size
of the data space available for key 8. If you have batch application programs that
call the Data Capture exit routine, the data space specified for key 8 must be large
enough to accommodate the data space requirements of data capture.
Storage failure
Either type of storage failure terminates the region with a U814 abend.
Related reading: For more information about storage failure, see IMS Version 14
Messages and Codes, Volume 3: IMS Abend Codes.
The Data Capture exit routine is an extension of the application program with the
same capabilities as the application program; the exit routine and the application
have equal authorization and limitations. IMS and DB2 for z/OS resources that the
exit routine uses must be authorized in the IMS PSB or DB2 PLAN for the
application program. This behavior ensures that the application program can access
any IMS or DB2 for z/OS data that is available to the exit routine.
The data and the exit routine operate in unprotected, key-8 storage. The exit
routine is able to modify data or control blocks that can affect the successful
operation of the application program. The data passed to the exit routine is the
physical segment data. With PSB field sensitivity, this data might include data that
is unavailable to the application.
Related concepts:
Asynchronous data propagation (System Programming APIs)
Dynamic Exits Facility
IMS DataPropagator Introduction
Related reference:
INQY call (Application Programming APIs)
Examples of the DBDGEN utility (System Utilities)
This topic provides examples of the Data Capture exit routine in COBOL and PL/I.
The exit routine can also be written in assembler or C.
Subsections:
v “COBOL”
v “PL/I” on page 72
COBOL
The following example is the Data Capture exit routine in COBOL.
IDENTIFICATION DIVISION.
PROGRAM-ID. DLICDCE.
*---------------------------------------------------------------*
*REMARKS. *
*---------------------------------------------------------------*
* DESCRIPTIVE NAME : HOSPITAL DATA BASE SEGMENT EXIT *
*---------------------------------------------------------------*
* THIS IS A SAMPLE IMS EXIT. THIS WILL BE CALLED BY IMS. *
* THIS PROGRAM PROPAGATES DATA FROM IMS TO DB2 SYNCHRONOUSLY.*
* THE NAME OF THIS PROGRAM LOAD MODULE IS SPECIFIED *
* ON SEGM MACRO DURING DBDGEN FOR THE HOSPITAL DATA BASE. *
* *
* THE DATA OPTIONS SELECTED FOR THIS EXIT : *
* EXIT=(KEY,DATA,NOPATH,CASCADE) *
*---------------------------------------------------------------*
* INPUT FOR THIS PROGRAM : XPCB, XSDB. *
* *
* OUTPUT: DISPLAY A MESSAGE WHEN THE IMS UPDATE IS NOT *
* ISRT, REPL, DELE, CASC. DISPLAY ’SQLERRM’ WHEN *
* SQLERROR OCCURS. *
* *
* UPDATES: UPDATES DB2 ILLNESS TABLE *
*---------------------------------------------------------------*
* LOGIC: THIS PROGRAM IS CALLED BY IMS AFTER THE IMS UPDATE*
* TO ILLNESS SEGMENT AND BEFORE IMS RETURNS TO THE *
* IMS APPLICATION PROGRAM. *
* *
* XPCB IS RECEIVED AS INPUT TO THIS PROGRAM. *
* IF THERE IS NO ADDRESS OF XSDB IN XPCB THIS *
* PROGRAM WILL RETURNS TO IMS OTHERWISE - *
* *
* LOGIC: THIS PROGRAM IS CALLED BY IMS AFTER THE IMS UPDATE*
* WE GET THE ADDRESS OF XSDB FROM XPCB, FROM XSDB *
* WE GET THE ADDRESS OF ILLNESS SEGMENT CONCATENATED*
* KEY, AND ADDRESS OF THE PHYSICAL SEGMENT DATA *
* *
* UPDATE THE DB2 ILLNESS TABLE WITH THE UPDATED IMS *
* SEGMENT DATA. *
* --------------------------------------------------------------*
INSTALLATION. IBM - SANTA TERESA LABORATORY.
DATE-WRITTEN. JANUARY 1990.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-3090.
OBJECT-COMPUTER. IBM-3090.
DATA DIVISION.
WORKING-STORAGE SECTION.
EXEC SQL
INCLUDE SQLCA
END-EXEC. *--- DB2 ILLNESS TABLE DECLARATION
EXEC SQL
DECLARE [Link] TABLE
(ILLDATE VARCHAR (6) NOT NULL,
PATNO VARCHAR (5) NOT NULL,
ILLNAME VARCHAR (10) NOT NULL)
70 Exit Routines
IBM Confidential
END-EXEC.
*---
01 W-POINTER POINTER.
01 W-POINTER-R REDEFINES W-POINTER PIC 9(8) COMP.
LINKAGE SECTION.
*--- EXIT SEGMENT CONTROL BLOCK
01 XPCB.
05 EYECATCHER PIC X(04).
05 VERSION PIC X(02).
05 RELEASE-ID PIC X(02).
05 EXIT-NAME PIC X(08).
05 EXIT-RETURN-CODE PIC 9(04) COMP.
05 EXIT-REASON-CODE PIC 9(04) COMP.
05 DATABASE-NAME PIC X(08).
05 DBD-VERSION-PTR POINTER.
05 SEGMENT-NAME PIC X(08).
05 CALL-FUNCTION PIC X(04).
05 PHYSICAL-FUNCTION PIC X(04).
05 FILLER PIC 9(08) COMP.
05 DB-PCB-PTR POINTER.
05 DB-PCB-NAME PIC X(08).
05 INQY-OUTPUT-PTR POINTER.
05 IO-PCB-PTR POINTER.
05 ENVIRONMENT-FLAGS PIC X.
88 IMS-ENH-SUPPORT VALUE X’80’.
* RRS SUPPORT IS AVAILABLE IN SYSTEM
88 IMS-RRS-ENABLED VALUE X’40’.
* RRS=Y WAS SPECIFIED
88 CALL_AT_COMMIT VALUE X’20’.
* SET BY EXIT - CALL DURING COMMIT
88 XPCB_LOGX_FORMAT VALUE X’10’.
* REDUCED 9904 FORMAT
88 XPCB_EXIT_WAS_CALLED VALUE X’08’.
* INTERNAL FLAG USED BY IMS
88 XPCB_DPROP_EXIT VALUE X’04’.
* SET BY DPROP EXIT ROUTINE
05 FILLER PIC X.
* RESERVED
05 FILLER PIC 9(04) COMP.
05 CONC-KEY-LENGTH PIC 9(04) COMP.
05 CONC-KEY-PTR POINTER.
05 DATA-XSDB-PTR POINTER.
05 BEFORE-XSDB-PTR POINTER.
05 PATH-XSDB-PTR POINTER.
05 FILLER POINTER.
05 FILLER POINTER.
05 FILLER POINTER.
05 EXIT-WORK-PTR POINTER.
05 NULL-PTR POINTER.
05 FILLER POINTER.
05 TIMESTAMP PIC X(08).
*--- EXIT SEGMENT DATA BLOCK
01 DATA-XSDB.
05 EYECATCHER PIC X(4).
05 VERSION PIC X(2).
05 RELEASE-ID PIC X(2).
05 NEXT-PTR POINTER.
05 DATABASE-NAME PIC X(8).
05 SEGMENT-NAME PIC X(8).
05 FILLER PIC X(4).
05 SEGMENT-LEVEL PIC 9(4) COMP.
05 KEY-LENGTH PIC 9(4) COMP.
05 KEY-PTR POINTER.
05 FILLER PIC 9(4) COMP.
05 SEGMENT-LENGTH PIC 9(4) COMP.
05 SEGMENT-DATA-PTR POINTER.
05 FILLER POINTER.
05 FILLER POINTER.
*--- ILLNESS SEGMENT DATA
01 LS-SEGMENT.
01 XPCB-CONCKEY.
EXEC SQL
INSERT INTO [Link]
VALUES (::LS-ILLDATE,::LS-PATNO,
::LS-ILLNAME)
END-EXEC ELSE
IF PHYSICAL-FUNCTION OF XPCB = "CASC" OR
PHYSICAL-FUNCTION OF XPCB = "DLET"
EXEC SQL
DELETE FROM [Link]
WHERE (PATNO = ::LS-PATNO AND
ILLDATE = ::LS-ILLDATE)
END-EXEC
ELSE
EXEC SQL
UPDATE [Link]
SET ILLNAME = ::LS-ILLNAME
WHERE (ILLDATE = ::LS-ILLDATE AND
PATNO = ::LS-PATNO)
END-EXEC
ELSE
DISPLAY "SQLERRM".
MOVE 8 TO EXIT-RETURN-CODE OF XPCB.
MOVE SQLCODE TO EXIT-REASON-CODE OF XPCB.
GOBACK.
PL/I
72 Exit Routines
IBM Confidential
*---------------------------------------------------------------*
* THIS IS A SAMPLE IMS EXIT THAT WILL BE CALLED BY IMS. *
* THIS PROGRAM PROPAGATES DATA FROM IMS TO DB2 SYNCHRONOUSLY.*
* THE NAME OF THIS PROGRAM LOAD MODULE IS SPECIFIED *
* ON SEGM MACRO DURING DBDGEN FOR THE HOSPITAL DATA BASE. *
* *
* THE DATA OPTIONS SELECTED FOR THIS EXIT ARE: *
* EXIT=(DLI2DB2,PATH,DATA,(CASCADE,PATH,DATA,NOKEY) *
*---------------------------------------------------------------*
* *
* INPUT FOR THIS PROGRAM : XPCB, XSDB. *
* *
* OUTPUT: DISPLAY ’SQLERRM’ WHEN SQLERROR OCCURS. *
* UPDATES: UPDATES DB2 TREATMT TABLE *
* *
* : RETURNS REASON CODE 14 RETURN CODE 16 WHEN PATH *
* NOT SPECIFIED ON THE DBDGEN EXIT STATEMENT, *
* RESULTING IN AN ABEND U3314. *
* *
*---------------------------------------------------------------*
* LOGIC: THIS PROGRAM IS CALLED BY IMS AFTER AN UPDATE TO *
* THE TREATMT SEGMENT AND BEFORE IMS RETURNS TO *
* IMS APPLICATION PROGRAM. *
* *
* THE ADDRESS OF AN XPCB IS PASSED TO THIS PROGRAM *
* FROM IMS. THE XPCB WILL PROVIDE THE ADDRESSES OF *
* THE XSDB FOR DATA, PATH DATA AND BEFORE DATA. *
* *
* UPDATE THE DB2 TREATMT TABLE WITH THE UPDATED IMS *
* SEGMENT DATA. *
* *
* HOSPITAL *********** *
* DATA BASE * * *
* * PATIENT * KEY FIELD IS PATNO *
* * * *
* *********** *
* * *
* * *
* *********** *
* * * *
* * ILLNESS * KEY FIELD IS ILLDATE *
* * * *
* *********** *
* * *
* * *
* *********** KEY FIELD IS TRTDATE *
* * * FIELD, MEDICINE *
* * TREATMT * FIELD, QUANTITY *
* * * FIELD, DOCTOR (NOT IN DB2 TABLE) *
* *********** *
* *
* *
* TREATMENT TABLE *
* *
* *************************************************** *
* * PATNUMB * DATEILL * DATETRT * MEDICAT * AMOUNT * *
* *************************************************** *
* *
* --------------------------------------------------------------*
*/
/* *************************************************************** */
/* */
/* E X T E N D E D D A T A B A S E P C B -- X P C B */
/* */
/* **************************************************************** */
DECLARE
1 XPCB BASED(XPCB_PTR),
3 EYECATCHER CHAR(4), /* "XPCB" EYECATCHER */
3 VERSION CHAR(2), /* XPCB VERSION INDICATOR */
3 RELEASE CHAR(2), /* XPCB RELEASE INDICATOR */
3 EXIT_NAME CHAR(8), /* SEGMENT EXIT NAME */
3 EXIT_RETURN_CODE FIXED BINARY (15), /* RETURN CODE */
3 EXIT_REASON_CODE FIXED BINARY (15), /* REASON CODE */
3 ATABASE_NAME CHAR(8), /* PHYSICAL DATA BASE NAME */
3 DBD_VERSION_PTR POINTER, /* ADDRESS OF DBD VERSION ID */
3 SEGMENT_NAME CHAR(8), /* PHYSICAL SEGMENT NAME */
3 CALL_FUNCTION CHAR(4), /* CALL FUNCTION */
3 PHYSICAL_FUNCTION CHAR(4), /* DL/I PHYSICAL FUNCTION */
3 FILLER1 FIXED BINARY (31), /* RESERVED */
DECLARE
1 XSDB BASED(XSDB_PTR),
3 EYECATCHER CHAR(4), /* "XSDB" EYECATCHER */
3 VERSION CHAR(2), /* XSDB VERSION INDICATOR */
3 RELEASE CHAR(2), /* XSDB RELEASE INDICATOR */
3 NEXT_PTR POINTER, /* NEXT XSDB POINTER */
3 DATABASE_NAME CHAR(8), /* PHYSICAL DATA BASE NAME */
3 SEGMENT_NAME CHAR(8), /* PHYSICAL SEGMENT NAME */
3 FILLER1 CHAR(4), /* RESERVED */
3 SEGMENT_LEVEL FIXED BINARY (15), /* SEGMENT DATA BASE LEVEL */
3 KEY_LENGTH FIXED BINARY (15), /* LENGTH OF PHYSICAL KEY */
3 KEY_PTR POINTER, /* ADDRESS OF PHYSICAL KEY */
3 FILLER2 FIXED BINARY (15), /* RESERVED */
3 SEGMENT_LENGTH FIXED BINARY (15), /* LENGTH OF SEGMENT DATA */
3 SEGMENT_DATA_PTR POINTER, /* ADDRESS OF SEGMENT DATA */
3 FILLER3 POINTER, /* RESERVED */
3 FILLER4 POINTER, /* RESERVED */
3 FILLER5 POINTER; /* RESERVED FOR NULLS AT END */
74 Exit Routines
IBM Confidential
3 PATHSEG_NAME CHAR(10),
3 PATHSEG_ADDR CHAR(30); DECLARE
1 PATH2_XSDB LIKE XSDB BASED(PATH2_XSDB_PTR);
DECLARE /* PATIENT SEGMENT */
1 PATH2_DATA BASED(PATH2_XSDB.SEGMENT_DATA_PTR),
3 PATH2SEG_ILLDATE CHAR(6), /* SEGMENT KEY */
3 PATH2SEG_ILLNAME CHAR(10);
DECLARE PATH2_XSDB_PTR POINTER;
DECLARE /* TREATMENT TABLE ROW */
1 TREATROW BASED(XPCB.EXIT_WORK_PTR),
3 COL_PATNUM CHAR(5), /* FROM LEVEL 1 KEY */
3 COL_ILLDATE CHAR(6), /* FROM LEVEL 2 KEY */
3 COL_TRTDATE CHAR(6), /* FROM LEVEL 3 KEY */
3 COL_MEDICINE CHAR(10), /* FROM LEVEL 3 */
3 COL_QUANTITY CHAR(4); /* FROM LEVEL 3 */
EXEC SQL
INCLUDE SQLCA;
/* - DB2 TREATMENT TABLE DECLARATION */
EXEC SQL
DECLARE [Link] TABLE
(PATNUMB VARCHAR (5) NOT NULL,
DATEILL VARCHAR (6) NOT NULL,
DATETRT VARCHAR (6) NOT NULL,
MEDICAT VARCHAR (10) NOT NULL,
AMOUNT VARCHAR (4) NOT NULL);
PATH2_XSDB_PTR = PATH_XSDB.NEXT_PTR;
TREATROW.COL_PATNUM = PATH_DATA.PATHSEG_PATNO;
TREATROW.COL_ILLDATE = PATH2_DATA.PATH2SEG_ILLDATE;
TREATROW.COL_TRTDATE = SEGMENT_DATA.SEGMENT_DATA_TRTDATE;
TREATROW.COL_MEDICINE = SEGMENT_DATA.SEGMENT_DATA_MEDICINE;
TREATROW.COL_QUANTITY = SEGMENT_DATA.SEGMENT_DATA_QUANTITY;
EXEC SQL
WHENEVER SQLWARNING CONTINUE;
EXEC SQL
WHENEVER SQLERROR GOTO BADSQL;
EXEC SQL
WHENEVER NOT FOUND GOTO BADSQL;
IF XPCB.PATH_XSDB_PTR = XPCB.NULL_PTR
THEN DO;
GOTO BADPATH; /* PATH NOT SPECIFIED */
END; ELSE DO; /* PRE-SET CODES TO ZERO */
XPCB.EXIT_RETURN_CODE = ZERO;
XPCB.EXIT_REASON_CODE = ZERO;
END;
/*====================================*/
/* IF CALLED FOR DELETE OR CASCADE, */
/* PERFORM THE DB2 DELETE. */
/*====================================*/
IF XPCB.PHYSICAL_FUNCTION = DELETE_FUNCTION
THEN DO;
EXEC SQL
DELETE FROM [Link]
WHERE PATNUMB = ::TREATROW.COL_PATNUM AND
DATEILL = ::TREATROW.COL_ILLDATE AND
DATETRT = ::TREATROW.COL_TRTDATE;
END;
/*==========================================*/
/* IF CALLED FOR INSERT, DO DB2 INSERT CALL */
/*==========================================*/
IF XPCB.CALL_FUNCTION = INSERT_FUNCTION
THEN DO;
EXEC SQL
INSERT INTO [Link]
VALUES(::TREATROW.COL_PATNUM,
::TREATROW.COL_ILLDATE,
::TREATROW.COL_TRTDATE,
::TREATROW.COL_MEDICINE,
::TREATROW.COL_QUANTITY);
END;
/*=====================================*/
/* IF CALLED FOR REPLACE, UPDATE THE */
/* THE DB2 ROW, IF A FIELD DESTINED TO */
/* THE DB2 DATA BASE HAS BEEN CHANGED. */
/*=====================================*/
IF XPCB.CALL_FUNCTION = REPLACE_FUNCTION
THEN DO; /* REPLACE */
IF (SEGMENT_DATA.SEGMENT_DATA_MEDICINE ≠
BEFORE_DATA.BEFORE_DATA_MEDICINE) |
(SEGMENT_DATA.SEGMENT_DATA_QUANTITY ≠
BEFORE_DATA.BEFORE_DATA_QUANTITY)
THEN DO; /* UPDATE */
EXEC SQL
UPDATE [Link]
SET MEDICAT = ::SEGMENT_DATA.SEGMENT_DATA_MEDICINE,
AMOUNT = ::SEGMENT_DATA.SEGMENT_DATA_QUANTITY
WHERE PATNUMB = ::TREATROW.COL_PATNUM AND
DATEILL = ::TREATROW.COL_ILLDATE AND
DATETRT = ::TREATROW.COL_TRTDATE;
END; /* OF UPDATE */
END; /* OF REPLACE */
STOP;
BADSQL: DO; DISPLAY(SQLERRM);
XPCB.EXIT_RETURN_CODE = 16;
XPCB.EXIT_REASON_CODE = SQLCODE;
END;
BADPATH: DO;
XPCB.EXIT_RETURN_CODE = 16;
XPCB.EXIT_REASON_CODE = 14;
END;
END DLI2DB2B;
This topic provides examples of the XPCB in assembler, COBOL, and PL/I.
Subsections:
v “Assembler”
v “COBOL” on page 77
v “PL/I” on page 78
Assembler
76 Exit Routines
IBM Confidential
COBOL
05 FILLER POINTER.
05 EXIT-WORK-PTR POINTER.
05 NULL-PTR POINTER.
05 FILLER POINTER.
05 TIMESTAMP PIC X(08).
PL/I
This topic provides examples of the XSDB in assembler, COBOL, and PL/I.
78 Exit Routines
IBM Confidential
Subsections:
v “Assembler”
v “COBOL”
v “PL/I”
Assembler
COBOL
PL/I
The following code sample is an example of the XSDB in PL/I.
DECLARE
1 XSDB BASED(XSDB_PTR),
3 EYECATCHER CHAR(4), /* "XSDB" EYECATCHER */
3 VERSION CHAR(2), /* XSDB VERSION INDICATOR */
3 RELEASE CHAR(2), /* XSDB RELEASE INDICATOR */
3 NEXT_PTR POINTER, /* NEXT XSDB POINTER */
3 DATABASE_NAME CHAR(8), /* PHYSICAL DATA BASE NAME */
3 SEGMENT_NAME CHAR(8), /* PHYSICAL SEGMENT NAME */
3 FILLER1 CHAR(4), /* RESERVED */
3 SEGMENT_LEVEL FIXED BINARY (15), /* SEGMENT DATA BASE LEVEL */
3 KEY_LENGTH FIXED BINARY (15), /* LENGTH OF PHYSICAL KEY */
3 KEY_PTR POINTER, /* ADDRESS OF PHYSICAL KEY */
3 LP_KEY_LENGTH FIXED BINARY (15), /* RESERVED */
The Data Conversion user exit routine (DFSDBUX1) gets control at the beginning
of a DL/I call and at the end of the call. In the exit routine, you can modify
segment search arguments, the key feedback area, the I/O area, and the status
code.
Restriction: This exit routine gets control only for calls to full-function databases.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 81
v “Data security and integrity” on page 82
Regardless of its function, the exit routine must be written in assembler language,
C language, COBOL, or PL/I. Routines written in high-level languages running
under Language Environment for z/OS are not supported.
Bind the exit routine DFSDBUX1 with the RENT attribute into an APF-authorized
library. This library can be either [Link], [Link], or any
partitioned data set that can be accessed by a JOBLIB or a STEPLIB DD statement
for the IMS control, SAS, batch, or CICS region.
IMS attempts to load the exit routine on the first database call. If the exit routine
fails to load, IMS does not attempt to load it again.
Other considerations
A DBD generation is not required for IMS to call the exit routine.
80 Exit Routines
IBM Confidential
If you do not specify the DATXEXIT=YES parameter for a DBD, the call analyzer
(DFSDLA00) issues a DFS2097I message if the exit routine specifies that it should
continue to be called for that DBD. After issuing message DFS2097I, the call
analyzer DFSDLA00 dynamically sets the DATXEXIT parameter to YES for the
DBD and continues calling the exit routine. The DFS2097I message appears only
once per DBD.
If you bind an exit routine and want to prevent it from being called, remove the
DFSDBUX1 exit routine from the library in which you edited it.
If you use exit routine DFSDBUX1, it is loaded and called on each database call. If
you do not want to run the DFSDBUX1 exit routine for every database, create a
table in the DFSDBUX1 exit routine that includes the names of the databases you
want the routine to process every time it is called. When exit routine DFSDBUX1 is
called, it checks the table of database names. If a database name is not in that
table, the DFSDBUX1 exit routine flags that database with a X'FF' value in the JCB
when it first calls it, which indicates that the database is not processed further.
Preloading the exit routine is not necessary. After it is loaded, the exit routine
remains loaded until region termination.
IMS uses the general purpose registers and several IMS control blocks to
communicate with the DFSDBUX1 exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
0 The characters 'IN' at the start of the DL/I call and the characters 'OUT' at
the end of the DL/I call.
1 Address of the Partition Specification Table.
3 Address of the Database Program Communication Block (DBPCB).
5 Address of the PSB Directory (PDIR).
Register Contents
6 Address of the System Contents Directory (SCD).
7 Address of the Program Specification Block (PSB).
9 Address of the Job Control Block (JCB).
10 Address of the Segment Descriptor Block (SDB).
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore registers 0 through 14. The
value of Register 15 must be a 2-byte or less positive value set as follows:
Register Contents
0 The exit routine has successfully processed the request.
non-0 The exit routine has set a status code or pseudoabend.
The exit routine is an extension of the application program with the same
capabilities as the application program; the exit routine and the application have
equal authorization and limitations.
In batch, the data and the exit routine operate in unprotected key-8 storage.
Online, the data and the exit routine operate in unprotected key-7 storage. The exit
routine is able to modify data or control blocks that can affect the successful
operation of the application program.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 85
The DEDB Partition Selection exit routine is defined in the primary DEDB database
DBD when its secondary index databases are HISAM or SHISAM databases and
user partitioning is required.
82 Exit Routines
IBM Confidential
A logical HISAM or SHISAM partition index database can include one or multiple
partitions. The PSELOPT=MULT|SNGL parameter on either a PCB statement with
the PROCSEQD= parameter, or on a XDFLD statement, determines how partitions
are grouped in the index database.
The following naming rules apply to the DEDB Partition Selection exit routine:
v The exit routine name cannot be longer than 8 characters.
v The first character must be alphabetic.
v The remaining characters must be alphabetic, numeric, or #, @, $.
If the PSELRTN= parameter specifies a DEDB Partition Selection exit routine name
that violates one or more naming rules, the DBDGEN utility terminates with a
MNOTE 8 and message XDFLD235.
The PTDBINIT function is driven when a primary DEDB database that has a
DEDB Partition Selection exit routine defined in the PSELRTN= parameter on a
XDFLD statement is opened.
The PTDBTERM function is driven when a primary DEDB database that has a
DEDB Partition Selection exit routine defined in the PSELRTN= parameter on a
XDFLD statement is closed. A DEDB Partition Selection exit routine has similar
attributes as a DEDB randomizing module. Table 21 on page 84 summarizes the
attributes of a DEDB Partition Selection exit routine for HISAM or SHISAM
secondary index databases.
Each user partition database can be accessed as a separate database. In addition, all
user partition databases in a user partition group can be accessed as a separate
logical database using PSELRTN and PSELOPT=MULT|SNGL parameters.
The SENSEGS statements in a PCB with the PROCSEQD parameter for both
ACCESS=DB and ACCESS=INDEX are the same even though the primary DEDB
database is not accessed when ACCESS=INDEX is specified. This requirement
allows compatibility of PSBGEN utility and ACBGEN utility for ACCESS=DB and
ACCESS=INDEX.
The following table shows the attributes of the Data Entry Database Partition
Selection exit routine.
Table 21. Data Entry Database Partition Selection exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention The name given to the load module used for partition selection
should also appear in the DBD generation associated with the
database. The load module name must be the value of the “mod”
parameter of the PSELRTN= parameter on the XDFLD statement in
the DEDB DBD generation.
Link editing After you compile and test your routine, bind it into [Link],
[Link], or any operating system partitioned data set that can
be accessed by a JOBLIB or STEPLIB JCL statement for the IMS
control and SAS regions.
Including the No special steps are needed to include this routine.
routine
IMS callable services This exit routine is not eligible to use IMS callable services.
Sample routine [Link] (member name DBFPSE00).
location
One DEDB Partition Selection exit routine can be shared by both HISAM and
SHISAM secondary index databases. A DEDB Partition Selection exit routine
resides in the [Link], [Link], or any operating system partitioned
data set that can be accessed by a JOBLIB or STEPLIB JCL statement for the IMS
control and SAS regions.
When a primary DEDB database has a DEDB Partition Selection exit routine
defined in the PSELRTN= parameter, IMS loads the exit at IMS initialization or at
/START DB or UPDATE DB START(ACCESS) command if the exit has not been
loaded.
When a primary DEDB database is closed, its DEDB Partition Selection exit routine
is logically deleted. When all the primary DEDB databases sharing the DEDB
Partition Selection exit routine are closed, the DEDB Partition Selection exit routine
is physically deleted.
84 Exit Routines
IBM Confidential
IMS uses the entry registers, parameter list, and exit registers to communicate with
the routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list mapped by DBFPTDBP macro
13 Address of save area chain for use by this routine.
14 Return address of IMS.
15 Entry point of exit routine.
Before returning to IMS, the routine must restore all registers except for register 15,
which must contain one of the following:
The following table describes the parameter list for the DEDB Partition Selection
exit routine (mapped by DBFPTDBP). The DBFPTDBP parameter list macro is
located in the IMS macro target library SDFSMAC.
Related concepts:
DEDB partitioned secondary indexes (Database Administration)
Subsections:
v “About this routine” on page 86
v “Communicating with IMS” on page 87
Several DEDBs can share the same routine, but all AREAs in a DEDB must use the
same routine.
If you are using data sharing, you must use the same randomizing routine on both
systems.
The key field value is supplied by an application program in the data itself for
inserting segments into the database, and in an SSA (segment search argument) for
retrieving segments from a database.
You can write the routine and bind it as reentrant (RENT) like the one that IMS
supplies. The routine receives control and must return control in 31-bit addressing
mode (AMODE 31). It must be able to execute in cross-memory and TASK modes.
You must reassemble the modules you wrote for use with previous IMS releases
because of changes to the control blocks.
The following table shows the attributes of the Data Entry Database Randomizing
routine.
Table 22. Data Entry Database randomizing routine attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention The name given to the load module used for randomizing functions
with a specific database should also appear in the DBD generation
associated with the database. The load module name must be the
value of the “mod” parameter of the RMNAME= operand on the
DBD statement in the DEDB DBD generation.
Binding After you compile and test your randomizing module, bind it into
[Link], [Link], or any operating system partitioned
data set that can be accessed by a JOBLIB or STEPLIB JCL statement
for the IMS control and SAS regions.
Including the routine No special steps are needed to include this routine.
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine [Link] (member name DBFHDC40).
location
All randomizing modules are loaded from their resident library by IMS. The name
of the module is the name you specified in the RMNAME parameter of the DBD
statement of the database description (DBD).
86 Exit Routines
IBM Confidential
Related Reading: For details on coding the RMNAME parameter, see IMS Version
14 System Utilities.
You can use one copy of the randomizing module to service several databases that
are concurrently open. At initialization time, the randomizing module can be
placed in the main storage or the LPA (link pack area). When running under z/OS,
the randomizing module is loaded into the Common Service Area (CSA). If you
were to bind with RMODE ANY, you can load it into the Extended Common
Service Area (ECSA).
When an application program issues a Get Unique or Insert call that operates on a
root segment of a DEDB database, the user-supplied randomizing module is
activated.
The source of the root key that IMS supplies to the randomizing routine is as
follows:
v For a root insert, it is taken from the I/O area containing the root to be inserted.
v For a call qualified on the root key, it is the key value in the segment search
argument.
Related Reading: For information on processing Get Next (GN) calls qualified on
the root key and calls with root qualification that allow a range of key values, see
IMS Version 14 Application Programming.
The key is supplied to the randomizing module for conversion to a relative block
number and anchor point number within the database. In addition to the key
supplied by an application program, parameters from the DBD generation
associated with the database being used are available to the randomizing module.
IMS uses the entry and exit registers to communicate with the routine.
Register Contents
0 Number of entries in the MRMB (total number of AREAs in the DEDB).
1 Address of first MRMB the routine uses.
2 Size of an entry in the MRMB.
3 Address of the root key.
4 Length of the root key in bytes.
5 Total number of RAPs in the DEDB.
6 Address of an eight-word area that the randomizing module can use.
10 Address of the EPST (Extended Partition Specification Table).
11 Address of the ESCD (Extended System Content Directory).
13 Address of save area. The routine must not change the first three words
14 Return address to IMS.
Register Contents
15 Entry point of randomizing module.
The randomizing module must neither change the key value nor modify any
control blocks.
Note: When you run z/OS batch utilities (such as DBFUCDX0 or MSDB-to-DEDB
conversion), register 10 contains decimal -1 (X'FFFFFFFF') and register 11 contains
zeros. Specific utilities might have additional communication requirements.
Description of parameters
MRMB
To support the facility of randomizing within an AREA, the routine is passed
the address of a Randomizing Module Block (MRMB).
Each AREA has one 3-word entry. MRMB entries are built in the same order as
their associated AREA macros in the DBDGEN for the database. The content of
an entry is mapped by DBFMRMB macro and contains the following:
MRMB DSECT
MRMBARTD DS 0F START IS WORD-ALIGNED
MRMBARTC DS F ADDRESS OF THE AREA SELECTED
MRMBARTI DS F NUMBER OF ANCHOR POINTS IN THIS AREA
MRMBARTN DS F CUMULATIVE NUMBER OF ANCHOR POINTS
* IN ALL AREAS OF THE DEDB UP TO AND
* INCLUDING THIS ONE
MRMBARTZ DS 0F END OF THIS ENTRY, START OF NEXT
MRMBARTL EQU MBMBARTZ-MRMBARTD
* LENGTH OF A SINGLE ENTRY
Caller Environment
This field contains 4 byte characters to allow the XCI randomizer to distinguish
between the IMS online or OS batch caller. The value 'IMS ' indicates IMS
online caller, and the value 'OS ' indicates OS batch caller.
Before returning to IMS, your routine must restore all registers, except for registers
0, 1, and 15, which must contain the following:
Register Contents
0 Relative root anchor point number within the selected AREA (0 for first root
anchor point).
1 DMAC address of the AREA selected.
15 Return code interpreted as follows:
Return code Meaning
0 Register 1 contains the address of the area selected. If the area
is not contained in the DMCB or the HSSP sublist,
ABENDU1021 is issued.
4 Status 'FM' needs to be issued.
Any other return code causes ABENDU1021 to be issued.
When randomizing through the entire DEDB, the randomizing module must
derive an AREA and a relative root anchor point number to conform to the exit
interface. You can use the third word of the MRMB entry to accomplish this.
88 Exit Routines
IBM Confidential
Related concepts:
Chapter 1, “Guidelines for writing IMS exit routines,” on page 3
Related reference:
“Routine binding restrictions” on page 8
Database Description (DBD) Generation utility (System Utilities)
The extended call interface (XCI) option can be specified in the RMNAME=
parameter list in the DBD statement of a DBDGEN.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 90
The XCI option specifies that this DEDB uses the extended call interface when
making calls to the randomizer. This option allows the XCI randomizer to be called
in 3 different ways. On initialization of IMS, or during a /START DB command, IMS
will first load the randomizer and then make an 'INIT' call to the randomizer to
invoke its initialization routines. During a /DBR DB command, IMS will make a
'TERM' call to the randomizer to invoke the termination routines before unloading
the randomizer. The normal randomizing call is made when the application issues
a GU or ISRT call on a root segment. The XCI randomizer option is valid only for
DEDBs.
The attributes of the routine are the same as the non-XCI randomizer.
IMS uses the entry and exit registers to communicate with the routine.
Note: In an OS batch caller environment, you can set the values of the IMS name
and ECB address fields to zeros. These fields are normally used for randomizing,
initialization, and termination calls, but are not used in an OS batch caller
environment.
On entry for a randomizing call, register 0 contains the constant 'XCI ' (be sure to
include a space after the 'XCI').
Register 1 contains the address of the parameter list with the following layout.
Table 23. Sample Parameter List for a Randomizing Call
Hex
Contents
Offset
X'0' 0
X'4' Number of areas
X'8' Address of randomizing module block (MRMB)
X'C' Size of MRMB
X'10' Address of key
X'14' Key length
X'18' Total number of route anchor points (RAPs)
X'1C' Address of work area
X'20' Any user data
X'24' 0 (XCI parameter version field)
X'28' 8-byte IMS name with trailing blanks
X'30' IMS level, specified as the value of the &DFSLEV variable of the DFSLEV macro
X'34' 8-byte PSB name with trailing blanks
X'3C' 8-byte caller environment label with trailing blanks: IMS for an online IMS caller
or OS for an OS batch caller
On entry for an initialization call, register 0 contains the constant 'XCI ' (be sure to
include a space after the 'XCI').
Register 1 contains the address of the parameter list with the following layout.
Table 24. Sample Parameter List for an Initialization Call
Hex
Contents
Offset
X'0' 4
X'4' Address of the DEDB master control block (DMCB)
X'8' Address of an event control block (ECB)
X'B' Any user data
90 Exit Routines
IBM Confidential
On entry for a termination call, register 0 contains the constant 'XCI ' (be sure to
include a space after the 'XCI').
Register 1 contains the address of the parameter list with the following layout.
Table 25. Sample Parameter List for a Termination Call
Hex
Contents
Offset
X'0' 8
X'4' Address of the DEDB master control block (DMCB)
X'8' Address of an event control block (ECB)
X'B' Any user data
X'10' 0 (XCI parameter version field)
X'14' 8-byte IMS name with trailing blanks
X'1C' IMS level, specified as the value of the &DFSLEV variable of the DFSLEV macro
X'20' 8-byte caller environment label with trailing blanks: IMS for an online IMS caller
or OS for an OS batch caller
The content of the XCI parameter version field is determined by the version of IMS
that is using the XCI randomizer.
If the XCI randomizer runs on multiple versions of IMS, you must check the XCI
version number. The version number will be incremented when new fields are
added. Before accessing fields that are added with a new version number, the
version must be checked to ensure that the fields exist.
Register Contents
0 Relative root anchor point number within the selected AREA (0 for first root
anchor point).
1 DMAC address of the AREA selected.
Register Contents
15 Return code interpreted as follows:
Return Code Meaning
0 Register 1 contains the address of the area selected. If the area
is not contained in the DMCB or the HSSP sublist,
ABENDU1021 is issued.
4 Status 'FM' needs to be issued.
Any other return code causes ABENDU1021 to be issued.
Register Contents
1 Reason code for a non-zero return code.
15 Return code.
Register Contents
1 Reason code for a non-zero return code.
15 Return code.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 93
The routine performs a hashing function on the high-order three bytes of the
relative byte address (RBA) representing a CI and uses the hashing result as a
displacement into the hash table. If you are using IRLM in your system, the
routine IMS supplies (DBFLHSH0) or the replacement routine that you write
yourself is called automatically.
You can write the routine and bind it as reentrant (RENT) like the one supplied by
IMS. It receives control and must return control in 31-bit addressing mode. It must
be able to execute in cross-memory and TASK modes.
Important: All IMS systems sharing data must use the same hashing routine or the
contents of DEDBs might be lost. IMS does not check to ensure that the routines
are the same.
92 Exit Routines
IBM Confidential
The following table shows the attributes of the Data Entry Database Resource
Name Hash routine.
Table 26. Data Entry Database resource name hash routine attributes
Attribute Description
IMS environments DB/DC, DBCTL
Naming convention You must name this exit routine DBFLHSH0.
Binding After you compile and test the routine, bind it into [Link] or to the library
specified in the USERLIB= parameter of the IMSGEN macro statement.
Including the routine At system definition time, you must specify the name of your routine in the UHASH
parameter of the DBC, FDR, or IMS procedure.
Related Reading: For details, see the on the UHASH and the above procedures in IMS
Version 14 System Definition.
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine location [Link] (member name DBFLHSH0)
In a multiple-IMS environment, all IMS systems must use the same hashing routine
and compile that routine at the same time. If you write your own routine, you
must store the compile time in the module using &SYSDATE and &SYSTIME. You
also must place the address of the date and time in the first field of the routine's
CSECT.
IMS uses the entry registers and parameter list, and the exit registers to
communicate with the routine.
On entry, the routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of Extended Partition Specification Table (EPST).
13 Address of save area. The routine must not change the first three words.
14 Return address to IMS.
15 Entry point of hash routine.
Description of parameters
As input to the hashing routine, you need to supply one of the following:
v the high-order byte of an RBA.
v the names of both a database and an area.
Register 1 points to the extended program specification table (EPST) that contains
this input as follows:
EPST DSECT
The DSECT of the extended program specification table (EPST) (name: DBFEPST),
and the DEDB area control list (DMAC) (name: DBFDMAC) can be used. The
DMAC address is set at the EPSTDMAA field.
Related concepts:
Chapter 1, “Guidelines for writing IMS exit routines,” on page 3
Resource name hash routine (Database Administration)
94 Exit Routines
IBM Confidential
The following figure shows the layout of the hash value stored in EPSTRSHS using
the IMS-supplied routine DBFLHSH0.
The following table describes the segments within a hash value and their sizes.
Table 27. Segments of a hash value
Segment Description Size
A Bits 0 - 17 of EPSTRSHS 18 bits
B Bits 21 - 25 of CI RBN XOR'd 5 bits
COMB value
C Bits 26 - 29 of CI RBN ¹ 4 bits
D Bits 16 - 20 of CI RBN XOR'd 5 bits
COMB value ²
Note:
1. COMB VALUE (bits 3 - 7) = bits 11 - 15 of DMCB XOR'd with bits 7, 6, 5, 4,
and 3 of the area number.
2. CI RBN = RBA divided by the CI size.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 96
The DEDB Sequential Dependent Scan utility might change both the content and
length of the segments scanned. You can choose to sort or not to sort the segments.
If you do not write an exit routine, the Scan utility defaults to passing unchanged
segment contents through the range you have specified for scanning. If you do not
specify a limit on the range of segments that the utility can scan, the utility scans
and copies all of the dependent segments.
You can write the routine and bind it as reentrant (RENT) like the one supplied by
IMS. The routine receives control and must return control in 31-bit addressing. The
routine must be able to execute in cross-memory and TASK modes.
The following table shows the attributes of the Data Entry Database Sequential
Dependent Scan Utility exit routine.
Table 28. Data Entry Database sequential dependent scan utility exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention This exit routine has no specific naming requirements or restrictions;
standard naming conventions apply.
Link editing After you compile your routine, include it into [Link] or
into any operating system partitioned data set to which access is
provided with a JOBLIB or STEPLIB control region JCL statement.
Including the No special steps are needed to include this routine.
routine
IMS callable services This exit routine is not eligible to use IMS callable services.
If you want IMS to call your routine instead of the IMS-supplied routine
(DBFUMSE0), you must specify the name of your routine in the EXIT control
statement of the SYSIN DD data set of the Scan Utility JCL.
IMS uses the entry registers, parameter list, and exit registers to communicate with
the routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list. The parameter list is mapped by macro
DBFUTDW.
13 Address of save area. The exit routine must not change the first three words.
14 Return address of IMS.
15 Entry point of exit routine.
96 Exit Routines
IBM Confidential
Before returning to IMS, the routine must restore all registers except for register 15,
which must contain one of the following:
Related concepts:
Chapter 1, “Guidelines for writing IMS exit routines,” on page 3
Related reference:
“Exit routine naming conventions” on page 3
“Routine binding restrictions” on page 8
The following code sample is not a usable exit routine provided by IMS nor is it
found in [Link] library.
TITLE ’DBFUMSE1 IMS DEDB ONLINE UTILITY SCAN EXIT’
***********************************************************************
* *
* MODULE NAME : DBFUMSE1 *
* *
* TITLE : STANDARD EXIT FROM SCAN UTILITY *
* *
* CONTAINS RESTRICTED MATERIALS OF IBM *
* COPYRIGHT : REFERENCE MODULE DBFCOPYR *
* *
* ENTRY POINT(S)/PURPOSE : DBFUMSE1 *
* *
* FUNCTION : THIS IS A SAMPLE OF THE SCAN UTILITY USER EXIT. *
* ITS PURPOSE IS TO DEFINE THE INTERFACE BETWEEN *
* THE UTILITY AND THE EXIT. IT IS NOT INTENDED TO *
* BE A USABLE EXIT. IN THIS EXAMPLE, OUTPUT TO THE *
* SCAN DATASET IS SUPPRESSED IF THE SEGMENT BEGINS *
* WITH HEX ZEROES. *
* *
* ENTRY INTERFACES: *
* *
* REGISTERS AT ENTRY : R1 ADDRESS OF USER PARAMETER LIST *
* R13 ADDRESS OF SAVE AREA *
* R14 ADDRESS OF RETURN POINT *
* R15 ADDRESS OF ENTRY POINT *
* REGISTERS ARE SAVED AND RESTORED BY THE *
* CALLING MODULES. *
* *
* CONTENT OF PARAMETER LIST (UTDWUSER) : *
* UTDWDATA - ADDRESS OF SEGMENT (FULLWORD) *
* ZERO AFTER LAST SEGMENT *
* 1. AT ENTRY ADDRESS OF SEGMENT *
* 2. AT EXIT ADDRESS OF DATA TO BE *
* PICKED UP AND PUT INTO SCAN *
* OUTPUT DATA SET REFERRED TO *
* BY SCANCOPY DD CARD. *
* UTDWMIN - MINIMUM LENGTH OF SEGMENT (HALFWORD) *
* AS IN DBD-GENERATION *
* UTDWMAX - MAXIMUM LENGTH OF SEGMENT (HALFWORD) *
* AS IN DBD-GENERATION *
98 Exit Routines
IBM Confidential
Subsections:
v “About this routine”
v “Communicating with IMS” on page 101
You can specify the name of the HALDB Partition Selection exit routine during
DBD generation, with the HALDB Partition Definition utility, or on the DBRC
[Link] command.
Use one of the following options to specify the name of the exit routine:
v During DBD generation, use the PSNAME keyword.
v With the HALDB Partition Definition utility, specify the exit routine name as the
Partition Selection name.
v Use the PARTSEL keyword on the DBRC [Link] command when you register a
HALDB database with DBRC.
If you do not specify an exit routine, IMS selects a partition using the high key
method and does not invoke the HALDB Partition Selection exit routine.
The following table shows the attributes of the HALDB Partition Selection exit
routine.
Table 29. HALDB partition selection exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention
The name given to the load module used for partition selection
appears in the DBD associated with the database, the HALDB
Partition Definition utility, or the DBRC [Link] command. The
load module name must be the value of the parameter of the
PSNAME operand on the DBD statement, Partition Selection name
in the HALDB Partition Definition utility, or value of the parameter
PARTSEL on the DBRC [Link] command.
One HALDB Parttion Selection exit routine can be shared by multiple HALDBs. A
HALDB Partition Selection exit routine can be placed in the [Link],
[Link], or any operating system partitioned data set that can be accessed
by a JOBLIB or STEPLIB JCL statement for the IMS control region and SAS region.
When a HALDB definition in the RECON data set includes a HALDB Partition
Selection exit routine definition, IMS loads the exit during IMS initialization if the
HALDB is resident, during the first application scheduling if the HALDB is
non-resident, or at the /START DB partition_name OPEN or UPDATE DB
NAME(partition_name) START(ACCESS) OPTION(OPEN) command if the exit has
not already been loaded.
When a HALDB Partition Selection exit routine is not loaded, you can update or
refresh the exit routine in the library where it is stored.
The HALDB Partition Selection exit routine receives control during modification of
the internal partition definition control block and when a DL/I call requires the
selection of a partition. The following processing activities activate the HALDB
Partition Selection exit routine:
v Control block initialization
v Control block termination
v Control block modification
IMS calls a HALDB Partition Selection exit routine when an exit routine is
specified for the database. When the internal partition definition control blocks are
created, modified, or terminated, this call to the exit routine allows your exit to be
aware of the current configuration of the HALDB partitions and to have some
influence on its validity for subsequent DL/I processing. The initialization call that
indicates that the control blocks were created occurs prior to authorizing and
opening the partition data sets.
The following factors determine whether your HALDB Partition Selection exit
routine is called in cross-memory mode:
v The IMS environment, either online (DLI) or batch (DBB)
v The call type, either control block manipulation or partition selection
IMS communicates with the HALDB Partition Selection exit routine through the
entry registers.
The HALDB Partition Selection exit routine is called with the following registers
established:
Register
Contents
1 Specifies the address of the parameter list that identifies the call. The
parameters are:
1 A full word that contains the number of parameters in the list. The
value of 2 is specified.
2 The Exit Communication Area that is mapped by DFSPECA.
3 The Partition Definition Area that is mapped by DFSPDA.
13 Address of a standard save area. Four pre-chained save areas are provided
for this exit routine to use.
14 Return address to IMS.
15 Exit entry point address.
Area mapping
DFSPECA
Partition Exit Communication Area Mapping. Dynamically initialized from
static storage.
DFSPDA
Partition Definition Area Mapping. Allocated and initialized during
internal partition definition control block initialization.
Depending on the call reason and call history, IMS takes certain actions when
return code 12 is received from the HALDB Partition Selection exit routine. The
rules are as follows:
1. When the exit routine is called for control block initialization, termination, or
modification (rebuild), the return codes can be 0, 4, or 8. A return code of 12 or
above is not supported. The return code from a control block termination
(PECTERM) call is ignored by IMS if it is 0, 4, or 8 (12 and above are not
supported). IMS terminates the control block in all cases when the return code
is 0, 4, or 8 for the PECTERM call.
2. When the exit routine is called for partition selection, return codes 0, 4, 8, and
12 are supported. If the partition selection is "Select Next", return code 12 from
the exit routine indicates that no partitions are available. If the partition
selection is "Select Target" or "Select First", return code 12 indicates a request
for ABEND 3499.
3. When the exit routine is called for any partition selection, a check is made to
see whether any prior call from the control block initialization, termination, and
rebuild has resulted in a pending request for ABEND 3499. If such a request
has been made, ABEND 3499 is issued.
Related tasks:
Creating HALDB databases with the HALDB Partition Definition utility
(Database Administration)
Related reference:
“Routine binding restrictions” on page 8
Be aware that the actual partition selection processing in the sample DFSPSE00 is
based on a high key value and not a user defined string value. The sample exit is
written in assembler language and located in the IMS Sample library.
The sample exit routine demonstrates the use of the interface and control blocks.
The sample exit performs partition selection processing by using partition high key.
The DFSPECA storage area is dynamically initialized from static storage for each
invocation of the HALDB Partition Selection exit routine. The DFSPECA DSECT
can be obtained by assembling DFSPSEIB.
Note: The user exit can set PECFLAG2 to any value, but that value is not
preserved across calls to the exit routine.
PECVRSN
A halfword with the value PECURVER that is set by IMS before invoking
the partition selection exit. The user exit can check the version number in
PECVRSN with the constant PECURVER to ensure it is using the same or
higher version of the DFSPECA control block passed by IMS. If the
PECVRSN value is less than PECURVER value, a mismatch exists because
the exit has been compiled with a higher version of the DFSPECA than the
one used by IMS.
PECUSER
Dynamic work area for exit use. This work area storage is not preserved
across calls to the exit routine.
The DFSPDA storage area is allocated and initialized during initialization of the
internal partition definition control block. DFSPDA storage area is maintained until
the control block changes. Any control block change causes the storage to be
released and a new area allocated and initialized. Each invocation of the HALDB
Partition Selection exit routine passes the DFSPDA area. The DFSPDA DSECT can
be obtained by assembling DFSPSEIB.
PDAPLEN
The length of the Partition Definition Area Prefix.
Subsections:
v “About these routines” on page 106
v “Communicating with IMS” on page 108
v “Sample HDAM and PHDAM randomizing routines” on page 110
Several databases can share the same routine, but each of those databases must be
associated with a single randomizing routine. If you are using data sharing, you
must use the same randomizing routine on all systems that share a given database.
The key field value is supplied by an application program in the data itself for
inserting segments into the database and in an application program in an SSA
(segment search argument) for retrieving segments from a database.
Four randomizing modules are supplied with IMS. Although four are supplied,
DFSHDC40 is the only one recommended for use. You can use this one or write
your own randomizing module.
Related Reading: To help you determine the module that best meets your need,
see IMS Version 14 Database Administration.
If you write your own module, follow the guidelines included in this topic.
The following table shows the attributes of the HDAM and PHDAM Randomizing
routine.
Table 30. HDAM and PHDAM randomizing routine attributes
Attribute Description
IMS environments DB/DC and DBCTL.
Naming convention
The name you give to the load module used for randomizing
functions with a specific database must appear in the DBD
generation associated with the database. The load module name
must be the value of the “mod” parameter of the RMNAME=
operand on the DBD statement in the HDAM and PHDAM DBD
generation.
To ensure that the routines run as they did in prior IMS releases,
bind them as neither reentrant nor reusable.
Including the routine No special steps are needed to include this routine.
IMS callable services This exit routine is not eligible to use IMS callable services.
You must write, compile, and bind the randomizing module as one of the
following:
REENTRANT
IMS does not serialize the database before calling the routine. A single
copy of the routine is used for the databases.
REUSABLE
IMS serializes the database before calling the routine. If the routine is used
for multiple databases, it must be written and compiled as reentrant, even
if it is not bound as reentrant.
NONREUSE
IMS serializes the database before calling the routine. Each database has its
own copy of the routine.
All modules receive control and must return control in 31-bit addressing mode.
They must be able to execute in cross-memory and task modes.
IMS loads all randomizing modules from their resident library when the database
is opened. IMS obtains the name of the randomizing module from the name you
have specified in the RMNAME parameter of the DBD statement of the database
description (DBD).
Related Reading: For details on coding the RMNAME parameter, see IMS Version
14 Database Utilities.
If you use any of the Local Storage Options (LSO), the randomizing module is
loaded in CTL or DL/I SAS private storage. Otherwise, the module is loaded into
CSA.
When an application program issues a Get Unique or Insert call that operates on a
root segment of an HDAM and PHDAM database, the randomizing module is
called.
The source of the root key that IMS supplies to the randomizing routine is as
follows:
v For a root insert, IMS takes the key from the I/O area containing the root to be
inserted.
v For a call qualified on the root key, IMS uses the key value in the segment
search argument.
Related Reading: For information on processing Get Next (GN) calls qualified on
the root key and calls with root qualification that allows a range of key values, see
IMS Version 14 Application Programming.
The key is supplied to the randomizing module for conversion to a relative block
number and anchor point number within the database. In addition to the key
supplied by an application program, parameters from the DBD generation for the
database are available to the randomizing module.
IMS uses the entry and exit registers to communicate with the randomizing
routine.
On entry, the randomizing routine must save all registers using the provided save
area. The registers contain the following:
Register Content
0 Address of Data Management Block (DMB).
1 Address of the DMBDACS CSECT.
7 Address of Partition Specification Table (PST).
9 Address of first byte of key field value supplied by an application program.
13 Address of save area. The exit routine must not change the first three words.
14 Return to IMS address.
15 Entry point of randomizing module.
If an HDAM and PHDAM database does not have a sequence field defined:
v The executable key length field in the CSECT named RDMVTAB is not
initialized and must not be used.
v The value in register 9 module contains the address of the first byte of the
segment.
If an HDAM and PHDAM database does not have a sequence field defined at the
root level, the randomizing module is given control on an insert call. All retrieval
calls result in a scan of the root-level qualification. On Get Unique (GU) calls, the
scan starts at the beginning of the database. On Get Next (GN) calls, the scan starts
at the current root-level position within the database.
The randomizing module is invoked on Get calls, particularly when the database
contains a secondary index or a logical relationship. The randomizing module
must produce the same results on the Get call as it did on the Insert call.
The first eight words of the PST are available to the randomizing module as a
work area. These words are also used by DL/I and must not be used by other exit
routines. If an additional work area is needed, CSECT RDMVTAB can be expanded
to provide additional space.
Internal IMS control blocks that can be of value to a randomizing routine are the
Partition Specification Table (PST), the Physical Segment Description Block (PSDB)
for the root segment, and the first Field Description Block (FDB). The FDB is the
root segment key field format description.
108 Exit Routines
IBM Confidential
Description of parameters
The parameters from DBD generation are available to randomizing modules. Their
area is described by the DMBDACS DSECT. It contains information such as the
randomizing routine's name, anchor point information, and the total area length.
You can extend the area by an assembly and bind process to contain any data or
algorithm information.
The root 32 bytes of the RDMVTAB CSECT (described by the DMBDACS DSECT)
contains constants defined by DBDGEN. If you extend the area to include
additional parameters, this field must be duplicated. The DMBDASZE field must
be updated to reflect the total length of this area (including the added parameters).
After assembly, you can bind the expanded RDMVTAB CSECT to replace the old
one. Use an ENTRY statement specifying the name of the DBD and an ORDER
statement to make sure the original order of the multiple CSECTs is maintained.
For more information, see information on the z/OS binder and loader in the z/OS
product library.
The following DSECT defines the format of the area pointed to by register 1:
DMBDACS DSECT
DMBDANME DS CL8 NAME OF ADDR ALGORITHM LOAD MODULE
DMBDAKL DS CL1 EXECUTABLE KEY LENGTH OF ROOT
DS CL3
DMBDASZE DS H SIZE OF THIS CSECT
DMBDARAP DS H NUMBER OF ROOT ANCHOR POINTS/BLOCK
DMBDABLK DS F NUM OF HIGHEST BLOCK DIRECTLY ADDRSD
DMBDABYM DS F MAX NUMBER OF BYTES BEFORE OFLOW TO
2NDARY
DMBDARC DS CL1 RETURN CODE FROM RANDOMIZER
DS CL3 RESERVED
DMBDACP DS F RESULT OF LAST ADDRESS CONVERSION
Before returning to IMS, the randomizing routine must restore all registers. The
parameter list pointed to by register 1 can contain one of the following return
codes:
For any randomizing routine that passes these return codes, ensure that application
programs that use the database can accept the return codes.
The return code from a randomizing module can be in either character or binary
form. In other words, X'F0' and X'0' are both valid for a return code of zero. This
return code must be placed in the DMBDARC field of the CSECT addressed by
register 1.
You do not need to explicitly set a return code of zero in DMBDARC, because it is
the default return code and the field is preset to zero.
The result of a randomizing module conversion must be in the form BBBR where
BBB is a 3-byte binary number of the block into which a root segment is inserted
or from which it is retrieved and R is a 1-byte binary number of the appropriate
anchor point, within a relative block, within a data set of the database.
This result must be placed in the CSECT addressed by register 1 in the 4-byte fixed
name DMBDACP. If the result exceeds the content of the field DMBDABLK, the
result is changed to the highest block and last anchor point of that block.
Module DFSHDC40 is recommended; the source code for all four modules resides
in the [Link] library. The next provides guidelines for using the sample
module, DFSHDC40.
If root keys are unique and totally random storage is desired, this routine can be
used for any HDAM and PHDAM database without performing an analysis of key
distributions.
This randomizing routine works with the entire key and has the following
characteristics:
v It is reentrant.
v Keys can contain any of the 256 characters, and key length can be from 1 to 256
bytes.
v It converts any key distribution (with unique key values) to a totally random
address distribution.
v It never returns an address in block 1, which is always a bit map block in
HDAM and PHDAM. You can specify any number of blocks and RAPs.
v The number of blocks must be in the range between 2 and 224-1; the number of
RAPs must be in the range of 2 to 231-1 when RAPs are multiplied by blocks.
The RBN subparameter of the RMNAME= parameter of the DBD statement
must be specified for the upper limit, together with DFSHDC40 as the “mod”
subparameter, if this randomizing routine is chosen.
v It allows the insertion of a dummy root at the highest block-RAP to ensure the
formatting of the entire root addressable area at load time.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 113
Two options are available to the Database Manager to control the volume of entries
in secondary index databases: the NULLVAL operand and the index maintenance
exit routine. To build and maintain a sparse index, you can use suppression of
indexing, the process of withholding a prospective index pointer segment from the
index.
Use the NULLVAL operand to suppress indexing when the entire indexed field
contains one specified character or value. For example, you might want to use
NULLVAL to suppress indexing when the indexed field contains only blanks. A
different NULLVAL can be specified for each indexed segment.
If you bind this exit routine as reentrant (RENT), it must be truly reentrant (it
cannot depend on any information from a previous invocation and it cannot store
into itself).
If you bind this exit routine as reusable (REUSE), it must be truly reusable (it
cannot depend on any information in itself from a previous call), but it can depend
on information that it saves in the specific database segment block that is passed to
it. In addition, if the same exit routine is used for two different segments, the
single copy of the exit can be called concurrently for each segment. In this case, the
exit routine must be written as reentrant.
If you bind this exit routine so that it is neither RENT nor REUSE, it can store into
itself and depend on the information saved in the database segment block that is
passed to it.
The following table shows the attributes of the Secondary Index Database
Maintenance exit routine.
Table 31. Secondary index database maintenance exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention Each exit routine must have a name unique with respect to all IMS module names and
to any other exit routines in the IMS libraries. The name of this exit routine is specified
for each DBD with the EXTRTN parameter of the XDFLD statement submitted to the
DBDGEN utility.
Before an index source segment in a database can be loaded or updated, its EXTRTN
routine must be in the system library.
Link editing After an exit routine has been compiled and tested, it can be placed into the
[Link] data set, from which it is loaded by IMS. It can also be placed in
[Link], or in any operating system partitioned data set to which access is
provided with a JOBLIB or STEPLIB JCL statement.
Including the routine No special steps are need to include this routine.
IMS callable services This exit routine is not eligible to use IMS callable services.
The first time that an exit routine associated with the specific database is
referenced, it is loaded into storage in either the IMS online control program region
or batch processing region when the associated database is opened. The loaded
routine will be used by any other databases that require the same exit routine. This
allows one copy of the module to service several databases that are open
concurrently. The routine is not refreshed during the current IMS execution.
When an index maintenance exit routine is used in either the IMS online control
region or a DL/I batch processing region and the exit routine does not exist in
LINKPACK, you must provide space in the IMS control region or in the DL/I
separate address space (DLISAS) to accommodate the exit routines that can be
used for online databases.
DLET call
ISRT call
In the case of ISRT, the indexing segment is built to correspond to the segment to
be inserted, and the null value test and the exit routine tests are performed. If no
suppression of indexing is indicated by either, it is inserted into the index.
REPL call
A REPL call can be a combination of a DLET call and an ISRT call, a simple
replace, or a NOP, depending on the fields changed in the replace. If a field in the
Index Source Segment (ISS) is changed by a REPL call that changes the indexed
data or subsequent data, the existing indexing segment is deleted and a new one
inserted. The index edit routine is invoked for each operation. If the change in the
ISS affects a source data field, a replace operation on the indexing segment is
executed, unless the index exit routine indicated that indexing was suppressed. If
the ISS replace made no changes in the indexing segment, no action is taken.
The suppression of indexing by the exit routine must be consistent. The same
indexing segment cannot be examined at two different times and have suppression
indicated only once. If the indexing segment contains user data, this user data
cannot be used to evaluate suppression, since the actual indexing segment is seen
by the exit routine just before the insertion of a new one. In the cases of replace
and delete, only a prototype is passed. The prototype contains the constant,
indexed data, subsequence data, duplicate data, and any symbolic pointer that was
added. Therefore, index suppression must not be based on any user data.
The exit routine issues a return code and indicates either that the present index
pointer segment belongs in the index or that it should be suppressed. The exit
routine must not change any IMS control blocks, or any fields in the indexing
segment.
You can include additional information about the segment in the exit routine
CSECT. This CSECT is part of the DBD, and as such can be replaced by a bind. It
is of variable-length and contains a fixed-format header. A separate CSECT is
provided for each XDFLD in the DBD for which an exit routine is specified. The
availability of this CSECT is described in the exit routine specifications. You can
replace this control section in the same manner as you can the segment
compression control section.
IMS communicates with the exit routine through the entry and exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of Partition Specification Table (PST).
Register Contents
2 Address of proposed or existing index segment.
3 Address of Index Maintenance Routine Parameters CSECT.
4 Address of Index Source Segment.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Description of parameters
On entry to the routine, IMS passes the address of the CSECT shown in the
following figure.
0
Indexed segment name
8
Indexed field (XDFLD) name
16
Indexed Maintenance
exit routine name
24
Entry point address
28
CSECT length RSVD
32
User data
Before returning to IMS, the exit routine must restore all registers except register
15, which contains one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
The following secondary index database maintenance exit routine example is not a
usable exit routine provided by IMS, nor is it found in the [Link] library.
SAMPLE TITLE ’SAMPLE OF SECONDARY INDEX EXIT ROUTINE’
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* SAMPLE OF SECONDARY INDEX DATA BASE MAINTENANCE EXIT ROUTINE *
* *
* THIS SAMPLE IS NOT INTENDED TO BE A USABLE EXIT ROUTINE. *
* IT IS PROVIDED HERE TO SHOW ENTRY AND EXIT CODE. *
* THIS SAMPLE SUPPRESSES THE INDEX ENTRY IF ALL BYTES OF THE *
* INDEX KEY ARE BLANK. *
* *
* *
* REGISTERS ON ENTRY *
* R1 - PARTITION SPECIFICATION TABLE (PST) ADDRESS *
* R2 - ADDRESS OF (PROPOSED OR EXISTING) INDEX SEGMENT *
* R3 - ADDRESS OF INDEX MAINTENANCE ROUTINE PARMS CSECT *
* R4 - ADDRESS OF INDEX SOURCE SEGMENT *
* R13 - SAVE AREA ADDRESS *
* R14 - RETURN ADDRESS *
* R15 - ENTRY ADDRESS *
* *
* REGISTERS ON EXIT *
* R15 - 0 TO NOT SUPPRESS THE INDEX ENTRY *
* - 4 TO SUPPRESS THE INDEX ENTRY *
* R0 THRU R13 ARE RESTORED *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
INDEXXIT CSECT
STM R14,R12,12(R13) SAVE REGISTERS 14 THRU 12
L R13,8(R13) SET 13 TO NEXT IMS PRE-CHAINED SAVE SET
LR R12,R15 SET 12 AS BASE
USING INDEXXIT,R12 USE R12 AS BASE FOR PROGRAM
USING PST,R1 USE R1 AS BASE FOR PST
USING XRECORD,R2 USE R2 AS BASE FOR INDEX RECORD
USING DMBXMPRM,R3 USE R3 AS BASE FOR INDEX CSECT
USING XSOURCE,R4 USE R4 AS BASE FOR INDEX SOURCE SEGMENT
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* LOGIC SHOULD BE PROVIDED HERE TO DECIDE WHETHER THE INDEX RECORD *
* SHOULD BE SUPPRESSED. *
* *
* THE FOLLOWING CODE WILL TEST WHETHER THE KEY OF THE INDEX *
* RECORD IS ALL BLANK. IF THE FIELD IS ALL BLANK, THE INDEX ENTRY *
* WILL BE SUPPRESSED. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
CLC XFIELD1,BLANKS IS FIELD BLANK
BE SUPPRESS YES, SUPPRESS INDEX FOR FIELD
B NOSUPP NO, ALLOW INDEX FOR FIELD
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* SUPPRESS RETURN, SET 4 IN R15 TO TELL IMS TO SUPPRESS THE ENTRY *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
SUPPRESS DS 0H
L R13,4(R13) BACK UP TO PRIOR SAVE AREA
RETURN (14,12),RC=4 RETURN WITH 4 IN R15
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* NORMAL RETURN, SET 0 IN R15 TO TELL IMS TO NOT SUPPRESS THE INDEX *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
NOSUPP DS 0H
L R13,4(R13) BACK UP TO PRIOR SAVE AREA
RETURN (14,12),RC=0 RETURN WITH 0 IN R15
SPACE 2
BLANKS DC CL255’ ’ CONSTANT OF 255 BLANKS
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* GENERATE DSECT FOR THE INDEX RECORD *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
XRECORD DSECT
XFIELD1 DS CL5
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* GENERATE DSECT FOR THE INDEX SOURCE SEGMENT *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
XSOURCE DSECT DSECT FOR INDEX SOURCE SEGMENT
XSFIELD1 DS CL5 FIELD 1 OF INDEX SOURCE SEGMENT
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* DSECT FOR INDEX MAINTENANCE EXIT ROUTINE PARAMETER CSECT *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
DMBXMPRM DSECT
DMBXMSGN DS CL8 NAME OF INDEXED SEGMENT
DMBXMXDN DS CL8 NAME OF INDEXED FIELD
DMBXMXNM DS CL8 NAME OF USER EXIT ROUTINE
DMBXMXEP DS A EXIT ROUTINE ENTRY POINT ADDRESS
DMBXMPLN DS H TOTAL LENGTH OF CSECT
DS H NOT USED
DMBUSERD DS C START OF USER DATA IF ANY
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* GENERATE DSECT FOR THE IMS PST WHICH IS PASSED IN R1 *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
PRINT NOGEN
IDLI PSTBASE=0
PRINT GEN
SPACE 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* GENERATE EQUATES FOR SYMBOLIC REGISTERS *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPACE 1
REQUATE
SPACE 2
END
This topic describes the segment edit/compression exit routine, its attributes, how
to activate it, how the routine communicates with IMS, and the restrictions that
apply. The topic also provides a description of sample segment
compression/expansion modules.
Subsections:
v “About this routine”
v “Restrictions” on page 124
v “Communicating with IMS” on page 124
Segment compression saves space and can result in reduced logging. You can write
an exit routine to:
v Edit or compress both fixed- and variable-length segments
v Accomplish either data edit/compression (DEDBs or full-function databases) or
key edit/compression (full-function databases only).
If you write your own exit routine, you can also allow for editing, such as
encoding and decoding segments for security purposes, and for validating and
formatting data. The logic for data encoding and decoding (or for other desired
editing or formatting) can be based on information contained within the
user-written routine itself. It also can be based on information from an external
source, such as data provided in the DBD block, or from tables examined at
execution time.
Segment compression is possible for both full-function databases and data entry
databases (DEDBs). You can use either DFSCMPX0 or DFSKMPX0, write your own,
or generate one which invokes hardware data compression.
You can apply the same exit routine to multiple segment types within the same or
different databases.
Related Reading: For a list of the specific full-function databases that are
supported and for additional guidance-level information, see IMS Version 14
Database Administration.
Related Reading: For details on coding the EXPANDSEG command, see IMS
Version 14 Database Utilities.
The following table shows the attributes of the segment edit/compression exit
routine.
The following list describes the attributes of the segment edit/compression exit
routine.
Minimum Authorization
Supervisor state in key 7.
APF Authorization
Must reside in either in [Link], [Link], or in an authorized
PDS library specified in JOBLIB or STEPLIB. It can also reside in any
library specified in LNKLSTxx of [Link]. It can be in [Link]
only if the library is included in IEAAPFxx of [Link].
Cross Memory Mode
Exit can be entered in cross-memory mode in the online environment but
not in batch mode.
AMODE, RMODE
Exit resides in 24-bit and can be entered only in 24-bit.
Handling Abnormal Conditions
Any error conditions that are returned by system services on
compression/expansion are handled by the sample routine DFSCMPX0,
which sets register 0 and register 15 with abend code 2990 and reason code
before returning to caller. See the reason codes in Table 26. However, the
action modules normally pseudoabend the application with a U840 abend.
the routine between consecutive calls to the exit. IMS loads the routine
once per segment reference. If the exit is link-edited as reusable (REUS),
the same physical copy of the load module in storage is used to satisfy all
load requests. Because IMS calls the exit by branch and link, there is no
operating system serialization of exit calls. IMS internally serializes calls to
full-function database compression exits at the database level and calls to
HALDB database compression exits at the partition level. If the same exit
name is used across more than one database or is used in a HALDB
database organization, the exit must either be coded and link-edited
(bound) as reentrant and reusable, or it must be coded as reusable but
link-edited as not-reusable. If the exit is link-edited as not-reusable, a
separate copy of the exit is loaded for each segment reference and used
only by that segment reference. Code and bind the exit as reentrant so that
it is serially reusable. The exit can be bound as RENT, REUS, as REUS, or
with neither RENT nor REUS.
DEDB If the segment edit/compression exit routine is used with DEDBs, you
must write it and bind it as reentrant. In addition, the exit routine is
loaded during control region initialization rather than during the opening
of a database (as it is with a full-function database).
An IMS restart is required to refresh the loaded exit routine with a new version.
Related Reading: For details on coding the COMPRTN parameter, see IMS Version
14 System Utilities. Adequate storage for the edit/compression routine must be
provided for both batch and online systems.
When a segment requiring editing or compression is accessed, IMS gives your edit
routine control and provides it with the following information:
v Address of the data portion of the segment.
v Address of the segment work area.
Definition: Although the exit can be used for functions other than compression,
from this point on the use of the term compression refers to the process of
converting the segment from the application program form to the form written to
external storage. The term expansion refers to the process of converting the segment
from the external storage form to the application program form.
Two types of segments can be presented to the routine: fixed length segments, with
a data length that is static and is reflected in control blocks; and variable-length
segments, with its data length contained within a field in the first two bytes of the
segment itself. While a routine dealing with a single-segment type normally does
not need to recognize the differences, a more general purpose module involved
with multiple segment types can obtain sufficient information to differentiate
between them. This is done by examining data provided in the segment
compression control section.
Segments being processed using the segment edit/compression facility are stored
as variable-length segments in the database. Variable-length segments have a size
field in the first two bytes of the data portion of the segment. This size field
defines the length of the data portion of the segment. When segments are defined
to the application program as fixed length, your routine must expand it to the
fixed length expected by the application program. In reverse, if the application
program presents a fixed-length segment, your edit routine must add the size field
to the compression segment. If the segment is a variable-length segment, it must
update the size field with the correct segment length.
Example
Although your edit routine can modify the key fields in a segment, the segment's
position in the database is determined by the original key field.
Example: If the key field of a segment type is based on last names and the
database has segments for people named McIvor, Hurd, and Caldwell, these
segments are maintained in alphabetic sequence—Caldwell, Hurd, and McIvor.
Assume your edit routine encodes the names as follows:
Caldwell ------> 29665
Hurd ------> 16552
McIvor ------> 24938
The encoded value is put in the key field. However, the segments in the database
remain in their original sequence (Caldwell, Hurd, McIvor) rather than in the
numeric sequence of the encoded values (16552, 24938, 29665). Because segments in
the database are maintained in their original sequence, application programs can
issue GN calls and retrieve the correct segment even though segments are encoded.
This is also true for secondary index fields contained in index source segments.
The DBD control block has a table appended to it in the form of an assembler
language CSECT. One CSECT is filled in for each segment type that specifies the
use of the segment edit/compression facility. The CSECT contains basic
information, such as the name of your edit routine and the name of the segment
type. You can extend the CSECT to contain any editing parameters or criteria you
want. In other words, some or all of the logic for editing a segment type can be
put in the CSECT. You can perform different editing operations on different
segment types with a single edit routine. If you want additional information for
editing a segment type, any external source can provide it, not just the table in the
DBD.
Related Reading: For information on the DBD control statement SEGM, see the
section “SEGM Statement” in IMS Version 14 Database Administration.
When the application program is activated and begins accessing segments, IMS
interfaces with the segment edit/compression exit routine as described in this
section. In all cases, IMS passes an entry code to the exit routine. Your exit routine
must examine this entry code to determine the function to be performed.
For compression, regardless of the format at the source address, the segment at the
destination address must be in variable-length format. The following figure shows
the input (a fixed- or variable- length segment) in expanded format that is passed
to the edit/compression routine and output (as a variable-length segment) in
compressed format. The first data field of the destination segment is a 2-byte
segment size field.
Segment length
In either case, the move operation provided by the edit/compression routine must
result in a 2-byte length field, followed by the corresponding quantity of data in
the segment work area.
IMS might pad a segment to a length greater than that created by your exit
routine. IMS pads full-function variable-length segments to their minimum length.
IMS pads full-function fixed-length segments to their pad length if it is specified
on the COMPRTN parameter of the DBD SEGM statement. IMS does not pad
DEDB segments.
For expansion, the input segment has a variable-length format. The following
figure shows the input (a variable-length segment) in compressed format that is
passed to the edit/compression routine and output (as a fixed- or variable- length
segment) in expanded format.
For segment expansion that occurs during the segment retrieval process, IMS
examines the application program request. If the request is satisfied by a
compressed segment, a test is made to determine the type of compression used,
either key or data. Then, depending on the type of retrieval request, either entry
code 4 or 8 is passed to the expansion routine. The following criteria are used as a
basis for the decision:
v If the segment can be accepted without analysis of either a key or data field,
control is transferred using entry code 4. The segment is expanded to the form
presented to the user.
v If the value of the segment sequence field requires examination prior to segment
selection, an additional check is performed to determine data or key
compression. Data compression requires no additional processing, while key
compression requires activation of entry code 8. If the segment is qualified for
presentation after the key field is validated, IMS formats the segment using
entry code 4 and passes it to the exit routine.
v If data field analysis is necessary to properly satisfy the DL/I call, proper
expansion of the segment by entry code 4 occurs. When the correct segment is
found, it is passed to the user.
The format of the segment presented through entry codes 4 and 8 of the
compression routine is identical to that of a variable-length segment (a 2-byte
segment size field followed by the appropriate quantity of data). The exit routine
must expand the segment at the destination address in correct format, either fixed
or variable-length. In the case of key compression, the exit routine must expand
the segment from its start to the sequence field. For variable-length segments, the
segment data length field, after processing by the key expansion, must reflect the
length of the expanded portion of the segment at the destination address.
IMS provides two additional entry codes that allow you to process tabled data
information. IMS calls a segment edit/compression exit routine with these entry
codes if you specify the INIT keyword on the COMPRTN parameter of the SEGM
statement. With these codes, IMS passes control to the initialization and
termination subroutines immediately after the full-function database or DEDB area
is opened, and immediately before the full-function database or DEDB area is
closed. Any processing required for the database segments that cannot be directly
related to any one segment can be done at this time using these options.
Initialization processing and termination processing can include the loading and
deleting of the compression algorithm table.
Code Description
12 Initialization processing call. Control is obtained for algorithm initialization
processing immediately after the full-function database or DEDB area is
opened. Registers 2 and 3 are unpredictable.
16 Termination processing call. Control is obtained for algorithm termination
processing immediately before the full-function database or DEDB area is
closed. Registers 2 and 3 are unpredictable.
When control is passed to the exit routine as a result of these two entry codes,
execution is not in cross-memory mode. For online systems, execution is in the
control region address space or, if a DL/I separate address space is used (LSO=S),
execution is in the DL/I separate address space.
Restrictions
Keep the following restrictions in mind when using the segment edit/compression
Facility:
v Because this routine becomes a part of the IMS control or batch region, any
abnormal termination of this routine terminates the entire IMS region. Any
user-written segment edit/compression exit routine should return to IMS with
an abend code and a reason code instead of initiating a standard abend.
v The exit routine cannot use operating system macros such as LOAD, GETMAIN,
SPIE, or STAE.
v All editing or compression of segments occurs as the segments are described in
a physical database only. For specific restrictions, see IMS Version 14 Database
Administration.
v The exit routine must not modify or alter the relative position of a key field in a
DEDB segment. If the key field in a DEDB segment changes or moves during a
compress or expand call, IMS issues abend 0799, subcode 1. For more
information about this abend, see IMS Version 14 Messages and Codes, Volume 3:
IMS Abend Codes.
v When you specify the maximum size of the data portion of the segment in the
DBD, if you use the segment edit/compression exit routine with full-function
variable-length segments, you might need to include extra bytes. These extra
bytes are needed if your exit routine makes the segment larger than its
maximum size. For example, if the maximum length of your data is 100 bytes
and your exit routine might add 2 bytes to the segment, specify 102 bytes as the
maximum size. Increasing the maximum size accounts for the size of the
segment from the application program (100 bytes) and the 2 bytes added by the
exit routine. This restriction does not apply to full function fixed-length
segments or to segments in DEDBs. Using the segment edit/compression exit
routine for both types of segments might increase their data sizes to values that
are larger than those specified in the DBD.
All IMS control blocks provided to the segment edit/compression exit routine are
for reference only; no data can be changed, including the segment at the source
area address. The only modification allowed is the alteration of the segment during
the move operation from the source to the destination address. DSECT
addressability to the control blocks is provided by the IMS IDLI macro.
Register Contents
0 Set to zero before call to exit routine. Can contain Abend code U2990 on
return if the exit routine detected an error.
1 Address of the Partition Specification Table (PST).
2 Address of the first byte of the segment to be modified (source address).
3 Address where the modified segment is returned (destination address). For
DEDB segments, this area is 10 bytes larger than the maximum segment size.
For full-function fixed-length segments, this area is 10 bytes larger than the
maximum segment size, unless a larger size was specified in the DBD. For
full-function variable-length segments, this area is the maximum segment
size.
Register Contents
4 Address of the physical segment description block (PSDB). From this block,
the field description blocks (FDB) can be located. (Register 4 is always zero
when a DEDB is accessed by the exit routine, because the PSDB does not
exist for DEDBs.)
5 Address of the segment edit/compression control section.
6 Entry code (detailed in the following section):
0 Segment compression call
4 Entire segment expansion call
8 Partial segment expansion call (full-function databases only)
12 Full-function database or DEDB area open call
16 Full-function database or DEDB area close call
7 For DEDB only, the minimum length as coded in DBD (SDBLMIN). Register
7 is only valid for function code 0 (segment compression) and function code
4 (segment expansion).
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers.
The following two entry codes are required for segment compression and
expansion; they are used when you specify the DATA compression operand.
Code Description
0 Segment compression call. The source address points to an uncompressed
segment image as it appears in the application program input/output area.
4 Entire segment expansion call. The source address points to a compressed
segment. Application program requests qualified on a data field require the
use of entry code 4 for normal retrieval expansions.
To reduce the amount of processing overhead required with the movement of data,
the following third entry is required when the KEY compression operand is used.
The KEY operand is for use with full-function databases only. Key compression is
not supported for DEDBs.
Code Description
8 Partial segment expansion call with the KEY operand (full-function databases
only). Expansion takes place from the start of the segment through the
sequence field. This facility is required if you elect to use key compression,
or if you compress any field that alters the starting position of the key field.
All DL/I calls using sequence field qualification on key compressed
segments require the use of this entry code.
The entry code that is passed to the exit routine in register 6 indicates the reason
IMS called the exit routine. The five possible entry codes are described in the
following sections.
Description of parameters
In either case, the move operation provided by the edit/compression routine must
result in a 2-byte length field, followed by the corresponding quantity of data in
the segment work area.
To help you provide parameters to the edit/compression routine, the DBD control
block has a table appended to it that is made up of assembly language control
sections. One control section is developed for each segment type to be edited or
compressed. Each control section has a CSECT name equal to that of the segment
name.
These control sections are placed at the end of the DBD module. They contain
information such as the segment edit/compression routine name, the name of the
segment, and the total length of that control section. Each control section can be
extended to contain any desired data or algorithm information. A sample segment
control section is shown in the following table.
Table 33. Segment edit/compression control section (DMBCPAC)
Hex
Contents
offset
+0 Segment name
+8 Routine name
+10 Entry point address Flag byte Sequence Sequence field
field offset
length -1
+18 Segment length / Total length of Reserved for exit routine
maximum length CSECT
+20 Any user data (length varies)
Information in the various fields shown in the previous code sample are as
follows:
DMBCPAC DSECT
DMBCPCNM DS CL8 Segment name
DMBCPCSG DS CL8 edit/compression routine name
DMBCPEP DS A Entry point address
DMBCPFLG DS XL1 Flag byte
DMBCPKEY EQU X’02’ Segment has key compression
option
DMBCPNIT EQU X’01’ Initialization processing is
required
DMBCPVLR EQU X’04’ Segment is variable-length
DMBCPSEQ EQU X’08’ Segment has key sequence field
defined
DMBCPJJD EQU X’10’ Exit caller requests a return code
The first 28 bytes are constants defined by DBDGEN. When the new table is
defined to include additional parameters, these fields must be duplicated. The only
exception to this rule is that the CSECT length field must be updated to reflect the
new length. After an assembly of the new table, bind is done to exchange the new
table for the old one. User-added code should not contain address constants,
because this CSECT is moved after it is loaded. Use an ENTRY statement to
specify the name of the DBD when this operation takes place, as well as an
ORDER statement to ensure that the original order of multiple CSECTs is
maintained. For details about this, see the section on automatic CSECT replacement
in the z/OS product library.
If your exit routine references IMS control blocks other than the one shown in
Table 33 on page 126, you need to reassemble the routine using the current release
of IMS.
Related reference:
“Initialization of IMS callable services (DFSCSII0)” on page 16
“Routine binding restrictions” on page 8
Subsections:
v “About this routine”
v “The compression routine” on page 128
v “The initialization processing routine” on page 129
v “Program messages and codes” on page 129
v “Program assumptions” on page 131
When control is given to DFSCMPX0 or DFSKMPX0, the program checks the entry
code passed in register 6. The entry code indicates whether the request is for
compression of a segment or for the partial (full-function databases only) or entire
expansion of a compressed segment. It then branches to an appropriate routine to
perform the required task. On normal completion of the task, it returns control to
the IMS Control Program with a return code of 0.
For the latest versions of DFSCMPX0 and DFSKMPX0, see the [Link]
library; the member names are DFSCMPX0 and DFSKMPX0. Because DFSCMPX0
provides improved performance and possibly better compression, IBM does not
recommend the use of DFSKMPX0.
You can specify the KEY (full-function databases only) or DATA operand for either
of the two data formats. The following figure shows data before and after
compression for both fixed- and variable-length segments.
D data
K pointer to the 1st CCB
Compression of a segment results in one of the four formats listed in the preceding
figure, depending on the original record format and the operand specified.
Program assumptions
All parameters and data passed by the IMS control program, such as the address
of the input segment data, the output data area address, and the length of an input
segment, are considered valid data.
The IMS control program passes an address of an input segment data area in
register 2 and an address of an output data area in register 3.
Although no DFSKMPX0 sample exit routine is provided here, the exit routine is
supported and supplied in the [Link] library.
With HDC support, you can generate exit routines to activate the
hardware-assisted data compression available on processors. The processors use a
compression technique that uses a fixed number of bits to replace a variable
number of bytes.
HDC compresses and expands segment data by calling a compression exit routine
that has been specified on the SEGM statement during DBDGEN. This exit routine
is created by binding a user-defined dictionary and an IMS-supplied base exit
routine.
If the segment length specified in the DBD is variable and the database is a DEDB,
the length can exceed the maximum by up to 10 bytes but must not exceed 120
bytes less than the control interval (CI) size. If the segment length specified in the
DBD is variable and the database is a HIDAM, HISAM, HDAM, or PHADM the
length cannot exceed the DBDGEN maximum.
To build the HDC dictionary, use a sequential variable-length file as input to the
HDCD utility. This must be a QSAM file of a variable record format and contain
uncompressed segments, which are used to build the dictionary. You can create
this QSAM file with a user-written unload program, or with the HD
Reorganization Unload utility (DFSURGU0). Use your own data analysis to
determine what uncompressed segments to use. Use the QSAM data set with the
procedure.
Exception: If you use a QSAM file created by the DFSURGU0 utility, the dictionary
build process includes (will not ignore) the header and trailer records created by
the DFSURGU0 utility. Also, the dictionary build process includes (will not ignore)
the prefix added to each data segment by the DFSURGU0 utility.
Use the QSAM data set with the following JCL procedure.
//HDCDBLD PROC
// HDCDNAM=DFSZHDCD, /*USER SUP. DICT NAME,8 CHARS*/
// QSAMIN=’[Link]’, /* INPUT QSAM FILE NAME */
// QSAMIT=’[Link]’, /* ALTERNATE QSAM FILE NAME*/
// DICTLIB=’[Link]’, /* DICTIONARY LOAD LIBRARY */
// DICTNAM=’DFSZHXYZ’, /* USER DICT. MEMBER NAME */
// CMPXIT=’[Link]’, /* COMPRESSION EXIT LIBRARY*/
// CMPMBR=’CMPXIT01’, /* USER EXIT MEMBER NAME */
// RGN=2048K,
// SYS2=,
// SOUT=*,
// UNIT=SYSDA,
// VOLSER=,
// CYL=TRK,PRIM=5,SEC=2,BLKSZ=3120
//**********************************************************
//* CREATE STATISTICS AND HDC DICTIONARY OBJECT FILE. *
//**********************************************************
//*
//*********************************************************
//* CREATE LOAD MODULE FROM DICTIONARY OBJECT TEXT DECK. *
//*********************************************************
// PARM=’SIZE=(180K,20K),RENT,REFR,NCAL,LET,XREF,LIST’
//SYSLMOD DD DSN=&DICTLIB(&DICTNAM),DISP=SHR
//SYSUT1 DD UNIT=&UNIT,DISP=(,DELETE),
// SPACE=(CYL,(10,1),RLSE)
//SYSPRINT DD SYSOUT=&SOUT
//SYSLIN DD DSN=IMS.&[Link],DISP=(OLD,DELETE,KEEP)
//*
//*********************************************************
//* THE USER COMPRESSION EXIT ROUTINE IS BUILT BY LINKING *
//* MODULE DFSZLDX0 AND THE HDC DICTIONARY TOGETHER. THE *
//* THE HDC DICTIONARY MUST BE THE FIRST CSECT WITHIN THE *
//* USER EXIT ROUTINE AND ALSO BE ON A PAGE BOUNDARY. *
//*********************************************************
//LINK2 EXEC PGM=IEWL,
// PARM=’SIZE=(180K,20K),RENT,REFR,NCAL,LET,XREF,LIST’
//SYSLMOD DD DSN=&CMPXIT(&CMPMBR),DISP=SHR
<litdata>
//SYSUT1 DD UNIT=&UNIT,DISP=(,DELETE),
// SPACE=(CYL,(10,1),RLSE)
//SYSPRINT DD SYSOUT=&SOUT
//SDFSRESL DD DSN=IMS.&[Link],DISP=SHR
//DICTLIB DD DSN=&DICTLIB,DISP=SHR;
//***********************************************************
//*THE FOLLOWING CONTROL STATEMENTS MUST BE IN THE ORDER AS *
//* ILLUSTRATED. *
//* *
//* DFSZHXYZ: THE HDC DICTIONARY NAME FOR THE SEGMENT. *
//* (&DICTNAM) THIS HAS TO BE CHANGED TO A FIXED NAME OF *
//* DFSZHDCD SO THAT THE COMPRESSION EXIT DRIVER *
//* CAN BE LINKED TO IT. *
//* *
//* DFSZLDX0: THE COMPRESSION EXIT DRIVER ROUTINE. *
//* *
//* &CMPMBR: USER SPECIFIED COMPRESSION/EXPANSION EXIT *
//* ROUTINE NAME THAT IS USED ON THE *
//* SEGM COMPRTN= (&CMPMBR,DATA) DBD STATEMENT. *
//***********************************************************
//SYSLIN DD *
CHANGE &DICTNAM(DFSZHDCD) (&DICTNAM) DICTIONARY NAME
INCLUDE DICTLIB(&DICTNAM) DICTIONARY MUST BE 1ST CSECT
INCLUDE SDFSRESL(DFSZLDX0) STANDARD COMPRESSION EXIT
PAGE DFSZHDCD
ENTRY DFSZLDX0
NAME &CMPMBR(R) (&CMPMBR) COMPRESSION EXIT
/*
// PEND
Subsection:
v “DD name descriptions”
DD name descriptions
HDCDIN DD
The input sequential variable length data set that contains the IMS database
segment data that you extracted.
HDCDIT DD
The input sequential variable length data set or an alternate file that is used to
calculate the compression statistics.
HDCDOUT DD
Output HDC dictionary object deck. The z/OS format dictionary is built and
converted into a bind compatible object deck for subsequent use in the
dictionary link edit step.
SYSPRINT DD
Compression analysis statistics.
HDCDCTL DD
A data set containing the following control statements. The value specified for
a control statement must conform to the rules described for each control
statement. Code the value after the keyword for the control statement. Use a
blank or a comma to separate control statements.
RECS=
The number of input records to be processed. The default is ALL. Specify a
number between zero and 2147483647. If any number outside this range is
specified, the default ALL is used.
PERC=
The percentage of storage savings to be realized. The default is 5 percent.
One or two digits are allowed.
INTEG=
By specifying Y or N, this keyword checks or does not check the data
integrity of compressed segments. The default is N.
To decide whether to use HDC, run the HDCD utility and analyze the output
statistics to determine how much storage and I/O savings you can achieve.
You might want to limit the use of HDC to one time per database, since its
implementation requires an unload and reload of the database.
Because uniquely tailored dictionaries yield the most compression, you should use
the dictionaries for high-volume segments to maximize savings.
You can create more generally-tailored dictionaries for other reasons. If you know
the type of data in most segments, you can create dictionaries by using a sampling
of similar data from many of those segments. For example, you might want
general dictionaries for upper-case text, mixed-case text, numeric, alphabetic, and
general mixed data. You can use these dictionaries for multiple segment types,
eliminating the need to produce unique dictionaries for each segment type.
Compression usually saves I/O for sequential processing and can also save I/O for
random processing. Typically, savings for random processing is realized with large
database records, especially if the record is spread over multiple blocks or CIs.
Compression can reduce the number of blocks or CIs that must be read to access a
segment. This is likely to apply to twin chains of multiple blocks or CIs, even after
reorganizations.
The following return codes can be issued from the HDCD utility:
Code Description
0 Utility ended successfully and issued the accompanying DFSZ1170I message.
4 Utility ended successfully and issued the accompanying DFSZ1171W
message, but it did not build a dictionary because the requested storage
savings percentage was not met.
8 Utility ended successfully and issued the accompanying DFSZ1172E message,
but it did not build a dictionary because data integrity checks were detected
between a source QSAM input record and its equivalent re-expanded record.
12 Utility ended unsuccessfully and issued the accompanying DFSZ1173W
message, because z/OS CSRCMPSC is not installed on the machine.
16 Utility ended unsuccessfully and issued the accompanying DFSZ1174E
message, because a logic error occurred during invocation of the CSRCMPSC
compression service macro.
Related Reading: For more information about these messages, refer to IMS Version
14 Messages and Codes, Volume 4: IMS Component Codes.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 137
By using one of the five sample SB routines that IMS provides or one that you
write, you can:
v Disallow the use of SB.
v Specify that SB be conditionally activated by default whenever IMS detects a
sequential I/O pattern in batch or BMP regions.
v Change the IMS default values for the number of buffer sets in each SB buffer
pool.
The following table shows the attributes of the Sequential Buffering Initialization
exit routine.
Considering performance
DFSSBUX0 is called frequently during the scheduling of MPPs and PSBs of CICS
in a DBCTL environment. If you modify an SB sample routine or write your own
routine, code it to minimize overhead during the call to the routine for these
programs.
IMS uses the entry registers, parameter list, and exit registers to communicate with
the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list.
10 Address of partition specification table (PST).
11 Address of SCD.
13 Address of save area. The exit routine must not change the first three words.
14 Return address of IMS.
15 Entry point of exit routine.
Description of parameters
The following paragraphs describe how DFSSBUX0 can change the default values
of SB options in the SB parameter area. Each change applies only to the current
application program or utility being invoked. The DSECT of the parameter area is
presented at the end of the discussion.
The SBPRMPDI bit determines whether the use of SB is disallowed. The default
value for this bit is off. DFSSBUX0 can set this bit on, however, to disallow the use
of SB and cause IMS to ignore any PSBGEN or SB control card requests to the
contrary. You can set this bit during peak periods of online use to save real storage
space, especially if your system's real-storage is already constrained.
The SBPRMPNR full word field specifies a default value for the number of buffer
sets (BUFSETS) in each SB buffer pool. The default value for this field is 4.
However, DFSSBUX0 can set this field to a value ranging from 1 to 25, inclusive. If
this value is greater than 1, SB can anticipate the future database calls of a BMP or
batch program by concurrently reading the next set of blocks while IMS is
processing current database calls.
DFSSBUX0 can also change the default BUFSETS value based on the time of day.
For example, you might want DFSSBUX0 to choose a small value for BUFSETS
during daytime main online processing time and a larger value during night batch
processing time.
Before returning to IMS, the exit routine must restore all registers.
Related concepts:
Chapter 1, “Guidelines for writing IMS exit routines,” on page 3
OSAM sequential buffering (Database Administration)
Related reference:
“Routine binding restrictions” on page 8
IMS supplies five SB sample routines. The first module disallows the use of SB; the
next four cause IMS to conditionally activate SB by default.
SB sample Description
routines
DFSSBU1 The sample Sequential Buffering (SB) exit routine disallows the use of
SB.
For the latest version of the DFSSBU1 source code, see the
[Link] library.
DFSSBU2 This sample exit routine causes IMS to activate Sequential Buffering (SB)
by default when IMS detects a sequential I/O reference pattern and
reasonable activity rate. This exit routine can be used for DataRefresher™
IMS utilities that can benefit from SB in both batch and BMP regions.
For the latest version of the DFSSBU2 source code, see the
[Link] library.
SB sample Description
routines
DFSSBU3 This sample exit routine causes IMS to activate Sequential Buffering (SB)
by default when it detects a sequential I/O reference pattern and
reasonable activity rate. In batch regions, this applies to all application
programs and utilities; in BMP regions, this applies to DataRefresher, as
well as those IMS utilities that can benefit from SB.
For the latest version of the DFSSBU3 source code, see the
[Link] library.
DFSSBU4 This sample exit routine causes IMS to activate Sequential Buffering (SB)
by default when it detects a sequential I/O reference pattern and
reasonable activity rate. This applies to all application programs and
utilities in both batch and BMP regions.
For the latest version of the DFSSBU4 source code, see the
[Link] library.
DFSSBU9 This sample exit routine either disallows the use of sequential buffering
(SB) or causes IMS to activate SB by default based on specific times of
day. The routine is coded as follows:
v The time between 1100 hours and 1400 hours is the peak period for
processing online transactions. During this time frame, SB is
disallowed.
v During the time between 0900 hours and 1100 hours, and 1400 hours
and 1700 hours, SB is neither disallowed nor activated by default for
batch and BMP regions.
v The rest of the time, SB is conditionally activated by default for batch
and BMP regions.
For the latest version of the DFSSBU9 source code, see the
[Link] library.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 142
The 2972/2980 Input edit routine must perform the following functions:
1. Determine the IMS destination (SMB or CNT) of messages entered from a 2980
teller or administrative station.
2. Determine end-of-message of multisegment messages (by setting DECCSWST
bit 7 to indicate EOM).
3. Reposition the entered data at the beginning of the input buffer for IMS
processing. The entered segment must be in standard IMS input message
format after edit processing; a two-byte length field is followed by the text.
The following table shows the attributes of the 2972/2980 Input Edit exit routine.
Table 36. 2972/2980 input edit exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFS29800.
Including the routine Because the Input Edit Routine will be called directly by the IMS 2972/2980 device
dependent module (DFSDN110), you must bind the input edit routine with the IMS
control region nucleus.
Familiarity with IMS terminal handling procedures and control blocks is required
for a user to write an Input edit routine to interface with IMS routines in the IMS
control region. Examination of these control blocks might be required, but
modification of IMS control blocks by a user-written routine seriously endangers
the integrity of the entire system.
On entry to the exit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
0 Length of input buffer.
1 Address of the input area.
2 Length of input data. (The length of the area pointed to in register 1.)
7 Address of CTB.
9 Address of CLB.
11 Base of SCD.
13 Address of save area. The first three words must not be changed.
14 Return address to IMS.
15 Entry point of exit routine.
The format of the data contained in the buffer pointed to by register 1 at entry to
the exit routine is as follows:
1. 9 blanks
2. Terminal address
3. Entered text
If the entered text is from a 2980-4, the first byte of the entry is the teller
identification.
On return to IMS, all registers must be restored except for registers 2, 10, and 15,
which must contain the following:
Register Contents
2 Data length after edit (a zero length signifies a no-data segment).
Register Contents
10 The inputting CNT address if a retransmission of the last successfully
outputted message is required.
15 One of the following return codes:
Return code Meaning
0 Process the entered segment.
4 Re-send the last message to the CNT in register 10.
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
Subsections:
v “About this routine”
v “Communicating with IMS”
This exit is provided as a sample routine that appends a blank and the eight-byte
node name to a transaction input message. If you have established a naming
convention that relates node names to LTERM names, the node name can be used
by the MPP to set up the appropriate change call for output.
The following table shows the attributes of the 4701 Transaction Input Edit routine.
Table 37. 4701 transaction input edit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFS36010.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service. Use the ECB found
in register 9 for the DFSCSI00 call. This exit is automatically linked to DFSCSI00 by
IMS. No additional linking is required to use IMS callable services.
Sample routine location [Link] (member name DFS36010).
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the exit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
1 Address of the input buffer
7 Address of CTB
9 Address of CLB
11 Address of SCD
13 Address of save area
15 Entry point of exit routine
On return to IMS, all registers must be restored except for register 15, which must
contain the following return code:
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
Use the Build Security Environment user exit to tell IMS whether to build the
RACF® or equivalent security environment in an IMS dependent region for an
application that has not received its input message from OTMA or from an LU 6.2
device.
You can also use this user exit to request that IMS bypass some part of the security
processing in the dependent region when one of the following events occurs for a
message that did not originate from an OTMA or LU6.2 device:
v CHNG call.
v AUTH call.
v Deferred conversational program switch on the local system (when the system
where the inputting terminal is active). Security authorization for the deferred
conversational program switch occurs only on the local system.
Subsections:
v “About this routine” on page 145
v “Communicating with IMS” on page 146
The Build Security Environment user exit receives control before the first or next
input message is given to an IMS application program and the input message is
from neither OTMA nor an LU 6.2 device.
The following table shows the attributes of the Build Security Environment user
exit.
Table 38. Build security environment user exit attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Note: Also supported in a DBCTL environment for non-message
driven BMPs.
Naming convention You can name this exit routine DFSBSEX0 and link it into a library
that is included in the STEPLIB concatenation.
Alternatively, you can define one or more exit routine modules with
the EXITDEF parameter of the USER_EXITS section of the
DFSDFxxx member of the [Link] data set. The routines are
called in the order they are listed in the parameter.
Binding
You must write this user exit using reentrant coding techniques. You
must link your user exit into the [Link] library.
If you use IMS callable services, you must link DFSCSI00 with your
user exit. The following is an example of the bind JCL statements
needed:
INCLUDE LOAD(DFSBSEX0)
INCLUDE LOAD(DFSCSI00)
ENTRY DFSBSEX0
NAME DFSBSEX0(R)
Including the routine The module or modules must be included in an authorized library
in the JOBLIB, STEPLIB, or LINKLIST concatenation. No additional
steps are necessary to use a single exit routine that is named
DFSBSEX0. If you use multiple exit routines, specify
EXITDEF=(TYPE= BSEX,EXIT=(exit_names)) in the EXITDEF
parameter of the USER_EXITS section of the DFSDFxxx member of
the [Link] data set.
IMS callable services To use IMS callable services with this user exit, examine the value
of the SXPLATOK field in the “IMS standard user exit parameter
list” on page 4:
v If SXPLATOK is zero, you cannot use IMS callable services with
this user exit.
v If SXPLATOK is non-zero, the value is the callable services token
for this user exit. You can use the 256-byte work area addressed
by the SXPLAWRK field to call DFSCSIF0.
Sample routine No sample exit routine is provided.
location
IMS uses the entry registers, the Standard User exit parameter list (SXPL), and the
Build Security Environment user exit (BSEX) parameter list to communicate with
this routine.
Register Contents
Register Contents
1 Address of the IMS Standard User exit parameter list (SXPL).
13 Address of a single standard z/OS save area.
14 Return address to IMS.
15 Address of BSEX.
Register Contents
15 Return code indicating requested action:
Return Code (decimal)
Meaning
00 IMS is not to build the security environment during the
scheduling phase of the transaction. The security environment
can be built later if needed for processing a CHNG call, AUTH
call, or a deferred conversational program switch.
04 IMS is to build the security environment during the scheduling
phase of the transaction. If the security environment is needed
later by a CHNG call, AUTH call, or a deferred conversational
program switch, this same security environment is used. If the
application program does not ever need the security
environment, the build of the security environment is
unnecessary.
08 Invoke the SAF interface (RACF, or equivalent product) on a
CHNG call, an AUTH call, and a deferred conversational
program switch, but bypass the dynamic creation of the
security environment. If the transaction is running in the local
system, and the user who entered the transaction is still signed
on, the security environment created by SIGNON is used.
Otherwise, the default security environment of the IMS control
region or the IMS dependent region is used for the SAF call.
Normally, the security environment of the dependent region is
used. However, if the dependent region is running with LSO=Y
or is a BMP with PARDLI=1 specified, then the security
environment of the Control Region is used.
12 Bypass invoking the SAF interface on a CHNG call, an AUTH
call, and a deferred conversational program switch.
16 Bypass invoking the SAF interface on a CHNG call, an AUTH
call, and a deferred conversational program switch, and bypass
the calls to the DFSCTRN0 and DFSCTSE0 user exits.
20 Invoke the SAF interface on a CHNG call, an AUTH call, and
deferred conversational program switch, and bypass the calls to
the DFSCTRN0 and DFSCTSE0 user exits.
Note:
1. For return codes 08, 12 and 16, IMS does not dynamically build the security
environment during transaction scheduling, or later for a CHNG call, an AUTH
call, or a deferred conversational program switch.
2. When return code 16 is used, the application gets a status code in the IOPCB of
blanks. For the AUTH call, the status field in the I/O area has the value 24
(X'18'): transaction authorization not active.
This user exit uses the Version 6 standard exit parameter list. The address of the
work area passed to this user exit in SXPLAWRK can be different each time that
this user exit is called.
If your BSEX user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
the byte that SXPLCNXT points to. This tells IMS to not call additional exit
routines.
The address of the BSEX parameter list (mapped by DFSBSEXP) on entry to this
routine is contained in field SXPLFSPL of the IMS Standard User Exit parameter
list. The following table describes the BSEX parameter list.
Table 39. BSEX parameter list (mapped by DFSBSEX0)
Offset Field length Description
X'00' 4 bytes Transaction scheduling class.
X'04' 8 bytes Transaction code of the input transaction.
X'0C' 8 bytes PSB name.
X'14' 8 bytes Program name.
X'1C' 8 bytes User ID. Specifies one of the following:
v Actual user ID of the user who entered the transaction.
v LTERM name of the terminal from which the transaction
was entered.
v Blanks.
Related reference:
“Routine binding restrictions” on page 8
“Resource Access Security user exit (RASE)” on page 435
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 150
When the sample exit routine (DFSCONE0) is finished, the IMS conversational
processor determines whether the transaction DFSCONE has been defined. If
DFSCONE is not defined, the conversation terminates and the SPA is discarded. If
DFSCONE is defined, the conversational processor schedules the transaction
DFSCONE with the SPA of the terminated conversation as a nonconversational
single-segment message.
As an alternative, you can provide a more tailored exit routine. For example, you
might want to interrogate the conversation control block (CCB) to determine the
transaction that was in process when the conversation terminated, or you might
want to inspect the SPA to find out what had occurred before the conversation
terminated. No DL/I calls can be issued by your exit routine. A message
processing program should be scheduled to handle database inquiries and updates
or extensive analysis of the conversation. The application program can send
messages to the terminal associated with the terminated conversation.
v Place the 8-byte name of the nonconversational transaction into the SPA (offset 6
bytes into the SPA).
v Set the desired length of the SPA.
v Insert information to be communicated to the scheduled program into the SPA.
v Set a return code of X'10' in register 15.
The transaction code inserted into the SPA must be for a valid, nonconversational
transaction. Otherwise, no transaction will be scheduled, the SPA is discarded, and
the response message (if available) is sent to the input terminal.
If you do not provide a DFSCONE0 exit routine, IMS processing is the same as if
an exit routine existed and it returned a return code of 0. The default IMS action is
as follows:
1. Terminate the conversation if it is still active.
2. Discard the SPA.
3. Discard the response message if available.
The following table shows the attributes for the Conversational Abnormal
Termination exit routine.
Table 40. Conversational abnormal termination exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCONE0.
Binding You must write this routine using reentrant coding techniques. You
must link your routine into the [Link] library.
If you choose to use IMS callable services, you must link DFSCSI00
with your routine. The following is an example of the bind JCL
statements needed:
INCLUDE LOAD(DFSCONE0)
INCLUDE LOAD(DFSCSI00)
ENTRY DFSCONE0
NAME DFSCONE0(R)
Including the routine No special steps are required to include this routine. To use the
sample user exit, you need to define the transaction DFSCONE.
IMS callable services
To use IMS callable services with this routine, you must issue an
initialization call (DFSCSII0) to obtain the callable service token and
a parameter list in which to build the function specific parameter
list for the desired callable service. Use the ECB in Register 9 for
IMS callable services.
Sample routine [Link] (member name DFSCONE0).
location
IMS uses the entry and exit registers to communicate with the exit routine.
Register 0 contains a flag that identifies the reason why the conversation was
terminated.
Byte Contents
0
Flags Meaning
X'01' Request for termination that is no longer active.
X'02' The /EXIT or /START command was issued by a different terminal
than the one in conversation; this causes the conversation to be
terminated. If this flag is not on, the request for termination of the
conversation is from the terminal in conversation.
X'04' The input CNT could not be found. The master terminal of the
current system is set as the input terminal.
X'08' The transaction was discarded by the processing of the /EXIT
command.
1
Return Code
Meaning
X'01' Conversation was terminated previously by an /EXIT, /START, or
IMS cold start. The conversation transaction processed successfully,
and IMS is sending (queuing) the response message to the input
terminal.
2 Reserved
Byte Contents
3 A flag byte that indicates the calling reason:
Flag Reason
X'00' Conversational application program abended.
X'04' Reserved.
X'08' /EXIT command for input or other (remote) terminal processed.
X'0C' /START LINE or NODE command processed for terminal in
conversation. The /START LINE command is valid only if no PTERMs
are specified.
X'10' SPA received for an inactive conversation.
X'14' Inconsistent conversational definitions found in a multisystem
conversation. Execute the /MSVERIFY command to show the
inconsistencies.
X'18' /EXIT command terminated the conversation and the latest SPA is
not currently available. (It is queued for processing in this system, or
it is in the MSC network.) The SPA passed to the exit routine is either
the one from the previous step of the conversation, or a short SPA
with just the header information.
The exit routine is called with vector 10 when the current step in
progress completes; at this time the latest (and last) SPA for the
conversation is passed to the exit routine. This can not occur if an
IMS restart results in the loss of the SPA in this or another IMS
system.
X'1C' The explanation for the /START LINE or NODE command is the same
as for Vector 18.
X'20' A conversational application program terminated without inserting to
a response PCB or an alternate PCB that represents another
conversational program.
X'28' /EXIT command for input or other (remote) ISC terminal processed.
X'30' The link receive entry point of the TM and MSC Message Routing
and Control user exit routine (DFSMSCE0) canceled the input
transaction.
Register Contents
1 Address of the SPA.
2 Pointer to a parameter list that contains SPA processing options. See "SPA
Options Parameter List" for a list of the parameters.
6 Address of the CCB for the terminal in conversation, if the conversation is
still active. Zero if the conversation is already terminated.
7 If zero, the conversation is already terminated. If positive, the register
contains the address of the CTB for the terminal in conversation (if the
conversation is active). If negative, the register contains the complemented
address of the SPQB for the signed-off user, which can be the result of the
exit being called because of an /EXIT CONV USER command.
09 Address of the ECB.
11 Address of the SCD.
Register Contents
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of DFSCONE0.
The following table shows the SPA options parameter list. This parameter list is
mapped in the sample exit routine.
Table 41. SPA options parameter list
Field Description
CONESPAH Maximum SPA length
CONESPAL Current SPA length
CONEFLG1 Flag 1. This flag can be set as follows:
CONE1TDO (X'80')
If this flag is set, register 1 points to a SPA buffer that
contains the SPA at the maximum length. If this flag is not
set, register 1 points to a SPA that is the length of the SPA
for the current transaction. Truncated data option is set for
the SPA parameter in the TRANSACT macro.
CONE1SQ (X'40')
shared queues are active.
On return to IMS, all registers must be restored except for register 15, which must
contain one of the following return codes:
Subsections:
v “About this routine”
v “Restrictions” on page 155
v “Communicating with IMS” on page 156
IMS will call the Destination Creation exit routine to create an LTERM or a
transaction when a destination for a message does not exist. DFSINSX0 tells IMS
which type of destination to create: LTERMs, transactions for queuing, or
transactions for scheduling. LTERM is the default destination.
The following table illustrates the types of destinations that are enabled under
specific conditions that are specified for your environment in the IMS PROCLIB
members:
The following table shows the attributes of the Destination Creation exit routine.
Table 43. Destination Creation exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSINSX0.
Binding This exit routine must be reentrant.
Restrictions
The following restrictions apply to the use of the Destination Creation exit routine
(DFSINSX0):
v DFSINSX0 is not called during XRF tracking on an XRF alternate system.
v When DFSINSX0 is used to create LTERMs, then DFSINSX0 and the Signon exit
routine (DFSSGNX0) are corequisite. If you provide one exit routine to supply
queue data for additional LTERMs, you must provide the other exit routine also.
Both exit routines create the user control block structure and related LTERMs
(including multiple LTERMs for a user): DFSINSX0 using an LTERM name and
DFSSGNX0 using the user ID. These exit routines must contain the same logic so
that the user structure is identical, regardless of which exit routine created it.
However, DFSINSX0 cannot return the address of a user descriptor. The address
of a user descriptor can only be provided using the Signon exit routine
(DFSSGNX0).
v When extended terminal option is inactive (ETO=N), you cannot write
DFSINSX0 to create dynamic LTERMs. When ETO=N, you can write DFSINSX0
only to create dynamic transactions.
v When dynamic resource definition is disabled (MODBLKS=OLC) in the
DFSCGxxx or the DFSDFxxx member of the [Link] members, you can
write DFSINSX0 to create transactions that can only be used for queuing
messages on the shared queues. You cannot write DFSINSX0 to create
transactions that can be scheduled when dynamic resource definition is disabled.
v When shared queues are not active (the SHAREDQ= parameter is not specified
on the IMS Procedure), you cannot use DFSINSX0 to supply destinations for
queuing transactions.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
13 Save area address
14 Return address to IMS
15 Entry point address of exit routine
The following table shows the Destination Creation exit routine parameters. The
address of this parameter list is in the standard exit parameter list field SXPLFSPL.
This parameter list is mapped by DSECT INSXMAIN, which can be found in the
DFSINSXP macro.
Table 44. Destination creation exit parameter list
Offset Length Description
+0 4 ECB address.
+4 4 SCD address.
+8 4 User Table address.
+12 4 Address of a buffer for use by the exit routine to
return user ID and queue data. The mapping of the
buffer is DSECT USEQDATA in USEQDATA COPY.
For additional details on the content and format,
refer to the prolog in the sample routine (DFSINSX0
in [Link]).
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains one of the following return codes. If an application
INSERT call forced the LTERM creation, IMS ignores the return code.
In addition to the return codes, the exit routine can indicate whether to create an
LTERM (set INSXTYPE equal to INSXCNT in the INSXDATA DSECT) or a
transaction (set INSXTYPE equal to INSXSMB in the INSXDATA DSECT).
Related concepts:
Remote LTERMs (Communications and Connections)
MSC descriptors (System Definition)
Related reference:
Chapter 3. Transaction Manager exit routines 157
IBM Confidential
You can specify that the extended terminal option is active by stating that ETO=Y
in the IMS or DCC startup procedure.
Based on the selected user descriptor when ETO=Y, DFSINSX0 can perform the
following tasks:
v If the selected user descriptor is the DFSUSER descriptor,
– Add additional LTERMs to the structure and supply queue data for those
additional LTERMs, based on supplied autologon parameters such as LU
name, user ID, logon descriptor name, and mode table name.
– Override queue data and autologon parameters.
– Override the user ID derived from the user structure.
– Provide the correct user ID for the user receiving messages.
– Use the correct user ID to create the name of the user control block structure,
including LTERM control blocks.
v If the selected user descriptor is a non-DFSUSER descriptor,
– Override queue data and autologon parameters for only one LTERM that is
derived from the non-DFSUSER descriptor.
– Cannot override the user ID.
If no user ID is supplied and extended terminal option is active, the name of the
user structure is the name of the target LTERM. If no user control block structure
exists, IMS uses the same name for both the target LTERM and the selected user
descriptor.
IMS creates LTERMs from information in the selected user descriptor, from
information that the Destination Creation exit routine supplies, or, in the case of
remote LTERMS, IMS will use Multiple Systems Coupling (MSC) descriptors. If an
LTERM is not available (that is, it is already assigned to another user), the user
control block is created without the LTERM. LTERMs can be added later using the
/ASSIGN command.
Related reading:
v See IMS Version 14 Communications and Connections for more information
regarding ETO.
v The Destination Creation exit routine creates destinations based on
environmental specifications. For more information on these specifications, see
the prolog of sample DFSINSX0.
Depending on the user descriptor selected, the Destination Creation exit routine
can provide queue data (LTERM data) and autologon parameters. If the exit
routine returns data that it is not allowed to return (as discussed in the following
cases), IMS rejects the LTERM creation attempt.
There are two cases which describe what data the Destination Creation exit routine
can supply. The two cases are based on whether a DFSUSER (Case 1) or a
non-DFSUSER (Case 2) descriptor is selected. (For this exit routine, non-DFSUSER
descriptors are descriptors based on the target LTERM name.) Each case is
discussed in the sections that follow.
If the Destination Creation exit routine does not provide data to override the
existing queue data, IMS proceeds as if you did not include the Destination
Creation exit routine; IMS uses the information in the selected user descriptor to
create the LTERMs.
Case 1
Case 2
In both cases, IMS verifies the additional LTERMs that are specified against the
LTERMs that already exist in the system. IMS automatically allocates the user to
the indicated node and attempts to establish a session with that node. If an LTERM
that is specified as an additional LTERM already exists in the system, IMS assumes
that this LTERM has been assigned to a different user, and it is not made part of
the user structure of the user for which messages are queued.
If the user control block structure already exists for the user for whom messages
need queuing but for which the target LTERM is missing, IMS selects the user
descriptor that was used to build the user structure and calls the exit routine. If
IMS locates the target LTERM name, it selects that user descriptor and calls
DFSINSX0.
If IMS does not find a descriptor that contains the target LTERM name, it selects
DFSUSER to create the user structure. IMS renames the descriptor, giving it the
name of the target LTERM, and equates the user ID to this name. IMS then calls
DFSINSX0, which can supply the correct user ID, overriding the one derived from
the target LTERM.
If no user descriptor can be found, including DFSUSER, IMS rejects the LTERM
creation request.
If Multiple Systems Coupling (MSC) is being used, the exit routine can request that
a remote LTERM (RCNT) be built instead of a local ETO LTERM (CNT) if the
destination of the message is an LTERM in a remote system. The exit routine
supplies the associated MSC MSNAME and the remote LTERM name in field
INSXMSN in the INSXDATA input parameter list. This name is a link name
(MSNAME) rather than a descriptor name.
The MSNAME and remote LTERM input creates the RCNT, similar to if an MSC
descriptor had been used. Do not change any other parameter values in the
INSXDATA input parameter list. The RCNT is assigned to the link name (LNB)
representing the MSNAME.
Related Reading: For more information on MSC descriptors, see IMS Version 14
System Definition.
If you specify that shared queues are active (SHAREDQ=name) in the IMS
PROCLIB members, you can create a transaction that queues messages in the
shared message queues and can be processed by another IMS in the IMSplex. The
transaction cannot be scheduled on the local IMS system unless DRD is also
enabled.
When the exit routine indicates that the destination is a transaction, IMS creates a
transaction control block. DFSINSX0 returns information to IMS about the
transaction, including whether the transaction is in conversational or response
mode, and the SPA size if applicable. The transaction control block is not deleted
until IMS is restarted. IMS can use the same transaction control block if it
encounters additional instances of the undefined transaction input message.
Before DFSINSX0 is called, you do not have to define the application program that
is scheduled to process the transaction. If the application program is not already
defined, DFSINSX0 can create the program with specific attributes. The DFSINSX0
exit routine can set the same attributes as those that are set by the CREATE TRAN
command.
The Destination Creation exit routine (DFSINSX0) exit might fail with a completion
code of 1D7 and the DFS3824 message if the default descriptor is being imported
from the IMS change list in the IMSRSC repository or was not successfully
imported from the change list. This error can occur if the default descriptor is not
the IMS system-defined default descriptor.
Subsections:
v “Creating transactions across an IMSplex” on page 162
v “Creating default or duplicate transactions” on page 163
DFSINSX0 exit routine can create transactions on other IMS systems in an IMSplex
in specific environments. The following table lists these environments, and the
options available to DFSINSX0 in these environments.
Table 45. Environments in which the DFSINSX0 exit routine can create transactions across
an IMSplex
Options that the DFSINSX0 exit routine can use to create
Environment transactions
Non-shared queues Dynamic transactions that the DFSINSX0 exit routine creates
are always for scheduling. Bit TRNQ_FC_SCHD is ignored;
however, if you set this bit, your exit does not need to be
recoded if you move to a shared queues environment.
Shared queues, without the Dynamic transactions that the DFSINSX0 exit routine creates
Structured Call Interface can be either for queuing (TRNQ_FC_SCHD = 0) or for
(SCI) scheduling (TRNQ_FC_SCHD = 1). The transaction is created
on the local IMS system only (the system in which the
DFSINSX0 exit routine is called). The dynamic transaction
definition is not propagated to other IMS systems in the
IMSplex.
Table 45. Environments in which the DFSINSX0 exit routine can create transactions across
an IMSplex (continued)
Options that the DFSINSX0 exit routine can use to create
Environment transactions
Shared queues with SCI Dynamic transactions that the DFSINSX0 exit routine creates
can be either for queuing (TRNQ_FC_SCHD = 0) or for
scheduling (TRNQ_FC_SCHD = 1). The transaction can be
created for the following:
Queuing on the local IMS only
If TRNQ_FC_SCHD is set to 0, the transaction is
created for queuing on the local IMS system only.
Field TRNQ_IMS is ignored. This is the default if
your exit does not modify bit TRNQ_FC_SCHD.
Scheduling on the local IMS only
If TRNQ_FC_SCHD is set to 1 and no name is set in
field TRNQ_IMS, the transaction is created for
scheduling on the local IMS. It is not created on any
other IMS in the IMSplex.
Scheduling on one local IMS and one additional IMS,
while queuing on all other IMS systems
If TRNQ_FC_SCHD is set to 1 and the name
(IMSID) of an IMS is specified in the TRNQ_IMS
field, a transaction is created for scheduling on both
the local IMS and on the IMS whose IMSID is
specified in the TRNQ_IMS field. If the IMSID
specified in the TRNQ_IMS field refers to the local
IMS, the transaction is created for scheduling on the
local IMS only. In both cases, the transaction is
created for queuing on the other active IMS systems
in the IMSplex. If the transaction is already created
for scheduling on one or more of the other IMS
systems in the IMSplex, it will not be changed to a
queuing-only transaction. The transaction will still
be able to be scheduled on those IMS systems.
Scheduling on all IMS systems in the IMSplex
If TRNQ_FC_SCHD is set to 1 with an asterisk (*) in
field TRNQ_IMS, the transaction is created for
scheduling on all IMS systems that are currently
active in the IMSplex.
If you want the DFSINSX0 exit routine to create a transaction using the current set
of system defaults (that is, as specified by the current transaction default
descriptor), do not set any of the definition bits in the INSXTRNQ DSECT. If you
want the DFSINSX0 exit routine to create a transaction that matches an existing
transaction or descriptor, specify the name of the transaction or descriptor in the
TRNQ_TRAND field of the INSXTRNQ DSECT. You may need to specify the
program name if the descriptor does not have a program name defined.
The transaction and program resources that are created by DFSINSX0 can be
defined to be exported by setting TRNQ_FC_EXPORT=1 on the exit parameter list.
If IMS is defined to use the repository, the resources created by DFSINSX0 are
exported to the repository when one of the following conditions is satisfied:
v The names of the resources are specified with the NAME keyword on the
EXPORT TARGET(REPO) command
v An EXPORT DEFN TARGET(REPO) OPTION(CHANGESONLY) command is
issued after DFSINSX0 creates the resources
v The resources are created in-between the range specified by the STARTTIME and
ENDTIME keywords on the EXPORT DEFN TARGET(REPO) command
Related reading:
v The Destination Creation exit routine creates destinations based on
environmental specifications. For more information about these specifications,
see the prolog of the sample DFSINSX0 module in [Link].
Related concepts:
Monitoring transaction-level statistics (System Administration)
Dynamic resource definition (System Definition)
Related reference:
EXPORT command (Commands)
CREATE TRAN command (Commands)
DFSDFxxx member of the IMS PROCLIB data set (System Definition)
IMS systems with a very high transaction rate use EMH. EMH is a performance
option that speeds up message processing by imposing restrictions on message
lengths and segmentation. To use EMH, an edit/routing routine must receive
control from the Input exit routine and determine the eligibility of an incoming
message for Fast Path processing. The sample exit provides the minimum level of
support required to use IMS Fast Path.
Subsections:
v “About this routine”
v “Using the routine with shared EMH queues” on page 165
v “Restrictions” on page 166
v “Communicating with IMS” on page 166
The Fast Path EMH buffer is dynamically allocated and might not be present at
entry. Therefore, DBFHAGU0 can receive the message in an EMH buffer or queue
buffer, depending on the terminal type. The exit routine is not permitted to move
the data out of the input location. If the message is in a queue buffer at entry, the
Fast Path system moves it to an EMH buffer. In editing the input message, the
application should not increase the length beyond a length that fits in any message
buffer.
If an EMH buffer cannot be obtained, the following message is sent to the input
terminal:
DFS3971 Unable to process Fast Path due to EMH buffer shortage
The following table shows the attributes for the Fast Path Input Edit/Routing exit
routine.
Table 46. Fast Path input edit/routing exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL
Naming convention You must name this exit routine DBFHAGU0.
Binding This exit routine must be reentrant if APPC/IMS support is active.
Including the routine DBFHAGU0 is a separately linked module in the [Link].
IMS automatically loads it during Fast Path initialization. If IMS
cannot find DBFHAGU0, IMS terminates abnormally with
ABENDU1011 and displays the following message:
DFS2730A UNABLE TO LOAD FP INPUT ROUTING EXIT: DBFHAGU0
IMS callable services
To use IMS callable services with this routine, you must issue an
initialization call (DFSCSII0) to obtain the callable service token and
a parameter list in which to build the function-specific parameter
list for the desired callable service. Use the ECB found at offset X'0'
of the Fast Path Input Edit/Routing Exit parameter list for the
DFSCSII0 call. This exit routine is automatically linked to DFSCSI00
by IMS. No additional linking is required to use callable services.
Sample routine [Link] (member name DBFHAGU0).
location
If your installation uses shared EMH queues, DBFHAGU0 can place messages on
the shared-queue structure for processing by any sharing IMS subsystem in the
sysplex.
You can modify the exit routine to specify an application name for the application
program used to process Fast Path input messages. If you do not specify an
application name, Fast Path locates the transaction or routing code in the local IMS
subsystem. Fast Path rejects the input message if it cannot locate the transaction or
routing code.
You can also specify a sysplex processing code that determines how a message
transaction or routing code is processed. The following sysplex routing options are
available:
Local First
Specifies that the message is processed on the local subsystem if an IFP
region is available. If no IFP region is available, the message is passed to
the EMH queue structure. A program name specified in the exit routine for
message processing overrides the transaction or routing code. Local First is
the default.
Local Only
Specifies that Fast Path does not place the message on the EMH queue
structure. Fast Path input messages are processed on the local IMS
subsystem.
Global Only
Specifies that Fast Path places the input message on the EMH queue
structure. The application program that processes the input message must
be active on all sharing IMS subsystems. If the application is not active,
Fast Path discards the input message and issues an error message. A
program name specified in the exit routine for message processing
overrides the transaction or routing code.
Recommendation: To avoid implicit priority for Local Only messages over Local
First messages, process Local First and Local Only messages under separate
program names. IMS places Local Only messages on the balancing group (BALG)
queue and Local First messages on the shared EMH queue. When an IFP region
becomes available, it checks the BALG queue for messages to process before it
checks the shared EMH queue. This sequence gives implicit priority to Local Only
messages that are processed in the same program.
Restrictions
You must rewrite your Fast Path Input Edit/Routing exit routine for this release of
IMS, based on the DBFHAGU0 sample (located in the [Link] library) and
the guidelines in this .
The exit routine cannot move the data out of the input location.
The exit routine must not increase the length of the message beyond a length that
fits in any message buffer.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of Standard Exit Parameter List.
13 Save area address.
Register Contents
14 Return address to IMS.
15 Entry point address of exit routine.
This exit routine uses the Version 1 standard exit parameter list.
The following table lists the Fast Path exit parameters. The address of this
parameter list is in the standard exit parameter list field SXPLFSPL.
Table 47. Fast Path input edit/routing exit parameter list
Offset Length
(decimal) (decimal) Description
+0 4 ECB address.
+4 4 SCD address.
+8 4 Input message.
+12 4 Address of routing code table entry if this is a Fast Path
exclusive transaction, or zero.
+16 4 Eight-character work area to supply a routing code name.
+20 4 Address of ESCD.
+24 4 The length of the EMH Buffer for this application.
+28 4 Address of the DBFHAGU0 extended parameter list. This
parameter list exists if shared EMH queues are used.
Otherwise, the extended parameter list is 0.
On return, all registers must be restored except for register 1 and 15, which must
contain the following:
Register Contents
1 Message number to send to inputting terminal.
15 One of the following return codes:
Return code Meaning
(decimal)
00 Schedule with Fast Path. Register 3 points to the RCTE to be
used.
04 Schedule with Fast Path using transaction code as the routing
code.
08 Schedule with Fast Path using the routing code you provide.
12 Return to IMS for processing.
16 Schedule with Fast Path using transaction code if the routing
code equal to transaction code is active; otherwise, let IMS
process it.
20 Schedule with Fast Path using routing code provided the
routing code is active; otherwise, let IMS process it. This is the
same action as user exit return code 08.
24 Discard input, send message from user table back to inputting
terminal.
28 Discard input, send message from system message table.
Related reference:
“Initialization of IMS callable services (DFSCSII0)” on page 16
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Restrictions” on page 169
v “Communicating with IMS” on page 170
During system definition, you specify the FES exit routine on the COMM macro
with the FESEXIT parameter, and you specify which VTAM nodes can do
front-end switching.
Front-End Switch is not related to Multiple Systems Coupling (MSC), and cannot
be used with MSC for the processing of the same transaction. Front-End Switch is
designed to connect an IMS network to non-IMS systems, and MSC is used for
homogeneous IMS networks.
The following table shows the attributes of the Front-End Switch exit routine.
Table 49. Front-end switch exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSFEBJ0.
Binding
This routine must be reentrant.
Including the routine If you want IMS to call the exit, include it in an authorized library
in the JOBLIB, STEPLIB, or LINKLIST library concatenated in front
of [Link]. If the exit routine is included, IMS automatically
loads it each time IMS is initialized.
IMS callable services
To use IMS callable services with this routine, you need to issue an
initialization call (DFSCSII0) to obtain the callable service token and
a parameter list in which to build the function-specific parameter
list for the desired callable service.
Use the ECB found in Register 9 for IMS callable services. This exit
is automatically linked to DFSCSI00 by IMS. No additional linking
is required to use IMS callable services.
Sample routine [Link].
location
You must code the exit routine for AMODE=31. You can define the RMODE as
ANY.
Restrictions
IMS uses the entry and exit registers to communicate with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Address of the FEIB. The FEIB contains all the information necessary for the
exit to function. The exit routine must store additional information in the
FEIB which is required for successful processing.
9 Address of ECB.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which must contain one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
The Front-End Switch exit routine gains control from an IMS system when the first
segment of an input message is received before IMS determines the destination of
the message. All input from FES-capable nodes and from ISC links are processed
by this exit routine. Both MFS Edit and Basic Edit can remove characters that have
a value less than X'41'.
For a diagram of the relationships among the front-end system, the intermediate
system, and the back-end system with regard to message switching, see the
following figure.
The exit routine must provide additional routing information to identify the reply
to this message when it comes back to the IMS front-end system. The user can tell
IMS to remove the added information before the reply message is sent to the
original terminal.
Intermediate Back-end
Front-end system systems system
In the preceding figure, the reply path is not shown to keep the diagram simple.
The reply would usually follow the same path back through the intermediate
system or systems to the front-end, and then to the originating terminal.
The exit routine takes control of each message that comes from an ISC or
FES-defined link. You must correlate the reply message to a previously switched
input message.
For a VTAM node (excluding ISC) defined as FES capable (by an OPTIONS=FES
on the TERMINAL, or TYPE macro, or ETO logon descriptor), the FEIB is allocated
when the session has been established. The block is released when the VTAM
session terminates and no reply for an FES message is outstanding.
Related Reading: For more information on the Extended Terminal Option (ETO)
feature, see IMS Version 14 Communications and Connections.
The interface block is also allocated for each ISC parallel session. This is done
automatically without special system definition at LOGON or OPEN DEST time.
The interface block is destroyed at LOGOFF time, at CLOSE DEST time, or at
session failure.
If the exit routine is not defined in the system or if the VTAM node is not defined
as FES capable, the FEIB will not be allocated.
Register 1 on entry to the exit contains the address of the interface block.
*---------------------------------------------------------------------*
* FEIB - FRONT END MESSAGE SWITCH INTERFACE BLOCK DSECT *
*---------------------------------------------------------------------*
FEIB DSECT
FEIBIFLG DS X USER EXIT INPUT FLAGS
FEIBISC EQU X’80’ MESSAGE FROM AN ISC LINK
* EQU X’40’ RESERVED BY IBM
* EQU X’20’ RESERVED BY IBM
* EQU X’10’ RESERVED BY IBM
* EQU X’08’ RESERVED BY IBM
* EQU X’04’ RESERVED BY IBM
* EQU X’02’ RESERVED BY IBM
* EQU X’01’ RESERVED BY IBM
FEIBOFLG DS X USER EXIT OUTPUT FLAGS
FEIBRPQ1 EQU X’80’ QUEUE RESPONSE TO ORIG DEVICE
* ELSE QUEUE SMB NAMED IN FEIBNDST
FEIBERP EQU X’40’ ON TIMEOUT CALL ERP, ELSE ERR MSG
* EQU X’20’ RESERVED BY IBM
FEIBTMED EQU X’10’ TIME RESPONSE WITH SYSDEF VALUE
* EQU X’08’ RESERVED BY IBM
* EQU X’04’ RESERVED BY IBM
* EQU X’02’ RESERVED BY IBM
* EQU X’01’ RESERVED BY IBM
FEIBMSGN DS H TIMEOUT ERROR MESSAGE NUMBER
* ONLY USED IF FEIBERP OFF
FEIBLTRM DS CL8 LTERM NAME OF ORIGINAL TERMINAL
* ONLY AVAILABLE IF FEIBISC OFF
FEIBMSG DS A POINTER TO INPUT MESSAGE BUFFER
FEIBUNID DS F UNIQUE ID NUMBER (FULL WORD BIN)
FEIBNDST DS CL8 NAME OF NEW DEST TO QUEUE MESSAGE
FEIBERPN DS CL8 NAME OF ERP TO CALL ON TIMEOUT
* ONLY USED IF FEIBERP ON
FEIBLDST DS CL8 NAME OF DEST TO QUEUE LATE MESSAGE
FEIBULNG DS H LENGTH OF DATA IN USER AREA
FEIBUSER DS CL40 USER AREA FOR DATA TO PREFIX MSG
* ONLY USED IF FEIBULNG > 0.
FEIBIMID DS CL4 IMS IDENTIFIER
FEIBTIME DS H TIMEOUT INTERVAL (SECONDS)
FEIBPRN DS CL8 PRIMARY RESOURCE NAME ADDED
TO USER DATA BY ISC EDIT
Related reference:
“Routing information” on page 177
The following table show the input fields and the output fields
The following table shows the input and output fields for reply message
processing.
0 - nothing
8 - Reply
12 - Table error
Flags: FEIBISC Flags: FEIBRPQ1
Intermediate system FEIBMSG (A) FEIBNDST (CL8)
0 - Nothing
6 - New destination from IBE
12 - Table error
Flags: FEIBISC Flags: N/A
Back-end system N/A N/A
Routing information
You are responsible for the format and the contents of the routing information.
If the value of the FEIBULNG field is greater than zero, IMS adds the user data on
an input message from an FE device to the input message between the old
destination and the message [Link] MFS edit and Basic Edit can remove
characters that have a value less than X'41'. As part of the routing information, the
following is required:
v A unique identifier assigned to the input message from the originating terminal.
This identifier must be sent with the user data to identify the reply to this
message when it comes back to IMS. For messages being processed by either
MFS or Basic Edit, the identifier value must be translated into unpacked format.
v The LTERM name of the originating terminal. IMS does not have access to the
control blocks of the originating terminal when the reply to a switched message
arrives. Therefore the exit routine must add the LTERM name of the originating
terminal to the user data. This LTERM name is to be rerouted with the reply
from the back-end system and must not be removed or changed by any
intermediate system.
When the exit routine gains control from IMS on input of the reply message, it
obtains the LTERM name and the unique identifier from the message text and
stores them into the corresponding fields of the FEIB. IMS then determines the
original input terminal and checks if timeout has already occurred. The destination
of the message is determined by the result of this check.
Be aware that the TPCBTSYM field of the I/O (TPPCB) might contain the ISC
LTERM name when the application does an ISRT reply back to the originating
LTERM. This choice is decided by the exit routine.
If the timer has expired, the message is no longer expected at the original terminal,
because it is already released from response mode. The message is then sent to the
destination defined by the exit routine for late reply messages.
Besides required routing information, the routine can store additional information,
such as a unique system identification throughout all connected systems.
Application programs processing FES messages must understand that the input
message contains routing information which must be rerouted to the front-end
system. The routing information in all the involved systems must be in agreement.
The routing information in the input message must be included in the output
message.
Message expansion
Combine the original message with the routine information and store it in the new
buffer.
Because the DC buffer is not large enough to store the routing information, use the
FEIBUSER field of the FEIB. The length of the user data must be stored in the
FEIBULNG field of the FEIB. The maximum length of user data is 40 bytes. IMS
combines the original message with the user data and stores both into the new
buffer. The new destination (FEIBNDST) is also stored into the new buffer.
The following figure shows the original and new buffer formats.
New_Dest
New destination from FEIBNDST field
User_Data
User data from FEIBUSER field
The old destination and the new destination are both followed by a blank. You
must lay out the routing information. After IMS has expanded the message, the
routing information should precede the original message text.
Timer facility
The timer facility controls each input message that is routine to a back-end system.
When the specified time interval expires without a reply to the input message, the
input terminal is released from response mode. The timeout value is specified
during system definition on the COMM macro and can be overwritten by the
FESTIM parameter on the IMS procedure, or by specifying a non-zero value in the
FEIBTIME field during front-end processing of an input message. To make use of
the timer, set the FEIBTMED flag in the FEIB. In addition, you must specify the
action which has to be taken at timeout. This can be done by specifying either the
name of a program that is to be given control (FEIBERPN field) or a message that
is to be issued (FEIBMSGN field). The message number must be included in the
user message table DFSCMTU0. See DFSCMTU0 for more information. The
program can send a message to the input terminal using the I/O PCB. This
response releases the terminal from response mode. The message text is directly
sent to the input terminal if you define a message number.
If the reply comes in time, the timer request for the input message is canceled. No
timeout can occur if you do not set the FEIBTMED indicator. If no reply is
received, the terminal is not released from response mode.
If the input terminal is in an active conversation status, the timer facility will not
be activated.
When switching to a local Fast Path transaction, the timeout facility can be
deferred until Fast Path sync-point by setting the FEIBDELT flag.
FEIBRPQ1 indicator
The FEIBRPQ1 indicator must be set in the FEIB for a reply message to be sent
directly to the original input terminal.
This indicator can only be set when a reply message has a return code of 8 in
register 15. If you do not set it, you have to store a new destination into the
FEIBNDST field of the FEIB. IMS checks the indicator and sends the message,
depending on the values in the FEIB.
If you change the destination code of an input message to a local transaction which
sends a message across a link, the timer supervisor includes the elapsed time for
the local transaction.
Subsections:
v “Routing scheme”
v “Description of sample exit routine” on page 181
Routing scheme
In the following figure, three IMS systems are connected by ISC links. SFIMS2 acts
as the front-end system, and LAIMS1 and NYIMS1 can act as a back-end system.
In addition, LAIMS1 can act as an intermediate system.
In each system, you can enter a transaction FESTX1. This is not defined as a
transaction in the system, but is a special transaction code used by the sample exit
routine that identifies this message as an FES transaction. The exit routine in the
front-end system (SFIMS2) changes the transaction code to FESTX2, which must be
defined in the system as a valid transaction.
There is an eight-digit location code (LOC-code) in the user data. The decision as
to which system processes the transaction depends on this LOC-code. If the
transaction is to be processed in another system, the exit routine changes the
destination to LAIMS1 so that either LAIMS1 or NYIMS1 processes the transaction
FESTX2.
The system that processes the transaction FESTX2 generates an output message
containing the transaction code FESTX3 in front of the message text. As with FESTX1,
this is not defined as a transaction in the system, but is a special transaction code
used by the sample exit routine that identifies this message as a reply to an FES
transaction. This output message has to be routed to the front-end system where
the corresponding FESTX1 transaction was entered which is now the target system
for the reply message.
1
Note: This table is used only if it is an intermediate system
Table 55. LAIMS1 tables
LAIMS1 - table I LAIMS1 - table II
1st digit of LOC-code
Next Target Next
system system system
1
Note: This table is used only if it is an intermediate system
The example in this section is based on the assumption that ISCEDIT is used for
editing the messages going across ISC links. ISCEDIT removes the first data field
of the message text on output to an ISC destination.
The exit routine is designed to run in each of the three systems without modifying
the code. It has to process different tables with routing information for each
system, and has to know the name of the owning system. This is obtained from the
FEIBIMID field. In this example:
v NYIMS1='IMS1' back-end system
v LAIMS1='IMS2' back-end or intermediate system
v SFIMS2='IMS3' front-end system
The exit routine in each system must analyze the transaction code and the
LOC-code in the message text:
v If the transaction code is FESTX1, and
– Change the transaction code to FESTX2.
– If the LOC-code is in table I:
- Change the transaction code to FESTX2.
- Change the destination to the corresponding destination from table I
(FEIBNDST).
- Set the FEIBTMED indicator on, if appropriate.
- Set the FEIBERP indicator on, if appropriate.
- Set the transaction code for ERP (FEIBERPN), if appropriate.
- Store the following routing information into the user area of the FEIB
(FEIBUSER) as shown in the following figure.
The FEIBUNID value is unpacked into zoned format to prevent MFS Edit
- Get the LTERM name from the routing information and store it into the
interface block (FEIBLTRM).
- Get a unique identifier from the routing information, change it from zoned
to packed format, and store it in the interface block (FEIBUNID).
- Set the transaction code for a message which comes too late (FEIBLDST).
- Set the FEIBRPQ1–indicator.
- Set the user data length field to 31 (FIEBULNG).
- Set the RC=08 in register 15.
v In all other cases no action is taken by the exit routine.1
This topic describes the Global Physical Terminal Input edit routine. This routine is
a user-written edit routine that performs the same functions as the Physical
Terminal Input edit routine (DFSPIXT0).
Subsections:
v “About this routine”
v “Communicating with IMS” on page 185
If you write and include the routine in your system, IMS calls it for all terminals
that do not have the Physical Terminal Input edit routine specified. By using the
Global Physical Terminal Input edit routine instead of the Physical Terminal Input
edit routine, you can eliminate the overhead associated with defining the edit
routine for each terminal through system definition.
If the input message is processed by MFS, the Global Physical Terminal (Input) edit
routine is not called. This edit routine is only called when a non-LU 6.2 message is
entered from a terminal; it is not called when the message is inserted by a
program-to-program switch.
Message segments are passed one at a time to the Global Physical Terminal (Input)
edit routine, and the edit routine can handle them in one of the following ways:
v Accept the segment and release it for further editing by the IMS Basic Edit
routine.
v Modify the segment (for example, change the transaction code or reformat the
message text) and release it for further editing by the IMS Basic edit routine.
Examples of segment modifications that can be made are:
– changing the transaction code.
– reformatting the message text.
v You can make any required modifications within the original segment because
IMS has not yet performed destination or security checking.
1. In an IMS back–end system, which processes TX2, an application program generates the output message with TX3.
The following table shows the attributes of the Global Physical Terminal (Input)
Edit exit routine.
Table 57. Global physical terminal input edit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSGPIX0.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must do the
following:
v Issue initialization call (DFSCSII0) to obtain the callable service
token and a parameter list in which to build the function-specific
parameter list for the desired callable service.
v Use the ECB found in register 9 for the DFSCSII0 call.
v Link DFSCSI00 with your user exit.
Sample routine No sample exit routine is provided. Instead, use the
location [Link] distribution library (member name DFSPIXT0).
If the IMS application program supplies [Link] in the MOD name parameter
for the output message, IMS bypasses the Basic Edit routine, except for transaction
code and password validation.
Related Reading: For further information see “MFS Bypass for 3270 or SLU 2” in
the “Application Programming Using MFS” in IMS Version 14 Application
Programming APIs.
The Physical Terminal Input edit routine must position the transaction code, and
optionally the password, if the terminal is not operating in conversational or preset
destination mode. The edit routine should detect errors and have IMS send a
message to the terminal operator if the routine finds any errors.
IMS maintains a flag in the CTB (bit CTB6TRNI in the CTBFLAG6 field) to indicate
when 3270 MFS bypass, nonconversational, no preset destination and first segment
exist on input to the Global Physical Terminal (Input) edit routine. This flag
notifies the Global Physical Terminal Input edit routine that it can add a minimum
of one byte and a maximum of 18 bytes to the front of the message segment for a
transaction code and optional password. The minimum of one byte to be added to
the front of the message segment consists of a one-byte transaction code. If
NOBLANK is not specified at system definition, a minimum of two bytes is added
to the front of the message segment, consisting of a one-byte transaction code and
one blank, which is necessary as a separator. To add a transaction code and
optional password, the exit routine can put a return code of 16 in register 15 and
set register 1 to point to an LLZZ field followed by the data to be added. You
cannot, however, alter the length of the segment passed in to the exit. If you need
to insert a transaction or destination code, and an optional password, set register 1
to the address of a static data field that consists of a halfword length (LL), a
halfword of binary zeroes (ZZ), and zero to 14 bytes of user data.
You must assemble and bind the edit routine into the IMS execution time library or
user library concatenated in front of the IMS execution time library.
IMS calls the Global Physical Terminal Input edit routine (DFSGPIX0) for each
terminal that does not have EDIT=(,YES) coded on the TERMINAL macro or ETO
logon descriptor.
Related Reading:
v For more information on the TERMINAL macro, see IMS Version 14 System
Definition.
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the edit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Content
1 Address of the input message segment buffer. IMS editing has not been
performed. The first two bytes of the buffer contain the segment length
(binary length includes the 4-byte overhead). The third and fourth bytes of
the buffer are binary zeros. The message text begins in the fifth byte of the
buffer.
If the device was defined with MFS support, but this message is not being
processed by MFS, the first segment of the message has backspace error
correction performed before entry to this edit routine. If escape (**) was
entered by the terminal operator, the first two data bytes have been changed
to binary zeros.
7 Address of CTB for the physical terminal from which the message was
entered.
9 Address of CLB for the physical terminal from which the message was
entered.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of edit routine.
The edit routine you supply can edit the message segment in the buffer pointed to
by register 1.
You can reduce the length of the message segment to any size by replacing the
length in the buffer with the appropriate value. The length field must appear in the
same place at exit as at entry, and bytes 3 and 4 must not be changed.
Before returning to IMS, the edit routine must restore all registers except for
register 1, which contains a message number if register 15 contains a value of 12;
otherwise register 1 is ignored. Register 15 contains one of the following return
codes:
When the entering terminal is not a 3270 MFS bypass terminal, and the
physical terminal input exit gives a return code of 16, IMS issues an error
message, and the transaction code is not inserted in the message.
Any other return code causes the message to be canceled and the terminal operator
to be notified.
Related reference:
“Routine binding restrictions” on page 8
Subsections:
v “About this routine”
v “Communicating with IMS” on page 188
IMS builds a message based on the calling module's request. This message, plus
information useful to the exit and a buffer for returning an alternate message built
by the exit, are passed as input to the exit. The exit indicates by a return code if
the message built by IMS should be used, or if an alternate message has been
returned and should be used. The message length returned must be at least five
bytes (four bytes for the length field and a one-byte message).
The following table shows the attributes of the Greeting Messages exit routine.
Table 58. Greeting messages exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSGMSG0.
Including the routine You can assemble the sample exit routine, or one that you write (using the standard
IMS macro and copy files), and include it in an authorized library in the JOBLIB,
STEPLIB, or LINKLIST library concatenated in front of the [Link]. If the
Greeting Messages exit routine is included, IMS automatically loads it each time IMS is
initialized.
IMS callable services To use IMS callable services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service token and a
parameter list in which to build the function-specific parameter list for the desired
callable service.
v Use the ECB found at offset 0 of the Greeting Messages Exit parameter list.
v Link DFSCSI00 with your user exit.
Sample routine location [Link] (member name DFSGMSG0).
The sample exit uses the DFS3649 and DFS2467 messages built by IMS, but it converts
the DFS3650 message to a single-segment message. You can also write your own exit
routine.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
13 Save area address
14 Return address to IMS
15 Entry point address of exit routine
The following table shows the greeting messages exit parameters. The address of
this parameter list is in the standard exit parameter list field SXPLFSPL.
Table 59. Greeting messages exit parameter list
Offset Length Description
+0 4 ECB address.
+4 4 SCD address.
+8 4 Pointer to User Table.
+12 4 Address of parameter list for this exit. For additional
details on the content and the format of these
parameters, see the prolog in the sample routine.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains the return code. The returns codes are as follows:
Register Contents
15 One of the following return codes:
Return code
Meaning
X'00' Use the message built by IMS.
X'04' Use the message in the alternate buffer (single segment).
X'08' Use the message in the alternate buffer (multiple segment).
X'0C' Send a null message so that the device is formatted with the MFS
format specified by IMS or returned by the exit.
X'10' Bypass password verification. Valid only for message DFS3656A.
Related reference:
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
Related information:
You can use DFSREXXU with the IMS adapter for the REXX environment. It is
optional and can be omitted from the bind step. The user exit routine is used more
for an installation than for a specific execution. The user exit routine is provided
by the IMS adapter for REXX and is called only when a new REXX transaction is
scheduled and ends. The user exit is not associated with the standard REXX exits
provided by TSO. A sample user exit routine (DFSREXXU) is shipped with IMS (in
source code only). For the latest version of the DFSREXXU source code, see the
[Link] distribution library; member name is DFSREXXU.
The user exit routine must conform to all of the restrictions that apply to IMS
application programs.
Subsections
v “About this routine”
v “Parameters” on page 190
The following table shows the attributes of the IMS Adapter for REXX exit routine.
Table 60. IMS Adapter for REXX exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL.
Naming convention The user exit routine must be named DFSREXX0.
Binding You must bind the user exit with DFSREXX1 during installation of
the IMS adapter for REXX.
Including the routine No special steps are required to include this routine.
IMS callable services This exit routine is not eligible to use IMS callable services.
Table 60. IMS Adapter for REXX exit routine attributes (continued)
Attribute Description
Sample routine [Link] distribution library.
location
The routine must be written to be reentrant (RENT), AMODE 31, RMODE ANY.
Parameters
On exit, all registers except R15 must be restored. Only the parameters can be
altered. The content of R15 is ignored on exit.
The parameter list contains a list of pointers to the parameters. All character data is
left justified and padded with blanks, if necessary. Omitted fields are set to blanks.
All fields are read-only unless otherwise specified. The following table shows the
user exit parameter list format.
Table 61. User exit parameter list
Name Offset Data type Length Description
(decimal) (decimal)
Function 0 Pointer 4 Pointer to one word function type. Func=0 on Setup Call,
Func=1 on Entry Call, Func=2 on Exit Call.
EXECParm 4 Pointer 4 Pointer to 128-byte area containing parameters that are
passed to the REXX interpreter. The format of the area is
a halfword length field that contains the length of the
text string that follows. The first blank separated word or
the entire string if no blanks are present is the exec name
to execute. On entry this field is set to the program name
followed by one blank and the transaction code if
available. The exit can rebuild this field when called on
entry to alter the exec name or parameters that are
passed. The length field can be set to zero indicating no
exec is to be executed.
PgmName 8 Pointer 4 Pointer to 8-byte area containing the Program name that
was scheduled.
TranCode 12 Pointer 4 Pointer to 8-byte area containing the Transaction Code
that was scheduled, if available (MPP,BMP,IFP).
User_ID 16 Pointer 4 Pointer to 8-byte area containing the current user ID for
the scheduled program, if available (MPP,BMP,IFP).
For each user exit parameter described in the preceding table, the following table
shows the corresponding DFSREXXU parameter.
Table 62. DFSREXXU parameter list
User exit parameter DFSREXXU parameter
Function pointer FUNCTION_CODE DS F FUNC_SETUP EQU 0
FUNC_BEFORE EQU 1 FUNC_AFTER EQU 2
EXECParm pointer EXEC_PARM DS 0CL128 EXEC_PARM_LL DS H
EXEC_PARM_TXT DS CL126
PgmName pointer PGM_NAME DS CL8
TranCode pointer TRAN_CODE DS CL8
User_ID pointer USER_ID DS CL8
IMSRXTRC pointer IMSRXTRC_LEV DS F
UserArea pointer USER_AREA DS 2F
RetCode pointer RETURN_CODE DS F
Useridind pointer USERID_IND DS F
Related concepts:
Using the environment block
In an XRF environment, the alternate IMS registers with CQS and receives CQS
events only if CQS is active when the alternate IMS is started. Otherwise, no CQS
events are received by the alternate IMS until it takes over and becomes the active
IMS.
The address for this parameter list is passed to the exit routine in the SXPLFSPL
field of the “IMS standard user exit parameter list” on page 4. This parameter list
is mapped by the DFSIXTP macro.
Table 64. Parameter list for the IMS CQS event user exit type
Field name Offset Length Usage Description
CEXP_PVER X’00’ X’04’ Input Parameter list version number (X’00000001’)
Table 64. Parameter list for the IMS CQS event user exit type (continued)
Field name Offset Length Usage Description
CEXP_FUNC X’04’ X’04’ Input Function code:
1 CQS event
CEXP_LEN X’08’ X’04’ Input CEXP parameter list length. This value does not
include the length of the CQS event client exit
parameter list.
CEXP_RGNTYPE X’0C’ X’04’ Input Region type:
1 DB/DC
3 DCCTL
CEXP_CQSEVLEN X’10’ X’04’ Input CQS event client parameter list length.
CEXP_CQSEVPTR X’14’ X’04’ Input Pointer to the CQS event client exit parameter list. This
parameter list is mapped by CQSCEVX.
There is no requirement for exit registers and there are no defined return and
reason codes.
The address for this parameter list is passed to the exit routine in the SXPLFSPL
field of the “IMS standard user exit parameter list” on page 4. This parameter list
is mapped by the DFSIXTP macro.
Table 66. Parameter list for the IMS CQS structure event user exit type
Field name Offset Length Usage Description
CSXP_PVER X’00’ X’04’ Input Parameter list version number (X’00000001’)
CSXP_FUNC X’04’ X’04’ Input Function code:
1 CQS structure event
CSXP_LEN X’08’ X’04’ Input Parameter list length. This value does not include the
length of the CQS structure event client exit parameter
list.
CSXP_RGNTYPE X’0C’ X’04’ Input Region type:
1 DB/DC
3 DCCTL
CSXP_CQSEVLEN X’10’ X’04’ Input CQS structure event exit parameter list length.
CSXP_CQSEVPTR X’14’ X’04’ Input Pointer to the CQS structure event client exit parameter
list. This parameter list is mapped by CQSSEVX.
There is no requirement for exit registers and there are no defined return and
reason codes.
area (if it exists). The address of this data area is also passed as part of the
nonstandard interface to the following exit routines:
Command Authorization exit routine (DFSCCMD0)
Greeting Messages exit routine (DFSGMSG0)
Logoff exit routine (DFSLGFX0)
Logon exit routine (DFSLGNX0)
Destination Creation exit routine (DFSINSX0)
Signoff exit routine (DFSSGFX0)
Signon exit routine (DFSSGNX0)
The general user data area is not available to some IMS user exit routines when
they are called during IMS initialization, because the DFSINTX0 user exit routine
is called during IMS initialization after these user exit routines are called. The
user data area is not available to the following exit routines when they are called
during IMS initialization: AOIE, DFSPSE00, DFSHINT0, DFSZINT0,
DFSQSPC0/DFSSSSP0, and RASE.
Other TM exit routines can address the user data table through SCDINTXP.
Refer to the topic for each exit routine for information on the routine's parameter
list.
v LU 6.2 user data area
The LU 6.2 user data area is not passed as part of the IMS standard user exit
interface. It is passed as part the nonstandard interface to the LU 6.2 Edit exit
routine.
You can also use this exit routine to alter the setting for the Extended Terminal
Option (ETO) feature. You can leave ETO activated or override the setting to
indicate that ETO is not required, even if you previously requested it.
This exit is also used to enable password verification. The IMS default processing
is to disable password verification. With password verification, users signing on to
VTAM terminals that change their password are prompted to verify the new
password.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 196
The Initialization exit routine is optional. If the exit is included in the system, IMS
calls it before IMS loads the ETO descriptors and any exit routine that requires
ETO to be active. If ETO is required for an exit routine, the documentation for the
routine states that requirement. If the Initialization exit routine returns a return
code indicating that ETO should not be made available, the ETO exit routines and
descriptors will not be loaded. If this exit is not included in the system, IMS
proceeds using the setting for the ETO= keyword that is specified as an EXEC
parameter or in the DFSPBxx of [Link].
The initialization exit routine can optionally enable password verification and an
alternate ETO ALOT=0 option by setting the appropriate flags in the exit routine
parameter list.
The following table shows the attributes of the Initialization exit routine.
Table 67. Initialization exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSINTX0.
Binding This exit routine must be reentrant.
Including the routine If you want IMS to call the Initialization exit routine, include it in
an authorized library in the JOBLIB, STEPLIB, or LINKLIST library
concatenated in front of the [Link]. If the exit routine is
included, IMS automatically loads it and calls it at initialization.
IMS callable services DFSINTX0 can use callable storage services. To use IMS callable
services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service
token and a parameter list in which to build the function-specific
parameter list for the desired callable service.
v Use the ECB found at offset X'0' of the IMS Initialization exit
parameter list.
v Link DFSCSI00 with your user exit.
Sample routine [Link] (member name DFSINTX0).
location
The user data areas can be used to provide access to user tables that can then be
referenced by any user exit that has access to the data area. An example of the use
of general user data area is for ETO. You can use the general user data area to
define access limits for terminals or users by total number, department, time of
day, or other criteria. You can also use the data area to define LTERM-to-user or
user-to-terminal relationships to aid your installation logon and signon exit routine
processes.
For APPC, you can use the LU6.2 user data area along with the LU6.2 User Edit
exit routine to emulate MFS. To do so, the LU6.2 user data area is built by
DFSINTX0 to hold a list of LTERM and MOD names available to the I/O PCB. IMS
then passes the address of the LU6.2 user data area LU 6.2 Edit exit routine for
input and output messages from a LU6.2 destination. The LU 6.2 Edit exit routine
can use the list of LTERM names to redirect output to a non-LU6.2 destination, or
the list of MOD names to format a message.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
R13 Save area address
Register Contents
R14 Return address to IMS
R15 Entry point address of exit routine
The following table shows the IMS initialization exit parameters. The address of
this parameter list is in the IMS standard user exit parameter list field SXPLFSPL.
The Initialization exit routine parameter list is mapped by macro DFSINTXP.
Table 68. IMS initialization exit parameter list
Offset Length Description
+0 4 CLB address
+4 4 SCD address
+8 4 0, as an indication that no user table exists
+12 4 0, as an indication that no LU 6.2 user table exists
+16 1 Input/Output Flag Byte
X'80'
0 No password verification (default).
To enable password verification, set
this flag to 1.
X'40'
0 Default ETO ALOT=0 process
X'10'
0 Static ISC resource sharing (default)
X'08'
0 ETO LU type 3 is not allowed to
log on as a SLU1 (default)
X'04'
0 ETO LU type 3 is not allowed to
log on as a 3270 printer (default)
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains the return code.
The address of the general user data area created by this exit routine can be
returned in the Initialization exit parameter list at +8. If zero, no general user data
area was created. If non-zero, IMS saves the address in the SCD control block at
SCDINTXP.
The address of the LU 6.2 user table created by this exit routine can be returned in
the Initialization exit parameter list at +12. If zero, no LU 6.2 user table was
created.
Register Contents
15 One of the following return codes:
Register Contents
Return code Meaning
0 Initialization of IMS continues.
4 Regardless of ETO specification, ETO terminal support is not
required. Message DFS3648 is sent to the system console.
Setting RC=4 resets both ETO function and logon user data
support.
8 Regardless of ETO specification, ETO terminal support is not
required but logon user data is supported for static terminals.
Message DFS3648 is sent to the system console. Setting RC=8
resets ETO function only.
Notes:
1. ETO LU type 3 is allowed to log on either as SLU1 or 3270 printer, but not both.
Related tasks:
Using the MOD name and LTERM interface (Communications and
Connections)
Related reference:
“LU 6.2 Edit exit routine (DFSLUEE0)” on page 214
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
This topic describes how to write an Input Message Field edit routine. Because this
routine is usually used with the Input Message Segment edit routine, you'll find
references to both routines throughout the following paragraphs.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 200
MFS application designers should consider the use of Input Message Field and
Segment edit routines to perform common editing functions such as numeric
validation or conversion of blanks to numeric zeros. Field and Segment edit
routines can simplify programming by using standard field edits to perform
functions that would otherwise have to be coded in each application program.
The following table shows the attributes of the Input Message Field Edit routine.
Table 70. Input message field edit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSME000.
Binding A Field edit routine must have a CSECT name of DFSMEnnn, where nnn is a number
from 001 to 126 that corresponds with the routine number specified in the MFLD
statement.
The edit routine needs to be linked into the library specified by the USERLIB
parameter of the IMSGEN Stage 1 macro before running the IMSGEN. The default for
this parameter is [Link].
The Field edit routine can only modify the data in the field created by MFS and must
not cause any waits.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must issue an initialization call
(DFSCSI00) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service.
Use the ECB found in register 9 for IMS callable services. This exit is automatically
linked to DFSCSI00 by IMS. No additional linking is required to use IMS callable
services.
Sample routine location [Link] (member name DFSME000).
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the edit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list.
9 Address of CLB/ECB.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of edit routine.
Byte Contents
0
Bit Contents
0,1 Message formatting option:
v 00 = option 1
v 01 = option 2
v 11 = option 3
2 Zero (Field edit routine)
3 Reserved
4 1 if the first 2 bytes in the field contains attribute information
5 1 if the field contains extended field attribute information
6 Reserved
7 Reserved
1 Zeros
2 The number of reserved extended field attribute bytes in the field. These
bytes appear immediately after the 3270 attribute bytes, if any.
3 The entry vector in binary (0 to 255).
4-7 The execute length (length-1) of the field as defined in the MFLD statement.
If ATTR=YES is specified, this field contains (length-3).
8-11 The field address after MFS editing (before uppercase translation and null
compression for option 1 and 2 fields). If ATTR=YES is specified, this is the
address of the first data byte after the two attribute bytes. For option 3, this
is the address of the 2-byte field length, which begins the completed option 3
field.
Before returning to IMS, the edit routine must restore all registers except for
register 15, which must contain one of the following return codes:
Register Contents
15 Return code value from 0 to 255
This routine will handle option 1, 2, and 3 formats. For option 1 and 2, MFLD
FILL=NULL and an entry vector of 1 can produce undesirable results.
Related reference:
“Input Message Segment edit routine (DFSME127)” on page 202
“IMS callable services” on page 12
“Routine binding restrictions” on page 8
Field edit routines are given control after MFS editing (before Segment edit
routines, uppercase translation for all options, and null compression for option 1 or
2). The routine can validate or alter the data and pass a return code to MFS. MFS
maintains the highest return code of all Field edit routines for each segment and
passes that code to the Segment edit routine after all fields for that segment are
edited.
Field edit routines are defined in the MID's MFLD statements in terms of a routine
number and entry vector.
Routine numbers identify the routine to be used for this field/segment. Routine
numbers range from 000 to 127. IMS-provided routines use numbers 000 (field edit,
DFSME000) and 127 (segment edit, DFSME127).
If you are using both the Field edit and Segment edit routines with your IMS
system, the Field edit routine should be assigned routine numbers that are lower
than the numbers assigned for the Segment edit routine. Therefore, the Field edit
number should be a decimal number greater than or equal to 0, and less than the
default or specified value for the Segment edit routine number parameter. The
default for the Field edit routine is 0.
Recommendation: Assign lower numbers to field exit routines and higher number
to segment exit routines.
Entry vectors are passed to the edit routine when it is activated. Entry vector
values can range from 0 to 255. The entry vector value can be thought of as an
additional qualification of the routine to be activated. For example, routine number
025 can perform numeric validation of a field; entry vector 0 can replace leading
blanks with zeros, and entry vector 1 can perform numeric validation.
If data is entered from the terminal in lowercase, the data is in lowercase when it
is presented to the edit routine. If data in an input segment is in nongraphic form,
GRAPHIC=NO should be specified in the SEG statement to prevent null
compression and uppercase translation. A valid byte value of a binary field could
be equivalent to a null character (X'3F') or some lowercase alphanumeric (for
example, a=X'81'). In this case, GRAPHIC=NO should be specified.
Related Reading: For a description of which characters MFS considers graphic, see
the SEG statement section in IMS Version 14 System Utilities.
Related information:
COMM macro statement (System Definition)
Performance considerations
When Field and Segment edit routines are used, extra processing occurs in the IMS
control region and, if used extensively, a measurable performance cost is incurred.
These edit routines also can improve performance by reducing processing time in
the message processing region, by reducing logging and queuing time, and by
allowing field verification and correction to be accomplished without scheduling
an application program. Efficiency of these user-written routines should be a prime
concern. Because these routines execute in the IMS control region, an abend in the
edit routine causes the IMS control region to abend.
This topic describes how to write an Input Message Segment edit routine. Because
this routine is usually used with the Input Message Field edit routine, you will
find references to both routines throughout the following paragraphs.
Subsections:
v “About this routine”
v “Communicating with IMS”
v “Function of the sample routine” on page 205
The following table shows the attributes of the Input Message Segment edit
routine.
Table 71. Input message segment edit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSME127.
binding
A Segment edit routine must have a CSECT name of DFSMEnnn,
where nnn is a number from 001 to 126 that corresponds with the
routine number specified in the SEG statement. It must be stored in
USERLIB before Stage 2 of IMS system definition is executed.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must issue an
initialization call (DFSCSII0) to obtain the callable service token and
a parameter list in which to build the function-specific parameter
list for the desired callable service.
Use the ECB found in register 9 for IMS callable services. This exit
is automatically linked to DFSCSI00 by IMS. No additional linking
is required to use IMS callable services.
Sample routine [Link] (member name DFSME127)
location
IMS uses the entry registers, parameter list, and exit registers to communicate with
the edit routine.
On entry to the edit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
0 Address of CLB.
1 Address of parameter list.
9 Address of CLB/ECB.
13 Address of save area. The edit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of edit routine.
Byte Contents
0
Bit Contents
0, 1 Message formatting option:
00 = option 1
01 = option 2
11 = option 3
2 1 (Segment edit routine)
3
1 If this message can be routed back to the device
by specifying return code 16. This bit is set on
when the following conditions are met:
v PAGDEL=YES or OPTIONS=(...,PAGDEL,...) is
specified in the TERMINAL macro for this
device.
v The device has an output logical terminal.
If the message contains a valid operator logical
paging request, bit 3 can be set on. However,
this message is not returned to the terminal if
requested.
4-7 Reserved
1,2 Zeros
3 The entry vector is binary (0 to 255).
4-7 The maximum segment length.
8-11 The segment address.
12-15 The highest return code from the Field edits for this segment.
16-23 The next MOD name.
The Segment Edit routine can modify only the segment contents, the save area,
and the next MOD name field of the parameter list. The MOD name field name
should be changed when the edit routine returns the input message to the device.
If the segment is option 1 or 2, the routine can set the segment length field to any
value from 0 to the maximum segment length. The Segment Edit routine must not
cause any waits.
On return to IMS, all registers must be restored except for register 15, which must
contain one of the following return codes:
All segments of a multisegment message are edited before the message is returned
to the device (return code 16); if return code 8 or 12 is specified for a segment
other than the final one, the message is canceled immediately and the remaining
segments are not edited.
In IMS releases with ETO, the Input Message Segment edit routine cannot use
return code 16 during the ETO signon process. This is due to the lack of a valid
output LTERM.
The functions of this routine are based on the entry vector and the highest Field
edit routine return code (FLD-RC) for the segment. This routine only performs
modifications of messages using formatting options 1 and 2. The functions are
shown in the following table.
Table 72. Input message segment edit routine functions based on the entry vector.
Input
vector FLD-RC Resulting function action SEG-RC
0 <4 None. 0
>= 4 Places EBCDIC return code in last 3 bytes of the 0
segment.
1 <4 None. 0
>= 4 Places EBCDIC return code in last 3 bytes of the 0
segment.
<8 None. 4
2 <4 None. 0
=4 <8 Places EBCDIC return code in last 3 bytes of the 0
segment.
>= 8 None. 8
3 <4 None. 0
=4 <8 Places EBCDIC return code in last 3 bytes of the
segment.
>=8 None. 6
4 ANY Sets FLD-RC as user message number. 12
Notes:
1. To continue processing
2. To cancel this segment
3. To cancel this message
4. To send this message back to the entering terminal
5. To cancel this message and send the user message, whose number is in register 1, back
to the entering terminal
Related reference:
Based on the return code received from Field or Segment edit routine, the Segment
edit routine can:
v Continue processing.
v Modify the segment.
v Cancel the segment.
v Cancel the message and IMS will notify the operator using the message DFS298
INPUT MESSAGE CANCELED BY MFS EXIT.
v Return a predefined message to the terminal.
v Return the input message to the terminal.
Restriction: The following applies only to IMS releases with ETO. During the ETO
dynamic terminal signon process, the Input Message Segment edit routine cannot
use return code 16 to return the input message to the terminal. This is because a
valid output LTERM has not yet been established.
Segment edit routines are defined in the MID's SEG statements. Each routine is
defined in terms of a routine number and an entry vector.
Routine numbers identify the routine to be used for this field or segment. Routine
numbers range from 000 to 127. IMS-provided routines use numbers 000 (Field
edit, DFSME000) and 127 (Segment edit, DFSME127).
If you are using both the Field edit and Segment edit routines with your IMS
system, the Field edit routine should be assigned routine numbers lower than the
numbers assigned for the Segment edit routine. Therefore, the Field exit number
should be a decimal number greater than or equal to 0, and less than the default or
specified value for the Segment exit routine number parameter. The default for the
Field edit routine is 0.
Entry vectors are passed to the edit routine when it is activated. Entry vector
values can range from 0 to 255. The entry vector value can be thought of as an
If data is entered from the terminal in lowercase, the data is in lowercase when it
is presented to the edit routine. If data in an input segment is in nongraphic form,
GRAPHIC=NO should be specified in the SEG statement to prevent null
compression and uppercase translation. A valid byte value of a binary field could
be a null character (X'3F') or some lowercase alphanumeric (for example, a=X'81').
In this case, GRAPHIC=NO should be specified.
Related reference:
SEG statement (System Utilities)
Related information:
COMM macro statement (System Definition)
Performance considerations
Efficiency of the Input Message Segment edit routine should be a prime concern.
When Field and Segment edit routines are used, extra processing occurs in the IMS
control region and, if used extensively, a measurable performance cost is incurred.
At the same time, these edit routines can improve performance by reducing
processing time in the message processing region, by reducing logging and
queuing time, and by allowing field verification and correction to be accomplished
without scheduling an application program.
This topic describes how you can use the Logoff exit routine to perform processing
that complements the Logon exit routine (DFSLGNX0).
Subsections:
v “About this routine”
v “Communicating with IMS” on page 208
IMS calls the Logoff exit routine for all non-MSC, non-LU 6.2 VTAM nodes with
which IMS communicates and for all master terminal operator (MTO) logoffs, even
if it did not call the Logon exit routine for the MTO at logon. (Keep this in mind if
your installation maintains a logon count.) All attempts to log off of ACF/VTAM
terminals cause IMS to call this exit routine.
Recommendation: Although the Logon exit routine and the Logoff exit routine are
optional, if you include one, you should also include the other to perform any
necessary cleanup operations.
The following table shows the attributes of the Logoff exit routine.
Each time IMS calls the Logoff exit routine, the exit routine receives information on
the XRF status of IMS. IMS calls the exit routine if XRF tracking fails.
You can use this exit to reset the significant status for a terminal in one of the
following states:
Conversational
Exclusive
Test
Preset
MFS test
Full-function response
Fast Path response
Note: Test and preset states are nonrecoverable, so IMS resets the significant status
automatically.
A parameter passed to the exit routine indicates the status of the terminal or ETO
user at signoff. All users except ETO terminals can reset the status in the output
parameters.
For conversation mode, IMS performs the equivalent of an /EXIT command for the
conversation.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
R13 Save area address
R14 Return address to IMS
R15 Entry point address of exit routine
The following table lists the logoff exit parameters. The address of this parameter
list is in the standard exit parameter list field SXPLFSPL.
Table 74. Logoff exit parameter list
Offset Length Description
+0 4 Current ECB address
+4 4 SCD address
+8 4 Address of User Table
+12 4 Address of the STATUS_IN and STATUS_OUT
vectors. The status vectors are mapped by the
DFSSTCHK macro. For the contents of the
STATUS_IN vector see the following table.
Contents of STATUS_IN
The input status vector is a two-byte field that indicates the significant status of a
terminal when the exit routine is called. The second byte of the field is reserved.
The first byte of the field contains a value that indicates the significant status as
follows:
Value Description
X'80' Conversation
X'40' Exclusive
X'20' Test
X'10' Preset
X'08' MFS test
X'04' Full-function response
X'02' Fast Path response
Contents of STATUS_OUT
The output status vector is a two-byte field that indicates changes to the terminal's
significant status made by the exit routine. IMS uses the contents of STATUS_OUT
as an indicator to exit a conversation and reset significant status. The default for
this field is zeros, indicating that no significant status is reset.
The second byte of the field is reserved. The first byte of the field contains a value
that indicates the significant status as follows:
Value Description
X'80' Exit conversation
X'40' Reset exclusive
X'20' Reset test
X'10' Reset preset
X'08' Reset MFS test
X'04' Reset full-function response
X'02' Reset Fast Path response
Before returning to IMS, the exit routine must restore all registers except for
register 15. The content of registers on exit is as follows:
Register Contents
15 Ignored by IMS in all cases.
Related reference:
“Logon exit routine (DFSLGNX0)”
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 211
The exit routine must handle all non-MSC, non-LU 6.2 VTAM nodes (excluding
MTOs at IMS initialization) with which IMS communicates. All attempts to log on
to ACF/VTAM terminals if ETO is active cause IMS to call this exit routine.
Depending on your installation's needs, you can write the Logon exit routine to:
v Select the logon descriptor that you want IMS to reference when building the
terminal control block structure for the logical unit (LU) that is logging on.
v Create or modify the user data that you want IMS to pass to the Signon exit
routine (DFSSGNX0). The user data can be entered as autologon data, with the
/OPNDST command, or with the VTAM internal commands INITSELF or
INITOTHER. Alternatively, the Logon exit routine can build the user data.
v Allow or disallow a logon attempt based on the maximum number of sessions,
or manage logons according to the time of day, certain terminal names, or other
criteria that you specify.
Recommendation: If you include this exit routine, you should also include the
Logoff exit routine (DFSLGFX0) to perform any necessary cleanup operations.
If you do not supply the Logon exit routine, logons proceed as usual with the
chosen logon descriptor.
The following table shows the attributes of the Logon exit routine.
Table 75. Logon exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSLGNX0.
Including the routine
If you want IMS to call the Logon exit routine, include it in an authorized library in
the JOBLIB, STEPLIB, or LINKLIST library concatenated in front of the [Link].
If the exit routine is included, IMS automatically loads it each time IMS is initialized if
ETO=Y (after the Initialization exit routine, DFSINTX0, changed the ETO= keyword).
IMS callable services
To use callable services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service token and a
parameter list in which to build the function-specific parameter list for the desired
callable service.
v Use the current address ECB found at offset 0 for the DFSCSII0 call.
v Link DFSCSI00 with your user exit.
Restriction: Global terminal or user resource information is not available to user exit
DFSLGNX0. Callable services will only return local information for DFSLGNX0.
Sample routine location [Link]
During XRF tracking mode, IMS calls the Logon exit routine in the alternate
system when the terminal control blocks are created for an XRF type 1 session with
an ETO terminal. If processing is on an XRF alternate system, IMS ignores the
contents of register 15 on exit. The exit routine is called during XRF alternate
tracking only for the logon of a class 1 terminal.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
R13 Save area address
R14 Return address to IMS
R15 Entry point address of exit routine
The following table lists the user logon parameters. The mapping for this
parameter list is DSECT LGNXPARM in DFSLGNXP macro. The address of this
parameter list is in the standard exit parameter list field SXPLFSPL.
Table 76. User logon exit parameter list
Offset Length Description
+0 4 Current ECB address.
+4 4 SCD address.
+8 4 Pointer to User Table.
+12 4 Pointer to the parameter list received from
ACF/VTAM when application logon or SCIP bind
exit routines are scheduled. If processing is on an
XRF system, this value is zero.
+16 4 Pointer to multi-word parameter list, mapped by
DSECT LGNXPARM in DFSLGNXP macro.
+20 4 CLB pointer for the node trying to logon. If the node
does not yet exist, this value is zero. The node
always exists on an XRF system.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains one of the following return codes:
Register Contents
15 One of the following return codes:
Return code Meaning
0 LOGON accepted
4 LOGON rejected
Related reference:
“Logoff exit routine (DFSLGFX0)” on page 207
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
z/OS LOGON exit
If no terminal control block structure exists for the terminal, you can write the
Logon exit routine to select the logon descriptor, select a logon descriptor by using
the LOGOND= keyword, or let IMS select the logon descriptor using the LU name
or default descriptor.
The following figure shows the search order IMS uses to select the logon
descriptor. IMS selects the first valid logon descriptor that it finds and uses that
logon descriptor to build the terminal control block structure. If IMS cannot find a
valid logon descriptor, including the default logon descriptor, it rejects the logon
request.
If the exit routine supplies the name of a valid logon descriptor, IMS uses the
logon descriptor associated with that name to build the terminal control block
structure. If the Logon exit routine does not choose a logon descriptor, or if the exit
routine is not included in the system, IMS uses the logon descriptor requested on
the LOGOND= keyword (entering the keyword and descriptor as user data when
you log on). If neither the exit routine nor the LOGOND= keyword identifies a
valid logon descriptor, IMS searches for a logon descriptor with the same name as
the logical unit (LU). If IMS cannot locate a logon descriptor with this name, IMS
uses the default logon descriptor table shown in the following table to select the
logon descriptor.
Table 77. Default logon descriptor table
CINIT LUTYPE CINIT TS Default logon descriptor
X'06' Not applicable DFSLU61
X'04' Not applicable DFSSLU4
X'02' Not applicable DFSSLU2
X'01' Not applicable DFSSLU1
X'00' X'04' DFSSLUP
X'00' X'03' DFS3270
If you do not want dynamic logons for a certain LU type, delete the default logon
descriptor for that type from the system, and be sure that the exit routine does not
attempt to choose it.
Regardless of how the logon descriptor is selected, the descriptor must agree with
the LUTYPE and TS fields (in the MODEENT macro of the VTAM mode table), or
IMS rejects the logon request.
This topic describes the LU 6.2 Edit exit routine. This exit routine is for use with
standard IMS and modified IMS application programs. It is not called for CPI
Communications driven application programs.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 216
For input messages, IMS calls the LU 6.2 Edit exit routine for each message
segment before the message segment is inserted to the IMS message queue. The
exit routine can edit message segments as necessary before the application program
processes the input message.
For output messages, IMS calls the LU 6.2 Edit exit routine for each message
segment before the message segment is sent to the LU 6.2 program. The exit
routine can intercept the data sent by the application program and edit it for the
particular destination.
The following table shows the attributes of the LU 6.2 Edit exit routine.
Table 78. LU 6.2 edit exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSLUEE0.
The IMS-provided default exit routine specifies a return code of zero. If you write your
own exit routine, replace the IMS default routine by binding the one you wrote into
the [Link] or including it in an authorized library in the JOBLIB, STEPLIB, or
LINKLIB library concatenated in front of [Link].
Including the routine No special steps are required to include this routine.
IMS callable services This exit routine is not eligible to use IMS callable services.
Sample routine location [Link] (member name DFSLUEE0).
This sample is a default exit routine, which IMS always calls for LU 6.2 messages
processed under the DL/I call interface.
The LU 6.2 Edit exit routine can change the message length and contents, provided
that it resets the message length field to reflect the new length. The exit routine can
increase the message length by up to 256 bytes, but the total length (length field,
flag field, and message) cannot exceed 32,767 bytes. If the message exceeds this
limit, IMS truncates the message and issues DFS1967 to the master terminal
operator (MTO) to indicate a message buffer overlay. The exit routine can reduce
the message length without restriction.
The LU 6.2 Edit exit routine can change the local LU name. Word 12 points to the
local LU name that is used to allocate outbound conversations. The LU 6.2 Edit
exit routine can be used to change that name. The local LU name can be changed
only for outbound conversations.
Network-qualified names
An LU 6.2 application program can send the LTERM and the MOD name in the
first segment of the message. IMS saves the LTERM and MOD name in the I/O
PCB.
At entry, IMS provides the address of the MOD name in the first segment of the
message sent to the LU 6.2 Edit exit routine (DFSLUEE0). DFSLUEE0 checks the
contents of the first message segment. If IMS finds the MOD name, it uses the
MOD name to format the output message. If IMS finds the LTERM, it can use the
LTERM to change the destination of the output.
Use the Initialization exit routine (DFSINTX0) to create the user table. This exit
routine must pass the address of the user table to IMS, and IMS passes the address
to DFSLUEE0.
IMS uses the entry and exit registers and a parameter list to communicate with the
exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list. The parameter list contains the following
addresses.
Bytes Content
00-03 Address of a flag field indicating what type of message caused
IMS to call the exit routine. This field contains one of the
following flags (fixed length, right justified, padded with
zeros):
0 Input message
4 Output message
04-07 Address of the area containing either the input or output
message segment length, message flag, and message segment
(variable length, left justified). The value in the length field
includes the length field, flag field, and message.
08-11 Address of transaction code (fixed length, left justified, padded
with blanks).
12-15 Address of LU name (fixed length, left justified, padded with
blanks).
16-19 Address of user ID (fixed length, left justified, padded with
blanks).
20-23 Address of return code, which is an exit parameter.
24-27 Address of LTERM (fixed length, left justified, padded with
blanks).
28-31 Address of MOD name (fixed length, left justified, padded with
blanks).
32-35 Address of user table, which is an entry parameter.
36-39 Address of message flag (if bit zero of the message flag equals
1, it is the first segment).
40-43 Address of user ID indicator byte, which describes the content
of the user ID field and can have a value of one of the
following: U (user ID), L (LTERM), P (PSBname), or O (Other).
44–47 For asynchronous outbound conversations the exit can change
the address of the synchronization level (one byte). The
synchronization level can be N (None), C (Confirm), or S
(Syncpoint). For asynchronous conversations the exit can
change the synchronization level. Note that only
synchronization level N and C are supported for asynchronous
conversations.
48-52 Address of the local LU name (8 bytes) or the base LU if no
local LU name has been used. For asynchronous outbound
conversations, the exit can change it to another LU defined for
this IMS.
Register Contents
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers. The registers
contain the following:
Register Contents
1 Address of parameter list (provided at entry). The parameter list contains the
following addresses.
Bytes Content
00-03 Used on entry only.
04-07 Address of the area containing the message segment length,
message flag, and message segment (variable length, left
justified). The value in the length field is the total length and
includes the length field, flag field, and message.
08-19 Used on entry only.
20-23 Address of the area for one of the following return codes from
the exit routine. (IMS treats any other value as 0.)
0 IMS performs the default action: continue processing.
2 For asynchronous conversations, IMS must discard
the message if it is not deliverable.
4 Discard this message segment.
8 DEALLOCATE_ABEND the conversation.
24-27 Address of LTERM (exit parameter).
28-31 Address of MOD name (entry and exit parameter).
32-35 Address of User Table (entry parameter).
36-39 Address of message flag (Bit 0 = 1 then first segment) (entry
parameter).
40-43 Address of user ID indicator.
44-47 For asynchronous outbound conversations the exit can change
the address of the synchronization level (one byte). The
synchronization level can be N (None), C (Confirm), or S
(Syncpoint). For asynchronous conversations the exit can
change the synchronization level. Note that only
synchronization level N and C are supported for asynchronous
conversations.
48-52 Address of the local LU name (8 bytes) or the base LU if no
local LU name has been used. For asynchronous outbound
conversations, the exit can change it to another LU defined for
this IMS.
The following table shows the data type, length, and format of the fields to which
the parameter list (addressed by register 1) points.
1
ZZ = flag field; LL = length field; bb = blanks; words in italics represent data values. The value in the length field LL
includes the length field, flag field, and message.
2
The exit routine can increase the message length by up to 256 bytes, but the total length cannot exceed 32,767 bytes.
3
The length of this user table is determined by the user.
Related tasks:
Qualifying network LU names (Communications and Connections)
Related reference:
“Routine binding restrictions” on page 8
This topic describes the Message Control/Error exit routine. The exit routine can
request that IMS handle the messages that are in error, depending on the condition
that led IMS to call the exit routine. The /DEQUEUE command supports the
MSNAME keyword so that this control is extended to messages queued on
Multiple Systems Coupling (MSC) links.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 221
A sample exit routine is available from the IMS library. The sample exit routine is
the default routine. IMS calls the sample exit routine unless you replace it with
your own version. The sample exit routine includes code that supports the
following keywords on the /DEQUEUE command:
lterm
node
msname
luname plus tpname
The default action for this exit routine is to proceed with the /DEQUEUE
command.
The following table shows the attributes of the Message Control/Error exit routine.
Table 80. Message control/error exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCMUX0.
Binding This exit routine must be reentrant.
The sample exit routine is a default routine. If you write your own exit routine, you
must bind it with the IMS control region SDFSRESL.
IMS callable services This exit routine cannot use callable services.
Sample routine location [Link] (member name DFSCMUX0).
The sample routine provided is compatible with the MSC error handling and
/DEQUEUE command processing that exists for prior releases of IMS. You can ensure
compatibility by including this sample exit routine logic in your customized version.
IMS calls the Message Control/Error exit routine and sets an entry flag in the
interface block as a result of one of the following:
v Link start.
A RSTART LINK command is entered to start an MSC link or when the MSC
link is started by the partner system (MSC environment only).
v Link termination.
This exit routine is called at link termination time mainly when a PSTOP link
command is entered from IMS, or the link is stopped by the partner IMS, for all
access methods of MSC. Most errors (such as, invalid data, queue error, or access
method) in MSC do not cause the link to be terminated.
For MSC VTAM, the exit routine is also called in the following cases:
– CLSDST/TERMSESS complete
– Lost term error
– Request canceled by CLSDST
– Error during start
– Clean up or Notify
– Z-net or cancel
v Send error.
– z/OS cross-system coupling facility send failed.
– An invalid data block (send error) is detected during a transmission (MSC
environment only). The sender must handle the message that is in error. You
can write the exit routine to check if the link is down or stopped at this time.
DFS2140 with reason code 2146 indicates a send error.
IMS uses the entry and exit registers, and the MSNB interface control block to
communicate with the exit routine.
On entry, the exit routine must save all registers in the provided save area. The
registers contain the following information:
Register Contents
1 Address of Message Control/Error exit interface block, MSNB.
13 Address of save area. The exit routine must not change the first 3 words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers. The contents of
the interface block pointed to by register 1 can be different.
Related reference:
“Routine binding restrictions” on page 8
Rerouting messages
Given certain conditions, the Message Control/Error exit routine enables you to
reroute transactions, responses, and message switches that are in error.
The format of the message depends on the message type and the new destination
type as shown in the following table. Each destination type is discussed in the
topic following the figure.
Table 81. Rerouting messages to new destinations
Message format (if
Message type New destination MSX2QBK is turned on)
1. Conversational Conversational transaction SPA + interface block +
message
2. Conversational Nonconversational Interface block + unpacked
transaction SPA + message
3. Nonconversational (but not Nonconversational Interface block + message
message switch) transaction
4. Message switch Nonconversational Interface block + message
transaction
5. Message switch LTERM Original message
6. All types Luname, tpname
7. OTMA Transaction, lterm, luname + Interface block + message if
tpname, or OTMA member the new destination is
name + tpipe name transaction or lterm, the
message format rules for
message types 1 through 5
are applicable.
Attention: During the rerouting process, the original message is dequeued first,
and then the newly built message is enqueued to the new destination. If a system
failure occurs between the dequeue and enqueue processing, the message can be
lost.
Subsections:
v “Rerouting to a conversational transaction”
v “Rerouting to a nonconversational transaction”
v “Rerouting to an LTERM” on page 224
If the message is conversational, the segment following the interface block is the
unpacked SPA and should be treated as a data segment by the new destination's
application program. If the message is conversational or is in response mode (or
both), it is the user's responsibility to end the conversation and take the input
terminal out of response mode. One of the following can be done to end the
conversation or take the terminal out of response mode:
v Enter the /EXIT command from the input terminal, if the keyboard is not locked.
v If the input terminal is a static terminal, from the MTO or system console of the
input system, enter:
–
Related Reading: For more information on these commands, see IMS Version 14
Commands, Volume 1: IMS Commands A-M.
Rerouting to an LTERM
When the new destination for a message is an LTERM and a message is rerouted
from one physical terminal type to another, IMS rejects the message and issues an
error message (such as DFS2078) if the new destination cannot handle the data.
Related Reading: For more information, see IMS Version 14 Messages and Codes,
Volume 1: DFS Messages.
Related reference:
“Message Control/Error Exit Interface Block (MSNB)”
The entry flag (MSNFLG1) indicates the reason the exit routine is called, and the
exit flag (MSXFLG1) determines what action will be performed when control is
returned to IMS. MSNBSEG1 points to the first segment of the message. If the
segment is a SPA, IMS unpacks it before passing control to the exit routine. The
exit routine can place any information that it needs into the user work area
(MSNBUSRA); IMS does not disturb the contents of this work area.
The Message Control/Error exit routine can only modify seven fields: MSNBRTPG,
MSNBRTPN, MSNBDEST, MSNBRINF, MSNBUSRA, MSXFLG1, and MSXFLG2.
All other fields are read-only. If the exit routine modifies MSNBDEST, it must
modify MSNBRINF. If the exit routine modifies MSNBRTPG and MSNBRTPN, it
must modify MSNBRINF. In addition, the exit routine can modify MSXFLG2 if the
exit routine modifies MSNBDEST and MSNBRINF, or MSNBRTPG, MSNBRTPN
and MSNBDEST.
Subsections:
v “Contents of interface block on entry”
v “Contents of interface block on exit” on page 226
v “Logging the interface block” on page 228
The following table shows the contents of key fields in the Message Control/Error
exit interface block as they appear on entry.
The following table shows the contents of key fields in the Message Control/Error
exit interface block as they appear on exit. The exit routine uses these fields to
return information to IMS.
Two copies of the interface block are added to the existing X'6701' log record. The
first copy is labeled “MSNB” and represents the interface block before IMS calls
the Message Control/Error exit routine with the log record ID of CMEA. The
second copy is labeled “USR MSNB” and represents the interface block after IMS
calls the exit routine with the log record ID of CMEB. The X'6701' log record can be
logged for informational reasons or to indicate an error in preparing to call the exit
routine, or in performing the action(s) requested by the exit routine. The trace ID is
CMEI. These log entries are forced entries for a send error, a receive error, and a
/DEQUEUE command, regardless of any trace options that are specified. For link
start and link termination, the interface block is only logged if the trace option is in
effect on the link or node involved.
Related Reading: For more information on this log record, see IMS Version 14
Diagnosis.
Default actions are specified in the MSXDFT1 field. The exit flag field (MSXFLG1)
is located in the interface block. If an invalid exit flag is requested, IMS sends error
message DFS2184 to the current MTO, in addition to performing the default action.
The following table shows valid entry flags, exit flags, and default actions.
Table 84. Flags and default actions
Entry flag (MSNFLG1) Valid exit flags (MSXFLG1) Default action (MSXDFT1)
X'80' X'00' X'00'
X'40' X'00' X'00'
X'20' X'00', X'40', X'60', X'80' X'60' + stop MSNAME
X'10' X'00', X'40', X'60', X'80' X'60'
X'08' X'00', X'10', X'30', X'40', X'80' X'40'
Note: The default action for a send error (entry flag = X'20') includes STOP MSNAME. In
addition, the default action for the DEQUEUE command is to proceed with the command. If
you do not want these actions to take place, specify a different exit flag depending on the
actions that you want to occur.
If any errors are encountered while IMS tries to perform the requested action, the
action is ignored and the default action is performed. The MSNBMSG field of the
interface block of the forced 6701 CMEI log record will contain one of the
following brief descriptions that describe the error encountered, if applicable:
v No storage for message buffer
v Invalid destination for reroute
v Cannot reroute MSG switch to CONV
v Error while building rerouted MSG
v Reroute destination not found
v Cannot reroute CONV MSG to LTERM
v Cannot reroute non-CONV MSG to CONV
Related reference:
“Message Control/Error Exit Interface Block (MSNB)” on page 224
This topic describes the Message Switching (Input) Edit routine. Information about
using a sample routine is provided at the end of this topic.
Subsections:
v “About this routine”
v “Communicating with IMS”
A facility similar to the Transaction Code (Input) Edit is provided for message
switching. The optional user-written routine, whose CSECT and load module name
must be DFSCNTE0, is included in the system at IMS system definition time. Only
one Message Switching edit routine can be specified for an IMS online control
program. This routine is specified for inclusion with the online control program by
specifying EDIT=(YES,...) in one or more NAME macros during system definition.
It is not called when the message is inserted using a program-to-program switch.
The Message Switching (Input) edit routine does not support terminals that are
defined dynamically using the Extended Terminal Option (ETO) feature.
The following table shows the attributes of the Message Switching (Input) edit exit
routine.
Table 85. Message switching (input) edit exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCNTE0.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service. Use the ECB found
in register 9 for the DFSCSII0 call.
IMS uses the entry and exit registers to communicate with the routine.
On entry, the edit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 The buffer location of the input message segment after translation to EBCDIC
and after IMS Basic Editing. The first two bytes of the buffer contain a binary
message length. The third byte of the buffer is binary zeros. The binary count
includes the 4-byte prefix. The fifth byte contains the first byte of message
text.
7 Address of CTB.
9 Address of CLB.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of edit routine.
Use the message segment in the buffer addressed by register 1 as input to the edit
routine.
The edit routine must place the text of the edited message segment to be returned
to IMS in the buffer addressed by register 1. If the input was processed by the IMS
Basic Edit, this buffer is always 10 bytes greater than the 2-byte binary count at the
beginning of the message segment. The length of the message segment can be
expanded or reduced to any desired size. The format of the edited message
segment in the buffer on return to IMS must be two bytes of binary count (LL),
two bytes of binary zeros (ZZ), and edited text. The second two bytes (ZZ) should
not be changed or edited. The LLZZ field is the first four bytes of the message
segment.
Before returning to IMS, the edit routine must restore all registers except register
15, which must contain one of the following return codes.
Register 1 contains the message number if register 15 contains a return code of 12;
otherwise it is ignored. Any other value causes the message to be canceled and the
terminal operator to be notified.
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
In the example, the input logical terminal name is used. This name is found in the
Communication Name Table (CNT), which is the IMS control block for the input
logical terminal. The CNT is addressed by a field called CTBCNTPT in the
Communication Terminal Block. The field in the CNT containing the logical
terminal name is called CNTNAME. Control blocks are defined in IMS Version 14
Diagnosis.
If IMS does not call the Non-Discardable Messages exit routine, IMS arbitrarily
discards messages from the system and issues message DFS555I.
Subsections:
v “About this routine”
v “Processing options” on page 233
v “Restrictions” on page 235
v “Communicating with IMS” on page 235
The following table shows the attributes of the Non-Discardable Messages exit
routine.
Table 86. Non-discardable messages exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You can name this exit routine DFSNDMX0 and link it into a library
that is included in the STEPLIB concatenation.
Alternatively, you can define one or more exit routine modules with
the EXITDEF parameter of the USER_EXITS section of the DFSDFxxx
member of the [Link] data set. The routines are called in the
order that they are listed in the parameter.
Binding This exit routine must be reentrant. It executes in non-cross-memory
mode.
Processing options
The following processing options are valid for DFSNDMX0. If you request an
option that is not valid, IMS ignores your request and continues normal processing
(the default option).
Continue normal processing is the default option. Request this option by setting
register 15 to zero before returning to IMS. IMS proceeds as if this exit routine had
not been called.
Depending on the type of application abend that initiated the exit routine, IMS
might delete the message, issue a DFS555I message to the originating terminal and
master terminal, and issue a DFS554A message to the master terminal.
Request this option by setting register 15 to 16 before returning to IMS and placing
a valid destination name in the NDMDEST field of the NDM interface block. The
following table shows the valid destination types and how to specify them in
NDMDEST.
Table 87. Valid alternate destinations
Alternate destination NDMDEST value
LTERM Specify a local, remote, or ETO LTERM, using the LTERM name or
ETO user descriptor name.
OTMA Specify the OTMA TPIPE name, or a name that is meaningful to the
OTMA exit routines.
LU 6.2 Specify a local LU 6.2 device descriptor. The LU 6.2 device must be
on the local IMS subsystem.
Transaction Specify a local or remote transaction code. The following transaction
types are not valid destinations:
v Fast Path exclusive transaction.
v Conversational transaction.
v SAA communications-driven transaction (that is, a CPI-C driven
transaction).
When IMS requeues the input message to a valid destination, IMS completes the
message processing as follows:
1. Issues a DFS550I message (succeeded version) to the master terminal
2. Issues a DFS555I message to the originating terminal (if possible) and to the
master terminal
3. Deletes the input message from the abended transaction
4. Issues a DFS554A message to the master terminal
Restrictions
Not all destinations are valid alternates for input messages. You can use this exit
routine to requeue messages to alternate destinations.
This exit routine uses a parameter list, entry and exit registers, and the
Non-Discardable Messages interface block (NDM) to communicate with IMS.
At entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of a single standard z/OS save area
14 Return address to IMS
15 Entry point of this exit routine
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area passed to this exit routine in SXPLAWRK can be different each time that
this exit routine is called.
If your NDMX user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
the byte that SXPLCNXT points to. This tells IMS to not call additional exit
routines.
The following table shows the contents of the NDM interface block. The address of
this parameter list is in the standard user exit parameter list (field name
SXPLFSPL). The mapping of the NDM interface block is available from the IMS
library [Link] (member name DFSNDM).
Table 88. NDM interface block
Field Offset Length Content
NDMEYE X'00' 4 NDM eye catcher.
message
segment
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
“IMS standard user exit parameter list” on page 4
| “OTMA User Data Formatting user exit (OTMAYDRU)” on page 249
“OTMA Input/Output Edit user exit (OTMAIOED)” on page 245
“OTMA Destination Resolution user exit (OTMAYPRX)”
“Destination Creation exit routine (DFSINSX0)” on page 154
Subsections:
v “About this routine”
v “Communicating with IMS” on page 242
Important: Within a shared-queues group, ensure that the OTMAYPRX user exit is
the same for both front-end and back-end IMS systems. If these exit routines differ
on one or more back-end IMS systems, asynchronous output might be sent to
different destinations, depending on which back-end IMS system processed the
input.
If multiple user exits routines are used, ensure the OTMARTUX user exit routines
are defined in the same order on front-end and back-end IMS systems.
The following table shows the attributes of the OTMA Destination Resolution user
exit.
Table 89. OTMA Destination Resolution user exit attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You can name this exit routine DFSYPRX0 and link it into a library that is included in
the STEPLIB concatenation.
Alternatively, you can define one or more exit routine modules with the EXITDEF
parameter of the USER_EXITS section of the DFSDFxxx member of the [Link]
data set. The routines are called in the order that they are listed in the parameter.
Link editing The OTMA Destination Resolution user exit must be reentrant.
The OTMA Destination Resolution user exit must be included in an authorized library
in the JOBLIB, STEPLIB, or LINKLIST library concatenated in front of the
[Link]. This exit routine is optional.
Including the routine Add Including the routine section of the OTMA Destination Resolution user exit
routine attributes that says the following: The module or modules must be included in
an authorized library in the JOBLIB, STEPLIB, or LINKLIST concatenation. No
additional steps are necessary to use a single exit routine that is named DFSYPRX0. If
you use multiple exit routines, specify
EXITDEF=(TYPE=OTMAYPRX,EXIT=(exit_names)) in the EXITDEF parameter of the
USER_EXITS section of the DFSDFxxx member of the [Link] data set.
IMS callable services This user exit is eligible to use IMS callable services. To use callable services, examine
the value of the SXPLATOK field in the IMS standard exit parameter list to determine
if a callable services token was passed to the routine. If the value of the field is zero,
no callable services are available. If the value is non-zero, examine the value of the
SXPLAWRK field in the parameter list for the address to a 256-byte work area. Use the
work area to issue calls to DFSCSIF0.
Sample routine location [Link] (member name DFSYPRX0).
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the user exit.
At entry, the user exit must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4
R13 Save area address (points to a single save area, not a save area chain)
R14 Return address
R15 Entry point address
This user exit uses the Version 6 standard exit parameter list. The address of the
work area passed to this user exit in SXPLAWRK will be the same each time that
this exit routine is called.
If your OTMAYPRX user exit can be called in an enhanced user exit environment,
additional user exit routines can be called after your routine. When your user exit
routine finds a message upon which to act, it can set SXPL_CALLNXTN in the
byte SXPLCNXT points to. This tells IMS to not call additional exit routines.
The following table describes the contents of the OTMA Destination Resolution
user exit parameter list. The address of this parameter list is in standard exit
parameter list field SXPLFSPL.
Table 90. Contents of the OTMA Destination Resolution user exit parameter list
Offset
(decimal) Description
+0 Name of the originating LTERM or OTMA transaction pipe.
+8 Destination name.
+16 Transaction name or program name.
+24 Flag byte:
Flag bits
Description
X'80' An OTMA prefix exists.
X'20' An OTMA message was submitted by an OTMA client with super
member support. The OTMA state data pointed to by the input
parameter list contains a 1-4 byte super member name at offset X'E'
from the start of the state data.
X'10' A DL/I ICAL call for synchronous program switch was issued. If the
X'80' flag is also set, this flag indicates that an OTMA transaction
initiated the ICAL call and the LTERM or tpipe name and input client
member name in the exit parameter list are from the original OTMA
transaction.
X'08' The destination name matches an entry in the OTMA destination
descriptor. The name is for an IMS Connect destination.
X'04' The destination name matches an entry in the OTMA destination
descriptor. The name is for a WebSphere® MQ destination.
X'02' The destination name matches an entry in the OTMA destination
descriptor. The name is for a non-OTMA destination.
+25 Synchronization level.
+26 Reserved.
+27 Parameter list version flag byte:
X'80' The user exit parameter list is expanded to include the address of the
OTMA destination descriptor at offset +88.
+28 User ID.
+36 Group name.
+44 Address of the PST block.
+48 Name of the originating OTMA client, if the message originated from an
OTMA client; otherwise zeros.
Table 90. Contents of the OTMA Destination Resolution user exit parameter list (continued)
Offset
(decimal) Description
+64 Address of the input Message Control Information prefix section of the OTMA
message.
If this call is from an ICAL request for synchronous program switch, the
message control information is generated by IMS. The information is not
propagated from the original message prefix. However, the LTERM or TPIPE
name and input client name are passed from the original OTMA message.
+68 Address of the input State Data prefix section of the OTMA message.
Check the prefix flag in the Message Control Information section to determine
the specific type of State Data section specified.
If this call is from an ICAL request for synchronous program switch, the state
data information is generated by IMS. The information is not propagated from
the original message prefix. However, the correlator field, TMAMHCOR, is
passed from the original OTMA state data. The LTERM or TPIPE name and
input client name are also passed from the original OTMA message.
+72 Address of the input User Data prefix section of the OTMA message.
+76 Address of SCD control block.
+80 Address of the 16-byte client override name, if any, to be returned to IMS.
This field is set by IMS at entry. It points to a 16-byte buffer area to which the
OTMA client name is written, if one does not exist at entry. Do not alter this
address.
The OTMA client name is written when the transaction originates from a
non-OTMA LTERM and is to be routed to an OTMA destination.
For detailed information about IMS Connect destination routing, see the
TMAMICON_DESCRIPTOR DSECT mapping.
Before returning to IMS, the exit routine must restore all registers, except register
15, which must contain one of the following return codes:
For the OTMAYPRX user exit, any other return code generates a DFS2370I message
with the return code listed in hex. The hex equivalents for the return codes are:
0 X'00'
4 X'04'
8 X'08'
100 X'64'
Error conditions
Subsections:
v “About this routine” on page 246
v “Communicating with IMS” on page 247
This user exit can do the following for OTMA input and output messages:
v Modify the length or data of a message segment.
IMS sends the modified message after it receives control from the user exit.
v Cancel a message segment.
v Cancel a message.
However, this user exit cannot be used for OTMA synchronous callout messages
using DL/I ICAL calls.
If your OTMAIOED user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
SXPL_FLGA. This tells IMS to not call additional exit routines.
Table 91. Canceling a message segment
Segment being
canceled IMS sends
First The full OTMA message prefix, with null data.
Last The last segment, with null data.
Other Nothing. IMS does not send the message segment.
Segment being
processed IMS sends
First The full OTMA message prefix, with null data.
Last The last segment, with null data.
Other Nothing. IMS does not send the message segment.
The following table shows the attributes of the OTMA Input/Output Edit user exit.
Table 93. OTMA input/output edit exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Alternatively, you can define one or more user exit modules with
the EXITDEF parameter of the USER_EXITS section of the
DFSDFxxx member of the [Link] data set. The routines are
called in the order that they are listed in the parameter.
Binding The OTMA Input/Output Edit user exit must be reentrant.
To use IMS callable services with this routine, examine the value of
the SXPLATOK field in the “IMS standard user exit parameter list”
on page 4 to see if a callable services token is available. If the value
of SXPLATOK is zero, you cannot use callable services with this
routine. If the value of SXPLATOK is non-zero, the callable services
token is included, and you can use callable services. You can use
the 256-byte work area addressed by SXPLAWRK in the standard
user exit parameter list to call DFSCSIF0.
Sample routine [Link] (member name DFSYIOE0).
location
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the user exit.
At entry, the user exit must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4
R13 Save area address
R14 Return address
R15 Entry point address
This user exit uses the “Version 6 standard exit parameter list” on page 5. The
address of the work area passed to this user exit in SXPLAWRK will be the same
each time that this exit routine is called.
If your OTMAIOED user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
the byte that SXPLCNXT points to. This tells IMS to not call additional exit
routines.
The following are the contents of the OTMA Input/Output Edit user exit
parameter list. The address of this parameter list is in standard exit parameter list
field SXPLFSPL.
Table 94. OTMA Input/Output Edit user exit parameter list
Offset Contents
+0 Input/output flag. Set to 0 for an input message segment; set to 4 for an output
message segment.
+1 Segment-type flag. Set to 0 for the first message segment; set to 4 for any other
message segment.
+2 Reserved.
+4 Address of the message segment. The segment has the format LLZZDD:
LL Total length (2 bytes)
ZZ Flag (2 bytes). Z1 is reserved for IMS. The exit routine can change Z2.
DD Message segment
If the user exit modifies the message segment, it must also modify the LL with the
new segment length. For null segments, LL must be set to 4 (2 bytes for LL and 2
bytes for ZZ).
The user exit can increase any segment to a maximum of 256 bytes. The overall
message, however, cannot exceed 32767 bytes (including the LL and ZZ fields). If
a segment exceeds the 256-byte limit, IMS truncates it and issues message
DFS1967.
+8 Address of the transaction code.
+12 Address of the OTMA transaction pipe name.
+16 Address of the z/OS cross-system coupling facility member name.
+20 Address of the user ID.
+24 Address of the OTMA user table, if any.
+28 Address of the message control region, available from input/output message
prefix. This is an entry parameter only.
+32 Address of state data, available from input/output message prefix. This is an
entry parameter only.
+36 Address of user data, available from input/output message prefix. This area can
be used to return modified user data, but the length of user data cannot be
changed. The format of the user data is:
0-1 Length of the user data that follows (including this length field). This
user exit cannot change the length of user data.
2 User data.
Table 94. OTMA Input/Output Edit user exit parameter list (continued)
Offset Contents
+40 Address of the output parameter list. The output parameter list is used to return
information to IMS and is defined as follows:
+00 8-byte LTERM override. This field is used to override the destination
override specified in the state data.
+08 8-byte map name override. This field is used to override the map name
specified in the state data.
+16
Flag Description
X'80' Wait for write for CM1 Fast Path transaction
X'00' Request check write for CM1 Fast Path transaction.
+17 Reserved.
+44 Address of the SCD.
Before returning to IMS, the user exit must restore all registers, except register 15,
which must contain one of the following return codes:
IMS treats any other return code as if it were 0, and processing continues.
Related reference:
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
| The OTMAYDRU user exit can change the final destination of OTMA messages by
| specifying OTMA member names, transaction pipe (Tpipe) names, or names of
| remote IMS systems.
You can specify OTMA C/I to use the HOLDQ when asynchronous output is
created before the OTMA C/I client has established via client-bid. This is optional,
as any queued output is moved by OTMA to the HOLDQ once the OTMA C/I
client has connected and specified it is HOLDQ capable.
You can use the OTMA destination descriptor to avoid coding this user exit. See
DFSYDTx in
IMS Version 14 System Definition for full details on specifying OTMA descriptors.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 251
v “Error conditions” on page 255
An OTMA client should not use a transaction name as a transaction pipe name (or
routing key) because of potential conflict with the SMB name.
| In a single IMS, multiple OTMA User Data Formatting exit routines are allowed.
| The default OTMAYDRU user exit can call multiple user exit routines by defining
| the routines in the EXITDEF statement in the USER_EXITS section of the
| DFSDFxxx member. In addition to the default, individual clients can specify their
| own OTMAYDRU user exit routine. To display the DFSYDRU0 exit routine
| associated with an OTMA client, issue the /DISPLAY TMEMBER command. If a
| client uses the default OTMAYDRU user exit and the default is defined in the
| DFSDFxxx member, OTMAYDRU is returned as the exit routine name.
IMS identifies the OTMA User Data Formatting user exit for an OTMA client by
searching, in the order listed, the following:
1. The user exit specified on the client-bid call
2. The OTMA client descriptor
| 3. The default user exit name, OTMAYDRU, if it exists
The user exit specified on the client-bid call overrides the OTMA descriptor. The
OTMA descriptor overrides the default user exit name. If the default user exit
name does not exist, the OTMA User Data Formatting user exit is not used.
The following table shows the attributes of the OTMA User Data Formatting user
exit.
Table 95. OTMA User Data Formatting user exit attributes
Attribute Description
| IMS environments DB/DC, DCCTL.
Table 95. OTMA User Data Formatting user exit attributes (continued)
Attribute Description
| Naming convention Different clients can have different user exit routine names, or the
| clients can all use the default OTMAYDRU user exit. You can name
| the default OTMAYDRU user exit routine DFSYPRX0 and link it
| into a library that is included in the STEPLIB concatenation.
| Alternatively, you can define one or more exit routine modules with
| the EXITDEF parameter of the USER_EXITS section of the
| DFSDFxxx member of the [Link] data set. The routines are
| called in the order that they are listed in the parameter.
| Binding The OTMA User Data Formatting user exit must be reentrant.
Draft comment
DEV: Does the member name also change to OTMAYDRU
here?
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the user exit.
At entry, the user exit must save all registers using the provided save area. The
registers contain the following information:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4
R13 Save area address (points to a single SAVEAREA, not a SAVEAREA
chain)
R14 Return address
R15 Entry point address
This user exit uses the Version 6 standard exit parameter list. The address of the
work area that is passed to this user exit in SXPLAWRK can be different each time
that this user exit is called.
The following table describes the contents of the OTMA User Data Formatting user
exit parameter list. The address of this parameter list is in the standard exit
parameter list field SXPLFSPL.
Table 96. Contents of the OTMA User Data Formatting user exit parameter list.
Offset Contents
(decimal)
+0 Name of the originating LTERM or OTMA transaction pipe.
+8 Destination name. If the destination is for OTMA and no Tpipe name is
specified in the output area, this field is used as the name of the Tpipe to
queue and deliver the output message.
+16 Transaction name or program name.
+24 Flag byte:
X'80' An OTMA prefix exists.
X'40' The user exit can override the client name.
X'20' OTMA message submitted by OTMA client with super member
support. The OTMA state data pointed to by the input parameter list
has the 1-4 bytes super member name at offset x'E' from the
beginning of the state data.
X'10' The user exit is called to process a late response to a synchronous
program switch request. If the X'80' flag is also set, the LTERM or
TPIPE name and input client member name in the parameter list are
propagated from the original OTMA transaction that initiated the
ICAL call.
X'08' The destination name matches an entry in the OTMA destination
descriptor for IMS Connect.
X'04' The destination name matches an entry in the OTMA destination
descriptor for WebSphere MQ.
+25 Synchronization level.
+26 Destination type flag:
X'80' Transaction pipe exists for the client.
X'40' LTERM exists in IMS (non-maintenenced versions).
X'20' LU 6.2 descriptor exists.
X'10' ETO is available.
X'08' Client is active.
X'04' Tpipe trace is active.
+27 Version flag:
X'80' The parameter list is expanded to include the address of the OTMA
destination descriptor WebSphere MQ and IMS Connect. The
additional information is at offset +100.
+28 User ID.
+36 Group name.
+44 Name of the destination OTMA client.
+60 Address of the PST block.
Table 96. Contents of the OTMA User Data Formatting user exit parameter list (continued).
Offset Contents
(decimal)
+64 Name of the originating OTMA client, if the message originated from an
OTMA client; otherwise zeros.
+80 Address of the input Message Control Information prefix section of the
OTMA message.
If the OTMA super member feature is used, the super member name is
located at offset +14 from the beginning of the state data. See the
TMAMSPNM field of the DFSYMSG macro.
The area is also used to return new or modified user data, up to a maximum
of 1024 bytes.
+92 Address of the SCD block.
+96 Address of the output parameter list. This parameter list is used to return
information to IMS. The contents of the output parameter list are shown in
the following table.
+100 Address of the routing information defined in the OTMA destination
descriptor for WebSphere MQ and IMS Connect. If the destination name
matches a non-OTMA destination descriptor, or the name does not match any
entry in the OTMA destination descriptor, this field contains 0.
The following table shows the contents of the output parameters list.
Before returning to IMS, the user exit must restore all registers, except register 15,
which must contain one of the following return codes:
Error conditions
An A1 status code will be returned to the application program when the following
errors occur:
v Incorrect 16-byte OTMA client override name is specified. The client name
cannot contain all blanks or zeroes. If the client name is shorter than 16 bytes, it
must be padded with blanks.
v The length of modified OTMA user data is over 1K.
v Incorrect return code is specified for the exit.
Related reference:
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
This level of security authorization interfaces with SAF and RACF only if the
default resource class, RIMS, is defined to RACF. IMS installations can use this exit
routine to authorize both the user ID and the transaction pipe name that is in the
Resume TPIPE call message, to receive the output contained in the Resume TPIPE
call message, in order to receive the output messages before any of these messages
are sent to an OTMA client.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 257
The OTMA Resume TPIPE Security exit is invoked when a RESUME TPIPE call is
received by OTMA if the user exit exists in the appropriate library. There are two
security procedures with regard to TPIPE name and user ID authorization:
v RACF security procedure
Verifies the existence of RACF resource name, RIMS or Rxxxxxxx, where xxxxxxx
is the value from the RCLASS EXEC parameter, the DFSPBxxx PROCLIB
member or the DFSDCxxx PROCLIB member, and RACF authorization of the
Resume TPIPE name and user ID combination.
v User exit security procedure
– Invokes the OTMARTUX user exit. Your exit might take the result of the
RACF security procedure, override its result, or add more restrictive security
rules.
The exit routine can serve the following functions for OTMA input and output
messages:
v Override the results of the SAF and RACF interaction.
v Function as stand-alone resume transaction pipe security.
v Complement or supplement the security that is defined to RACF.
The following table shows the attributes of the OTMA Resume TPIPE Security exit
routine.
Table 98. OTMA Resume TPIPE Security exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You can name this exit routine DFSYRTUX and link it into a library that is included in
the STEPLIB concatenation.
Alternatively, you can define one or more exit routine modules with the EXITDEF
parameter of the USER_EXITS section of the DFSDFxxx member of the [Link]
data set. The routines are called in the order that they are listed in the parameter.
Binding The OTMA Resume TPIPE Security exit routine must be reentrant.
IMS callable services This exit routine is eligible for callable services. To use IMS callable services with this
exit routine, examine the value of the SXPLATOK field in the “IMS standard user exit
parameter list” on page 4:
v If SXPLATOK is zero, you cannot use IMS callable services with this exit routine.
v If SXPLATOK is non-zero, the value is the callable services token for this exit
routine. You can use the 256-byte work area addressed by the SXPLAWRK field to
call DFSCSIF0.
Including the routine The module or modules must be included in an authorized library in the JOBLIB,
STEPLIB, or LINKLIST concatenation. No additional steps are necessary to use a single
exit routine that is named DFSYRTUX. If you use want the exit to be refreshable,
specify EXITDEF=(TYPE=OTMARTUX,EXIT=(exit_names)) in the EXITDEF parameter
of the USER_EXITS section of the DFSDFxxx member of the [Link] data set.
Sample routine location [Link] (member name DFSYRTUX).
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
Normal linkage convention is used on entry and exit to and from this routine.
Register Contents
R0 Reason code
R1 Address of the “IMS standard user exit parameter list” on page 4
R13 Save area address
R14 Return address
R15 Entry point address
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area that is passed to this exit routine in SXPLAWRK can be different each
time that this exit routine is called.
If your OTMARTUX user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
the byte that SXPLCNXT points to. This tells IMS to not call additional exit
routines.
If register R15 is X'04', the sense code in the message prefix TMAMCSNC is X'33'.
This sense code indicates that there must be a reason code in the message prefix
TMAMCRSC. The applicable reason codes are listed in the following table under
RTUPRSNC.
The following table describes the parameter list (DFSYRTUP) for the OTMA
Resume TPIPE Security exit routine.
Table 99. Contents of the interface, DFSYRTUP
Label Description
RTUPVERS Version number of the parameter list.
RTUPTPNM Address of the TPIPE name.
RTUPUSID Address of the user ID. If this address is zero, there is no user ID
(user ID is provided by the client).
RTUPSENC Address of the sense code. The sense code for a failure in Resume
TPIPE authorization is X'33'.
RTUPRSNC Address of the reason code. The following reason codes are possible:
v X'01': Security header was not provided in the message prefix
v X'02': User ID was not provided in the message prefix
v X'03': Group ID was not provided in the message prefix
v X'04': User token was not provided in the message prefix
v X'05': TPIPE name was not provided in the message prefix
v X'06': RACF system failure
v X'07': RACF security violation; no profile was defined for the user
v X'08': User ID or Group ID is not authorized
RTUPRRET Address of the return code from RACF. If this address is zero, the
SAF parameter area does not exist.
RTUPRREA Address of the reason code from RACF. If this address is zero, the
SAF parameter area does not exist.
RTUPSFRC Address of the return code from SAF. If this address is zero, the SAF
parameter area does not exist.
RTUPSFRS Address of the reason code from SAF. If this address is zero, the SAF
parameter area does not exist.
RTUPSAFP Address of SAF.
RTUPAMCI Address of MCI.
Related reference:
“Routine binding restrictions” on page 8
This chapter describes the Physical Terminal (Input) Edit routine. This user-written
edit routine gains control before the IMS Basic Edit routine. If the input message is
processed by MFS, the Physical Terminal (Input) edit routine is not called. This edit
routine is called only when inserted from a terminal; it is not called when the
message is inserted by a program-to-program switch. This edit routine is not called
for LU 6.2 terminal input.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 261
Message segments are passed one at a time to the Physical Terminal Input edit
routine, and the edit routine can handle them in one of the following ways:
v Accept the segment and release it for further editing by the IMS basic edit
routine.
v Modify the segment and release it for further editing by the IMS basic edit
routine. Examples of segment modifications that can be made are changing the
transaction code and reformatting the message text. Make any required
modifications, because IMS has not yet performed destination or security
checking.
v Cancel the segment.
v Cancel the message and request that the terminal operator be notified
accordingly.
v Cancel the message and request that a specific message from the User Message
Table be sent to the terminal operator.
The Physical Terminal Input edit routine requests these actions by specifying
different return codes that are interpreted and acted on by IMS.
The following table shows the attributes of Physical Terminal (Input) edit routine.
If the IMS application program supplies [Link] in the MOD name parameter
for the output message, the IMS basic edit routine will be bypassed except for
transaction code and password validation.
Related Reading: For further information, see “MFS Bypass for the 3270 or SLU 2”
in the “Application Programming Using MFS” chapter in IMS Version 14
Application Programming APIs.
The Physical Terminal Input edit routine must position the transaction code, and
optionally the password, if the terminal is not operating in conversational or preset
destination mode. The exit routine should detect errors and return a message to
the terminal operator if any errors are found.
IMS maintains a flag in the CTB (bit CTB6TRNI in the CTBFLAG6 field) to indicate
when 3270 MFS bypass, nonconversational, no preset destination, and first segment
exist on input to the Physical Terminal Input exit routine. This flag notifies the
Physical Terminal Input exit routine that it can add a minimum of 1 and a
maximum of 18 bytes to the front of the message segment for a transaction code
and optional password. The minimum of 1 byte to be added to the front of the
message segment consists of a 1-byte transaction code. If NOBLANK is not
specified at system definition, a minimum of 2 bytes is added to the front of the
message segment, consisting of a 1-byte transaction code and 1 blank, which is
necessary as a separator. To add a transaction code and optional password, the exit
routine can put a return code of 16 in register 15 and set register 1 to point to an
LLZZ field, followed by the data to be added.
The Physical Terminal Input exit routine (DFSPIXT0) is specified on the LINEGRP
or TYPE macros as part of the EDIT parameter. If you are using both the Physical
Terminal Input and Output edit routines, you must specify (YES,YES) on the EDIT
parameter of the TERMINAL macro or Extended Terminal Option (ETO) logon
descriptor.
The CSECT name for this edit routine is the name specified in the TYPE or
LINEGRP macro statement for which this edit routine applies. You must also
specify YES in the EDIT parameter of the TERMINAL macro statement or ETO
logon descriptor.
The Global Physical Terminal Input edit routine (DFSGPIX0) performs the same
functions as this edit routine but does not require system definition.
Related Reading:
For information on coding the LINEGRP, TYPE, and TERMINAL macros, see
IMS Version 14 System Definition.
For more information on the ETO feature, see IMS Version 14 Communications
and Connections.
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the edit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
1 Address of the input message segment buffer. IMS editing has not been
performed. The first two bytes of the buffer contain the segment length
(binary length includes the 4-byte overhead). The third and fourth bytes of
the buffer are binary zeros. The message text begins in the fifth byte of the
buffer.
If the device was defined with MFS support but this message is not being
processed by MFS, the first segment of the message has backspace error
correction performed before entry to this edit routine. If escape (**) was
entered by the terminal operator, the first two data bytes have been changed
to binary zeros.
7 Address of CTB for the physical terminal from which the message was
entered.
9 Address of CLB for the physical terminal from which the message was
entered.
13 Address of save area. The first three words must not be changed.
14 Return address to IMS.
15 Entry point of edit routine.
The edit routine you supply can edit the message segment in the buffer pointed to
by register 1.
You can reduce the length of the message segment to any size by replacing the
length in the buffer with the appropriate value. The length field must appear in the
same place at exit as at entry, and bytes 3 and 4 must not be changed.
On return to IMS, all registers must be restored except for register 1, which
contains a message number if register 15 contains a value of 12; otherwise it is
ignored. Register 15 contains one of the following return codes:
When the entering terminal is not a 3270 MFS bypass terminal, and the
physical terminal input exit gives a return code of 16, IMS issues an error
message, and the transaction code is not inserted in the message.
Any other return code causes the message to be canceled and the terminal operator
to be notified.
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
“Global Physical Terminal (Input) edit routine (DFSGPIX0)” on page 183
Subsections:
v “About this routine”
v “Communicating with IMS” on page 264
During system definition, you specify which physical terminals or set of VTAM
nodes use the defined edit routine for output editing. You can use these edit
routines to meet your special editing needs associated with different
communication terminals.
You can also specify that this edit routine cancel an output message so that it is not
delivered to the terminal. Instead, the routine can optionally request that an error
message be sent in place of the canceled message.
The following table shows the attributes of the Physical Terminal (Output) edit
routine.
Table 101. Physical terminal (output) edit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must provide a 1-byte to 8-byte name.
Binding This routine must be reentrant.
If this exit routine is used by both static and ETO terminals, then
this exit is automatically linked to DFSCSI00 in the same manner as
exits that are used by only static terminals.
Sample routine [Link].
location
Related Reading: For information on coding the LINEGRP, TYPE, and TERMINAL
macros, see the section on “Macros” in IMS Version 14 System Definition.
IMS uses the entry and exit registers to communicate with the exit routine.
On entry, the edit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 The address of a buffer containing the output message segment to be edited.
The first two bytes are a binary count of the message segment length. The
second two bytes are control information provided by the application
program that constructed the message. The text of the output message starts
in byte 5. The count includes the first four bytes in length.
This register contains zeros if flag CTBAEOM in field CTBACTL of the CTB
is on, indicating end-of-message. Any exit that modifies the contents of the
buffer passed in register 1 should test for an end-of-message condition.
2 The address of an 8-byte field that contains either binary zeros or the user ID
associated with the output message. The contents of the user ID field are
described in IMS Version 14 Application Programming in the section on “I/O
PCB Masks” in “Defining Application Program Elements”.
The user ID in the output message can be compared to the user ID in the
CTB (CTBUSID) to determine editing requirements. The user ID is only
checked on the first segment of a multisegment message. DFSCTTO0 uses
CTBAEOM and ENTSTAT to determine which segment is being processed.
3 Address of storage area. For details of the format of this storage area, see the
prolog in the sample routine ([Link]; member name is DFSCTTO0).
7 CTB address for the destination terminal.
CTBFLAGC field: CTBCDSDT bit on means that session restart has occurred
for this terminal. If the edit routine is called with the CTBCDSDT on, the edit
can assume that this is the first application output message selected for
output processing since the session has restarted (provided that the bit is
turned off by the edit routine after the first message is processed).
IMS turns this bit on every time SDT (Start Data Traffic) for VTAM occurs.
The edit routine is responsible for resetting this flag after it receives the first
message.
The output message segment that your edit routine returns to IMS from must be
pointed to by the contents of the DECAREA field of the DECB. The first four bytes
must be in a format as received at input with the binary count updated to the
edited message segment length inclusive of the four bytes of prefix.
Before returning to IMS, the edit routine must restore all registers. If you are
editing the message in place, you can increase its length by a maximum of ten
bytes.
When the last segment of a message has been edited, IMS returns control to the
routine. The routine has no new message data to edit.
Whenever a Physical Terminal Output edit routine is called, the CTB is in register
7. A 1-byte field, CTBACTK, in the CTB contains a 1 in the second bit position if
this entry to the routine is for end of message (EOM).
On return, registers must be restored except for register 15, which must contain the
following return code.
All registers are not restored when a cancel request is made and the edit requests
that IMS send an error message DFS3489 to the terminal for a non-response-mode
message.
In order for IMS to cancel an output message before it is sent to the terminal, the
Physical Terminal Output edit routine must make a request when the first segment
of an output message is presented to it. The edit makes this request by setting the
length of the first segment to zero in the buffer pointed to by DECAREA.
If the edit routine wants IMS to send error message DFS3489 in place of the
canceled message, it places a return code of 4 in register 15 (in addition to zeroing
the length field of the first segment).
If the terminal is in response mode, IMS always replaces the canceled message
with error message DFS3489. Across a system restart, response mode is reset.
Therefore, if an output message is canceled after the system restart, no error
message is sent.
If the terminal is not in response mode, the edit routine is not required to have
IMS send error message DFS3489. Nevertheless, it might be necessary to have IMS
send the error message to prevent a hang condition for certain device types that
are expecting a message.
Related Reading: For an explanation of error message DFS3489, see IMS Version 14
Messages and Codes, Volume 1: DFS Messages.
Related reference:
“Links with your exit routine and DFSCSI00” on page 15
“Initialization of IMS callable services (DFSCSII0)” on page 16
“Routine binding restrictions” on page 8
IMS callable services are used to get and release storage. This example applies to
single-segment or multisegment messages, and to as many devices as the edit
routine's table is assembled to handle. The default table size allows for five
devices, but can be changed by modifying the label NUMENTS. If the table
capacity is exceeded, an ABENDU55 results. If the prefix had not increased the
message length by more than ten bytes, it could have been attached without the
creation of an additional buffer area.
IMS sets an upper threshold value of 75 percent, and a lower threshold value of 60
percent. You can modify these values using the QTU and QTL parameters of the
IMS procedure.
QTU has a range of 2 percent through 100 percent, and QTL has a range of 1
percent through 99 percent.
The exit routine can also be called optionally when a BMP's unit of work is
completed.
Subsections:
v “About this routine”
v “Restrictions” on page 269
v “Communicating with IMS” on page 270
If unprocessed messages overflow a message queue data set before the automatic
shutdown completes, a U0758 abend occurs.
This exit routine provides a warning before the automatic shutdown is initiated, so
you can reduce message queue buildup, possibly avoiding the automatic shutdown
and, most importantly, the U0758 abend.
You can replace the IMS-supplied exit routine with your own to establish your
own threshold algorithm or issue user messages, which can then be captured by
the AOI exit routine to reduce queue usage.
As an option, for certain units of work, you can modify this exit to find the
number of records currently in use by the calling task. You can also request
information that can be used to terminate the unit of work. For each application,
LU 6.2 conversation, or OTMA session, IMS maintains counts of short and long
message queue records (DRRNs) assigned, and supplies them to
DFSQSPC0/DFSQSSP0 if this option is used.
If you use this option, the expanded parameter list contains an output field that
allows you to tell IMS that you want the unit of work stopped because one or both
of the counts have exceeded specified limits. Different count limits can be
established for different tasks.
For most program types, the record counts are reset when one of the following
occurs:
v A message is retrieved (GU call) from the message queues.
v A sync point occurs.
v A rollback occurs.
v The application terminates normally.
For LU 6.2 conversations, the record counts are reset for each new message.
After the unit of work terminates, message queue records in use are released.
The following table shows the attributes of the Queue Space Notification exit
routine.
Table 102. Queue space notification exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSQSPC0 (or DFSQSSP0 for shared queues).
Binding
This routine must be reentrant. It can be called in cross-memory mode.
DFSCSI00 (callable services module) must be included in this load module if you plan
to use IMS callable services from this exit routine. An example of the bind control
statements is:
INCLUDE LOAD(DFSQSPC0) SPACE NOTIFY USER EXIT
INCLUDE LOAD(DFSCSI00) IMS callable services
MODE AMODE(31),RMODE(ANY)
ENTRY DFSQSPC0
NAME DFSQSPC0(R)
Including the routine DFSQSPC0 is a separately linked composite module in the [Link]. If you
write your own exit routine, it must be linked into [Link].
IMS callable services
To use callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service.
Use the ECB passed in parameter list QSPCECB for IMS callable services.
Sample routine location [Link] (member name DFSQSPC0 or DFSQSSP0).
The following call types are recognized by the Queue Space Notification exit
routine. Some of the parameters passed to the exit routine vary with the call type.
Restrictions
v Code running in cross-memory mode cannot issue any SVCs except ABEND.
Because this exit is called every time a message queue data set record is assigned
or released, the logic you add to this exit can have a negative effect on system
performance. IWAITs, time consuming algorithms, and excessive use of IMS
callable services should be avoided.
If you want to issue user messages instead of IMS system messages DFS2013
through DFS2018, you must provide an exit which returns user message keys in
register 15. The value returned in register 15 is actually the negative of the key in
the user message table. In addition to returning the appropriate message key in
register 15, be sure the message text is in the user-supplied message table,
DFSCMTU0.
The queue space notification exit routine is called whenever a logical record is
assigned to or released from a message queue data set. A parameter list is passed
to the exit routine. Its contents depend on whether the user-provided
DFSQSPC0/DFSQSSP0 takes advantage of the optional capabilities provided by
IMS. The IMS-provided DFSQSPC0/DFSQSSP0 does not use the optional
capabilities, although it does describe how they can be used.
The parameter list is mapped by the macro DFSPARM. The parameter list has five
parts:
1. Message queue data set in-use count and threshold status
v The number of records currently in use
The high-order byte of the in-use count is used as a flag byte.
v The maximum number of records assignable before shutdown (not provided
for shared queues)
The exit routine interrogates these values and sets the parameter flag and a
return code (register 15) based on their values. The return code is either zero
or an error message number.
2. Pointers to control blocks and thresholds
These fields are always passed to DFSQSPC0/DFSQSSP0:
v Address of the SCD control block
v Address of the ECB (required for IMS callable services).
v Address of user exit's work area or zero
If you want to change the threshold notification algorithm, note the following
interface requirements.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
0 Data set indicator:
00 QBLKS data set or Call Type 8. For Call Type 8, there is no
data set indicator value to put in Register 0.
04 SMSGQ data set
08 LMSGQ data set
2 Address of parameter list
9 Address of ECB
10 Address of SCD
14 Return address to IMS
15 Entry point of exit routine
Description of parameters
The macro DFSPARM generates the DSECT for the parameter area passed to
DFSQSPC0/DFSQSSP0 by IMS. For additional information, refer to DFSPARM
included in [Link].
Recommendation: Get addressability to the SCD from the parameter list rather
than register 10.
Before returning to IMS, the exit routine must restore all registers except for
register 15. Register 15 must contain one of the following return codes, except for
call type 8, which does not check for a return code.
Threshold values
The parameter list fields QSPCQTU and QSPCQTL contain the upper and lower
threshold values (DFSQSPC0 only).
The IMS security exit routines do not need to be bound to the IMS nucleus, can
run in 31-bit storage, and can share a work storage area. The following security
exit routines have these attributes:
v Signon/off security exit routine (DFSCSGN0)
DFSCSGN0 is called during IMS initialization to give the exit routine the chance
to acquire a work storage area. The exit routine passes the address back to IMS.
Then, IMS passes the address to the other security exit routines every time they
are called.
v Security Reverification exit routine (DFSCTSE0)
v Transaction Authorization exit routine (DFSCTRN0)
Subsections:
v “About this routine”
v “Communicating with IMS” on page 274
The following table shows the attributes of the Security Reverification exit routine.
Table 103. Security reverification exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCTSE0.
In IMS Version 12 and earlier, the security exit routines must be bound to the IMS
nucleus because the SECURITY macro is included in the IMS nucleus. In IMS Version
13 and later, the SECURITY macro is not supported and the security exit routines can
be bound separately.
If the security exit routines are linked in one of the STEPLIB or LINKLIST libraries,
IMS loads the exit routine. There is no startup parameter to specify whether to load
the routines. Message DFS1937I is issued for every exit routine that is loaded into
31-bit storage.
If the exit routines cannot be linked separately or cannot use a common work area,
they must be linked in the following manner:
v If the CSECT of DFSCTSE0 is part of DFSCTRN0 source, DFSCTSE0 must be linked
as an ALIAS of DFSCTRN0.
v If virtual address spaces are used to exchange data between DFSCSGN0,
DFSCTRN0, and DFSCTSE0, you must link DFSCTSE0 and DFSCSGN0 as ALIASs of
DFSCTRN0.
Including the routine If DFSCTSE0 is link edited to DFSCTRN0, it is called on return from DFSCTRN0.
IMS callable services To use callable services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service token and a
parameter list in which to build the function-specific parameter list for the desired
callable service.
v Use the ECB found in register 9 for the DFSCSII0 call.
v Link DFSCSI00 with your user exit routine.
Sample routine location No sample is provided.
On entry, the exit routine must save all registers using the save area provided. The
registers contain the following:
Register Contents
0 Address of the user ID from PST (PSTUSID)
1
Address of the password or zero
For AUTH call, address of GENERIC class
For TRAN call, address of TRAN class
For FIELD call, address of FIELD class
For DATABASE call, address of DATABASE class
For SEGMENT call, address of SEGMENT class
For OTHER call, address of OTHER class
2 Calling routine number as follows:
12 (X'0C')
DFSDLA30 for DFSCTSE0 only, CHNG call
32 (X'20')
DFSDLA30 for DFSCTSE0 only, AUTH call
12 (X'0C')
DFSDLA30 for DFSCTSE0 only, CHNG call
32 (X'20')
DFSDLA30 for DFSCTSE0 only, AUTH call
3 Return code from prior routines
4 For details of the format of this storage area, see the prolog in the sample
routine ([Link]; member name is DFSCTSE0).
7 Address of source CTB or zeros.
Recommendation: Do not write an application that requires the contents of
this register, because they vary depending on the type of call to the exit
routine and the environment from which the call is made.
9 Address of PST.
10 Address of transaction code or resource name.
11 Address of SCD.
13 Address of save area. The exit routine must not change the first three words.
15 Entry point of exit routine.
On return, all registers must be restored except for register 15, which must contain
one of the return codes shown in the following table, to indicate the success or
failure of the user's authorization to issue a AUTH or CHNG call.
Related reference:
“Transaction Authorization exit routine (DFSCTRN0)” on page 311
“Initialization of IMS callable services (DFSCSII0)” on page 16
Subsections:
v “About this routine”
v “Communicating with IMS” on page 277
To acquire SLU 1, or 328X BSC/VTAM printers that are defined to IMS as shared,
the IMS message router activates a Shared Printer exit routine. This is a routine
that you write to decide whether a terminal that is unavailable can be
automatically acquired by IMS or an AOI application program. The Shared Printer
exit routine should return the name of the AOI application program.
A Shared Printer exit routine is not necessary to use shared printing. If no exit
routine exists, the message router simulates a /OPN command when the terminal
is defined as shared.
The following table shows the attributes of the Shared Printer exit routine.
Table 104. Shared printer exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSSIML0.
Including the routine No special steps are required to include this routine.
IMS callable services To use IMS callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service. Use the ECB found
in register 9 for the DFSCSII0 call.
Special considerations
If you decide to write a Shared Printer exit routine, here are some things you need
to know:
v If the exit routine returns a bad return code, it is disabled and message DFS2084
is sent to the master terminal operator. A bad return code, in this case, is a
return code of 8 when no transaction name is in the area pointed to by register 1
or when the transaction name returned is invalid. After the exit routine has been
disabled, a return code of 0 is assumed. For the exit routine to be enabled, IMS
must be restarted.
v The exit routine must not issue any waits, OS macros, or SVCs.
v The exit routine can examine output destination but cannot modify it.
v The exit routine should return the name of the AOI application program in the
field provided by the message router.
v The exit routine receives control of the messages after they are queued.
v Because the exit routine runs in the IMS control region, your installation must
maintain security. Installation procedures should not let an unauthorized routine
be linked into the nucleus.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the area where the AOI transaction name is to be returned.
6 Address of CNT.
7 Address of CTB.
9 Address of CLB.
11 Address of SCD.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which must contain one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
Subsections:
v “About this routine”
v “Restrictions” on page 279
v “Communicating with IMS” on page 279
All attempts to sign off from ACF/VTAM terminals cause IMS to call this exit
routine. The Signoff exit routine is also called if either RACF or the Signon/off
Security exit routine (DFSCSGN0) fails a signon attempt.
Recommendation: Although the Signon exit routine and this exit routine are
optional, if you include one, you should also include the other to perform any
cleanup operations that are necessary.
The following table shows the attributes of the Signoff exit routine.
Table 105. Signoff exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSSGFX0.
Including the routine If you want IMS to call the Signoff exit routine, include it in an authorized library in
the JOBLIB, STEPLIB, or LINKLIST library concatenated in front of the [Link].
IMS callable services To use callable services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service token and a
parameter list in which to build the function-specific parameter list for the desired
callable service.
v Use the current address ECB found at offset 0 for the DFSCSII0 call.
v Link DFSCSI00 with your user exit.
Sample routine location [Link] (member name DFSSGFX0).
Each time IMS calls the Signoff exit routine, the exit routine receives information
on the XRF status of IMS. The exit routine can check this information and return
the appropriate error message if necessary. IMS calls the exit routine if XRF
tracking fails.
You can use this exit to reset the significant status for a terminal in one of the
following states:
Conversational
Exclusive
Test
Preset
MFS test
Full-function response
Fast Path response
Note: Test and preset states are nonrecoverable, so IMS resets the significant
status automatically.
A parameter passed to the exit routine indicates the status of the terminal or ETO
user at sign off. You can reset the status in the output parameters.
For conversation mode, IMS performs the equivalent of an /EXIT command for the
conversation.
Restrictions
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
R13 Save area address
R14 Return address to IMS
R15 Entry point address of exit routine
The following table lists the sign off parameters. The address of this parameter list
is in the standard exit parameter list field SXPLFSPL.
Table 106. Signoff exit parameter list
Offset (decimal) Length Description
+0 4 Current ECB address.
+4 4 SCD address.
+8 4 Address of the user table created by initialization
user exit DFSINTX0 or zero, if none.
+12 4 Address of USERID associated with Sign Off.
+16 4 CLB address.
+20 4 Address of the STATUS_IN and STATUS_OUT
vectors. The status vectors are mapped by the
DFSSTCHK macro.
Contents of STATUS_IN
The input status vector is a 2-byte field that indicates the terminal's significant
status when the exit routine is called. The second byte of the field is reserved. The
first byte of the field contains a value that indicates the significant status as
follows:
Value Description
X'80' Conversation
X'40' Exclusive
X'20' Test
X'10' Preset
X'08' MFS test
X'04' Full-function response
X'02' Fast Path response
Contents of STATUS_OUT
The output status vector is a two-byte field that indicates changes to the significant
status made by the exit routine. IMS uses the contents of STATUS_OUT as an
indicator to exit a conversation and reset significant status. The default for this
field is zeros, indicating that no significant status is reset.
The second byte of the field is reserved. The first byte of the field contains a value
that indicates the significant status to be reset as follows:
Value Description
X'80' Exit conversation
X'40' Reset exclusive
X'20' Reset test
X'10' Reset preset
X'08' Reset MFS test
X'04' Reset full-function response
X'02' Reset Fast Path response
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
“IMS standard user exit parameter list” on page 4
This topic describes the Signon exit routine. All attempts to sign on to ACF/VTAM
terminals if the Extended Terminal Option (ETO) feature is active cause IMS to call
this exit routine. The Signon exit routine cannot be used by LU 6.2 terminals.
IMS calls the Signon exit routine before RACF validation (if requested) is
performed and before the Signon/off Security exit routine (DFSCSGN0) is called.
This exit routine contains logic and function that complement the Signon/off
Security exit routine. Review your use of the Signon/off Security exit routine to
determine if the function that it provides is necessary or conflicts with the Signon
exit routine.
Related Reading:
v For more information on ETO and LU 6.2, see IMS Version 14 Communications
and Connections.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 284
For the latest version of DFSSGNX0, see the [Link] library; member name
is DFSSGNX0. If you write your own Signon exit routine or modify the sample,
you must include the portion of the sample exit routine (or the equivalent logic)
that removes extraneous blank fields that RACF (if used) creates. (When the
Signon exit routine is not included in the system, internal IMS logic removes these
extraneous blank fields.) The sample exit routine also provides an example of
associated printing.
When the Signon exit routine (DFSSGNX0) is not included in the system and the
MFS formats for the DFS3649 message have not been modified, internal IMS logic
removes these extraneous blank fields. If the MFS formats for the DFS3649 message
have been modified, corresponding changes to the logic in the Signon exit routine
that removes the extraneous blank fields might be necessary. This logic is included
in the Signon exit routine so that adjustments can be made when changes are
made to the DFS3649 MFS formats.
The Signon exit routine and the Destination Creation exit routine (DFSINSX0) are
corequisite exit routines, under the following conditions. If you provide one exit
routine to supply queue data for additional LTERMs, you must provide the other
exit routine also. They both create the user control block structure and related
LTERMs (including multiple LTERMs for a user): the Signon exit routine using the
user ID and the Destination Creation exit routine using an LTERM name. Both exit
routines must have the same logic so that the structure created is identical,
regardless of which exit routine created it.
You can use the Signoff exit routine (DFSSGFX0) to complement any processing
that the Signon exit routine performs.
The following table shows the attributes of the Signon exit routine.
Table 107. Signon exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention
You must name the Signon exit routine DFSSGNX0.
Including the routine If you want IMS to call the Signoff exit routine, include it in an
authorized library in the JOBLIB, STEPLIB, or LINKLIST library
concatenated in front of the [Link].
IMS callable services
To use IMS callable services with this routine, you must do the
following:
v Issue an initialization call (DFSCSII0) to obtain the callable service
token and a parameter list in which to build the function-specific
parameter list for the desired callable service.
v Use the current address ECB found at offset 0 for the DFSCSII0
call.
v Link DFSCSI00 with your user exit.
Sample routine [Link].
location
If you want associated printing, be sure to specify the following when you
assemble the sample exit routine:
&ASSOCPRT SETC ’YES’
This specification ensures that the associated printing sample code is generated.
User ID
The Signon exit routine informs the external subsystem of the user ID associated
with the transaction input message. The user ID can be one of the following:
v The inputting LTERM name if the terminal user is not signed on
v The ID of the terminal user
v The RACF/user-authorized user ID associated with a non-message driven BMP
or CPIC application
v The PSB name specified on the JOB statement
For a message driven BMP that has done a GU, or IFP that has done a GU, or
MPP:
1. PSTUSID if the field does not contain blanks
2. PSTSYMB0 if the field does not contain blanks
3. PSTBUSER if the field does not contain binary zeros or blanks
4. PDIRSYM
For message driven BMP that has not done a GU or IFP that has not done a GU:
1. PSTBUSER if the field does not contain binary zeros or blanks
2. PDIRSYM
IMS calls the Signon exit routine in the XRF alternate system for a type 1 session
with ETO. When IMS calls the exit routine in the alternate system, the exit routine
is not allowed to change anything related to the terminal or user structures,
including fields that the exit routine can normally change.
Each time IMS calls the Signon exit routine, the exit routine receives information
on the XRF status of IMS.
The exit routine must insert a period (.) in the sign-on user verification string
(UVS) after building the associated printer buffer.
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
R13 Save area address
R14 Return address to IMS
R15 Entry point address of exit routine
The following table lists the signon exit parameters. The address of this parameter
list is in the standard exit parameter list field SXPLFSPL.
Table 108. Signon exit parameter list
Offset (decimal) Length Description
+0 4 Current ECB address.
+4 4 SCD address.
+8 4 Address of the user table created by Initialization
User Exit routine DFSINTX0 or zero, if none.
Set to zero:
v For a static terminal.
v If processing on an XRF alternate system.
v If processing /SIGN ON ETO STSN device.
Set to zero:
v For a static terminal.
v If processing on an XRF alternate system.
v If processing /SIGN ON ETO STSN device.
+28 4 CLB address.
+32 4 Table of existing user structures. For additional
details on the content and the format, refer to the
prolog in the sample routine.
+36 4 Address of general Input/Output parameters. For
additional details see DSECT DFSSGNXP macro for
the format.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains one of the following return codes.
Related reference:
“Signon/off Security exit routine (DFSCSGN0)” on page 289
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
“IMS standard user exit parameter list” on page 4
The exit routine can determine whether to use the user ID structure or the
nodename structure by examining the passed structure without making an explicit
IMS callable service routine call to find the nodename user structure.
If the exit routine chooses the nodename as the user structure name, the user ID is
hashed to a non-SPQB user hash table.
If no user control block structure exists, you can select a user descriptor by using
the USERD= keyword, write the Signon exit routine to select the user descriptor, or
let IMS select a descriptor. The following figure shows the search order that IMS
uses to select the user descriptor.
You can use the USERD keyword (entering it as user data with the /SIGN ON
command) to select the user descriptor. If your Signon exit routine does not choose
a user descriptor, IMS uses the user descriptor requested by the USERD parameter.
The Signon exit routine is called with the parameter list SPQBPTRS, which
contains the address of the USERD= keyword specified, and the addresses of the
user ID descriptor, node name descriptor, and DFSUSER descriptor. The exit
routine can choose among these descriptors by specifying the descriptor's address
in the USEQUSED field of the USEQDATA DSECT. If the exit routine selects one of
these user descriptors, IMS uses it to create the user control block structure. (A
user descriptor that the exit routine specifies overrides any descriptor specified on
the USERD= keyword.)
The exit routine can also create an arbitrary user structure name by specifying the
name in the eight-byte USEQUSTN field in the USEQDATA parameter list. IMS
creates the user structure with the name from this field and stores the returned
name in the SPQB user hash table. Security is based on the original user ID that
the user signed on with and is stored in the non-SPQB user hash table.
If no user descriptor is specified on the USERD= keyword and the Signon exit
routine does not return the address of a user descriptor, IMS selects the first
descriptor address that it finds in the SPQBPTRS among the user ID descriptor,
node name descriptor, and the DFSUSER descriptor, respectively. IMS uses this
descriptor to create the user control block structure.
If none of these methods returns a user descriptor, IMS uses DFSUSER to create
the user structure. If no user descriptor can be found, including DFSUSER, IMS
rejects the signon request.
Cases
Four cases describe what data the Signon exit routine (DFSSGNX0) can supply. The
four cases are based on whether the user structure exists and whether DFSUSER or
a non-DFSUSER descriptor is selected.
For the Signon exit routine, non-DFSUSER descriptors are descriptors based on the
user ID or node name.
Table 109. Case numbers identifying what data DFSSGNX0 can provide
Descriptor User structure exists User structure does not exist
DFSUSER Case 1 Case 2
Non-DFSUSER Case 3 Case 4
Case 1
The Signon exit routine is called using the descriptor, DFSUSER, that was used to
create the user control block structure. The exit routine can:
v Supply queue data (except LTERM names) to override data of the existing
structure
v Provide data for additional LTERMs, if it supplies the data for the existing
LTERMs first and in the order in which they are chained
IMS verifies the additional LTERMs that are specified (but are not in the existing
user structure) against the LTERMs that already exist in the system. If an LTERM
that is specified as an additional LTERM already exists in the system, IMS assumes
that this LTERM has been assigned to a different user, and it is not made part of
the user structure of the user that is signing on. If this is the only LTERM that the
descriptor or the Signon exit routine specifies for this user, IMS rejects the signon
attempt.
Case 2
If DFSUSER is selected and no user control block structure exists, the Signon exit
routine:
v Can supply any queue data desired (including LTERM names)
If the exit routine does not provide queue data, one LTERM (named for the user
ID) is created. If any queue data is passed, this default user ID LTERM is not
created and must be specified in the queue data if it is desired.
IMS verifies the additional LTERMs that are specified against the LTERMs that
already exist in the system. If an LTERM that is specified already exists in the
system, IMS assumes that this LTERM has been assigned to a different user, and it
is not made part of the user structure of the user that is signing on. If this is the
only LTERM that the descriptor or exit routine specifies for this user, IMS rejects
the sign-on attempt.
Case 3
The Signon exit routine is called with the same non-DFSUSER descriptor that was
used to create the user control block structure (either the user ID or node name
descriptor). The exit routine:
v Can supply any queue data (except LTERM names) to override data of the
existing structure
v Cannot provide data for additional LTERMs
IMS verifies the LTERMs that are specified in the descriptor (but are not in the
existing structure) against the LTERMs that already exist in the system. If an
LTERM is specified in the descriptor but is not in the existing structure, IMS
assumes that this LTERM has been assigned to a different user and deleted. The
LTERM is given back to the user and is made part of the user structure of the user
that is signing on.
Case 4
IMS verifies the LTERMs specified in the descriptor against the LTERMs that
already exist in the system. If an LTERM that is specified in the descriptor already
exists in the system, IMS assumes that this LTERM has been assigned to a different
user, and it is not made part of the user structure of the user that is signing on. If
this is the only LTERM that the descriptor or exit routine specifies for this user,
IMS rejects the signon attempt.
Related tasks:
“User descriptor selection” on page 286
This chapter describes the Signon/off Security exit routine. You can use this exit
routine to verify a user's ID and password.
This exit routine can conflict with the Signon exit routine (DFSSGNX0).
Subsections:
v “About this routine”
v “Communicating with IMS” on page 290
You can use the Signon/off Security exit routine with or without RACF to verify
the user ID and password. IMS calls this exit routine after RACF /SIGN ON
verification has been performed. If the /SIGN ON request is rejected by RACF,
IMS does not call this exit routine. If the RACF option is not selected in the IMS
system definition, you can use this exit routine to verify the user's identification
and passwords at /SIGN ON time.
If shared queues are active and the security environment for a transaction is
created on the back-end IMS subsystem, IMS does not call this exit routine.
The Signon/off Security exit routine should have access to a table of valid user IDs
and the passwords associated with each ID. The exit routine should note successful
/SIGN ONs to prevent additional attempts to perform the /SIGN ON function.
When the /SIGN ON command is executed, the exit routine should mark that user
ID as available for /SIGN ON. For logging purposes, the exit routine can also
place information into the data portion of the user verification string that is passed
to the exit.
If you plan to use the Signon exit routine, review how you use the Signon/off
Security exit routine to determine if the function that this exit routine provides is
necessary or might even conflict with the Signon exit routine.
Like both the Security Reverification exit routine (DFSCTSE0) and the Transaction
Authorization exit routine (DFSCTRN0), the Signon/off Security exit routine does
not need to be bound to the IMS nucleus, can run in 31-bit storage, and can share
a work storage area using a standard technique.
The Signon/off Security exit routine is called during IMS initialization to give the
exit routine the chance to acquire a work storage area. If storage is acquired, the
exit routine passes the address back to IMS in register 2. Then, IMS passes the
address to the DFSCTSE0, DFSCTRN0, and DFSCSGN0 security exit routines every
time they are called.
If the Signon/off Security exit routine is linked in one of the STEPLIB or LINKLIST
libraries, IMS loads the exit routine. There is no startup parameter to specify
whether to load the routines. Message DFS1937I is issued when the Signon/off
Security exit routine is loaded.
Signon/off Security exit routine is called after the Initialization exit routine
(DFSINTX0) is called.
The following table shows the attributes of the Signon/off Security exit routine.
Table 110. Signon/off security exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCSGN0.
Including the routine No special steps are required to include this routine.
IMS callable services
To use callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service. Use the ECB found
in register 9 for callable services. This exit is automatically linked to DFSCSI00 by IMS.
No additional linking is required to use callable services.
Sample routine location [Link] (member name DFSCSGN0).
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the exit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
0 /SIGN function (ON or OFF):
0 /SIGN ON
1 /SIGN OFF
2 /SIGN ON in XRF alternate system.
3 /SIGN OFF in XRF alternate system.
4 IMS initialization. The exit can return an address that is passed to
DFSCTRN0, DFSCTSE0, and DFSCSGN0.
1 Pointer to the variable-length user verification string, if the SIGN function is
/SIGN ON. The string format is LLZZ (4 bytes), followed by the text, starting
with the first character of the user ID.
Register Contents
7 Address of source CTB or zeros.
Recommendation: Do not write an application that requires the contents of
this register, because the contents of this register vary depending on the type
of call to the exit routine and on the environment from which the call was
made.
9 Address of ECB.
11 Address of SCD.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
On return to IMS, all registers must be restored except for register 15, which
contains one of the following return codes:
Exception: The exit routine does not check this return code on return from
RACF or during /SIGN OFF processing.
Related tasks:
Extended Terminal Option (ETO) (Communications and Connections)
Related reference:
“Signon exit routine (DFSSGNX0)” on page 281
“Transaction Authorization exit routine (DFSCTRN0)” on page 311
“Security Reverification exit routine (DFSCTSE0)” on page 273
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
“User Message table (DFSCMTU0)” on page 483
Subsections:
v “About this routine”
v “Communicating with IMS” on page 293
The message switch acts as a load command from DFSTCF to load another TCO
script. Use this exit routine to control which LTERMs are allowed to load TCO
scripts.
The default exit routine immediately returns control to DFSICIO0, and you can
load TCO scripts from any terminal.
The following table shows the attributes of the TCO CNT exit routine.
Table 111. TCO CNT exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention If you are writing your own routine, you can give it any name. If you are using the
IMS-supplied routine, use the name DFSTCNT0.
In this example, [Link] is an authorized library that contains all load modules.
[Link] is a library that contains all object modules. The JCL in this example expects
to find the object modules of the exit routine (MYEXIT) and the IMS Communication
Analyzer module (DFSICIO0) in [Link] and places the result of the into
[Link].
After you've compiled and tested your routine (or if you are using the routine
supplied by IMS), you must bind the exit routine with the TCO Language Interface
module (DFSTDLI0).
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine location [Link] (member name DFSTCNT0).
IMS uses the entry and exit registers to communicate with the routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 The buffer location of the input message segment after translation to EBCDIC
and after IMS Basic Editing. The first two bytes of the buffer contain a binary
message length. The third byte of the buffer is binary zeros. The binary count
includes the 4-byte prefix. The fifth byte contains the first byte of message
text.
7 Address of CTB.
9 Address of CLB.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of edit routine.
Use the message segment in the buffer addressed by register 1 as input to the exit
routine.
The exit routine must place the text of the edited message segment to be returned
to IMS in the buffer addressed by register 1. If the input was processed by the IMS
Basic Edit, this buffer is always 10 bytes greater than the 2-byte binary count at the
beginning of the message segment. The length of the message segment can be
expanded or reduced to any desired size. The format of the edited message
segment in the buffer on return to IMS must be two bytes of binary count (LL),
two bytes of binary zeros (ZZ), and edited text. The second two bytes (ZZ) should
not be changed or edited. The LLZZ field is the first four bytes of the message
segment.
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes.
Register 1 contains the message number if register 15 contains a return code of 12;
otherwise it is ignored. Any other value causes the message to be canceled and the
terminal operator to be notified.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 295
The TCO exit routine inserts messages that are the commands, transactions, and
message switches that you specify in the time schedule requests and message sets
that make up a script member. The TCO exit routine passes any data found in
columns 56 through 71 of the time schedule request to IMS to be processed.
You do not have to write your own exit routine. You can schedule predefined
commands, transactions, and message switches at predefined times with
DFSTXIT0, the TCO exit routine IMS supplies. If you do write your own, you can
write it in COBOL or assembler.
Restriction: PL/I and C language exit routines are not supported. Cobol routines
running under Language Environment for z/OS are not supported.
The following table shows the attributes of the Time-Controlled Operations (TCO)
exit routine.
In this example, [Link] is an authorized library that contains all load modules.
[Link] is a library that contains all object modules. The JCL in this example expects
to find the object modules of the exit routine (MYEXIT) and the TCO Language
Interface module (DFSTDLI0) in [Link] and places the result of the bind into
[Link].
After you've compiled and tested your routine (or if you are using the routine
supplied by IMS), you must bind the exit routine with the TCO Language Interface
module (DFSTDLI0) and place them into [Link].
Including the routine To load and execute the routine, it must be referred to in a time schedule request in
the script member that is executing.
Related Reading: For more information about time schedule requests and script
members, see IMS Version 14 Operations and Automation.
The following is an example of a time schedule request in a script member that wants
the routine “MYEXIT” to be executed.
*TIME 1200 MYEXIT
v Columns 1-5 contain the Identification field. '*TIME' is in this field.
v Columns 7-10 contain the initial dispatch time. In this example it is 12:00 p.m.
v Columns 12-19 contain the name of the exit routine, left-justified and padded with
blanks. The name in this example is 'MYEXIT'.
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine location [Link] (member name DFSTXIT0).
IMS uses the entry and exit registers, and parameters to communicate with the exit
routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of a parameter list that contains the address of the program
communication block (PCB) used in the exit routine calls.
10 Reserved for TCO.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
The PCB
The program communication block (PCB) contains the actual scheduling time for
the time-initiated message processing. It is in the PCBTIME field (PCB + 16).
Under most circumstances, this is the same time as the time initiated request. In
very busy systems, however, that actual scheduled time can differ from the
schedule request. For example, if you request your exit routine to be scheduled at
12:01 and a busy system prevents it from being scheduled until 12:03, the PCB
contains 12:03.
DL/I calls
The TCO exit routine calls the TCO Language Interface module (DFSTDLI0) to
process these calls. You can call DFSTDLI0 or CBLTDLI0 (for COBOL) to process
the call.
You must pass a parameter list with the call in standard DL/I format (for example,
register 1 contains the address of a 2- or 3-word parameter list whose end is
indicated by a X'80' in the high-order byte). The PURG call can have two or three
parameters. The other calls require three parameters.
Status codes
A blank status code is returned to the exit routine after a successful call.
The following status codes can be returned to the exit routine after an unsuccessful
call:
AB The call didn't specify an I/O area.
Message formats
Figure 17. Format of message where the address of a message set is retrieved
The last message of the message set contains binary zeros in the “next segment”
field.
If the message set is broken into individual messages and segments (by the use of
a space and an S in column 72), this is shown in the ZZ field of each segment. The
values are as follows:
Value Meaning
0001 First segment of a message
0000 Middle segment of a message
0002 Last segment of a message
0003 First and last (only) segment of a message
Subsections:
v “About this routine”
v “Sample IMS configurations” on page 299
v “Defining entry points” on page 302
v “Authorization checking” on page 303
v “Attributes of the routine” on page 304
v “Communicating with IMS” on page 305
Restriction: The DFSMSCE0 user exit routine is not called for DL/I ICAL
requests for synchronous program switch.
In turn, the exit is allowed to affect the routing of most of these messages.
Exceptions are cases where rerouting would violate IMS architecture or cause
problems such as hung terminals or incorrect application program operation. For
example, rerouting application program output messages to the I/O PCB is one
of these exceptions (it is not allowed), or affinity routing of synchronous
APPC/OTMA transaction messages to another IMS in a shared queues
environment when the resource recovery service or APPC/OTMA enablement
service is not set.
For details on the routing capabilities for each exit entry point, see the user
reroute flags MSTRFL2 (terminal), MSLRFL2 (MSC link), and
MSPRFL2/MSPRFL3 (application) in the DFSMSCEP user parameter list
mapping tables in Table 114 on page 306. Messages will be canceled or rerouted
if you have set one of more of these flags in conjunction with the destination
type.
298 Exit Routines
IBM Confidential
The user reroute request flags are MSTRFL2 (terminal), MSLRFL2 (MSC link),
and MSPRFL2/MSPRFL3 (application). Setting one or more of these flags in
conjunction with changing destination type fields, causes the message to be
canceled or rerouted (see following note).
See the DFSMSCE0 sample exit for examples of message routing.
For affinity routing restrictions, see the topic "Managing APPC and OTMA
messages in a sysplex environment" in IMS Version 14 System Administration.
DFSMSCEP parameters that the exit can set or change to affect message routing
are marked with a "U" or "B" as follows:
I IMS SETS (EXIT MUST NOT CHANGE)
U USER EXIT SETS
B BOTH IMS/USER EXIT SET (OR CHANGE)
v Provides a common parameter list interface and linkage interface to the various
entry points (or functions).
v Provides the ability to append an optional user prefix segment to TM and MSC
messages which TM and MSC user exit routines can use to communicate and
control user-customized routing needs.
v Provides new entry points:
– Control at IMS initialization and termination
– Control of messages in an MSC intermediate system
– Application program inserts to a non-modifiable PCB
All the entry points are optional, using a vector table that you code at the
beginning of the common exit module.
v Logs routing errors and footprints in the message to indicate those exit routines
that reroute the message.
These samples describe four separate IMS configurations and the points where the
DFSMSCE0 exit routine receives control during the flow of a transaction and
response message.
In a single IMS environment, the TR exit routine can receive control when a
message is received from the terminal. The PR exit routine receives control when
an application program issues a CHNG call to a modifiable PCB or on an ISRT call
to a I/O or ALT PCB to insert a message, or a GU call to the I/O PCB.
Single IMS
IMSA
Transaction message
TR Application
program
Response
PR
Input
terminal
Figure 18. Single IMS system environment
LR4 LR3 PR
Shared-queues environment
The PR exit routine receives control when the application program issues a CHNG
call to a modifiable PCB or on an ISRT call to the I/O or ALT PCB to insert a
Front-end Back-end
IMS IMS
IMSA IMSB
Transaction message
TR
Shared Application
queues program
Input
terminal Response message
PR
Application Application
program program
You can define the entry points and conditions for IMS to call the DFSMSCE0 exit
routine by coding the user vector table macro (DFSMSCVT). In the front of the
module, code the VECTOR=MSCVTABLE parameter in the DFSMSCSV macro to point to
the resulting vector table. The DFSMSCVT macro supports 12 entry points that you
can specify to select those conditions for which the exit routine is called (2 for IMS
initialization and termination, and 10 entry points in the flow of TM message
processing).
The DFSMSCE0 user exit routine can change the routing of a message by setting
flags and fields in the user parameter list that IMS passes to the exit routine. This
parameter list is mapped by the DFSMSCEP macro, and then returned to IMS. The
parameter list contains:
v Fields and flags to indicate IMS conditions, such as MSC or shared-queues
system definition
v Information regarding the message, such as source and destination names and
MSC system identifiers (SYSIDs) for routing control
Some of the information in the parameter list is for reference only, while other
information can be changed to affect the rerouting of the message. See the
DFSMSCEP macro, described in Table 114 on page 306 through Table 119 on page
308, for more information.
At any of the user exit entry points (other than the initialization or termination
entry points), the exit routine can request a user prefix segment to be added to the
message. If a user prefix is already obtained for this message by a previous call to
the exit routine, IMS passes the address of the user prefix to the exit routine. The
exit routine can reference or change the user prefix, but cannot delete it or change
its length. This prefix can contain user routing information that can be passed to
the other routing exit entry points to be used to reroute the message. After the user
prefix is obtained, it remains appended to the message and is logged with the
message (for example, a type 01 or type 03 message log record is mapped by the
QLOGMSGP macro).
For each routing request, the user exit routine is passed a 512–byte work area that
is initialized to zeros and that the user exit routine can use as a work area, such as
for creating a user prefix.
No IMS System Definition changes are needed to invoke the DFSMSCE0 exit
routine, and MSC does not need to be available; however, several of the routing
functions are only available for MSC messages. The DFSMSCE0 exit routine is
loaded at IMS initialization, provided that the load module is link edited into
[Link] or a user library concatenated to [Link].
Authorization checking
The exit call during link receive processing controls the level of authorization
checking. The level of authorization is controlled by the field MSLRFL3 of the
parameter list during link receive. IMS sets one of the flags in MSLRFL3 when
calling the link receive entry points to indicate which level of security checking is
active. If the message is a local transaction message, resetting or changing this flag
will override the level of security to be performed for this message. Flag MSLRFL1
can be tested to determine if the message is a local transaction. The following
parameters in the MSLRFL3 field specify the level of authorization:
MSLR3MSN
Authorization by MSNAME. The accessor environment element (ACEE)
dynamically created for first authorization, then reused.
The specification of MSLR3MSN causes the security environment based on
the MSNAME to be built the first time it is needed for an authorization
check. Thereafter, the environment is saved and is reused for subsequent
checking.
MSLR3CTL
Authorization by CTL address space security. The specification of
MSLR3CTL uses the security environment of the CTL address space that
already exists.
MSLR3USR
Authorization by user ID of input terminal. ACEE dynamically created and
deleted for each authorization.
The specification of MSLR3USR causes the security environment based on
the user ID of the input terminal (that entered the transaction) to be built
each time it is needed for an authorization check.
MSLR3XIT
Authorization by user exit (DFSCTRN0). MSLR3XIT can be specified by
itself, or with either MSLR3MSN, MSLR3CTL, or MSLR3USR. The
specification of MSLR3XIT causes DFSCTRN0 or DFSCTSE0 to be called, if
they exist.
MSLR3NON
No security authorization checking.
MSLR3NON can only be specified without any of the other four options.
The specification of MSLR3NON bypasses all security checking, and allows
the use of the transaction destination.
On entry, the MSLRFL3 field contains the system default value from
MSCSEC=(,xxx) in the DFSDCxxx PROCLIB member. The exit can then override
the system default, or leave it as is.
The TM and MSC Message Routing and Control user exit routine must be written
as reentrant. The exit routine receives control while running in a 31-bit addressing
mode, and must return control in that mode. The exit routine is called in TASK
mode, with no locks held, and can be in cross memory, non_AR mode.
The following table shows the attributes of the TM and MSC Message Routing and
Control User exit routine.
Table 113. TM and MSC message routing and control user exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention Must be named DFSMSCE0.
Binding This exit routine must be reentrant.
The sample exit routine is a default routine. If you write your own
exit routine, you must bind it with the IMS control region
SDFSRESL.
Table 113. TM and MSC message routing and control user exit routine attributes (continued)
Attribute Description
IMS callable services To use callable services with this exit routine, it must be given a
callable services token by IMS when it is given control. To
determine if you can use callable services, check the value of the
SXPLATOK field in the “IMS standard user exit parameter list” on
page 4:
v If the value of SXPLATOK is zero, you cannot use callable
services with this exit routine.
v If the value of SXPLATOK is non-zero, the callable services token
is included and you can use callable services with this routine.
Use the 256-byte work area addressed by the SXPLAWRK field to
call DFSCSIF0.
Sample routine Recommendation: Use the sample DFSMSCE0 exit routine that is
location shipped in [Link] and tailor it when first coding the user
exit routine. This sample contains examples of the following:
v Routing messages, using all the supported routing options (by
setting the appropriate flags and fields in the DFSMSCEP area).
v Canceling messages.
v Using the DFSMSCVT (entry vector table) macro and all 12 entry
points.
v Using the DFSMSCSV (save) macro to set up the entry
environment.
v Using the DFSMSCLV (leave) macro to return to IMS.
v Chaining and using the 6 save sets that are passed to the exit
routine.
v Using the 512–byte work area to build a user prefix and
requesting that IMS obtain a prefix buffer to build a prefix.
v Storing information in the user prefix
This section provides information about how to communicate with IMS using the
DFSMSCE0 user exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
R1 Address of the “IMS standard user exit parameter list” on page 4
R13 Address of save area
R14 Return address
R15 Address of entry point
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area that is passed to this exit routine in SXPLAWRK can be different each
time that this exit routine is called.
The DFSMSCE0 user parameter list and field definitions are mapped by the
DFSMSCEP macro.
Table 114. Main user exit parameter list mapped by the DFSMSCEP macro
Field Offset Length Description
MSCEIMID 00 8 IMSID of this IMS
MSCEIMSR 08 1 Source IMS release number
MSCEIMSL 09 1 Source IMS mod level
MSCEPLVER 0A 2 DFSMSCEP parameter list version (current
version=0004)
MSCEFL1 0C 1 Main flag 1
MSCEFL2 0D 1 Main flag 2
MSCEFL3 0E 1 Main flag 3
MSCEFL4 0F 1 Main flag 4
MSCEECB 10 4 Address of ECB
MSCESCD 14 4 Address of SCD
MSCESIDT 18 4 Address of SID_Table
MSCESEG 1C 4 Address of MSG_Segment
MSCEUPR 20 4 Address of User_PFX_Seg
MSCEIPR 24 4 Address of IMS_PFX_Seg
MSCEUPRL 28 2 User_PFX_Len (halfword)
MSCEIPRL 2C 2 IMS_PFX_Len (halfword)
MSCESSET 2E 4 Address of Save_sets
MSCEMSEB 30 4 Address of DFSMSCEB
34 4 Reserved
MSCEUSID 38 8 User ID
MSCEGRPN 40 8 Group name
MSCEUSII 48 1 User ID indicator
49 3 Reserved
MSCEAFIN 4C 8 IMSID to route message for shared queues
affinity routing
54 20 Reserved
68 End main parameters
The initialization entry parameter list and field definitions are mapped by the
DFSMSCEP macro.
Table 115. Initialization entry parameters for user exit parameter list mapped by the
DFSMSCEP macro
Field Offset Length Description
MSINFL1 68 1 Initialization flag1
MSINFL2 69 1 Initialization flag2
MSINFL3 6A 1 Initialization flag3
MSINFL4 6B 1 Initialization flag4
6C 12 Reserved
78 End of IMS initialization parameters
The termination entry parameter list and field definitions are mapped by the
DFSMSCEP macro.
Table 116. Termination entry parameters for user exit parameter list mapped by the
DFSMSCEP macro
Field Offset Length Description
MSTEFL1 68 1 Termination flag1
MSTEFL2 69 1 Termination flag2
MSTEFL3 6A 1 Termination flag3
MSTEFL4 6B 1 Termination flag4
6C 12 Reserved
78 End of IMS termination parameters
The terminal routing parameter list and field definitions are mapped by the
DFSMSCEP macro.
Table 117. Terminal routing parameters for user exit parameter list mapped by the
DFSMSCEP macro
Field Offset Length Description
MSTRFL1 68 1 XL1 TR flag1
MSTRFL2 69 1 XL1 TR flag2
MSTRFL3 6A 1 XL1 TR flag3
MSTRFL4 6B 1 XL1 TR flag4
MSTRDEST 6C 8 DEST_NAME
MSTRSRCE 74 8 SRCE_NAME
MSTRLUNM 7C 4 LU_NAME
MSTRMSGR 80 4 APPC_WORK
MSTRDMSN 84 8 MSNAME
MSTRDSID 8C 2 Dest_SID
MSTRKEY 8E 2 MSG_KEY
MSTRLTMN 90 8 OTMA destination override name
98 16 Reserved
A8 End of terminal routing parameters
The link receive parameter list and field definitions are mapped by the DFSMSCEP
macro.
Table 118. Link receive routing parameters for user exit parameter list mapped by the
DFSMSCEP macro
Field Offset Length Description
MSLRFL1 68 1 Link receive flag1
MSLRFL2 69 1 Link receive flag2
MSLRFL3 6A 1 Link receive flag3
MSLRFL4 6B 1 Link receive flag4
MSLRDEST 6C 8 DEST_NAME
Table 118. Link receive routing parameters for user exit parameter list mapped by the
DFSMSCEP macro (continued)
Field Offset Length Description
MSLRSRCE 74 8 SRCE_NAME
MSLRDMSN 7C 8 DST_MSNAME
MSLRDSID 84 2 DEST_SID
MSLRSMSN 86 8 SRC_MSNAME
MSLRSSID 8E 2 Source_SID
MSLRKEY 90 2 MSG_KEY
92 22 Reserved
A8 End of link receive routing parameters
The program routing parameter list and field definitions are mapped by the
DFSMSCEP macro.
Table 119. Program routing parameters for user exit parameter list mapped by the
DFSMSCEP macro
Field Offset Length Description
MSPRFL1 68 1 Program routing flag1
MSPRFL2 69 1 Program routing flag2
MSPRFL3 6A 1 Program routing flag3
MSPRFL4 6B 1 Program routing flag4
MSPRDEST 6C 8 DEST_NAME
MSPRSRCE 74 8 SRCE_NAME
MSPRDMSN 7C 8 DST_MSNAME
MSPRDSID 84 2 DEST_SID
MSPRDMSN 86 8 DEST_MSNAME
MSPRSSID 8E 2 Source_SID
MSPRSTAT 90 2 Status_Code
92 22 Reserved
A8 End of program routing parameters
The DFSMSCE0 exit routine is called with one caller save area in R13. Field
MSCESSET in DFSMSCEP points to six preformatted save sets for the exit routine's
use. The routine (INITSAV) in the sample exit routine (DFSMSCE0) chains these
save sets to the caller save set and moves R13 to the first save set in MSCESSET.
This allows the DFSMSCE0 exit routine to call other routines and to pass a save set
chain. When DFSMSCE0 returns to IMS, the DFSMSCLV macro (Linkage=Yes)
returns to the caller save set and restores registers.
Callable services
Storage services and control block services can be performed by invoking IMS
callable services. This exit routine can use callable services with the ECB passed at
MSCEECB of the user exit PARMLIST.
This exit routine can use IMS Callable Storage Services. This exit routine is defined
to IMS as an IMS standard user exit. Exit routines that are defined to IMS receive
the callable services token in the standard exit parameter list. This exit routine does
not need to issue an initialization call (DFSCSII0) to use IMS callable services.
The exit routine receives control at the following points: the Terminal Routing (TR)
call, the Link Receive (LR) call, and the Program Routing (PR) call. In each
situation, if the DFSMSCE0 user exit routine is called (based on the DFSMSCVT
vector entry) and obtains a user prefix, IMS attaches the prefix to the message and
passes it on to other DFSMSCE0 entry points.
For each entry point parameter selected by the DFSMSCVT macro, the exit routine
must provide a label for the entry point, as shown in the following table.
Table 120. Labels for entry point parameters selected by the DFSMSCVT macro
Parameter Label Function/when called
1. INIT IMS_INITIALIZATION IMS initialization
2. TERM IMS_TERMINATION IMS termination
3. TRBTAM TERMINAL_ROUTING_BTAMS System console message
4. TRVTAM TERMINAL_ROUTING_VTAM VTAM messages
5. TRAPPC TERMINAL_ROUTING_APPC APPC messages
6. TROTMA TERMINAL_ROUTING_OTMA OTMA messages
7. LRTRAN LINK_RECEIVE_LOCAL_TRANSACTION Local tran messages
8. LRLTERM LINK_RECEIVE_LOCAL_LTERM Local LTERM messages
9. LRDIR LINK_RECEIVE_LOCAL_DIRECT_ROUTING Local DIR RTE messages
10. LRINT LINK_RECEIVE_INTERMEDIATE Intermediate messages
11. PRCHNG PROGRAM_ROUTING_CHNG_CALL Application program
CHNG call
12. PRISRT PROGRAM_ROUTING_ISRT_CALL First message segment ISRT
call
13. PRGU PROGRAM_ROUTING_ISRT_CALL Application program issued
GU call
The DFSMSCVT macro parameters listed in the preceding table have the following
characteristics:
INIT entry point
Receives control at IMS initialization, immediately after the exit routine is
loaded.
TERM entry point
Receives control at IMS termination when IMS is shutting down. The INIT
and TERM entry points are not associated with a message.
The next 4 entry points are for the Link Receive (LR) user exit routine:
LRTRAN
Receives control when a message is received on an MSC link, and the
destination is a local transaction in the received system.
LRLTERM
Receives control when a message is received on an MSC link, and the
destination is a local LTERM in the received system.
LRDIR
Receives control when a direct-routed message is received for the local IMS
system. The destination can be an LTERM or a transaction. Direct-routed
messages are created by an application program running in a remote MSC
system that inserts messages using directed routing (in other words, inserts
messages to a PCB MSNAME destination).
LRINT
Receives control for any message received on an intermediate IMS system
(in other words, a message received on an MSC link that is destined to
another remote MSC system). This includes intermediate messages that are
inserted by a remote IMS system using directed routing.
The next 2 entry points are for the Program Routing (PR) user exit routine:
PRCHNG
Receives control when an application program issues a CHNG call to a
modifiable PCB.
PRISRT
Receives control when an application program issues the first ISRT call
(first segment) to a modifiable PCB, non-modifiable PCB, or I/O PCB.
PRGU Receives control when an application program issues a GU call to a I/O
PCB. The exit may request or update a user prefix but no message routing
is supported.
Messages contain a variety of prefixes that IMS uses to route and process the
message. These prefixes are mapped by the QLOGMSGP macro, and are in front of
the message, before the user data segments. These prefixes are for internal IMS
use. DFSMSCE0 can add a user prefix to this message. This prefix is mapped by
the DFSMSCUP macro. The exit routine can build this prefix in one of two ways:
v Test the field MSCEUPR in DFSMSCEP for zero to see if a user prefix already
exists. If not obtained (zero), build a prefix in the 512–byte work area by
addressing some area in the work area that is large enough to hold the prefix.
Set bytes 0 and 1 to the prefix length (5 to 512 bytes), storing the address back in
MSCEUPR. The exit routine can then alter the user data portion of the prefix
(bytes 4 to 512). When the exit routine returns control to IMS, IMS sets the prefix
code (byte 2 = 8E) and the reserved flag (byte 3) and copies the prefix to the
message.
v Test the field MSCEUPR in DFSMSCEP for zero to see if a user prefix already
exists. If not obtained (zero), set flag MSCE2UPR=1 and field MSCEUPRL to the
length of the requested prefix (5 to 512 bytes) and return to IMS. IMS obtains
storage that is large enough for the user prefix and stores the address in
MSCEUPR, resets flag MSCE2UPR, and returns control to the exit routine. The
exit routine can then alter the user data portion of the prefix (bytes 4 to 512).
When the exit routine returns control to IMS, IMS sets the prefix code (byte 2 =
8E) and the reserved flag (byte 3) and copies the prefix to the message, and then
frees the original prefix storage.
Note: If the user prefix is obtained for the DFSMSCE0 exit, the size of that prefix
should be considered along with the accumulated size of the other prefix items
when calculating the record lengths for the short and long message queue records.
Related reading: For more information on MSGQUEUE macro message prefix sizes
for each supported IMS release, see IMS Version 14 System Definition.
Related reference:
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 312
This exit routine can be used with or without RACF to verify that the user's ID is
authorized to run a transaction. If the RACF option is selected and the Transaction
Authorization exit routine is loaded, the exit is activated after RACF verifies the
transaction. If the transaction request is rejected by RACF, the exit is not called. If
the RACF option is not selected in the IMS system definition, this exit routine can
be used to verify the user's authorization and the password, if required, for that
transaction.
Attention: Changing RCF=N to RCF=R requires a cold start of the IMS control
region.
The exit routine should have access to a table of valid user IDs, and the passwords
and transactions associated with each valid user ID.
If you want to generate your own messages for the routine, you need to make the
message number negative in register 15 to issue a specific message, and you need
to list the absolute value of this message number in the User Message Table,
DFSCMTU0. For details, see “User Message table (DFSCMTU0)” on page 483.
If you do not list this message in the User Message Table, message DFS060I is
issued instead of the message you wanted to send.
The IMS security exit routines do not need to be bound to the IMS nucleus, can
run in 31-bit storage, and can share a work storage area. The following security
exit routines now have these attributes:
v Signon/off security exit routine (DFSCSGN0)
DFSCSGN0 is called during IMS initialization to give the exit routine the chance
to acquire a work storage area. The exit routine passes the address back to IMS.
Then, IMS passes the address to the other security exit routines every time they
are called.
v Security Reverification exit routine (DFSCTSE0)
v Transaction Authorization exit routine (DFSCTRN0)
If the security exit routines are linked in one of the STEPLIB or LINKLIST libraries,
IMS loads the exit routine. There is no startup parameter to specify whether to
load the routines. Message DFS1937I is issued for every exit routine that is loaded
into 31-bit storage.
The following table shows the attributes of the Transaction Authorization exit
routine.
Table 121. Transaction authorization exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSCTRN0.
Binding The Security Reverification exit routine (DFSCTSE0) can be bound to DFSCTRN0 or
coded as an explicit part of DFSCTRN0. If you code this entry point, it should have
access to a table of valid user IDs, passwords, and transactions associated with each
valid user ID, or contain some algorithm to derive this authorization information. For
addressability, this table should reside in this module, in the /SIGN ON exit
(DFSCSGN0), or in the IMS nucleus.
If the security exit routines are linked in one of the STEPLIB or LINKLIST libraries,
IMS loads the exit routine. There is no startup parameter to specify whether to load
the routines. IMS issues message DFS1937I each time a DFSCSGN0, DFSCTRN0, or
DFSCTSE0 exit routine is loaded.
If the exit routines cannot be linked separately or cannot use a common work area,
they must be linked in the following manner:
v If the CSECT of DFSCTSE0 is part of DFSCTRN0 source, DFSCTSE0 must be linked
as an ALIAS of DFSCTRN0.
v If virtual address spaces are used to exchange data between DFSCSGN0,
DFSCTRN0, and DFSCTSE0, then DFSCTSE0 and DFSCSGN0 must be linked as
ALIASs of DFSCTRN0.
Including the routine Include the exit routine by linking it in either the STEPLIB or LINKLST library. IMS
detects and loads it automatically. You do not need to specify any system definition or
startup parameters. IMS confirms that the exit routine is loaded by issuing a DFS1937I
message.
IMS callable services To use callable services with this routine, you must issue an initialization call
(DFSCSII0) to obtain the callable service token and a parameter list in which to build
the function-specific parameter list for the desired callable service. Use the ECB in
register 9 for the DFSCSII0 call. This exit is automatically linked to DFSCSI00 by IMS.
No additional linking is required to use callable services.
Sample routine location [Link] (member name DFSCTRN0).
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the exit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
0 Register contents is dependent on what is processed:
v To process a deferred program-to-program switch (R2 = 8), or DL/I CHNG
call (R2 = C), then R0 = pointer to user ID (PSTUSID).
v To process receipt of a transaction received on an MSC link from a remote
IMS system (R2 = 4), then R0 = pointer to user ID in the security prefix of
the message.
This exit routine is called when R2 = 4 depending on the MSCSEC
par\ameter in DFSDCxxx and on the MSLRFL3 response in the
DFSMSCE0 parameter list for Link Receive. For more information on the
MSCSEC parameter, see IMS Version 14 System Definition.
1
Address of the password or 0:
For AUTH call, address of GENERIC class
For TRAN call, address of TRAN class
For FIELD call, address of FIELD class
For DATABASE call, address of DATABASE class
For SEGMENT call, address of SEGMENT class
For OTHER call, address of OTHER class
2 Calling routine number:
Number
Name
X'0' Transaction input from terminal
X'4' Transaction from remote MSC system
X'8' Deferred conversation program-to-program switch
X'C' CHNG DL/I call
X'10' /SET command
X'14' /LOCK command
X'1C' /RELEASE command
X'20' AUTH call
X'24' LU 6.2 AUTH call
X'28' Transaction input from OTMA
X'2C' /LOCK and /UNLOCK transaction
X'30' /LOCK and /UNLOCK program
X'34' /LOCK and /UNLOCK database
X'38' /LOCK and /UNLOCK LTERM
X'3C' Remote deferred program switch
3 Address of storage area. For details of the format of this storage area, see the
prolog in the sample routine ([Link]; member name is DFSCTRN0).
7 Address of source CTB or zeros.
Recommendation: Do not write an application that requires the content of
this register, because they vary depending on the type of call to the exit
routine and the environment from which the call is made.
Register Contents
9 Address of the ITASK control block:
If Register 2 is
Address of Register 9 will be
X'0' CLB
X'4' LLB
X'8' PST
X'C' PST
X'10' CLB
X'14' CLB
X'1C' CLB
X'20' PST
X'24' CLB
X'28' PST
X'2C' CLB
X'30' CLB
X'34' CLB
X'38' CLB
X'3C' CLB
10 Address of transaction code or resource name.
11 Address of SCD.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
On return to IMS, all registers must be restored except for register 15, which must
contain one of the following return codes to indicate the success or failure of the
user's authorization to a transaction.
Related reference:
“Security Reverification exit routine (DFSCTSE0)” on page 273
“Signon/off Security exit routine (DFSCSGN0)” on page 289
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
Subsections:
v “About this routine”
v “Communicating with IMS” on page 317
Messages that are entered for the transaction are passed to the Transaction Code
Input edit routine before they are queued for scheduling. This sequence enables
you to edit input messages before they are placed on the message queues. The
Transaction Code Input edit routine is called in addition to the IMS Basic Edit
routine or MFS (Message Format Service) editing. The message is passed to the
input edit routine before it is translated to uppercase characters.
Transaction code input edit routines can be defined to IMS either through the
system definition process or dynamically by using a DRD command. You can
define up to 255 different Transaction Code Input edit routines for each IMS.
You can define a Transaction Code Input edit routine during system definition by
using the EDIT parameter on the TRANSACT macro. The edit routine must reside
in the [Link] data set prior to IMS system definition stage 2 execution. Edit
routines that are included in the [Link] data set and are referenced by a
TRANSACT macro are included in the IMS nucleus as part of the system definition
process.
You can dynamically define a Transaction Code Input edit routine by using DRD
commands. The EDITRTN parameter can be specified on the CREATE and
UPDATE commands to define a transaction with a Transaction Code Input edit
routine. The edit routine must be included in one of the [Link]
concatenated data sets.
The Transaction Code Input edit routine must store the edited message segment to
be returned to IMS in the buffer that is addressed by register 1. If the input was
processed by the IMS Basic Edit routine, this buffer is always 10 bytes greater than
the 2-byte binary count at the beginning of the message segment, and the message
segment can be expanded or reduced to any size. The format of the edited message
segment in the buffer on return to IMS must be two bytes of binary count,
followed by bytes 3 and 4 unchanged from the original message and edited text.
If the input was processed by MFS, the length of this buffer is in the first two
bytes of the buffer. No extra space is provided in this buffer for edit routines.
This edit routine is called only when a transaction is entered from a terminal; it is
not called when the transaction is inserted by a program-to-program switch or for
LU 6.2 terminals.
If specified, a Transaction Code Input edit routine gains control after each message
data segment is processed by the IMS Basic Edit routine or MFS, and after
transaction code validity and security are checked. If the transaction code is the
only data in the message segment and the transaction is a conversational
transaction, the edit routine is not entered.
The following table shows the attributes of the Transaction Code (Input) Edit exit
routine.
Table 122. Transaction code (input) edit exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention This name must be alphanumeric (A-Z, 0-9, #, $, and @). The name cannot include a
blank, comma, period, hyphen, or equal sign, and cannot include the wildcard
characters * or %.
Including the routine If the transaction code input edit routine is specified on a TRANSACT macro, the edit
routine must reside in the [Link] data set prior to IMS system definition stage 2
execution. If the edit routine is defined dynamically on a CREATE or UPDATE
command, the edit routine must reside in one of the [Link] concatenated data
sets.
Table 122. Transaction code (input) edit exit routine attributes (continued)
Attribute Description
IMS callable services To use IMS callable services with this routine, you must do the following:
v Issue an initialization call (DFSCSII0) to obtain the callable service token and a
parameter list in which to build the function-specific parameter list for the desired
callable service.
v Use the ECB found in register 9 for the DFSCSII0 call.
v Link DFSCSI00 with your user exit.
Sample routine location [Link] (member name DFSCSMB0).
IMS uses the entry and exit registers to communicate with the exit routine.
On entry to the edit routine, all registers must be saved using the save area
provided. The registers contain the following:
Register Contents
1 Address of the buffer location of the input message segment after translation
to EBCDIC and after IMS Basic Editing.
The first two bytes of the buffer contain the binary message length. The third
byte of the buffer is binary zeros. The binary count includes the 4-byte prefix.
If Basic Edit is used, the fourth byte of the message segment (Z2) is X'00'. If
MFS is used, the fourth byte can contain either a X'01', X'02', or X'03'
signifying that option 1, 2, or 3 respectively was selected for the message by
the format designer. The fifth byte contains the first byte of the message text.
If the input was processed by MFS, the length of this buffer is in the first
two bytes of the buffer. No extra space is provided in this buffer for edit
routines.
7 CTB address of the physical terminal from which the message is entered.
9 Address of CLB for the communication line from which the message is
entered.
10 Address of SMB.
11 Address of SCD.
13 Address of save area. The first three words must not be changed.
14 Return address to IMS.
15 Entry point of edit routine. The entry point name and load module name for
an edit routine must be the same as the name used for the edit routine in
system definition.
On return to IMS, all registers must be restored except for register 15, which must
contain one of the return codes shown in the following table. Register 1 contains
the message number if register 15 contains a value of 12; otherwise it is ignored.
Any other value causes the message to be canceled and the terminal operator to be
notified.
Related reference:
“Routine binding restrictions” on page 8
“Initialization of IMS callable services (DFSCSII0)” on page 16
Assume a multisegment transaction named ICS. Normally, the first segment of this
message contains ICS GN (meaning to get the next segment of a given message),
or it contains ICS CAN (meaning to cancel this message). A user-supplied edit
routine allows further input flexibility, as shown in the following decision table.
Other GN As received
Segment CAN Cancel message
Any other Cancel message
The Transaction Code edit routine allows the input for the ICS GN message
segment to be shortened.
When you use parallel RECON access, VSAM RLS manages a system-wide buffer
tool. In this case, you cannot control the number of buffers on a data set basis.
Subsection:
v “About this facility”
DBRC provides a CSECT, DSPBUFFS, for you to override the default number of
buffers used. The values in the CSECT are used to build the VSAM local shared
resource pool for LSR support or to specify the number of index and data buffers
if NSR buffering mode is used.
After assembling the source code, bind the object code of the CSECT into the IMS
load module DSPCINT0.
DSPBUFFS layout
The following code sample shows the layout of the DSPBUFFS CSECT. You can
assemble your own version of this CSECT and replace it in load module
DSPCINT0 using the standard binder setup included in the System Modification
Program (SMP) process, or modify the existing version of the CSECT supplied by
IBM.
DSPBUFFS CSECT , DECLARE NBR OF INDEX & DATA BUFFERS
DC CL8’DSPBUFFS’ REQUIRED EYECATCHER FOR DUMPS
*
* DECLARE THE NUMBER OF INDEX AND DATA BUFFERS TO BE USED IN EACH
* OF THE DEFINED OPERATING MODES WHEN USING THE LSR OPTION OF VSAM.
* APPLIES TO AN ESA* OR XA ENVIRONMENT ONLY. BOTH BUFFER NUMBERS GIVEN
* IN EACH CASE MUST BE AT LEAST 4 ELSE DBRC REVERTS TO NSR MODE USING
* THE NSR BUFFER NUMBERS BELOW THAT CORRESPOND TO THE SAME OPERATING
* MODE. THIS FEATURE CAN BE USED TO INHIBIT THE USE OF LSR IN ANY OF
* THE OPERATING MODES SHOULD SOME PROBLEM ARISE. REMEMBER THAT UNDER
* LSR THE INDEX/DATA BUFFERS DEFINED APPLY TO ALL THE ACTIVE RECONS.
*
LSRONLIN DC AL2(60,120) IMS ONLINE DBRC
LSRCICS DC AL2(60,120) CICS USE OF DBRC
LSRBATCH DC AL2(60,120) OFFLINE/BATCH DBRC
*
* DECLARE THE NUMBER OF INDEX AND DATA BUFFERS TO BE USED IN EACH
* OF THE DEFINED OPERATING MODES WHEN USING THE NSR OPTION OF VSAM.
* APPLIES IF THE LSR OPTION HAS BEEN INHIBITED ABOVE FOR ONE OR
* MORE OF THE DEFINED OPERATING MODES. THE MINIMUM NUMBER OF INDEX
* AND DATA BUFFERS ASSIGNED TO EACH RECON IS TWO.
* REMEMBER THAT UNDER NSR THE NUMBER OF INDEX/DATA BUFFERS
* DEFINED APPLY TO EACH OF THE RECONS. NOT SHARED AS WITH LSR.
*
NSRONLIN DC AL2(2,2) IMS ONLINE DBRC
NSRCICS DC AL2(2,2) CICS USE OF DBRC
NSRBATCH DC AL2(2,2) OFFLINE/BATCH DBRC
END
As the comments and structure of preceding code sample indicate, the first three
pairs of halfwords control the number of index and data buffers that are used for
LSR. The second three pairs of halfwords control the number of index and data
buffers that are used for NSR. DBRC always uses the VSAM LSR option unless it
is inhibited through DSPBUFFS (see comments in the CSECT to see how this is
done).
In either LSR or NSR mode, DBRC determines which pair of index/data values to
use based on the “operating mode” for each execution. During initialization,
DBRC:
1. Uses LSR/NSR pair 1 for IMS control regions
2. Uses LSR/NSR pair 3 for batch jobs or utilities
In effect, by changing or creating your own version of DSPBUFFS, you can specify
separate buffering values for batch and online environments. If NSR buffering is
used, individual values for BUFNI and BUFND can be specified in the JCL DD
statements used to override the default buffer size. For VSAM LSR, only the first
three pairs of values are used, so there is no advantage in allocating the RECON
data sets through JCL and specifying BUFNI or BUFND values. Similarly, the
BUFFERSPACE parameter used when defining a RECON data set through Access
Method Services (AMS) is only applicable to the NSR buffering technique and is
not used for LSR.
Because the VSAM LSR pools are built while the RECON data sets are open in
NSR mode, values for the BUFFERSPACE, BUFNI, and BUFND parameters should
not be specified when defining the VSAM clusters and when allocating the
RECON data sets using JCL. Because the VSAM LSR pools are built prior to
opening the RECON data sets for LSR, supplying values for BUFFERSPACE,
BUFNI, or BUFND that exceed VSAM's minimum default only increases the virtual
storage needed to support DBRC for batch regions.
Use DSPBUFFS to specify the number of buffers for NSR, even though it is
optional. With NSR specified, more efficient use of virtual storage can be achieved
than by using the BUFFERSPACE parameter (when defining the RECON clusters)
and adjusting the number of index and data buffers through the use of JCL. As a
result, the RECON data sets can be dynamically allocated in nearly all applications.
IMS callable services are not applicable for use with this exit routine.
Company XYZ shares RECON data sets between two processors. Processor A is an
ESA machine, processor B is not— a coexistence environment involving an earlier
release of IMS is on processor B. In this case, each IMS system uses a separate
copy of the following example.
XYZ frequently runs batch jobs using DBRC under TSO. However, tight region
restrictions exist for jobs run under TSO, so they must limit the amount of storage
used by DBRC in these circumstances. However, DBRC storage is not limited when
executing as a control region task, so they have replaced DSPBUFFS with the
following values:
DSPBUFFS example
DSPBUFFS CSECT , DECLARE NBR OF INDEX & DATA BUFFER
DC CL8’DSPBUFFS’ REQUIRED EYECATCHER FOR DUMPS
*
* processor A (LSR) SETUP
LSRONLIN DC AL2(10,26) ESA ENVIRON - IMS ONLINE DBRC
LSRCICS DC AL2(6,12) ESA ENVIRON - CICS USE OF DBRC
LSRBATCH DC AL2(6,14) ESA ENVIRON - OFFLINE/BATCH DBRC
*
* processor B (NSR) SETUP
NSRONLIN DC AL2(4,9) NONESA ENVIRON - IMS ONLINE DBRC
NSRCICS DC AL2(2,2) NONESA ENVIRON - CICS USE OF DBRC
NSRBATCH DC AL2(3,5) NONESA ENVIRON - OFFLINE/BATCH DBRC
END
When run as an IMS online region, DBRC in processor A (LSR) creates 10 index
buffers and 26 data buffers to be shared between the 2 active RECON data sets. In
processor B (NSR), DBRC assigns 4 index buffers and 9 data buffers to each
RECON data set. When both active RECON data sets are opened for NSR, a total
of 8 index and 18 data buffers are implied. Remember that under NSR, when the
spare RECON data set is opened, it too will be assigned 4 index and 9 data
buffers. For brief periods of time in processor B, the total number of index and
data buffers used are 12 and 27, respectively.
Under LSR, when the spare RECON data set is opened (initially in NSR mode, a
VSAM requirement), it is assigned 2 index and 2 data buffers. These values cannot
be overridden. For brief periods of time in processor A, the total number of index
and data buffers used are 12 and 28, respectively. Thus the total amount of storage
that is used for RECON buffers is approximately the same in both processors.
When running batch jobs, DBRC in processor A creates 6 index buffers and 14 data
buffers to be shared between the 2 active RECON data sets. In processor B, DBRC
assigns 3 index buffers and 5 data buffers to each RECON data set opened with
NSR buffering. Again, during those periods of time that all 3 RECON data sets are
open, the total amount of buffer storage used is approximately the same in both
processors (8 index and 16 data buffers in processor A, 9 index and 15 data buffers
in processor B).
This exit routine verifies that the user is authorized to issue a particular command.
IMS does not call this exit routine for internally generated or auto-restart
commands.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 324
You can use the Command Authorization exit routine with a security product, such
as RACF. The return code that the exit routine issues ultimately determines the
success or failure of the command authorization; the exit routine can override the
outcome of RACF.
The Command Authorization exit routine is optional. For the latest version of
DFSCCMD0, see the [Link] library; the member name is DFSCCMD0.
This sample includes routines for terminals defined using the Extended Terminal
Option (ETO) feature, commands entered with ICMD calls, and commands entered
from MCS/E-MCS consoles.
The following table shows the attributes for the Command Authorization exit
routine.
Table 123. Command authorization exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL
Naming convention You must name this exit routine DFSCCMD0.
Link editing You can assemble the sample exit routine or one that you write using the standard
IMS macro and copy files and include it in [Link]. You must manually link
edit this routine with DFSCSI00 to use IMS callable services.
Including the routine Include DFSCCMD0 in [Link].
This routine is required if one or both of the following parameters is specified in the
IMS, DBC, or DCC procedures:
v AOIS=A or C
v CMDMCS=B or C
Using the routine with AO (Automated Operator) applications that issue CMD or
ICMD calls
The Command Authorization exit routine can be used with automated operator
(AO) applications that issue a CMD or ICMD call. The routine is called for AO
applications that issue ICMD calls when the AOIS parameter is specified as A or C
in the IMS, DBC, or DCC procedure. The routine is called for AO applications that
issue CMD calls when the AOI1 parameter is specified as A or C in the IMS or
DCC procedure.
DFSCCMD0 is called during CMD and ICMD processing to check that the AO
application is authorized to issue the command that it issued. DFSCCMD0 lets you
secure commands issued in the CMD and ICMD calls at the command verb,
keyword, and resource name level.
The Command Authorization exit routine can be used with terminals defined
statically at system definition. The return code from the default security is passed
to the Command Authorization exit routine. IMS calls the exit routine (if it is
included in the system) regardless of the result of the default security check; the
return code from the exit routine determines authorization.
The Command Authorization exit routine can be used with terminals that are
defined dynamically using ETO. If RACF (or an equivalent security product) is
requested and the user is signed on, RACF performs the command authorization.
IMS passes the RACF return code to the Command Authorization exit routine. IMS
calls the exit routine (if it is included in the system) regardless of the result of the
RACF security check.
If RACF is not requested but the Command Authorization exit routine is included
in the system, IMS calls the exit routine and performs command authorization
only. If neither RACF nor the Command Authorization exit routine is included,
IMS provides command authorization equivalent to the default security available
for static terminals.
The /SIGN and /RCLSDST commands are the only commands that can be entered
from an ETO terminal before signon. Although these commands cause IMS to call
the Command Authorization exit routine, neither RACF nor the exit routine
authorizes the commands.
This exit routine can be used with commands entered from MCS/E-MCS consoles.
The routine is called for commands from MCS/E-MCS consoles when the
CMDMCS parameter is specified as B or C in the IMS, DBC, or DCC procedure.
The Command Authorization exit routine can be used with IMS Open Transaction
Manager Access (OTMA).
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4 (Version 1)
13 Address of the save area. Your exit routine must not change the first three
words of this save area.
14 Return address of IMS.
15 Entry point address of exit routine.
The macro DFSCCMD generates the DSECT for the function-specific parameter list
passed to DFSCCMD0 by IMS. For additional information, see DFSCCMD included
in [Link].
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains the return code. See the following table:
Register Contents
15 One of the following return codes:
Return code Meaning
0 USER/TERMINAL is authorized to use command
4 USER/TERMINAL is not authorized
Negative USER/TERMINAL is not authorized. The specified user
value message is sent to the terminal where command originated.
Related concepts:
Defining security during DB/DC and DCCTL system definition (System
Administration)
Related reference:
“CSL OM user exit routines” on page 599
“IMS callable services” on page 12
Subsections:
v “About this routine”
v “Communicating with IMS” on page 326
The following table shows the attributes for the DBRC Command Authorization
exit routine.
Table 124. Command authorization exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL
IMS uses the entry and exit registers to communicate with the routines.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the DBRC command authorization exit parameter list
13 Address of the save area
14 Return address to DBRC
15 Entry point address of exit routine
The following table lists the exit parameter list. It is mapped by the DBRC
Command Authorization (DCA) Interface Parameter Block (DSPDCABK).
Table 125. DCA Interface Parameter Block description
Length Field
Field name Offset in bytes Usage Description
DCABLKID X'00' X'08' Input Eye catcher “DSPCABK”
DCABLKLN X'08' X'04' Input Length of the block
DCARNPTR X'0C' X'04' Input Address of the resource name (RN)
DCARNLEN X'10' X'04' None Resource name length
DCARHPTR X'14' X'04' Input Address of RN high-level qualifier
DCARHLEN X'18' X'04' Input Length of RN high-level qualifier
DCARVPTR X'1C' X'04' Input Address of RN command verb
DCARVLEN X'20' X'04' Input Length of RN command verb
DCARMPTR X'24' X'04' Input Address of RN command modifier
DCARMLEN X'28' X'04' Input Length of RN command modifier
DCARQPTR X'2C' X'04' Input Address of RN command qualifier
DCARQLEN X'30' X'04' Input Length of RN command qualifier
DCAUserID X'34' X'08' Input User ID of command issuer
Before returning to DBRC, the exit routine must restore all registers except for
register 15, which contains the following return code.
The following table reflects the register contents for non-BPE based DBRC exit
routines.
Register Contents
15 One of the following return codes:
Return code Meaning
0 USER is authorized to use the DBRC command.
nonzero USER is not authorized to use the DBRC command.
Related reference:
Chapter 7, “BPE-based DBRC user exit routines,” on page 539
“Routine binding restrictions” on page 8
“DBRC Security exit routine” on page 541
Subsections:
v “About this routine”
v “Communicating with IMS”
The DBRC SCI Registration exit routine (DSPSCIX0) is called by DBRC before
registering with the SCI. DSPSCIX0 supplies the IMSplex name needed for SCI
registration. The exit can also supply a DBRC group ID to identify unique RECON
sharing groups. If the exit is not used, DBRC will behave as if the sample version
of the exit was being used.
The following table shows the attributes for the DBRC SCI Registration exit
routine.
Table 126. DBRC SCI registration exit routine (DSPSCIX0)
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL.
Naming convention You must name this exit routine DSPSCIX0.
Binding You must bind this routine into an authorized data set as a separate reentrant (RENT)
load module, DSPSCIX0.
Including the routine No special steps are needed to include this routine. If the exit is not used, DBRC will
behave as if the sample version of the exit was being used.
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine location [Link] (member name DSPSCIX0).
IMS uses the entry and exit registers to communicate with the routines.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the DBRC SCI registration exit parameter list
13 Address of the save area
14 Return address to DBRC
Register Contents
15 Entry point address of exit routine
Before returning to DBRC, the exit routine must restore all registers except for
register 15, which contains the following return code.
Register Contents
15 One of the following return codes:
Return code Meaning
0 DBRC expects a valid IMSplex name and DBRC group ID to
be returned in the parameter list. The IMSplex name and
group ID are used for registration with SCI.
4 Access is attempted without SCI registration. If the RECON
indicates that RECON Loss Notification is active or PRA is
active, DSP1136A is issued and RECON access fails.
8 Access is attempted without SCI registration. RECON access is
forced without regard to RECON content. DSP1143I is issued.
Access to the RECON will be done in serial mode regardless
of the access setting in the RECON data sets. If another
instance has the RECONs opened in parallel mode, this access
will fail with an OPEN failure.
12 RECON access fails and message DSP1139I is issued.
Any other Will behave as RC12 in this implementation.
value
Related reference:
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
Chapter 7, “BPE-based DBRC user exit routines,” on page 539
For the latest version of DSPSCIX0, see the [Link] library, member name
DSPSCIX0.
The sample version of DSPSCIX0 will issue a return code 4 in register 15 unless an
IMSplex name is supplied through the IMSPLEX EXEC parameter. If an IMSplex
name is supplied, DSPSCIX0 will return the IMSPLEX parameter value and the
group ID value specified by the DBRCGRP EXEC parameter. If an IMSplex EXEC
parameter is specified but no DBRCGRP EXEC parameter is specified, the sample
exit will return the IMSplex parameter value and the default group ID '001'.
The sample version of DSPSCIX0 contains a table of RECON data set names and
associated IMSplex names and DBRC group IDs. As shipped, the exit responds to
any RECON name with return code 4 and the table has no other entries. To
activate the RECON Loss Notification or use parallel RECON access, either specify
an IMSplex name through the IMSPLEX EXEC parameter on all jobs which use
DBRC, or add RECON data set names, associated IMSplex names, and DBRC
group IDs to the table.
The first entry in the table follows the label PLEXTABL. Each entry consists of a
44-byte RECON data set name, left justified and padded with blanks, followed by
a 5-byte character IMSplex name, a 3-byte group ID, and a 4-byte hexadecimal
return code. The last entry is the default entry consisting of an asterisk (*) for a
RECON data set name and, unless altered by the user, a blank IMSplex name, a
default group ID '001,' and a return code of 4. While the default response can be
changed, the entry containing the asterisk marks at the end of the table should not
be removed unless the associated exit logic is changed as well.
A table modified for a production IMSplex and a test IMSplex could appear as
follows:
PLEXTABL DS 0H
* production RECONs and associated IMSplex
DC CL44’PROD.RECON1’ RECON name
DC CL5’PLEXA’ IMSplex name
DC CL3’GP1’ Group ID
DC XL4’00000000’ RC00 = use the IMSplex name
DC CL44’PROD.RECON2’ RECON name
DC CL5’PLEXA’ IMSplex name
DC CL3’GP1’ Group ID
DC XL4’00000000’ RC00 = use the IMSplex name
DC CL44’PROD.RECON3’ RECON name
DC CL5’PLEXA’ IMSplex name
DC CL3’GP1’ Group ID
DC XL4’00000000’ RC00 = use the IMSplex name
* test RECONs and associated IMSplex
DC CL44’TEST.RECON1’ RECON name
DC CL5’PLEXT’ IMSplex name
DC CL3’GT1’ Group ID
DC XL4’00000000’ RC00 = use the IMSplex name
DC CL44’TEST.RECON2’ RECON name
DC CL5’PLEXT’ IMSplex name
DC CL3’GT1’ Group ID
DC XL4’00000000’ RC00 = use the IMSplex name
DC CL44’TEST.RECON3’ RECON name
DC CL3’GT1’ Group ID
Subsections:
v “About these routines”
v “Communicating with IMS” on page 333
Dependent Region Preinitialization routines can activate any z/OS system or data
management services for which they are authorized, although they cannot issue
DL/I calls or activate IMS system services. Because they receive control after
module preload, but before IMS scheduling, you might want to use these routines
for such tasks as building an internal table for your applications to access during
dependent region processing.
For example, you can use a preinitialization routine to build a table for application
decision making. You can maintain this table by using z/OS services in the
following manner:
v Using z/OS storage management services, the preinitialization routine can
acquire and format a main storage table.
v Using z/OS Name/Token callable services, the preinitialization routine can
establish a name/token pair for the storage that provides the user application
access to the storage area.
This name/token pair can then be used by the dependent region applications using
the Name/Token services to access the table. It is your responsibility to determine
what these preinitialization routines do, and how the information is made available
to user applications.
Preinitialization routines are not intended to control the IMS dependent region
environment. These routines provide installation information that can be shared
between applications. This information can be used to control the applications and
allow the application to make decisions based on the information in these tables.
The preinitialization routines must not be system-type routines (for example, z/OS
services, Language, or Access Method) but rather user-written routines.
The Dependent Region Preinitialization routines get control after the dependent
region has IDENTIFIED or SIGNED-ON to the associated Control Region, but
before IMS scheduling is attempted. These routines execute under the IMS
Program Control Task whenever it:
v Is attached or reattached in problem program state/user key 8
v Receives control in the order specified in the PROCLIB member
Related Reading: For details about these procedures, see IMS Version 14 System
Definition.
Column Contents
1-71 Routine names and entry points. The last name on a record is denoted by a
comma followed by one or more blanks; the last name on the last record is
followed by one or more blanks.
72-80 Must remain blank. Ignored.
The routines are given control in the order specified in the member. If a requested
routine is not found, the dependent region abnormally terminates with a U0588.
IMS uses the entry and exit registers to communicate with the routines.
On entry, the routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Zero.
13 Address of save area. The routine must not change the first three words.
14 Return address to IMS.
15 Entry point of routine.
Before returning to IMS, the routine must restore all registers except register 15,
which must contain the following:
Register Contents
15 0
The IMS Dump Override Table is used to override default dump processing for
IMS abends that occur after early IMS initialization. You can use this table to force
a dump to be taken for abend codes for which dumps are normally suppressed.
You can also use it to prevent dumps for abend codes for which dumps are
normally taken.
not found, or if DFSFDOT0 is not present in [Link], IMS will use its
default logic to decide whether or not to create a memory dump.
The Dump Override Table suppresses only IMS Control Region, IMS DLS Region,
and DBRC Region abend dumps. IMS Dependent region dumps cannot be
suppressed with the Dump Override Table.
The only change that the Dump Override Table makes to the dumping process is
to force or suppress the initial dump decision. IMS still creates only one dump,
even when multiple abends occur and matching entries are found in the Dump
Override Table.
A sample Dump Override Table is shipped with a default set of entries. The entries
in this sample are the same as the default processing that IMS performs if there is
no DFSFDOT0 present in [Link]. Modify DFSFDOT0 to fit your own
needs. If you want no entries in the Dump Override Table, you must create a
DFSFDOT0 with no entries. After you assemble your customized version, link it
into the system to activate the changes.
DFSFDOT macro
Parameters are required and must be specified when defining the Dump Override
Table.
DFSFDOT BEGIN
This parameter is required at the start of the Dump Override Table definition.
It must be coded before any other DFSFDOT invocations. When BEGIN is
specified, no other options are allowed. If any options are specified, they are
ignored.
DFSFDOT END
This parameter is required at the end of the Dump Override Table and must be
the last DFSFDOT invocation in DFSFDOT0. When END is specified, no other
options are allowed. If any options are specified, they are ignored.
ABEND=
This parameter specifies a user or system abend for which a dump is either to
be forced or suppressed. The abend is specified in one of the following forms:
UNNNN, where NNNN is the four-digit decimal number (U0780, U4095) of
the abend.
SXXX, where XXX is the three-digit hexadecimal number (S075, S3E7) of the
abend.
DUMP=
This parameter specifies whether the abend dump is forced or suppressed.
This parameter overrides IMS dump decision logic and the z/OS dump
request bit. It has two options:
FORCE generates a dump for a non-dumping ABEND. There is no default
value for DUMP=.
SUPPRESS prevents unwanted dumps. Default = none.
The Dump Override Table can specify an abend code and an action of SUPPRESS.
However, IMS cannot suppress all dumps. For example, z/OS or another
component can write the dump prior to IMS receiving control. In the case of
system abend code S122, z/OS causes the dump to be written before the abend is
issued and before IMS receives control. IMS then issues message DFS3984I stating
that the dump has been suppressed. This message is misleading, but as far as IMS
is concerned the dump has been suppressed. IMS cannot suppress dumps
produced by abends that occur after IMS has already processed the Dump
Override Table. In the case of ABENDU0002, IMS has already processed the Dump
Override Table.
IMS documentation does not explicitly list every abend that supplies a dump that
cannot be suppressed by using the Dump Override Table.
The table in this example forces dumps for ABENDS S075, U780, and S222; the
table suppresses dumps for ABENDS S80A and U790.
DFSFDOT BEGIN
DFSFDOT ABEND=S075,DUMP=FORCE
DFSFDOT ABEND=U0780,DUMP=FORCE
DFSFDOT ABEND=S80A,DUMP=SUPPRESS
DFSFDOT ABEND=S222,DUMP=FORCE
DFSFDOT ABEND=U0790,DUMP=SUPPRESS
DFSFDOT END
You can generate a Dump Override Table with no FORCE or SUPPRESS by coding
a single DFSFDOT BEGIN/END pair, as follows:
DFSFDOT BEGIN
DFSFDOT END
Errors
Messages
DFSFDMP0 issues message DFS3984I when a TCB ABEND code matches an entry
in the Dump Override Table. The message appears as:
DFS3984I DUMP FOR ABEND _____ FORCED BY DUMP OVERRIDE TABLE
DFS3984I DUMP FOR ABEND _____ SUPPRESSED BY DUMP OVERRIDE TABLE.
With this information, you can resolve the in-doubt work before restarting the
failed IMS. This routine is optional. If it is not used, IMS attempts to resolve the
in-doubt data when it can.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 337
| v “Sample exit routine” on page 338
During an emergency restart or an FDBR start, when scanning the units of work
for recovery, IMS provides to the user exit routine the identities of all external
subsystem units of work, the names of the external subsystems, and the final
resolutions of the data.
IMS synchronously calls the exit routine one time for each in-doubt external
subsystem unit of work. Because these are synchronous calls, consider the
performance impact on FDBR when writing the exit routine.
In an XRF environment, consider the performance impact of the exit routine during
an XRF takeover.
Attributes of the ESAF In-Doubt Notification exit routine are described in the
following table.
Table 129. ESAF In-Doubt Notification exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL, and DBCTL.
Naming convention The exit routine must be named DFSFIDN0.
| To use this exit routine to resolve in-doubt work during an FDBR recovery, you must
| link-edit it into the [Link] concatenation of the FDBR procedure.
IMS callable services This exit routine is not eligible to use IMS callable services.
The routine is called in TCB mode with AMODE=31. SVCs are allowed.
| Sample routine location A sample exit named DFSDIFN0 is provided in the [Link] library. You must
| compile the sample exit routine before you can use it.
IMS uses the entry and exit registers to communicate with the exit routine.
Register Contents
1 Address of the DFSRNID parameter list.
13 Address of the save area. This save area is not chained to any IMS save area.
14 Return address to IMS.
15 Entry address of this exit routine.
| Table 130. ESAF In-Doubt Notification exit routine parameter list (continued)
| Offset Length Field name Description
| 20 2 RNIDRESO Unit-of-work resolution action:
| CO Commit
| AB Abort
| 22 2 RNIDUOWL Unit-of-work length
| 24 4 Reserved
| 28 4 RNIDUOW Unit-of-work identifier address
| 32 8 RNIDSST External subsystem type
| 40 8 RNIDISMSN IMS name (UOR owner)
|
| Source code for a sample DFSFIDN0 exit routine is provided with IMS in the
| [Link] library. The sample exit routine does not perform any processing
| on incoming in-doubt UOWs. It is intended to demonstrate the basic program flow
| that is required for a user-supplied DFSFIDN0 exit routine. The sample performs
| the following basic processing steps:
| 1. Receive the RNID.
| 2. Create a work area, or issue a DFS3723E message if it is unable to do so.
| 3. Build a DFS3722I message that reports the status of the UOW in the log.
| 4. Issue the DFS3722I message.
| 5. Free the work area.
| 6. Return control to IMS.
Related concepts:
Accessing external subsystem data (System Definition)
External Subsystem Attach Facility (ESAF) (Communications and Connections)
Related reference:
“Routine binding restrictions” on page 8
IMS uses the module names in the external subsystem module table (ESMT)
specified for the control region to load the exit routines during control region
initialization. The ESMT specified (or defaulted to) for a dependent region is used
to load the exit routines into the dependent region.
Most of the exit routines execute functions that are required for attach processing;
others are optional. When an exit routine required to support connection
processing is not present, IMS terminates the connection to the external subsystem,
if one exists, and issues an informational message (DFS3068I). If an application
program is involved, it is terminated with a user abend (U3049).
This topic describes general interfaces for all the External Subsystem exit routines.
You need to familiarize yourself with these interfaces.
IMS activates an external subsystem exit routine, passing the address of an exit
parameter list (EPL) in register 1 (see the following figure). The EPL contains the
addresses of the parameters required by the exit routine. IMS passes to an exit
routine only the specific parameters it requires, so the contents and length of the
EPL differ between exit routines. The parameters for each exit routine are specified
in the individual exit routine description topics that follow.
The general format of the EPL is an array of fullword fields (4-byte fields, fullword
aligned), each containing the address of a parameter required for the exit routine
being activated. The first word in the EPL always contains the address of a 4-byte
parameter count field. The binary value in the count field is the number of
parameters being passed minus the count parameter (see the following figure).
Contents of registers
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of exit parameter list (EPL).
13 Address of save area. The exit routine must not change the backward chain
field, but it can alter the forward chain field.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which must contain a return code. IMS provides one standard register
save area (address in register 13) in the appropriate storage protect key into which
the exit routine can save the entry register contents. The save area backward chain
field must not be altered (such as to chain the save area into a save area set). The
exit routine can alter the forward chain field.
Return codes
Return codes are exit routine specific. The return codes are shown in hexadecimal
format. Return code 20 is supported for all exit routines and is described as
follows.
If register 15 on return from an exit routine contains a return code that is not
supported for the exit routine, it is treated as an error. IMS terminates the
connection for the region that activated the exit routine if one exists. If an
application program is involved, it terminates with a U3049 abend.
Return code 20
Return code 20 is used by all exit routines to indicate a 'should not occur'
condition and is described as follows:
Action:
v If an application program is involved, it terminates with abend U3044. If
the external subsystem does not respond or responds incorrectly to the
control region echo request, the connection to that subsystem terminates.
v If the external subsystem does respond, the identify for the dependent
region terminates. A subsequent external subsystem request causes the
structure to be rebuilt.
v If a connection exists when the error is encountered, it terminates by
activating the Terminate Identify exit routine.
Related reference:
“Abort Continue exit routine” on page 343
This topic describes the prefix for the external entry vector table and the vector
table itself.
The address of an external entry vector table prefix (EEVTP) control block is
always passed in the EPL on exit routine activations. The EEVTP is the primary
external subsystem interface control block and contains the:
v Address of the external entry vector table (EEVT)
v Address of the resource translation table (RTT)
v Environment indicator (control or dependent region TCB)
v Address of the IMS service exit routine router module
The external entry vector table (EEVT) contains the addresses of external
subsystem exit routine modules. IMS gets exit routine addresses from this control
block to activate the exit routines. IMS creates an EEVT (and EEVTP) in the control
region and in each dependent region before loading the modules defined in the
ESMT into the region. When the modules are loaded their addresses are stored in
the EEVT.
The EEVT is an IMS control block, however, module addresses are placed in the
control block based on the module definitions contained in the ESMT. Therefore,
the external subsystem, in creating the ESMT, must make sure that exit routine
module definitions provide for placement of exit routine addresses in the EEVT
according to the EEVT mapping layout used by IMS. The ESAP can manipulate
addresses in this vector table if it chooses.
In addition to exit routine modules, the external subsystem can define other
modules in the ESMT, for example, modules that would be activated by exit
routines and not by IMS. IMS loads all modules defined in the ESMT and stores
their addresses as specified in the definitions.
The EEVTP is the prefix of the EEVT and contains the address of the EEVT.
DFSEEVTP
DFSEEVT
The Abort Continue exit routine is activated by IMS for all transaction types. The
external subsystem resource managers hold onto the resources they have acquired
on behalf of the application. The application will continue using the current
recovery token.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 344
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
hexadecimal Decimal Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'2'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems.
Action: IMS terminates the application with abend U3045 (the input message
is discarded; DL/I resources are backed out). The control region performs
resolve indoubt processing for the recovery token. The dependent region is
terminated; which implicitly terminates the dependent region connection to
the external subsystem; the Signoff and Terminate Identify exit routines are
not called). BMP jobs must be resubmitted; they resume processing at the
prior commit point.
20
Should not occur.
Related reference:
“Resolve Indoubt exit routine” on page 360
IMS activates the optional external subsystem Command exit routine when IMS
discovers the subsystem's unique command recognition character (CRC) as the first
non-blank character in the text portion of the /SSR command.
IMS passes the command output destination name (LTERM name) to the exit
routine. The external subsystem can send a command response to this destination
by using the IMS Message Service.
For commands from an AOI program or from an input-only device not associated
with an output device, the output destination is the IMS MTO; otherwise it is the
inputting terminal.
IMS also provides the user ID associated with the command, if any, that the
external subsystem might use for security authorization checking.
Subsections:
v “Activating the routine” on page 345
v “Contents of register 15 on return” on page 345
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a control region environment (control region TCB). The following table
explains the contents of the EPL.
Table 131. EPL contents
Offset
Offset (decimal) Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'5'.
X'4' 4 Address of EEVT prefix.
X'8' 8 Address of the variable length external subsystem
command input. See the next table for the format of the
command input.
X'C' 12 Address of the 8-byte alphanumeric destination name (that
is, LTERM name) where the command response message, if
any, is to be sent. The name is left justified and padded
with blanks on the right.
X'10' 16 Address of the 8-character user ID associated with the
command input message. The user ID is left justified and
padded with blanks on the right. If IMS extended security
(SIGNON|SIGNOFF) is not active, or the inputting
terminal did not sign on, the user ID field contains the
output destination LTERM name.
X'14' 20 Address of the 8-byte RACF group name for the user ID
that entered the command. The name is left justified and
padded with blanks on the right. The area contains blanks
if RACF checking is not in effect.
Related reference:
“Message Service exit routine” on page 378
Chapter 4. IMS system exit routines 345
IBM Confidential
In other words, the data associated with the current PSB is committed to the
database, locks are released, and cleanup is performed. This exit routine is
activated after all participating subsystems have voted 'yes' (return code 0 from
Commit Prepare exit routine) to the commit prepare request.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return”
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
X'0' 0 Address of the parameter count field. The count field contains
the value F'2'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems.
Action: IMS terminates the application with abend U3046 (the input
message is processed; DL/I resources are committed). The control region
performs resolve indoubt processing for the recovery token. The
dependent region is terminated, which implicitly terminates the
dependent region connection to the external subsystem (Signoff and
Terminate Identify exit routines are not called). BMP jobs that must be
resubmitted resume processing after the commit point.
20 Should not occur.
Related reference:
“Commit Prepare exit routine” on page 347
“Resolve Indoubt exit routine” on page 360
On return, the exit routine must indicate whether it is prepared to commit all
uncommitted changes initiated by the currently scheduled application. The exit
routine can indicate whether or not the second phase of the commit process
(commit continue) is required. If the transactions associated with the sync point
processing are non-update transactions, they do not need to be committed, in
which case the exit routine returns with a return code of X'C', requesting that IMS
not call the Commit Continue exit routine.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return”
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Decimal
Offset
(hexadecimal) Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'2'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems.
Action:
v If the application is not terminating, IMS drives the Abort Continue
exit routine. An internal ROLB is performed, which returns the input
message to the application.
v If the sync point was the result of the application terminating, IMS
activates the Terminate Thread exit routine with the abort option. The
application is terminated with abend U3055, updates are discarded,
and the input message is re-enqueued.
X'08'
Commit Prepare unsuccessful. Prepare processing failed in the external
subsystem.
Action: IMS activates the Abort Continue exit routine for all
participating subsystems (if the application is not terminating) or the
Terminate Thread exit routine with the abort option. The application
terminates with abend U3044 and updates are discarded.
X'0C'
Commit Prepare successful for nonupdate transactions.
Action: IMS continues normal processing but does not call the Commit
Continue exit routine. The external subsystem indicated that it is
processing nonupdate transactions that do not need to be called for the
second phase of commit processing. If the application program is
terminating, IMS calls the Terminate Thread exit routine.
X'18'
Commit Prepare unsuccessful. The request was rejected because the
recovery token presented by IMS at commit prepare already existed in
the external subsystem. One of the following conditions occurred:
v Outstanding recovery was not resolved by the Resolve indoubt exit
routine, probably due to errors in the external subsystem.
v IMS was cold started and the contents of the recovery token occurred
once again.
Action: IMS pseudo abends the application program with abend U3053
and backs out the previous updates. The application is immediately
rescheduled. The dependent region connection is reestablished
whereupon a new recovery token is presented to the Signon exit routine.
X'20'
Should not occur.
Related reference:
“Terminate Thread exit routine” on page 373
“Resolve Indoubt exit routine” on page 360
IMS calls the exit routine before the next message is dequeued and presented to
the application program. The exit routine allows the external subsystem to decide
if it can properly process a new message without initiating a commit for the
previous message. The external subsystem returns to IMS with a return code that
requests that IMS continue with normal MODE=MULT (or CMTMODE(MULT))
processing or initiate a commit action. If a commit action is requested, IMS will
initiate the commit action before dequeuing the next message and will terminate
the application program with a “QC” status code.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return”
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'3'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 8-character user ID, left justified and padded
with blanks. The user ID is associated with the message that
is currently being processed (the next message has not yet
been dequeued) and is identical to the one that was
presented to the external subsystem at the time IMS last
called the Signon exit routine.
X'C' 12 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems. This recovery
token is identical to the one that was presented to the
external subsystem when IMS last called the Signon exit
routine.
Action: IMS terminates the application with a “QC” status and initiates
commit processing. Following the commit action, IMS reschedules the
application program and the next message is presented for processing.
8
Commit Verify unsuccessful. Commit Verify processing failed in the external
subsystem.
Action: IMS terminates the application program with abend U3044 and
discards all updates.
20
Should not occur.
Threads can be created only after the TCB that the application runs under has been
identified to the external subsystem. A thread is created for each application that
makes a request to the external subsystem. The first request by the application
program directed at the selected subsystem initiates the activation. Once the thread
is created, application requests flow directly to the external subsystem through the
Normal Call exit routine.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 351
The exit routine is activated in key seven, supervisor state. The EEVT prefix
(EEVTP) indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'5'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the eight-character application program name,
left justified and padded with blanks to the right.
X'C' 12 Address of the eight-character PSB name, left justified and
padded on the right with blanks.
X'10' 16 Address of the contents of register 0 in the application save
area. When register 0 was saved, it contained the address of
the external subsystem-directed parameter list constructed
by the language interface.
Offset
(hexadecimal) Decimal Content
X'14' 20 Address of a two-character transaction characteristic field.
The fields are described from left to right.
Action: IMS activates the Subsystem Not Operational exit routine. The return
code from the Subsystem Not Operational exit routine determines further
processing.
Return code 4, coupled with a return code 4 out of the Subsystem Not
Operational exit routine, causes an application loop unless the application
checks the return code presented by the API.
X'08'
Create Thread temporarily unsuccessful. The external subsystem was unable
to complete the request due to the unavailability of a required resource
(resource allocation failure).
Action: IMS terminates the application program with abend U777. All
changes are backed out and the application is rescheduled.
Related reference:
“Normal Call exit routine” on page 358
“Subsystem Not Operational exit routine” on page 366
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 353
The exit routine is activated in key seven, supervisor state. The EEVT prefix
(EEVTP) indicates a control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field
contains the value F'1'.
4 4 Address of the EEVT prefix.
Related reference:
“Resolve Indoubt exit routine” on page 360
Initial contact from the region to the external subsystem is through this exit
routine. (The Identify exit routine is expected to communicate with the external
subsystem whereas the Initialization exit routine, if provided, might only perform
ESAP initialization and not actually communicate with the external subsystem.)
Successful activation of the exit routine (for example, return code 0) is necessary in
order for the region to be able to communicate with the external subsystem.
An aspect of the identify concept is the identification of IMS TCBs to the external
subsystem. When an IMS TCB terminates abnormally and in some cases when a
dependent region terminates normally, IMS does not inform the external subsystem
of the termination. The external subsystem should monitor, with z/OS end-of-task
(EOT) exit routines, the TCBs for the regions that identify so that it can be notified
by z/OS of a termination that was not communicated by IMS.
In the control region and in an MPP- or IFP-dependent region, the Identify exit
routine is activated during region initialization processing unless the Initialization
exit routine returned with return code 4 (do not identify). The Identify exit routine
(control or dependent region) is also activated when the external subsystem
activates (through an exit routine) the Subsystem Startup Service supplied by IMS.
IMS passes a notify message on the control region identify request. If the exit
routine returns with return code 4 (notify message accepted), IMS waits for the
external subsystem to send the notify message before reactivating the exit routine
to establish the connection. This return code is intended to be used (optionally) in
the case where the external subsystem is not active when IMS attempts to identify.
Related Reading: See IMS Version 14 Communications and Connections for more
information about notify message.
IMS also passes the address of a termination ECB to the control region Identify exit
routine. The external subsystem can post this ECB to cause IMS to terminate the
connection; for example, when the external subsystem is shutting down.
Subsections:
v “Activating the routine from the control region”
v “Contents of register 15 on return”
v “Activating the routine from the dependent region” on page 355
v “Contents of register 15 on return” on page 355
The exit routine is activated in key seven, supervisor state. The EEVT prefix
(EEVTP) indicates control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
X'0' 0 Address of the parameter count field. The count field
contains the value F'5'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 4-character external subsystem name.
X'C' 12 Address of the 8-character field containing the IMS system
ID (4 characters blank filled to 8 bytes). In an XRF complex,
this field contains the RSENAME.
X'10' 16 Address of the notify message area. See IMS Version 14
Communications and Connections.
X'14' 20 Address of the subsystem termination ECB.
Action: The external subsystem connection is not established. IMS waits for
receipt of the notify message before activating the Identify exit routine again.
Calling the IMS Subsystem Startup Service after Identify return code 4 does
not cause the Identify exit routine to be reactivated.
Action: IMS waits for receipt of the notify message before activating the exit
routine again.
X'C'
Identify unsuccessful. The identify process failed, either in the ESAP or the
external subsystem.
The exit routine is activated in key seven, supervisor state. The EEVT prefix
(EEVTP) indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
X'0' 0 Address of the parameter count field. The count field contains
the value F'3'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the four-character external subsystem name.
X'C' 12 Address of the IMS system ID.
Related reference:
“Resolve Indoubt exit routine” on page 360
IMS activates the optional Initialization exit routine to allow the ESAP to initialize
work areas or control blocks in the following instances:
v During the initial stages of establishing a connection from the control or
dependent regions. Activation occurs after IMS has constructed its required
control blocks as well as the control blocks for the external subsystem. This
action takes place before the control or dependent regions have their respective
Identify exit routine activated.
v In a dependent region after an application program abend.
If the Initialization exit routine sets the 'do not identify' return code (return code
4), or if an Initialization exit routine is not supplied, IMS does not automatically
perform identify processing for the region. See IMS Version 14 Communications and
Connections for information on how the identify process is eventually performed.
Subsections:
v “Activating the routine from the control region”
v “Contents of register 15 on return”
v “Activating the routine from the dependent region” on page 357
v “Contents of register 15 on return” on page 357
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'2'.
4 4 Address of the EEVT prefix.
8 8 Address of the 1-byte alphabetic region error option (REO)
character defined by the installation. The exit routine should
save the error option for future reference when a decision
concerning the application is required.
Action: IMS does not perform identify processing during control region
initialization. It is now the responsibility of the external subsystem to initiate
the connection using the IMS Subsystem Startup Service.
8
Initialization unsuccessful.
Action: IMS does not initiate a connection to the subsystem. The external
subsystem is marked as unstartable. The /START SUBSYS command resets the
condition.
20
Should not occur.
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'2'.
4 4 Address of the EEVT prefix.
8 8 Address of the 1-byte alphabetic region error option character.
The region error option is user-defined as part of the
[Link] member. The exit routine code should save the
error option for future reference when a decision concerning
the application is required.
Action: For an MPP or IFP region, IMS initiates a connection to the external
subsystem during region initialization. (IMS does not automatically initiate a
connection for a BMP region. See the description for return code 4.)
4
Initialization successful. Do not identify to the external subsystem.
Action: IMS does not automatically initiate a connection for the dependent
region. When the region processes the first application call to the external
subsystem, the ESAP is expected to activate the IMS Subsystem Startup
Service (from the Subsystem Not Operational exit routine.
This is always the case for BMP regions (that is, when return code 0 is set).
Return code 4 has significance only for MPP and IFP regions.
Action: IMS does not initiate a connection to the subsystem for the life of the
execution of this dependent region.
20
Should not occur.
Related reference:
“Subsystem Not Operational exit routine” on page 366
“Subsystem Startup Service exit routine” on page 380
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 359
The exit routine is activated in the caller's key. The caller is IMS, an application
program, or an external subsystem-supplied exit routine, and is either authorized
or unauthorized. If the caller is authorized, the exit routine is activated in key 7,
supervisor state. If the caller is unauthorized, the exit routine is activated in key 8,
problem program state. The EEVT prefix (EEVTP) indicates a dependent region
environment (dependent region TCB).
Offset
Offset (decimal) Content
X'0' 0 Address of the parameter count field. The count field contains
the value F'6'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the contents of register 0 in the application save
area. At this time register 0 contains the address of the external
subsystem-directed parameter list as constructed by the
language interface.
X'C' 12 Address of the contents of register 1 in the application save
area. Register 1 contains the address of the application
parameter list.
Offset
Offset (decimal) Content
X'10' 16 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems.
X'14' 20 Address of a one-character field which identifies the
authorization state:
A The caller is authorized and the exit routine is
activated in key seven, supervisor state.
U The caller is unauthorized and the exit routine is
activated in key eight, problem program state.
X'18' 24 Address of a 12-word buffer area provided for specific
language function calls. External subsystems that require IMS
to call internal exit routines for post-normal call processing can
use this buffer to pass data to the internal exit routine. If
post-normal call processing is required, IMS passes the address
of the buffer to the associated internal exit routine. If
post-normal call processing is not required, the external
subsystem should not use this parameter. For more
information, see return code 12.
Action: IMS terminates the application program with abend U777. All
changes are backed out and the application is rescheduled.
X'8'
Normal Call unsuccessful. A failure in the external subsystem occurred while
processing the request.
The actual interface to an internal exit routine is unique to that routine and
depends on the type of external subsystem. The external subsystem-specific
interfaces are not documented.
X'20'
Should not occur.
The Resolve Indoubt exit routine provided by the external subsystem aids in the
coordination of recovery between the two subsystems. IMS, as the recovery
coordinator, always calls this exit routine after successful completion of the identify
process. IMS indicates in the EPL whether or not recovery must take place for the
units of work in question.
The Resolve Indoubt exit routine is activated once for each outstanding IMS
recovery token. It is called after the Echo exit routine. The external subsystem
directs IMS to save or destroy the recovery token. More information on exit routine
responses is in “Contents of register 15 on return” on page 362.
The Resolve Indoubt exit routine has the option of allowing the two subsystems to
continue communication with or without all recovery tokens resolved. If
communication continues and outstanding recovery tokens exist, an authorized
operator can direct IMS to delete its recovery tokens using the /CHANGE command.
If the Resolve Indoubt exit routine address is not present in the EEVT and
outstanding recovery tokens do not exist, IMS allows the connection process to
continue. However, if a recovery token does exist, IMS terminates the connection
and informs the MTO with message DFS3602I.
The Resolve Indoubt exit routine is also activated after the abend of an application
program that had a connection (thread) to the external subsystem.
Subsections:
v “Activating the routine” on page 361
v “Contents of register 15 on return” on page 362
The exit routine is activated in key seven, supervisor state. The EEVT prefix
(EEVTP) indicates a control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'4'.
4 4 Address of the EEVT prefix.
8 8 Address of a two-character field:
v Byte 1 contains an indicator, either 'C' or 'W', on the first
activation of the Resolve Indoubt exit routine during the
current IMS execution. On subsequent activations, the byte
contains binary zeroes. (For example, if the external
subsystem terminates and restarts while IMS remains
active, when the connection is reestablished, the byte will
contain binary zeroes.)
C Indicates IMS was cold started. All subsequent
fields in the parameter list contain binary zeroes.
W Indicates IMS was warm started.
v Byte 2 is set to 'L' after the last recovery token of the
current sequence is processed. For all other activations, the
byte is set to binary zeroes.
L Indicates either that there are no recovery tokens
to be resolved, or that all recovery tokens that
were to be resolved at this time have been
processed. If 'L' is not set on an activation of the
exit routine, the exit routine should expect to be
activated one or more times (once per recovery
token) until 'L' is set. A recovery token is not
passed on the last ('L') activation.
When 'C' is set in byte one, 'L' is always set
because IMS does not save recovery information
across a cold start.
Action: IMS saves the recovery token. The connection status remains
unchanged. IMS assumes that the indicated unit of work is indoubt status in
the external subsystem (for example, resources have not become
inconsistent). The saved recovery token will be included in the resolve
indoubt processing for the next establishment of the connection. IMS does
not inform the installation that the unit of work was not resolved.
8
Resolve Indoubt unsuccessful. Return code 8 can be used when the external
subsystem chooses not to resolve the unit of work during exit processing but
saves the commit direction so that IMS does not need to save the recovery
token. This return code is not intended for the case where resources have
become inconsistent (see return code C).
Return code 8 might be used when the indicated unit of work is not in
indoubt status in the external subsystem but resource consistency is not
jeopardized, however, caution is advised. External subsystem-specific
processing that is not coordinated with IMS can result in IMS holding a
recovery token in indoubt status when the unit of work is not indoubt in the
external subsystem (for example, external subsystem “cold start”, or manual
recovery of a unit of work by the installation if allowed by the external
subsystem). If the external subsystem can determine that its prior resolution
of a unit of work (explicit or implicit) agrees with the commit direction
passed to the exit routine, return code 8 can be set; otherwise, return code C
should be set.
Action: IMS destroys the recovery token. The connection status remains
unchanged (IMS assumes that resource consistency is maintained).
The IMS action is the same as for return code 0. Setting return code 8 allows
for an audit trail of the “not-quite-normal” cases.
Action: IMS terminates the connection and saves all remaining recovery
tokens. IMS also issues message DFS3602I to notify the installation of a
resource problem.
v If a recovery token was passed on the exit routine activation (for example,
L was not set), IMS terminates the connection to the external subsystem.
The recovery token passed and all remaining recovery tokens are saved.
v If this is the last activation (L was set), the connection status is unchanged.
Dependent regions are allowed to connect to the external subsystem.
20
Should not occur.
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'1'.
4 4 Address of the EEVT prefix.
Action: IMS terminates the dependent region connection with the external
subsystem, allowing other dependents to continue processing.
20
Should not occur.
The following table lists, in search order, the fields that IMS will check when it
searches for a user ID. For each field, it lists the criteria that IMS uses to validate
the user ID. When IMS finds a valid user ID, IMS extracts the ID and passes it to
the Signon exit routine.
Table 133. Determining the signon user ID
Type of application Field Criteria for authorized user ID
CPI-C 1. RACF user ID if the accessor Value passed without validation
environment element (ACEE) is
cloned in the dependent region
2. PSTBUSER The value is not binary zeroes or blanks
3. PSTUSID The value is not blanks
4. PSTSYM80 The value is not blanks
5. PDIRSYM Value passed without validation
v Message-driven BMP 1. PSTUSID The value is not blanks
that has done a Get
2. PSTSYM80 The value is not blanks
Unique call
v IFP that has done a Get 3. PSTBUSER The value is not binary zeroes or blanks
Unique call 4. PDIRSYM Value passed without validation
v MPP
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'5'.
4 4 Address of the EEVT prefix.
8 8 Address of the eight-character user ID, left justified and
padded on the right with blanks.
C 12 Address of the 16-byte recovery token associated with this
instance of the transaction. The recovery token identifies the
unit of work across one or more subsystems.
10 16 Address of the 8-byte RACF group name for the user ID that
entered the transaction. The name is left justified and padded
with blanks on the right. The area contains blanks if RACF
checking is not in effect.
14 20 Address of the field containing the performance block token
for z/OS workload management support.
18 24 Address of the XID token associated with this transaction.
The XID token identifies participants in a Distributed
Syncpoint environment.
Action: IMS activates the Subsystem Not Operational exit routine. The return
code from the Subsystem Not Operational exit routine determines further
processing.
8 Signon temporarily unsuccessful. The external subsystem was unable to
complete the request due to the unavailability of a required resource
(resource allocation failure).
Action: IMS pseudo abends the application program with abend U3053 and
backs out the previous updates. The application is immediately rescheduled.
The dependent region connection is re-established whereupon a new
recovery token is presented to the Signon exit routine.
20 Should not occur.
Related reference:
“Subsystem Not Operational exit routine”
“Resolve Indoubt exit routine” on page 360
The Subsystem Not Operational exit routine is viewed as a utility type of exit
routine. IMS activates this exit routine when:
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 369
The exit routine is activated in the caller's key. The caller is IMS, an application
program, or an external subsystem-supplied exit routine, and is either authorized
or unauthorized. If the caller is authorized, the exit routine is activated in key
seven, supervisor state. If the caller is unauthorized, the exit routine is activated in
key eight, problem program state. The EEVT prefix (EEVTP) indicates a dependent
region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field contains
the value F'10'.
4 4 Address of the EEVT prefix.
8 8 Address of the contents of register 0 in the application
program save area. At this time register 0 contains the address
of the external subsystem-directed parameter list as
constructed by the language interface.
C 12 Address of the contents of register 1 in the application
program save area. Register 1 contains the address of the
application parameter list.
Offset
(hexadecimal) Decimal Content
10 16 Address of a one-character information field. The contents
indicate why the Subsystem Not Operational exit routine is
being activated. The field contains:
A Return code 4 was returned by the Signon or Create
Thread exit routines.
C The IMS control region has not identified to the
external subsystem. This condition was discovered
when an application directed a request to the
subsystem. The Subsystem Not Available exit routine
can activate the IMS Subsystem Startup Service to
initiate a connection.
D An application issued a call to the external
subsystem but the dependent region has not
identified. The Subsystem Not Operational exit
routine can activate the IMS Subsystem Startup
Service to initiate a connection.
Q The external subsystem notified IMS that it is
terminating in a quiesce fashion. Prior to the creation
of a thread is the only interval where 'Q' is passed to
the external subsystem (applicable mainly when the
region error option (REO) is an 'R').
T The external subsystem notified IMS that it is either
abnormally terminating or terminating in a quick
fashion. It is highly likely that a subsystem-directed
request will fail. IMS notifies the external subsystem
when servicing a subsystem request (such as Create
Thread).
14 20 Address of a one-character default application option field.
This field contains the region error option (REO) defined by
the installation in the external subsystem PROCLIB member
to take effect in the event an application issues a
subsystem-directed request when a complete authorized
connection does not exist. This field is always valid.
Offset
(hexadecimal) Decimal Content
28 40 Address of a one-character field which identifies the
authorization state:
A The caller is authorized and the exit routine is
activated in key seven, supervisor state.
U The caller is unauthorized and the exit routine is
activated in key eight, problem program state.
A loop between the Create Thread exit routine and the Subsystem Not
Operational exit routine might result if the application program does not
check for nonzero return codes from the API.
8
Subsystem Not Operational call unsuccessful.
Action: IMS terminates the application program with abend U3044. The
transaction input is saved and all uncommitted changes are backed out. The
dependent region remains available for application processing.
C
Subsystem Not Operational call unsuccessful.
Action: IMS terminates the application program with abend U3047 and
discards the input. The dependent region remains available for application
processing.
10
Subsystem Not Operational call unsuccessful.
Action: IMS uses the z/OS format abend code returned by this exit routine
to abend the application.
20
Should not occur.
Related reference:
“Signoff exit routine” on page 363
“Create Thread exit routine” on page 350
The Subsystem Termination exit routine should execute in parallel with normal
and abnormal IMS or external subsystem termination processing. External
subsystem termination is recognized when the subsystem posts the termination
ECB.
v “Activating the routine”
v “Contents of register 15 on return” on page 371
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field
contains the value F'2'.
4 4 Address of the EEVT prefix.
Offset
(hexadecimal) Decimal Content
8 8 Address of a 1-byte character format field indicating the
reason for subsystem termination. The field contains one of
the following:
A IMS is shutting down in a normal fashion
(/CHECKPOINT FREEZE). IMS makes sure new
connections are not established and permits existing
ones to terminate normally.
B IMS is shutting down abnormally (abend). Some
abend conditions might prohibit the activation of
this exit routine.
C The external subsystem notified IMS that it is
terminating in a quiesce fashion. IMS makes sure
new connections are not established and permits
existing ones to terminate normally.
D The external subsystem notified IMS that it is
terminating abnormally (catastrophic). IMS makes
sure new connections are not attempted and
terminates existing ones.
E The connection between the subsystems is being
quiesced by IMS. IMS is not shutting down but
remains available. The termination of the
connection is the result of the /STOP command, a
bad return code from an exit routine, or a required
exit routine missing.
F The connection between the subsystems is being
terminated because the IMS Subsystem Termination
Service exit routine was activated by an external
subsystem exit routine.
Each IMS region that has an external subsystem connection must first identify to
the subsystem. Identify must first be complete for the control region before any
dependent regions identify. This hierarchical structure allows the control region to
act as recovery coordinator for the dependent regions. If a dependent region were
to fail, the control region intervenes and instructs the external subsystem to
commit or abort the dependent region units of work.
Subsections:
v “Activating the routine from the control region”
v “Activating the routine from the dependent region”
v “Contents of register 15 on return” on page 373
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a control region environment (control region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field
contains the value F'1'.
4 4 Address of the EEVT prefix.
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP)
indicates a dependent region environment (dependent region TCB).
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field
contains the value F'1'.
4 4 Address of the EEVT prefix.
The exit routine is activated in key 7, supervisor state. The EEVT prefix (EVVTP)
indicates a dependent region environment (dependent region TCB).
Action: IMS terminates the application with an abend. The dependent region
connection to the external subsystem is also terminated. Resolve indoubt
processing for the recovery token is performed in the control region.
v For the COMM (commit) option: The application is terminated with abend
U3046 (the input message is processed; DL/I resources are committed).
BMP jobs must be resubmitted; they resume processing after the commit
point.
v For the ABRT (abort) option: The application is terminated with abend
U3045 (the input message is deleted; DL/I resources are backed out). BMP
jobs must be resubmitted; they resume processing at the prior commit
point.
8
Terminate Thread unsuccessful. The Terminate Thread exit routine has either
detected an error with the request information or considers the request
invalid at this time. This return code should only be used when the commit
option character string is 'DE'.
Related reference:
“Resolve Indoubt exit routine” on page 360
To activate an IMS system service exit routine, the ESAP loads the address of an
IMS service router module from EEVPESGL in the EEVTP control block and
branches to it. The ESAP passes required parameters using an exit routine
parameter list (EPL) in the same general format as the EPL passed to external
subsystem exit routines. Each exit routine has a unique function code. The address
of the function code defined for the exit routine being activated must be supplied
in the EPL. If a function code address is not passed, the invalid parameter list
return code, X'20', is returned to the caller.
On entry, the system service exit routine saves all registers using the provided save
area. The registers contain the following:
Register Contents
1 Address of exit parameter list (EPL)
13 Address of save area
14 Return address
15 Address obtained from EEVPSEGL in the EEVTP
Before returning to the ESAP, the system service exit routine restores all registers
except register 15, which contains a return code. The parameters and return codes
for each system service exit routine are described in the following topics.
The storage key of the save area should be that of the caller, for example, key 8 for
the Normal Call exit routine; key 7 for the Subsystem Termination exit routine.
The key of the storage passed to the system service exit routines (Log exit routine,
Message exit routine) must be the same as the caller's. For example, if the Identify
exit routine wants to place data on the IMS log, that data must exist in storage
obtained while the Identify exit routine was running in key 7 before calling the
Log exit routine.
IMS system service exit routines should not be activated from TCBs attached by
the ESAP. The system service modules expect to be activated under an IMS
internal structure that is only available under IMS TCBs.
The following restrictions, which are associated with extended partitioned data sets
(PDSE), apply to resources (tables and exit routines) that are associated with an
external subsystem:
v All executable code, such as exit routines, must have link attributes that are
reentrant. These subsystem exit routines must take appropriate actions to
prevent access errors.
v Non-executable tables are loaded in the TCB key, or key 0.
Before IMS loads a subsystem resource, IMS locates the resource and determines
the type of data set that holds the resource. If the data set type is a PDS, IMS
manages the key and subpool of the resource. If the data set is a PDSE, the linkage
attributes of the resource determine the key and subpool of that resource.
Non-executable tables that reside on a PDSE and are linked as non-reentrant must
be referenced in TCBKEY. Otherwise, fetch-protection errors also occur. By linking
these tables as reentrant, these errors are prevented.
IMS reserves log record type X'55' for external subsystem usage. The exit routine
does not accept any other log record types.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 377
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field must
contain the value F'3'.
4 4 Address of the 1-character logging service function code,
X'16'. If an address is not present, return code X'20' is
returned to the caller.
8 8 Address of the EEVT prefix. The EEVT prefix must be fully
initialized.
Offset
(hexadecimal) Decimal Content
C 12 Address of the log record area. The exact contents are written
to the log. IMS does not alter this area. The log record must
be in the following format:
The log record prefix must contain the LL, ZZ, and C fields
as follows:
LL A 2-byte field that must contain the total length of
the record. The total length (prefix + data) cannot
exceed the logical record length (LRECL) for the
system log data set minus 4 bytes.
ZZ A 2-byte field that must contain binary zeroes.
C A 1-byte field that must contain the log record type,
X'55'.
Possible errors:
v Invalid log record address—the EPL contains zeroes or a negative value.
v Invalid log record length—the length field contains zeroes or a negative
value.
Two types of messages are accepted by the exit routine: preedit (prebuilt) and key
call (message number).
On a key call, the address of the message number is passed. The message itself is
supplied in the user message table.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return” on page 380
Possible errors:
v Invalid EEVTP address—the EPL contains zeroes.
v Invalid destination name—the destination name area contains blanks.
v Invalid message type.
Related reference:
“User Message table (DFSCMTU0)” on page 483
If the control region identify or an MPP or IFP dependent region identify was
deferred (for example, not done automatically during region initialization
processing), this service is to be used to establish the necessary connection. It can
also be used to establish the connection for a BMP dependent region. The external
subsystem activates the service from the Subsystem Not Operational exit routine in
the dependent region (key 8) when the first application call to the external
subsystem is processed in the dependent region.
Related Reading: See IMS Version 14 Messages and Codes, Volume 2: Non-DFS
Messages for more information about the external subsystem connection.
If the control region connection has not been established, the Startup Service exit
routine activates the control region identify process before activating the dependent
region identify process. The startup exit routine activation fails if the notify
message passed to the control region Identify exit routine (on a previous
activation) was accepted by the exit routine but the external subsystem has not
sent the message to IMS to indicate that it is ready to establish a connection.
Subsections:
v “Activating the routine” on page 381
v “Contents of register 15 on return” on page 381
Offset
(hexadecimal) Decimal Content
0 0 Address of the parameter count field. The count field must
contain the value F'2'.
4 4 Address of the one-character startup service function code,
X'17'. If an address is not present, return code X'20' is
returned to the caller.
8 8 Address of the EEVT prefix. The EEVT prefix must be fully
initialized.
The Subsystem Termination exit routine is activated by the ESAP, possibly when a
subsystem termination command is intercepted by the ESAP exit routine. The
intercepting routine is available whether or not the subsystem is attached and
running in user key.
Subsections:
v “Activating the routine”
v “Contents of register 15 on return”
Several reasons exist for altering the keyword table. For example, you might want
to tailor the keywords and synonyms to satisfy unique requirements. A new
keyword or keyword synonym in a new IMS release can conflict with a name
already assigned by your installation to a resource such as an LTERM or a
transaction. If a new keyword “ABC” is introduced and you already have an
LTERM with the name “ABC”, you can change the keyword name to “ABCDEFG”
and remove the source of the conflict. If the source of the conflict is the new
keyword synonym, you can change or delete the synonym.
Another reason you might want to modify the table is to limit the use of the ALL
parameter for certain keywords by changing the parameter's default value from
ALL=YES to ALL=NO or ALL=DIS. Using ALL=YES allows the operator to enter IMS
commands with the ALL option; this requires a significant increase in storage in the
IMS general pool and adversely affects IMS performance. To avoid these negative
consequences, you can specify ALL=NO or ALL=DIS to be used with IMS commands
except those associated with AOI transactions.
Details about ALL=NO and ALL=DIS options and instructions for modifying them are
discussed in the following topics.
The following table shows the attributes of the IMS Command Language
Modification facility.
Table 134. IMS command language modification facility attributes
Attribute Description
IMS environments DB/DC, DCCTL, DBCTL.
Naming convention You must name this routine DFSCKWD0 with ALIAS CKWDTABL.
Two of the macro statements that appear in the table, KEYWD and SYN, can be
replaced to modify the keywords and synonyms. One way of modifying the table
is:
1. Edit module DFSCKWD0.
2. Change the KEYWD and SYN macro statements.
3. Reassemble DFSCKWD0.
4. Relink the reassembled DFSCKWD0 in [Link].
Changes to DFSCKWD0 cannot conflict with the names in this list. Keywords can
be changed and keyword synonyms can be added, changed, or deleted, as long as
the new keyword or synonym is not a reserved word. For example, a new
synonym of “MSDB” for MSDBLOAD cannot be added, because “MSDB” is a
reserved parameter. If “MSDB” is made a keyword synonym, the /DBDUMP
DATABASE MSDB command fails with a syntax error.
KEYWD macro
KEYWD
keyword,LAST=NO|YES,ALL=YES|NO|DIS
Where keyword is the new or changed keyword. LAST=NO and ALL=YES are the
defaults and need not be supplied. LAST=YES must be specified if it is the last
macro call in the module. A keyword cannot exceed 12 characters in length.
Specifying ALL=NO prevents the use of the ALL parameter with all IMS commands
that apply to the keyword being changed (except for commands issued from AOI
programs).
For example, specifying ALL=NO for the keyword LTERM prevents the use of the ALL
parameter for the following commands:
/BROADCAST LTERM ALL
/DISPLAY ASSIGNMENT LTERM ALL
/DISPLAY LTERM ALL
/LOCK LTERM ALL
/PSTOP LTERM ALL
/PURGE LTERM ALL
/START LTERM ALL
/STOP LTERM ALL
/UNLOCK LTERM ALL
Specifying ALL=DIS prevents the use of the ALL parameter with all /DISPLAY
commands that apply to the keyword being changed (except for commands issued
from AOI programs).
For example, specifying ALL=DIS for the keyword LTERM prevents the use of the ALL
parameter for the following commands:
v /DISPLAY ASSIGNMENT LTERM ALL
v /DISPLAY LTERM ALL
SYN macro
SYN synonym,LAST=YES|NO
Where synonym is the desired synonym. LAST=NO is the default and need not be
specified. LAST=YES must be coded if this is the last macro call in the assembly.
Synonyms cannot exceed 12 characters in length; they must be defined under the
keyword to which they apply.
Error messages
Any error in a macro statement terminates assembly of the keyword table and
results in generation of an error message. The remaining macro statements are
error checked, but nothing is generated. All macro assembly errors are severity
code 16 errors.
KYTBL001 - SEQUENCE ERROR. XXX CANNOT FOLLOW IKEY
A macro was called which cannot immediately follow an IKEY macro call. XXX
is either IKEY or SYN. IKEY calls cannot be modified.
KYTBL002 - XXX CALLED WITHOUT ANY PARAMETER
A macro was called without any parameter. XXX is either IKEY, KEYWD, or
SYN.
KYTBL003 - XXX IS NOT A VALID INTERNAL KEYWORD
The parameter specified on an IKEY call (XXX) is not known to the system.
IKEY calls cannot be modified.
Message DFS058 COMMAND COMPLETED EXCEPT xxx y z... uses the keyword
table to replace 'xxx' with the keyword associated with the command that caused
the message. Therefore, keywords defined by KEYWD macro calls appear in this
message. Other messages, however, are prebuilt, and keywords that might have
changed will still appear in these.
Related reference:
“Routine binding restrictions” on page 8
For the latest version of DFSCKWD0, see the [Link] library. The member
name is DFSCKWD0.
The address for this parameter list is passed to the exit routine in the SXPLFSPL
field of the “IMS standard user exit parameter list” on page 4. This parameter list
is mapped by the DFSIXTP macro.
Table 136. Parameter list for the Initialization and termination user exit type
Field name Offset Length Usage Description
ITXP_PVER X’00’ X’04’ Input Parameter list version number (X’00000001’)
ITXP_FUNC X’04’ X’04’ Input Function code:
1 IMS initialization
2 IMS normal termination
3 IMS abnormal termination
ITXP_LEN X’08’ X’04’ Input Parameter list length
Table 136. Parameter list for the Initialization and termination user exit type (continued)
Field name Offset Length Usage Description
ITXP_RGNTYPE X’0C’ X’04’ Input Region type:
1 DB/DC
2 DBCTL
3 DCCTL
4 FDBR
There is no requirement for exit registers and there are no defined return and
reason codes.
This topic describes the CEEBXITA Assembler User exit routine, DFSBXITA, and
provides information about the attributes of the routine, how the routine is called
and how the routine communicates with IMS.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 389
Note: If your z/OS environment includes software other than IMS that uses
CEEBXITA, be aware that if DFSBXITA is linked with the LE initialization/
termination library routines, it will be called by the non-IMS software that
previously called CEEBXITA. You must provide logic to ensure that programs that
need to use CEEBXITA can access it.
IMS communicates with this routine through the entry registers, a parameter list,
and the exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Input parameter list address (CEEAUE)
12 Pointer to the common anchor area (CAA), which is mapped by CEECAA
13 Caller's save area address
14 Return address
15 Entry point address
Before returning to IMS, the exit routine must restore all registers.
Related reference:
“Routine binding restrictions” on page 8
User-generated resources are those that are built as partition data set (PDS) add
members during the Stage 1 assembly and are designated for user customization
only.
Subsections:
v “About this routine”
v “Restrictions”
v “Communicating with IMS” on page 391
The Large System Definition Sort/Split Input exit routine uses a control record to
process user resources and to call exit routines. Each user-generated resource type
must have a control record created for the Resource Information File during Stage
1. The control record instructs the Sort/Split utility to process a user resource and
to call the Sort/Split utility exit routines. The details of the control record layout
are provided in the prolog of the LGNBLKS macro.
DFSSS050 is called by the Large System Definition Sort/Split routine following the
reading of each user input resource and before the sort table is built.
DFSSS050 allows you to customize the resource data with a return code to the
calling routine in register 15. You can insert, delete, or update the resource data.
The following table shows the attributes of the Large System Definition Sort/Split
Input exit routine.
Table 138. Large system definition sort/split input exit routine attributes
Attribute Description
IMS environments DB/DC, DCCTL
Naming convention You must name this exit routine DFSSS050.
Including the routine No special steps are needed to include this routine.
IMS callable services IMS callable services are not applicable for use with this exit
routine.
Sample routine [Link] (member name DFSSS050)
location
Restrictions
If a return code other than those listed is returned to the calling routine, an error
message is issued, and further processing ceases.
The length of the input buffer and the user buffer must be the same.
The length of the buffers cannot be altered or unpredictable results occur. The
buffer length is equivalent to the length of the resource data in 80-byte increments,
plus 10 bytes for the sort key.
The input buffer pointer, input buffer length, and user buffer pointer are passed to
DFSSS050 on each call. The input buffer pointer and input buffer length (used for
updates only) pertain to the buffer containing the current resource data.
The input buffer contains a “complete” resource. If the resource is a single record
resource, the input buffer is 90 bytes in length, where:
v The first 10 bytes are the sort key.
v The following 80 bytes are the actual resource data.
If the resource comprises multiple records, the length of the input buffer is large
enough to contain all the 80-byte increments for the resource, plus the 10-byte sort
key. The sort key is in the first 10 bytes of the buffer. The resource records follow
in 80-byte increments.
The user buffer pointer contains the address of the buffer where an insert is made.
The length of the user buffer is the same as the input buffer.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the input parameter list (three words long).
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes:
Altering the sort key can affect the sorting process of the resource type.
Related reference:
“Routine binding restrictions” on page 8
User-generated resources are those resources that are built as partition data set
(PDS) members during the Stage 1 assembly and are designated for user
customization only.
Subsections:
v “About this routine”
v “Restrictions”
v “Communicating with IMS” on page 393
The Large System Definition Sort/Split Output exit routine uses a control record to
process user resources and to call exit routines. Each user-generated resource type
must have a control record created for the Resource Information File during Stage
1. The control record instructs the Sort/Split utility to process a user resource and
to call the Sort/Split exit routines. The details of the control record layout are
provided in the prolog of the LGNBLKS macro.
DFSSS060 allows you to customize the resource data by means of a return code
sent to the calling routine in register 15. You can alter the sorted resource at each
of the three sections of a member.
DFSSS060 is called by the Large System Definition Sort/Split routine after each
user resource type is sorted and before writing each resource for the user resource
type.
The following table shows the attributes of the Large System Definition Sort/Split
Output exit routine.
Table 139. Large system definition sort/split output exit routine attributes
Attribute Description
IMS environments Batch large system definition process.
Naming convention You must name the exit DFSSS060.
Including the routine No special steps are needed to include this routing.
IMS callable services IMS callable services are not applicable for use with this exit
routine.
Sample routine [Link].
location
Restrictions
v If a return code other than those listed is returned to the calling routine, an error
message is issued, and further processing ceases.
v The length of the input buffer and the user buffer must be the same.
v The length of the buffers cannot be altered, or unpredictable results occur.
v This routine cannot be used in a DBCTL environment.
The input buffer pointer, the input buffer length, the user buffer pointer, and the
member section are passed to DFSSS060 on each call. The input buffer pointer and
the input buffer length pertain to the buffer containing the current resource; they
are used for updates only.
The user buffer pointer contains the address of buffer where an insert is made.
The output PDS contains members for a given resource type. Each member
contains three sections where user resource type members can be altered. These
sections are:
BOM Beginning of member, where a header record can be inserted
RES Resource section of the member, where a resource can be inserted,
updated, or deleted
EOM End of member, where a trailer record can be inserted
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the input parameter list (four words long).
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes, listed by section of the
member:
v BOM (beginning of member):
After the insert is processed by the calling routine, this exit is called again
with the user buffer cleared.
The count of resources written per member can be greater or less than the split
count, due to the ability of this routine to insert into and delete members. The split
count is the number of resources that will assemble in a 4096 KB region.
Related reference:
“Routine binding restrictions” on page 8
Subsections:
v “About this routine”
v “Restrictions” on page 396
v “Communicating with IMS” on page 396
You can use the sample Log Archive exit routine to produce an edited subset of
the complete IMS log. The subset log contains the records needed by the Tivoli®
Performance Reporter z/OS, (Program Number 5695-101). The Tivoli Performance
Reporter z/OS (PR) collects statistics about IMS transactions and schedules.
The following table shows the attributes of the Log Archive exit routine.
Table 140. Log archive exit routine attributes
Attribute Description
IMS environments Only used by the Log Archive utility.
Naming convention Must match name specified on Log Archive EXIT statement.
Binding You must bind the exit routine into [Link] (or a library
concatenated with it) as a separate reentrant load module. If the
module is not present in the load library, the IMS logger does not
load or call it.
Example: This shows you how to bind the exit routine into
[Link].
//LINKIT JOB 1,MSGLEVEL=1
//LINK EXEC PGM=IEWL,PARM=RENT
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(20,20))
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link].,DISP=SHR
//OBJIN DD DSN=[Link].,DISP=SHR
//SYSLIN DD *
INCLUDE OBJIN(IMSEXIT)
MODE AMODE(24),RMODE(24)
NAME IMSEXIT(R)
/*
Including the routine Use the Utility Control EXIT statement.
IMS callable services This exit routine is not eligible to use IMS callable services.
Sample routine No sample exit routine is provided.
location
You must write this exit routine in assembler language. This exit routine receives
control running in 24-bit addressing mode and must return control in that mode.
Restrictions
An abend in the exit routine causes the utility to abend. IMS macros cannot be
used in the exit routine. Because the performance of the exit routine affects the
total performance of the utility, the logic of the exit routine should not be so
complicated as to delay the OLDS from being used by the online region.
IMS communicates with the Log Archive exit routine through the entry registers,
parameter list, and exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to the calling RECON access routine.
15 Entry point of exit routine.
Parameter list
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes:
X'00' Active utility continues processing
non-0 Active utility terminates and IMS issues an error message
The following sample shows the Sample Log Archive exit routine.
IMSEXIT CSECT ,
**START OF MODULE SPECIFICATION****************************************
* *
* MODULE-NAME = IMSEXIT *
* *
* DESCRIPTIVE-NAME = SAMPLE IMS ARCHIVE FUNCTION EXIT *
* *
* COPYRIGHT = NONE *
* *
* *
* FUNCTION: *
* WRITES THE RECORDS USED BY SLR V3 (IBM PP, PROG NO 5665-397) *
* INTO THE FILE WITH DDNAME IMSLOG. THE FOLLOWING RECORD TYPES *
* ARE WRITTEN (ALL IN HEX): 01, 03, 06, 07, 31, 34, 35, 36, 38, *
* 4001, 4003, 4004, 4098, 42. MESSAGE TEXTS OF 01 AND 03 *
* RECORDS ARE TRUNCATED TO 24 BYTES. *
* *
* LOGIC: *
* CASE INIT. *
* GETMAIN STORAGE FOR WORK AREAS AND ANCHOR IT IN THE USER *
* WORD. *
* OPEN OUTPUT FILE. *
* END CASE INIT. *
* *
* CASE NORMAL. *
* SUBCASE RECORD TYPES 01, 03. *
* CALCULATE TOTAL LENGTH OF ALL TEXT SEGMENTS. *
* IF (LENGTH OF ALL TEXT SEGMENTS > 24 BYTES) THEN *
* TRUNCATE ANY MESSAGE PART TO 24 BYTES. *
* CHANGE SIGN OF TOTAL TEXT LENGTH AND STORE IT BACK AS AN *
* INDICATOR. *
* ELSE. *
* *
* COPY RECORD. *
* END SUBCASE RECORD TYPES 01, 03. *
* *
* SUBCASE RECORD TYPES 06, 07, 31, 34, 36, 38, 42. *
* COPY RECORD. *
* END SUBCASE RECORD TYPES 06, 07, 31, 34, 36, 38, 42. *
* *
* SUBCASE RECORD TYPES 4001, 4003, 4004, 4098. *
* COPY RECORD. *
* END SUBCASE RECORD TYPES 4001, 4003, 4004, 4098. *
* END CASE NORMAL. *
* *
* CASE TERMINATE. *
* CLOSE OUTPUT FILE. *
* FREEMAIN STORAGE FOR WORK AREAS AND RESET ANCHOR POINTER. *
* END CASE TERMINATE. *
* *
* NOTES = SEE BELOW *
* *
* DEPENDENCIES = NONE *
* *
* RESTRICTIONS = NONE *
* *
* REGISTER CONVENTIONS = SEE LINKAGE *
* *
* PATCH LABEL = NONE *
* *
* MODULE-TYPE = PROCEDURE *
* *
* PROCESSOR = ASSEMBLER *
* *
* MODULE-SIZE = SEE ASSEMBLER LISTING *
* *
* ATTRIBUTES = REENTRANT *
* *
* ENTRY-POINT = IMSEXIT *
* *
* PURPOSE = SEE FUNCTION *
* *
* LINKAGE = STANDARD OS LINKAGE *
* *
* INPUT: *
* REGISTER 1 POINTS TO A 3-WORD PARAMETER LIST: *
* *
* USERWORD - PTR(31). CONTAINS ZERO AT INIT CALL, AND A POINTER *
* TO A WORKAREA AT NORMAL AND TERM CALLS. *
* TYPEPTR - PTR(31). POINTS TO A 1-BYTE AREA, THAT CONTAINS: *
* X’01’ - INIT CALL *
* X’02’ - NORMAL CALL *
* X’03’ - TERM CALL *
* RECPTR - PTR(31). FOR NORMAL CALL, POINTER TO A LOG RECORD. *
* *
* FEEDBACK: *
* USERWORD - PTR(31). FILLED IN WITH A POINTER TO A GETMAINED *
* WORK AREA AT INIT CALL. *
* *
* OUTPUT: *
* SELECTED LOG RECORDS WRITTEN TO DDNAME IMSLOG *
* *
* MESSAGES: *
* 001 - UNABLE TO GET STORAGE *
* 002 - UNABLE TO OPEN FILE IMSLOG *
* 003 - ERROR DURING PUT TO IMSLOG *
* 004 - INVALID CALL TYPE *
* *
* ABEND CODES: *
* NONE. *
* *
* EXTERNAL-REFERENCES = NONE *
* *
* ASSEMBLER MACROS: *
* DCB *
* DCBD *
* FREEMAIN *
* CLOSE *
* GETMAIN *
* OPEN *
* PUT *
* *
* *
* NOTES: *
* THE FOLLOWING REGISTERS ARE IN THE CODE: *
* *
* R6 = RECPTR: POINTER TO THE INPUT RECORD *
*---------------------------------------------------------------------*
REC40 DS 0H * RECORD 40 - CHECKPOINT
SR R7,R7 * CLEAR WORK REGISTER
IC R7,RECSUBT(,RECPTR) * GET RECORD SUBTYPE
C R7,TYPE03 * CNT TYPE RECORD ?
BE REC40USE * YES, GO COPY IT
C R7,TYPE04 * SMB TYPE RECORD ?
BE REC40USE * YES, GO COPY IT
C R7,TYPE01 * START CHECKPOINT RECORD ?
BE REC40USE * YES, GO COPY IT
C R7,TYPE98 * END CHECKPOINT RECORD ?
BNE RECEND * NO, IGNORE IT
REC40USE DS 0H * YES,
LR PBLDREC,RECPTR * INDICATE TO COPY RECORD
*---------------------------------------------------------------------*
* CHECK IF ANYTHING INTERESTING FOUND *
* IF SO, PUT THE RECORD *
*---------------------------------------------------------------------*
RECEND DS 0H * END PROCESS RECORDS
LTR PBLDREC,PBLDREC * ANYTHING INTERESTING FOUND ?
BZ EPILOG * NO, SKIP TO EPILOG
LA R1,DYNDCB * YES, LOAD DCB ADDRESS
USING IHADCB,R1 * LOCATE DCB
CLC RECLL(2,PBLDREC),DCBLRECL * IS DEFINED LRECL BIG ENOUGH?
BH SYNAD * NO, TREAT AS I/O ERROR
PUT (1),(PBLDREC) * YES, PUT RECORD
DROP R1 * DROP BASE REG FOR DCB
B EPILOG * SKIP TO EPILOG
*---------------------------------------------------------------------*
* SYNAD EXIT - SEND A MSG, CLOSE, AND DEACTIVATE *
*---------------------------------------------------------------------*
SYNAD WTO ’IMSE003 - ERROR DURING PUT TO IMSLOG’,ROUTCDE=11,DESC=7
L ENTIND,TERMCALL * INDICATE TO TERMINATE
B TERMCASE * SKIP TO CLOSE AND TERMINATE
*---------------------------------------------------------------------*
* END SYNAD EXIT *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* *
* TERMINATE CALL *
* *
*---------------------------------------------------------------------*
TERMCASE C ENTIND,TERMCALL * IS THIS THE TERMINATE CASE ?
BNE OTHCASE * IF NOT SKIP ON
OI DYNCLOSE,X’80’ * SET HIGH ORDER BIT IN CLOS LIST
LA R5,DYNDCB * LOCATE DCB
CLOSE ((R5)),MF=(E,DYNCLOSE) * CLOSE IT
B EPILOG * END OF TERMINATE CASE
*---------------------------------------------------------------------*
* *
* OTHER CALL, ISSUE MESSAGE AND RETURN *
* *
*---------------------------------------------------------------------*
OTHCASE DS 0H * START OF OTHER CASE
* * ERROR, SEND A MESSAGE
WTO ’IMSE004 - INVALID CALL TYPE’,ROUTCDE=11,DESC=7
B NOFREEMN * SKIP TO TERMINATE
*---------------------------------------------------------------------*
* *
* EPILOG *
* - FREEMAIN STORAGE FOR TERMINATE CALL *
* *
*---------------------------------------------------------------------*
EPILOG DS 0H
LR R1,R13 * POINT TO DYNAMIC AREA
L R13,SAVEAREA+4 * POINT TO OLD SAVE AREA
C ENTIND,TERMCALL * IS THIS TERMINATION CALL ?
BNE NOFREEMN * NO, DON’T FREE STORAGE
L R0,SIZEWORK * PICK UP LENGTH OF DYNAMIC AREA
FREEMAIN R,LV=(0),A=(1) * FREE IT
SLR R15,R15 * GET A ZERO
ST R15,0(,R11) * STORE IT INTO THE USER WORD
NOFREEMN SLR R15,R15 * CLEAR RETURN CODE
L R14,12(,R13) * RESTORE RETURN REGISTER
LM R0,R12,20(R13) * RESTORE OTHER REGS
BR R14 * RETURN TO CALLER
*---------------------------------------------------------------------*
* *
* STATIC DATA AREA *
* *
*---------------------------------------------------------------------*
DS 0F
INITCALL DC F’1’
NORMCALL DC F’2’
TERMCALL DC F’3’
SUFFLEN DC F’16’
TYPE01 DC XL4’01’
TYPE03 DC XL4’03’
TYPE04 DC XL4’04’
TYPE42 DC XL4’42’
TYPE98 DC XL4’98’
DS 0F
SIZEWORK DC AL1(0)
DC AL3(((ENDWORKA-WORKAREA+7)/8)*8)
DS 0D
PRINT NOGENLISTDCB DCB MACRF=PM,DDNAME=IMSLOG,DSORG=PS,EXLST=EXITLIST, *
SYNAD=SYNAD
LENDCB EQU *-LISTDCB * LENGTH OF DCB
EXITLIST DC XL1’85’,AL3(DCBEXIT) * DCB EXIT ADDRESS
DCBD DSORG=PS
*---------------------------------------------------------------------*
* *
* DCB EXIT *
* - FORCE RECFM = VB *
* - ENSURE LRECL AND BLOCK SIZE ARE LARGE ENOUGH *
* *
*---------------------------------------------------------------------*
IMSEXIT CSECT
DCBEXIT DS 0H
USING *,R15 * SET ADDRESSABILITY
LR DCBPTR,R1 * LOAD DCB POINTER
USING IHADCB,DCBPTR * LOCATE DCB
NI DCBRECFM,DCBRECV+DCBRECSB+DCBRECBR
* * SET NOT NEEDED FLAGS OFF
OI DCBRECFM,DCBRECV+DCBRECBR * SET RECFM=VB
CLC DCBBLKSI,IMSBLOCK * IS BLOCK SIZE
BNL BLOCKOK * GREAT ENOUGH ?
MVC DCBBLKSI,IMSBLOCK * NO, SET TO USUAL SIZE
BLOCKOK EQU * * YES, OK
CLC DCBLRECL,TESTLREC * IS LRECL
BNL LRECLOK * GREAT ENOUGH ?
MVC DCBLRECL,MAXLRECL * NO, SET TO MAX VALUE
LRECLOK EQU * * YES, OK
LH R9,DCBLRECL * LOAD LRECL
S R9,BDWLEN * SUBTRACT BDW LENGTH
CH R9,DCBBLKSI * LRECL > BLOCK SIZE - 4 ?
BNH SPANNOK * NO, SKIP ON
OI DCBRECFM,DCBRECSB * YES, FORCE SPANNED RECORDS
SPANNOK EQU * * SPANNED FLAG OK
DROP R15 * DROP BASE REG
BR R14 * RETURN TO OPEN
MAXLRECL DC H’32756’
IMSBLOCK DC H’6144’
TESTLREC DC H’6140’
BDWLEN DC F’4’
*---------------------------------------------------------------------*
* END DCB EXIT *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* *
* DYNAMIC WORK AREA *
* *
*---------------------------------------------------------------------*
WORKAREA DSECT
DS 0F
SAVEAREA DS 18F
PARMLIST DS 3FDYNDCB DCB MACRF=PM,DDNAME=IMSLOG,DSORG=PS,EXLST=EXITLIST
DYNOPEN OPEN (,),MF=L
DYNCLOSE CLOSE (,),MF=L
RECAREA DS 0D
DS 128CL256
ENDWORKA EQU *
IMSEXIT CSECT
R0 EQU 00 EQUATES FOR REGISTERS 0-15
R1 EQU 01
R2 EQU 02
R3 EQU 03
R4 EQU 04
R5 EQU 05
R6 EQU 06
R7 EQU 07
R8 EQU 08
R9 EQU 09
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
DCBPTR EQU R2
RECPTR EQU R6
ENTIND EQU R10
PBLDREC EQU R9
*---------------------------------------------------------------------*
* *
* IMS RECORD MAPPING *
* *
*---------------------------------------------------------------------*
RECORD EQU 0 * START OF RECORD
RECLL EQU RECORD * RECORD LENGTH
RECTYPE EQU RECORD+4 * RECORD TYPE
RECSUBT EQU RECORD+5 * RECORD SUBTYPE
RECPRELL EQU RECORD+16 * TOTAL RECORD PREFIX LENGTH
END IMSEXIT
Subsection:
v “IMSLOG”
IMSLOG
The following record types are selected and written to the data set connected to
the DD name IMSLOG:
Record Message
type
01 Input message.
03 Output message.
06 IMS start/stop.
07 Application accounting (MPP or BMP end).
31 Message queue get unique.
34 Message cancel.
35 Message placed on message queue.
36 Message removed from message queue.
38 Transaction reschedule.
40 Checkpoint records. Only header, trailer, SMB, and CNT block records are
written (subtypes 01, 03, 04, and 98 respectively).
42 IMS log header record.
To limit the size of the written log, the message text parts of the 01 and 03 records
are truncated to 24 bytes. However, when this truncation occurs, the total length of
all message segments is calculated and stored as a negative value in the length
field of the first message segment. SLR uses this field to calculate the number of
bytes transferred.
A program dependent on the sequence numbers of the IMS log records should not
be used to process the written log data set.
After the message is edited, the message-related record is then logged. Even
though the altered record is logged, IMS processes the original version of the
message. After a subsequent restart, IMS processes the edited version of the
message. If restart reschedules an edited message, the transaction might fail
because of the edits.
Attention: The log edit user exit can potentially damage system information, such
as the system segments in a type01 record. Use it only when no alternative exists.
Test the routine rigorously before using it in a production environment.
Subsections:
v “About this routine”
v “Restrictions” on page 406
v “Communicating with IMS” on page 406
The user exit cannot directly edit log data. Instead, it returns an offset and length
where data is to be changed and the address of a replacement. IMS overwrites the
actual record starting at the specified offset for the specified length using the data
at the address indicated for replacement data.
The user exit can specify that no alterations are to be made. Or, after specifying an
edit, it can indicate that further edits are needed in the same record.
If the offset or length that is specified extends outside the data portion of the
record, no editing occurs, and the user exit is notified on the next call. The user
exit can assess the situation, but no further editing of the record is allowed. After
the user exit returns, it is called for the next record.
This user exit is optional. No default user exit and no samples are provided. The
following table shows the attributes of the log edit user exit.
Table 141. Log Edit User Exit Attributes
Attribute Description
IMS environments DB/DC, DBCTL.
Naming convention You can name this exit routine DFSFLGE0 and link it into a library
that is included in the STEPLIB concatenation.
Alternatively, you can define one or more exit routine modules with
the EXITDEF parameter of the USER_EXITS section of the
DFSDFxxx member of the [Link] data set. The routines are
called in the order that they are listed in the parameter.
Binding You must bind the exit routine into [Link] (or a library
concatenated with it) as a separate reentrant load module. If the
module is not present in the load library, the IMS logger does not
load or call it.
The log edit user exit must be written as reentrant. The user exit receives control
running in 31-bit addressing mode and must return control in that mode. It is
called in TASK mode, with no locks held, and in non-cross memory, non-AR mode.
In an online IMS environment, the log edit user exit runs in key 7, supervisor state,
in the IMS control region address space.
The log edit user exit is called at each of the times described in the list that
follows. The type of call is determined when IMS calls the user exit.
Initialization call
IMS calls the LOGEDIT user exit when the logger is initialized. IMS makes
this call when it opens the first OLDS.
Edit record call
The log edit user exit is called immediately before the log record (OLDS or
WADS) is written.
Termination call
IMS calls the LOGEDIT user exit when the logger is terminated. IMS
makes this call after it closes the output log and notifies DBRC. If IMS
terminates abnormally, it attempts to make this call from the log task
ESTAE routine.
If IMS terminates abnormally, there might be cases when the logger cannot
make the termination call to LOGEDIT. Therefore, your user exit must be
able to tolerate not being called for termination.
Restrictions
Important: The IMS logger is critical to performance. Avoid coding the exit routine
to do things that could negatively affect performance in the IMS logger, such as
WAITs and other z/OS services that could cause long delays before returning to
your exit routine.
IMS communicates with this user exit through the entry registers, a parameter list,
and the exit registers.
On entry, the user exit must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area. Your user exit must not change the first three
words of this save area. This save area is not chained to any other IMS save
area.
14 Return address to IMS.
15 Entry point of this user exit.
This user exit uses the Version 6 standard exit parameter list. The address of the
work area passed to this user exit in SXPLAWRK will be the same each time that
this user exit is called.
If your LOGEDIT user exit can be called in an enhanced user exit environment,
additional user exit routines might be called after your routine. When your user
exit routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in
the byte that SXPLCNXT points to. This tells IMS to not call additional exit
routines.
The following table shows the content of the function-specific parameter list. The
address of this parameter list is in the standard IMS user exit parameter list field
SXPLFSPL.
Table 142. Function-specific parameter list for log edit user exit (Mapped by LGEXPL, which
is included in LCDSECT)
Field Offset Length Content
LGEXVERA X'0' X'4' Address of parameter list version number.
LGEXTYPA X'4' X'4' Address of call type field.
The remaining fields apply only to the edit record call type:
LGEXRCDA X'8' X'4' Address of log record image.
LGEXEINA X'C' X'4' Address of edit instruction area.
LGEXFBKA X'10' X'4' Address of feedback field.
As shown in the preceding table, some fields apply only to the record edit call.
v LGEXRCDA points to a copy of the log record. It does not point into a log
buffer.
v LGEXEINA points to the edit instructions area mapped by LGEXEI (included in
LCDSECT). These fields are described in the following table.
v LGEXFBKA points to the feedback field, described in Table 146 on page 408:
The user exit cannot actively edit log data. Instead, it returns an offset and length
where data is to be changed and the address of a replacement. IMS overwrites the
actual record starting at the specified offset for the specified length using the data
at the address indicated for replacement data.
The edit instruction area is cleared before each record edit call. IMS edits the
record only if LGEXEDIT is set on return to IMS. If the user exit needs to make
another change in the same record, it must also set LGEXHOLD to have the same
record presented again. The previous edit does not appear in the record image.
IMS changes only the actual record.
If the offset or length specified extends outside the data portion of the record, no
editing occurs, and the exit is called again with LGEXFDBK set to LGEXEDER. The
edit instruction area will not have been cleared, so the erroneous values are
present. The exit can assess the situation, but no further editing of the record is
allowed. After the exit returns, it is called for the next record.
Note: The data portion of the record is defined as everything between the record
type field and the clock value and sequence number at the end of the record. The
logger is unaware of the significance of any part of this area. Consequently,
damage to the system segments in a type01 record would go undetected and cause
unpredictable results when encountered during restart. Use caution to edit only the
message data.
Before returning to IMS, the user exit must restore all registers except for register
15, which must contain the following:
Register Contents
15 0
Related reference:
Defining DASD logging initialization parameters (System Definition)
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
IMS supplies a default filter exit routine, which eliminates database records for:
v Databases not defined as covered
v Diagnostic data
v Block padding data
Subsections:
v “About this routine”
v “Communicating with IMS” on page 411
v “Recovery environment” on page 412
v “Initialization and termination calls” on page 412
v “IMS-supplied filter exit routine” on page 413
You can replace the IMS default filter exit routine with one of your own. Your
replacement exit routine must return valid IMS log records, valid log record
lengths, and valid IMS log record sequence numbers. The exit routine can only
filter a particular log record by replacing it with a X'4304' log record containing the
same log sequence number as the record being filtered.
The performance of your exit routine can affect the logging of both RSR and the
active IMS subsystem.
The Log Filter exit routine is called in the following three cases:
v IMS and ILS Initialization
The Log Filter exit routine is called during IMS initialization and during isolated
log sender (ILS) instance initialization. You can use the log filter exit to perform
setup or initialization work during IMS and ILS initialization.
The initialization call can return a token, which is passed to the filtering exit
routine on each subsequent call. The second word of the parameter list, on
return, contains a 0 or the address of the token.
v Log Buffer Send
The Log Filter exit routine is called each time a log buffer is to be sent to the
tracking site and filters which log buffers are sent.
v IMS and ILS Termination
The Log Filter exit routine is called during IMS termination and during isolated
log sender (ILS) instance termination. You can use the log filter exit to perform
cleanup or termination work during IMS and ILS termination.
The Log Filter exit routine must take into account the fact that it is possible to
have multiple instances of the isolated log sender in one address space.
The mapping definition for the X'4304' log record is contained in the source code
of the IMS DFSLOG43 macro.
You must write this exit routine so that it is reentrant. It must be compiled with
AMODE=31 and RMODE=ANY. It runs in supervisor state in user protect key 7.
Its primary address space can be either CTL, DBCTL, DCCTL, batch, or isolated
log sender.
The following table shows the attributes of the Log Filter exit routine.
Table 147. Log filter exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, batch.
Naming convention Must be named DFSFTFX0.
Binding
You must bind the exit routine into [Link] (or a library
concatenated with it) as a separate reentrant load module. If the
module is not present in the load library, the IMS logger does not
load or call it.
This JCL shows you how to bind the exit routine into
[Link].
//LINKIT JOB 1,MSGLEVEL=1
//LINK EXEC PGM=IEWL,PARM=RENT
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(20,20))
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link].,DISP=SHR
//OBJIN DD DSN=[Link].,DISP=SHR
//SYSLIN DD *
INCLUDE OBJIN(DFSFTFX0)
MODE AMODE(31),RMODE(ANY)
NAME DFSFTFX0(R)
/*
Including the routine No special steps required.
IMS callable services IMS callable services are not applicable for use with this exit
routine.
Sample routine [Link].
location
The routine can be given process mode of SRB or TCB for log buffer send. Because
an enabled unlock task (EUT) functional recovery routine (FRR) exists, no SVCs
can be issued by the routine, nor can it hold any locks.
The input parameters are available until the exit routine returns to its caller; at that
time, the storage is freed. The result is that the exit routine must copy any data
you want to be preserved.
The log filter exit must ensure that filtered data has a format appropriate for the
level of IMS that generated the data. X'4304' log records, for instance, must match
the X'4304' log record DSECT for that level of IMS.
Use the RELEASE parameter of the ILOGREC macro to generate DSECTs for log
records of different levels of IMS.
IMS communicates with this exit through the entry and exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of a standard parameter list (a series of words containing the
parameters' addresses)
13 z/OS standard save area address (not an IMS pre-chained save area)
14 Return address (set with the assembly BALR instruction)
15 Filter exit routine entry address
Before returning to IMS, the exit routine must restore all registers except for
registers 0, 1, and 15.
Also before returning to IMS, be sure to set the token in the parameter list (on the
initialization call) if you want to use a token, and be sure the data and data length
have been set (on the send call).
Recovery environment
For initialization and termination calls, an ESTAE is established for the recovery
environment; for log buffer send calls, a functional recovery routine (FRR) is
established for the recovery environment. If the FRR exit routine is driven, it will
SDUMP. If retry is allowed, it turns off filtering for the duration of the IMS
instance. (This exit routine is not reloaded as a result of a /START SERVGRP or /STOP
SERVGRP command.) If an error is detected in the filtered record, filtering is turned
off for the duration of the IMS instance. If retry is not allowed, the component
abends.
IMS calls the Log Filter exit routine during IMS initialization and normal
termination and for ILS instance initialization and termination. You can thereby
prepare for log filtering or clean up after termination. If you do not return a token
on the initialization call, IMS sets the token to zero for all subsequent filter exit
routine calls.
The attributes of the routine for initialization and termination is the same as for log
buffer send, except that the routine can only be given a process mode of TCB, thus
allowing SVC calls.
The recovery environment for initialization and termination calls is different than
for log buffer send calls. An ESTAE environment is created to cover the
initialization and termination call. If the ESTAE is driven and retry is allowed, it
turns off log filtering for the duration of the IMS instance and issues an error
message. If retry is not allowed, the component abends (under certain
circumstances, such as CANCEL, z/OS does not allow a retry).
This exit routine includes a summary of which log records can be filtered by the
Log Filter exit routine. It also summarizes which log records can be filtered if you
do not need to restart transaction manager at the tracking site.
The filter exit module supplied with IMS is table driven, with the tables already set
up to filter some log records. These records are replaced with a X'4304' dummy log
record. The log filter exit module contains complete information about which log
records can be eliminated or changed. The name of this module is DFSFTFX0. Use
the prolog and tables in the exit routine as a reference.
The module also indicates how to eliminate data communication log records. This
causes filtering of message queue records, scratchpad areas, Fast Path output
messages, DC sequence number records, and DC-related checkpoint records. Using
this option reduces log volume but requires a COLDCOMM emergency restart at
the tracking site after remote takeover to restart transaction manager.
Attention: You should be very careful when writing the replacement for the Log
Filter exit routine, because incorrect filtering of the log data can make the tracking
SLDS data invalid or unusable. You also need to consider that multiple copies of
the exit routine can run for concurrent IMS jobs and ILS instances.
Related reference:
“Routine binding restrictions” on page 8
Subsections:
v “About this routine”
v “Calling the routine” on page 415
v “Restrictions” on page 416
v “Communicating with IMS” on page 416
IMS calls the LOGWRT user exit with an initialization call when the logger is
opened and with a termination call when the logger is closed. At these times, your
exit routine can get or free any additional storage that it needs to run. IMS also
calls the exit routine and passes log data to it with a write call whenever a block of
data is written to the logger.
The following table shows the attributes of the LOGWRT user exit.
Attention: The IMS logger is critical to performance. Avoid coding the user exit
to do something that could negatively affect performance in the IMS logger, such
as WAIT and other z/OS services that could cause long delays before returning to
your user exit.
Alternatively, you can define one or more exit routine modules with
the EXITDEF parameter of the USER_EXITS section of the
DFSDFxxx member of the [Link] data set. The routines are
called in the order that they are listed in the parameter.
Binding
You must bind the exit routine into [Link] (or a library
concatenated with it) as a separate reentrant load module. If the
module is not present in the load library, the IMS logger does not
load or call it.
The LOGWRT user exit must be written as reentrant. The exit routine receives
control running in 31-bit addressing mode and must return control in that mode. It
is called in TASK mode, with no locks held, and in non-cross memory, non-AR
mode. In an online IMS environment, the LOGWRT user exit runs in key 7,
supervisor state, in the IMS control region address space. In batch and log recovery
environments, it runs in key 8, problem state.
This information on various IMS environments is for the current release of IMS
and might change in subsequent releases.
The LOGWRT user exit is given control for each of the following three calls. The
call type is determined by when IMS calls the routine.
Initialization call
IMS calls the LOGWRT user exit when the logger is initialized. IMS makes this call
when it opens the first output log.
IMS calls the LOGWRT user exit after a block of data is successfully written to the
online log data set (OLDS) or the system log data set (SLDS). The OLDS is
accessed in a DB/DC, DBCTL, or a DCCTL environment and in the SLDS in a
batch environment.
A pointer to the data that was written is passed to the exit routine. (The blocks of
data might not be presented in sequence.) All processing of the data must be
completed before returning to IMS, because the data address is not valid after
leaving the LOGWRT user exit.
Under some abend or error conditions, one or more blocks might be written to the
log and not passed to the exit routine, or IMS might pass the same blocks to the
LOGWRT user exit several times. Your exit routine must be able to tolerate both of
these situations.
Termination call
IMS calls the LOGWRT user exit when the logger is terminated. IMS makes this
call after it closes the output log and notifies DBRC.
If IMS terminates abnormally, there might be cases when the logger is unable to
make the termination call to the LOGWRT user exit. Therefore, your exit routine
must be able to tolerate not being called for termination.
Restrictions
IMS communicates with this routine through the entry registers, a parameter list,
and the exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Content
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area. Your exit routine must not change the first three
words of this save area. This save area is not chained to any other IMS save
area.
14 Return address to IMS.
15 Entry point of this exit routine.
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area passed to this exit routine in SXPLAWRK will be the same each time
that this exit routine is called.
However, the following fields are not passed to the exit when it is called from the
Log Recovery utility because the data is not available:
v SXPLASCD
v SXPLRSEN
v SXPLCNXT
v SXPLFLGA
The address of the function-specific parameter list is in the standard exit parameter
list field SXPLFSPL. The content of the function-specific parameter list depends on
whether this exit routine is called by a call type 1, 2, or 3. The following tables
outline the contents of the parameter list for each of these calls.
Table 149. Function-specific parameter list for initialization call, call type 1 (mapped by LGWXPLST, which is included
in LCDSECT)
Field Offset Length Content
LGWXTYPE X'0' 1 Call type: 1
LGWXENVR X'1' 1 Environment type:
X'01'= DB/DC online system
X'02'= Batch IMS system (includes CICS/DLI)
X'03'= Log Recovery utility
X'04'= DBCTL system
X'05'= DCCTL system
LGWXFLG1 X'2' 1 Flag byte:
X'20'
0 Not an /ERE log recovery
1 An /ERE log recovery
X'10'
0 Not an XRF takeover
1 An XRF takeover
X'08'
0 The LGWXTODN field does not exist
1 The LGWXTODN field does exist
X'04'
0 The LGWXVRSN field does not exist
1 The LGWXVRSN field does exist
The following table shows the parameter list for call type 2.
Table 150. Function-specific parameter list for OLDS/SLDS write call, call type 2 (mapped by LGWXPLST, which is
included in LCDSECT
Field Offset Length Content
LGWXTYPE X'0' 1 Call type: 2
LGWXENVR X'1' 1 Environment type:
X'01'= DB/DC online system
X'02'= Batch IMS system (includes CICS/DLI)
X'03'= Log Recovery utility
X'04'= DBCTL system
X'05'= DCCTL system
LGWXFLG1 X'2' 1 Flag byte:
X'20'
0 Not an /ERE log recovery
1 An /ERE log recovery
X'10'
0 Not an XRF takeover
1 An XRF takeover
X'08'
0 The LGWXTODN field does not exist
1 The LGWXTODN field does exist
X'04'
0 The LGWXVRSN field does not exist
1 The LGWXVRSN field does exist
X'3' 1 Reserved
LGWXTOD X'4' 8 This field has been left here for compatibility with previous
versions. The old time stamp format value is in the
00YYDDDF HHMMSSTF format.
LGWXSSID X'C' 8 IMS subsystem ID.
LGWXBUFR X'14' 4 Address of IMS log block data that has been successfully
written to the OLDS/SLDS. (This might be a copy of the
original IMS buffer.)
The following table shows the parameter list for call type 3.
Table 151. Function-specific parameter list for termination call, call type 3 (mapped by
LGWXPLST, which is included in LCDSECT)
Field Offset Length Content
LGWXTYPE X'0' 1 Call type: 3
LGWXENVR X'1' 1 Environment type:
X'01'= DB/DC online system
X'02'= Batch IMS system (includes CICS/DLI)
X'03'= Log Recovery utility
X'04'= DBCTL system
X'05'= DCCTL system
LGWXFLG1 X'2' 1 Flag byte:
X'80'
0 Normal termination
1 Abnormal termination
X'40'
0 Buffer purge succeeded
1 Buffer purge failed (abend)
X'20'
0 Not an /ERE log recovery
1 An /ERE log recovery
X'08'
0 The LGWXTODN field does
not exist
1 The LGWXTODN field does
exist
X'04'
0 The LGWXVRSN field does
not exist
1 The LGWXVRSN field does
exist
For calls made during normal IMS operation, the time in the field at offset X'10'
contains the start time of the current IMS system. For calls made during emergency
restart log recovery, this field contains the start time of the previous IMS system,
the one whose log is being recovered.
If log recovery is required during emergency restart processing, the LOGWRT user
exit is called for two sets of initialization/write/termination call sequences. The
first set of calls occurs during log recovery and sets a flag indicating that log
recovery is processing. Only the data from the buffers (recovered from the WADS
and written to the OLDS to close it) is passed. The second set of calls occurs for
normal IMS processing.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which must contain the following:
Register Contents
15 0
Related reference:
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 421
The Partner Product exit routine is entered immediately before IMS is ready for
startup (before the DFS994I start complete message is issued). The exit routine is
deleted after control returns to IMS.
Be aware that the interface to this exit routine might change in future releases of
IMS.
The exit routine must reside on the library pointed to by the STEPLIB DD
statement. If the exit routine exists, it is called.
The following table shows the attributes of the Partner Product exit routine.
Table 152. Partner product exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL.
Alternatively, you can define one or more exit routine modules with
the EXITDEF parameter of the USER_EXITS section of the
DFSDFxxx member of the [Link] data set. The routines are
called in the order that they are listed in the parameter.
Including the routine The module or modules must be included in an authorized library
in the JOBLIB, STEPLIB, or LINKLIST concatenation. No additional
steps are necessary to use a single exit routine that is named
DFSPPUE0. If you use multiple exit routines, specify
EXITDEF=(TYPE= PPUE,EXIT=(exit_names)) in the EXITDEF
parameter of the USER_EXITS section of the DFSDFxxx member of
the [Link] data set.
IMS callable services This exit routine can use IMS Callable Storage Services. This exit
routine is defined to IMS as an IMS standard user exit. Exit routines
that are defined to IMS receive the callable services token in the
standard exit parameter list. This exit routine does not need to issue
an initialization call (DFSCSII0) to use IMS callable services. You
must manually bind this exit routine with DFSCSI00.
Sample routine A sample exit named DFSPPEX0 is provided in the [Link]
location data set.
IMS uses the entry registers, a parameter list, and the exit registers to communicate
with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area. Your exit routine must not change the first three
words of this save area. This save area is not chained to any other IMS save
area.
14 Return address to IMS.
15 Entry point of this exit routine.
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area passed to this exit routine in SXPLAWRK will be the same each time
that this exit routine is called.
The following table shows the content of the function-specific parameter list. The
address of this parameter list is in the standard IMS user exit parameter list field
SXPLFSPL.
Table 153. Function-specific parameter list for partner product exit (mapped by DFSPPUE)
Field Offset Length Content
PPUEIMSD 0 4 IMS identifier
PPUEREL 4 1 IMS level
PPUETYP 5 1 IMS subsystem type
PPUEOSL 6 1 z/OS level
Reserved 7 1
Before returning to IMS, the exit routine must restore all registers except register
15, which must contain one of the following return codes:
If multiple DFSPPUE0 exit routines are called, the highest return code is
returned to the calling program.
Related reference:
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 423
The Restart exit is passed a function code and a code that indicates the type of
restart that is being done. The exit routines are defined to IMS using the EXITDEF
parameter in the USER_EXITS section of the DFSDFxxx member; there is no
default exit name. Multiple routines can be defined. The routines are called in the
order that they are listed in the EXITDEF parameter.
The exit is called at the beginning of restart with a function code of x'01'. It is
called after IMS has determined what type of restart is being performed and before
the log is read.
This exit is called at the end of restart with a function code of X'02'. It is called
immediately before the restart complete message is issued.
IMS uses the entry registers, a parameter list, and the exit registers to communicate
with the exit routine.
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area. Your exit routine must not change the first three
words of this save area. This save area is not chained to any other IMS save
area.
14 Return address to IMS.
15 Entry point of this exit routine.
This exit routine uses the Version 6 standard exit parameter list.
The following table shows the content of the function-specific parameter list. The
address of this parameter list is in the standard IMS user exit parameter list field
SXPLFSPL.
Table 155. Function-specific parameter list for partner product exit (mapped by DFSPPUE)
Field Offset Length Content
RSTX_PVER 0 4 Parameter List Version (X'00000001')
RSTX_FUNC 4 4 Function Code
1 Restart Begin
2 Restart End
RSTX_TYPE 8 4 IMS restart type
1 Cold start
2 Warm start
3 Emergency restart
4 Cold comm
5 Cold base
6 Cold sys
12 4 Reserved
There is no requirement for exit registers and there are no defined return and
reason codes.
Related reference:
“Exit routine naming conventions” on page 3
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
DBRC gives control to the RECON I/O exit routine (DSPCEXT0) during I/O
operations to the RECON.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 427
You can code DSPCEXT0 so that it updates the journal each time a record of the
data set is updated, inserted, deleted, or read. You can also record changes that are
internal to the RECON access modules, such as header record extension control
item changes, or the addition and deletion of multiple update control records
within the data set.
You can use DSPCEXT0 when RECON access is either serial or parallel.
The following table shows the attributes of the RECON I/O exit routine.
Table 156. RECON I/O exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, and DCCTL
Naming convention You must name this exit routine DSPCEXT0.
Binding You must write and bind this routine as reentrant (RENT).
After assembling the source code, you need to bind the object code
for this module into the IMS load module DSPCINT0.
Including the routine No special steps are needed to include this routine.
IMS callable services This exit is not eligible to use IMS callable services.
Sample routine The [Link] data set contains member name DSPCEXT1,
location which you can modify to provide support for both BPE and
non-BPE based DBRC environments. DSPCEXT1 must be linked as
DSPCEXT0.
You must write and bind DSPCEXT0 as reentrant. It is entered from DBRC in
31-bit addressing mode and must return to DBRC in 31-bit addressing mode. All
parameters and data areas supplied to DSPCEXT0 by DBRC are located above the
16 MB line. In addition, load module DSPCINT0, in which DSPCEXT0 is located,
resides above the line. Note that due to the residency of DSPCINT0, unless you
specify otherwise, GETMAIN will acquire storage above the 16 MB line when
issued for DSPCEXT0.
Control is passed to the RECON I/O exit routine whenever a RECON record has
been successfully read, written, or modified on COPY 1 of the RECON data set,
not necessarily for every physical I/O operation. Changes to the header record
extension also cause the RECON I/O exit routine to be called.
When RECON access is parallel, the RECON data set can be accessed by multiple
DBRC instances concurrently. In this case, multiple instances of the RECON I/O
exit routine can be invoked concurrently.
With serial access, the user can rely on all updates written to the RECON data set.
If an error occurs, and the update is backed out by DBRC, the exit is called for all
the updates made during backout. If the exit is used to mirror updates, the exit can
immediately make the equivalent updates to a mirror data set.
With parallel access, the backout of data is not done by DBRC, which means that
the exit is not called for the backout updates. Updates made during a given series
should not be considered hardened in the RECON data set until a commit call is
made. If the exit is used to mirror updates, it must either be capable of backing out
the updates it mirrors, or it must collect all updates for a given series and only
mirror them if the exit is called with a commit call.
record, respectively. For each update call, the routine receives a copy of the record
as it appeared both before and after it was updated. For delete and update calls,
the copy of the record read must be incomplete if DBRC is unable to locate all
segments for that record. In this case, byte 2 of word 17 in the I/O exit parameter
list is set to X'40'.
The records passed to the exit routine are in the format of the release level of the
RECON data set, and rather than the release level of the DBRC that calls the exit.
In order for the DBRCs of multiple IMS systems at different release levels to
coexist, the RECON data set must be at the level of the highest level system. An
indication of the RECON data set release level exists in the parameter list that is
passed to the exit. When the RECON is upgraded to a new release, the exit routine
can use both the old release format and the new release format. During the
upgrade process, the release level in the parameter list shows the old release level.
A flag in the parameter list indicates that an upgrade is in progress.
The release level of the RECON can change from one Begin Series call to another.
Except during the upgrade process, the release level does not change between the
Begin Series call and the Terminate Series call.
Any modifications to storage that this routine makes must be made to storage that
is obtained by the routine, not to the data areas pointed to by DBRC or IMS or to
those contained within the routine itself.
Each series of I/O accesses that DBRC makes to the RECON data set is indicated
to the routine by a Begin Series call. When the series of I/O operations is complete,
the routine receives a Terminate Series call.
Performance recommendations
While this routine is running, the RECON data set is reserved so that no other jobs
can access RECON records. To minimize the affect that this routine's execution has
on your system's performance, you need to:
v Limit the I/O operations that the routine itself performs and simplify the
routine's functions to make efficient use of processing time.
v Be sure that any resources needed solely by the routine (that is, those not
needed by DBRC/IMS in general) are immediately available to z/OS when
DBRC is initialized and in control. You should therefore avoid operations that
can put the routine, and therefore DBRC, in a prolonged wait state (for example,
the ENQUEUE/DEQUEUE of resources that cannot be readily accessed by the
routine or write to operator messages that require waiting for a reply).
v Be aware that with parallel RECON access, the RECON data set is not reserved.
In addition, multiple instances of the RECON I/O exit routine can be invoked
concurrently.
DBRC enables the size of a record in the RECON data set to not be limited by the
defined RecordSize. DBRC divides its own records into segments, each of which
fits into a single Control Interval (CI) and is sent by VSAM as a complete record.
Segmenting allows a logical RECON record to be as large as 16 777 215 bytes. The
RECON I/O exit routine will be presented with complete, unsegmented logical
records.
To minimize the performance impact that the routine's execution has on DBRC, the
routine spools its copy of RECON data records to a data set (specified by a DD
statement with the name DBRCDATA) for later offline processing outside the
DBRC environment. Any data sets that your routine references need to be accessed
by DD statements as well.
IMS uses the entry and exit registers to communicate with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of a standard z/OS parameter list. This list consists of a fullword
with the high-order bit ON, indicating the last entry in the list. The
remaining bits comprise the address of a data area containing the RECON
I/O parameter list (DSPRIOX).
13 Address of save area. The exit routine must not change the first three words.
14 Return address to the calling RECON access routine.
15 Entry point of exit routine.
Description of parameters
This routine receives the parameter list from the calling RECON access module at
the first Begin Series call for a job. The parameter list points to the same data area
for all subsequent calls for that job.
The data area pointed to by the parameter list is 24 words (96 bytes) long and
starts on a fullword boundary. Words 9 through 16 of the list are free to be used by
the exit routine and remain unchanged by DBRC after the first Begin Series call.
They initially contain all zeros.
The first byte of word 17 of the list indicates the release level of the RECON in
hexadecimal format. The following table lists RECON release levels by IMS
version:
Byte 2 of word 17 contains flags. Bytes 3 and 4 of Word 17, and Words 22 through
24 are reserved for future use.
The following tables list the exit parameter list at various exit points in the routine.
Table 157. Begin Series parameter list
Field Name Offset Length Field Description
Usage
RIOX_EYEC X'00' X'04' Input Eye catcher “CEXT”
Before returning to DBRC, the exit routine must restore all registers except register
15, which must contain one of the following return codes.
The following table reflects the register contents for non-BPE based DBRC exit
routines.
Related concepts:
Initializing and maintaining the RECON data sets (System Administration)
Related reference:
Chapter 7, “BPE-based DBRC user exit routines,” on page 539
“Routine binding restrictions” on page 8
“RECON I/O exit routine” on page 544
While this routine is running, the RECON data set is reserved so that no other jobs
can access RECON records. To minimize the affect that this routine's execution has
on system performance:
1. Limit the I/O operations that the routine completes and simplify the functions
of the routine to use processing time efficiently.
2. Ensure that any resources that are needed solely by the routine (needed by
DBRC or IMS) are immediately available to z/OS when DBRC is initialized and
in control. Avoid operations that can put the routine, and therefore DBRC, in a
prolonged wait state (for example, the enqueue or dequeue of resources that
cannot be readily accessed by the routine, or write to operator messages that
require waiting for a reply).
3. Be aware that with parallel RECON access, the RECON data set is not reserved.
In addition, multiple instances of the DSPCEXT0 routine can be invoked
concurrently.
DBRC divides its own records into segments, each of which fits into a single
Control Interval (CI) and is sent by VSAM as a complete record. Segmenting
allows a logical RECON record to be as large as 16 777 215 bytes. The DSPCEXT0
exit routine will be presented with complete, unsegmented logical records.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 436
This user exit is called during the initialization of an IMS dependent region or
CCTL/AER initialization or connection to allow the user to instruct IMS to
perform one of the functions described in the return codes section. For example,
this user exit can terminate a connection with a code 437 user abend.
This user exit is called to perform pre-authorization processing and can instruct
IMS to skip PSB or transaction authorization processing for any thread instance.
The pre-authorization process is performed only if the exit returns with return
code 4 or 24 from initialization processing, and ISIS=R or ISIS=A is specified or if
ODBASE=Y is specified for an AER thread.
If ISIS=A or ISIS=C is specified, the RASE user exit is required at IMS initialization.
If the exit is not available during IMS initialization, IMS terminates with a U0107
abend, subcode x'04'. The RASE user exit is optional if ISIS=R or if ODBASE=Y
and ISIS=N.
The RASE user exit can be added or deleted using the REFRESH USEREXIT
command. If you delete the RASE user exit with the REFRESH USEREXIT
command, DFS4585W message is issued. The ISIS and ODBASE values are
included in the message text.
Specify the requirement to call the SAF interface and user exit using the ISIS
parameter at system initialization.
The following table shows the attributes for the Resource Access Security user exit.
Table 165. Resource Access Security user exit attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL
Alternatively, you can define one or more exit routine modules with the EXITDEF
parameter of the USER_EXITS section of the DFSDFxxx member of the [Link]
data set. The routines are called in the order that they are listed in the parameter.
Binding You must write the exit routine as reentrant.
Including the routine The module or modules must be included in an authorized library in the JOBLIB,
STEPLIB, or LINKLIST concatenation. No additional steps are necessary to use a single
exit routine that is named DFSRAS00. If you use multiple exit routines, specify
EXITDEF=(TYPE=RASE,EXIT=(exit_names)) in the EXITDEF parameter of the
USER_EXITS section of the DFSDFxxx member of the [Link] data set.
IMS callable services This routine is not eligible for IMS callable services.
Sample routine location [Link]
IMS uses the entry and exit registers, as well as parameter lists, to communicate
with the user exit.
On entry, the user exit must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area.
14 Return address of IMS.
15 Entry point address of user exit.
This user exit uses the Version 6 standard exit parameter list. The address of the
work area passed to this user exit in SXPLAWRK can be different each time that
this user exit is called.
If your RASE user exit can be called in an enhanced user exit environment,
additional user exit routines can be called after your routine. When your user exit
routine finds a transaction upon which to act, it can set SXPL_CALLNXTN in the
byte that SXPLCNXT points to. This tells IMS to not call additional exit routines.
The following table shows the function-specific parameter list that is mapped by
DFSRASL.
Notes:
1. When the RASE user exit is used to authorize two resources, the exit routine is
called twice: once for each resource. On the first call, one resource field
(RASLTRAN, RASLPSB, or RASLLTRM) contains the resource name and the
other resource field contains binary zeros. If the first call is successful, on the
second call, the resource field that contained zeros in the first call contains the
resource name and the other resource field that contained the resource name
contains binary zeros.
For example, to authorize a PSB and output LTERM, the first call is made with
the RASLPSB containing the PSB name and RASLLTRM containing binary
zeros. On the second call, RASLPSB contains zeros and RASLLTRM contains
the LTERM name.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which contains one of the following return codes:
For function codes X'07', X'08', and X'09' in the RASLFUNC field, this
return code instructs IMS to issue a DFS2854A message and terminate the
dependent region or CCTL/AER thread with ABENDU0437.
12 IMS must skip the subsequent PSB or transaction authorization
processing for this instance of this thread. IMS honors this return code
instruction only when the function code in the RASLFUNC field is X'0A'.
16 IMS must skip all subsequent PSB or transaction authorization processing
for all instances of this thread. IMS honors this return code instruction
only when the function code in the RASLFUNC field is X'07', X'08', or
X'09'.
20 IMS must skip the subsequent user authorization processing of the IMS
APPL ID during dependent region initialization or CCTL/AER thread
connection. IMS honors this return code instruction only when the
function code in the RASLFUNC field is X'07', X'08', or X'09'.
If this return code is specified, IMS will skip the SAF FASTAUTH call
that is normally performed for PSB or transaction authorization when
ISIS=A or R is specified for the IMS system.
24 IMS must perform authorization processing as indicated in both return
code 4 and return code 20. IMS honors this return code instruction only
when the function code in the RASLFUNC field is X'07', X'08', or X'09'.
Related reference:
“Routine binding restrictions” on page 8
“IMS standard user exit parameter list” on page 4
Subsections:
v “About this routine”
v “Communicating with IMS” on page 441
Control passes to DFSPRE60 after each stage 1 input record is read from SYSIN,
and also after each record (if any) is read from SYSLIB, but before any such records
are scanned by the preprocessor. Stage 1 data is presented to DFSPRE60 exactly as
read by the preprocessor. Data can be altered, inserted, or deleted during this exit
routine phase. However, the alterations, insertions, or deletions are not passed to
Stage 1.
Related Reading: For a description of the system definition preprocessor, see IMS
Version 14 System Definition.
You can also use this exit routine for construction of tables or for verification as
required by installation practices. For example, if you want to check if transaction
codes (which are also IMS command keywords) are accidentally defined, this
routine can insert TRANSACT macros for each IMS command keyword. The
results of changes appear in the listing produced by the preprocessor, unless the
exit routine returns a return code of 4. However, no update of the original input is
performed.
If this exit routine is used, you must specify Y as the first positional parameter in
the parameter field of the EXEC card. The routine module must be named
440 Exit Routines
IBM Confidential
The following table shows the attributes of the System Definition Preprocessor
(Input Phase) exit routine.
Table 167. System definition preprocessor exit routine (input phase) attributes
Attribute Description
IMS environments DB/DC, DCCTL, and DBCTL (with modifications).
Naming convention You must name this exit routine DFSPRE60.
Binding You must bind this routine with RMODE=24; otherwise, an abend
can occur.
Including the routine No special steps are required to include this routine.
IMS callable services IMS callable services are not applicable for use with this exit
routine.
Sample routine [Link] (member name DFSPRE60).
location
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list.
10 Address of vector table.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Description of parameters
The parameters are listed in parameter list format and vector table format.
Before returning to IMS, the exit routine must restore all registers except for
register 15, which must contain one of the following return codes:
Related reference:
“Routine binding restrictions” on page 8
The input statements are scanned for a comment card indicating that TRANSACT
macros are to be read from a user file, and passed to the preprocessor in the input
buffer area whose address is passed on entry. While the user file is read, the exit
routine returns a code of X'08', indicating that the preprocessor is to continue
calling the exit routine, instead of reading input records from the SYSIN file.
When the end of file is reached on the user file, the exit routine returns a code of
X'0C', indicating that the exit routine is not to be invoked again. The statements
passed to the preprocessor are handled identically to the statements on the SYSIN
file. However, these statements are not written out to the SYSIN file for later
processing by Stage 1.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 443
To track the changes between IMS system definitions, you can access all tables
constructed by the preprocessor, and write them on files for input to a user
program.
If this exit routine is used, you must specify Y as the second positional parameter
in the parameter field on the EXEC card. The exit module, which must be named
DFSPRE70, must reside on the library pointed to by the STEPLIB DD statement. If
concatenated, the libraries are searched according to z/OS rules. The processing in
this exit routine does not affect the previous preprocessor results or error messages.
The following table shows the attributes of the System Definition Preprocessor exit
routine (name check complete).
Table 168. System definition preprocessor exit routine (name check complete) attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention You must name this exit routine DFSPRE70.
Including the routine No special steps are required to include this routine.
IMS callable services IMS callable services are not applicable for use with this exit
routine.
Sample routine [Link] (member name DFSPRE70).
location
In the sample routine, the source name tables are written out for
later processing by user programs. The end of each exit routine is
indicated by the insertion of high values (X'FF').
IMS communicates with the System Definition Preprocessor exit routine through
the entry and exit registers.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of parameter list.
10 Address of vector table.
13 Address of save area. The exit routine must not change the first three words.
14 Return address to IMS.
15 Entry point of exit routine.
Description of parameters
These are the addresses and sizes of tables of resource names. The contents of the
count field (fullword) determine the usefulness of the table field. If the count field
is zero, the contents of the table field are not guaranteed and should be ignored. If
the count field is nonzero, the table field contains the address of the table of
resource names.
Table 169. Parameter list
Resource address Contents
A(Table1) DBD names
Before returning to IMS, the exit routine must restore all registers. Register 15 can
contain a return code, but the preprocessor ignores it.
Related reference:
“Routine binding restrictions” on page 8
You can write two types of Automated Operator (AO) exit routines. The AO exit
routine that is described in this topic is called a type 1 AO exit routine. It can be
used in the DB/DC and DCCTL environments.
The other AO exit routine (DFSAOE00) is called a type 2 AO exit routine and can be
used in the DB/DC, DCCTL, and DBCTL environments.
Subsections:
v “About this routine”
v “Restrictions” on page 453
v “Communicating with IMS” on page 453
You can write the exit routine to handle both single and multisegment messages,
and to perform the following functions:
v Ignore selected segments or an entire message.
v Send a copy of a system message, command, or command response to an
alternate destination.
v Send a new message to an alternate destination for a system message, command,
or command response.
v Change a system message.
v Change a system message and send a copy to an alternate destination.
v Change a copy of a command or command response and send the copy to an
alternate destination.
v Delete a system message.
v Delete a system message and send a copy to an alternate destination.
v Request the edited command buffer (when the input is a command).
The following figure shows how an AO exit routine intercepts a command that is
entered from a master terminal.
1. The command is entered.
2. The command controller passes a copy of the command to the exit routine
before it runs the command. The exit routine can send a copy of the command
to any destination (LTERM or transaction).
3. The exit routine returns to the command controller, where the command is run.
4. When the response to the command is returned to the command controller, a
message is generated for the master terminal.
5. Before the message is sent, the exit routine receives control and can route a
copy of the message to any destination (LTERM or transaction).
6. The message is then sent to the master terminal.
The following figure shows how an exit routine processes a system message that is
destined for the master terminal. When a system message is generated, the exit
routine receives a copy of the message before the message is sent to the master
terminal. The exit routine can route a copy of the message to any destination. It
can alter or delete any segment of the message.
The following sections contain information about which messages are passed to the
exit routine. IMS passes a copy of commands and command responses, and system
messages destined for the master terminal.
A message that is passed to the exit routine can contain multiple segments.
System messages
While IMS passes a system message destined for the master terminal, it can also
send a copy of this message to the secondary master terminal or the z/OS system
console. IMS sends this copy before it passes the original message to the master
terminal. The exit routine can change only the original message that is destined for
the master terminal. The copy that the secondary master terminal or z/OS system
console receives does not reflect any changes the exit routine makes to the original
message.
Most system messages are single-segment messages. Some system messages are
multisegment messages (such as DFS802, DFS970, DFS2503, and DFS3222).
Commands
IMS passes the exit routine a copy of each IMS command that is entered except:
v Internally generated commands.
v Commands that are issued by a CMD or ICMD call from an AO application.
v /FORMAT
v /LOOPTEST
v /MSVERIFY
v /RELEASE
v /NRESTART
v /ERESTART
IMS passes the command after the message editing routines have been called to
modify it. This modified input can contain carriage control characters.
Command responses
IMS passes a copy of command responses to the exit routine. A command response
is a copy of the original response that IMS sent to the terminal that entered the
command. Any asynchronous system message that IMS produces as a result of a
command is not considered a command response, and is passed to the exit routine
only if its destination is the master terminal (as is the case with all system
messages that IMS passes to the exit routine). The exit routine can request that the
edited command buffer be made available on the last entry by setting a flag in the
UEHB (user exit header block).
The command editor translates certain control characters in any commands you
enter from a terminal. You must accommodate this translation when you write
your exit routine.
IMS does not pass all system messages, operator-entered commands, and
command responses to this exit routine. The following are messages that IMS does
not pass to the exit routine:
v Messages resulting from a /BROADCAST command, other than the command and
the initial response
v Messages that are associated with the /FORMAT, /LOOPTEST, /MSVERIFY, and
/RELEASE commands and their responses
v Copies of system messages that are destined for the secondary master terminal
or the z/OS system console
v Copies of message switches, messages that are inserted by application programs,
or messages that result from the /BROADCAST command
v All system messages, commands, and command responses if message queues are
unavailable, which is possible when initializing, restarting, or shutting down
IMS
The exit routine cannot determine from the first segment of a message whether it
is a multisegment message or not. You can determine which messages are
single-segment messages, and write the exit routine so that IMS only calls it once.
This practices helps your system avoid additional processing that is incurred when
the exit routine is written to always test for subsequent segments. To handle those
messages that are multisegment messages or for which you cannot predetermine
the number of segments, you can write the exit routine to request all remaining
segments.
If you write the exit routine so that it does not differentiate between single and
multisegment messages and always checks for remaining segments, IMS always
calls it at least twice. A message segment can accompany the last entry to the exit
routine when the message is a multisegment message. No segment is presented to
the exit routine when the message is a single-segment message.
Although most messages contain only one segment, some messages are
multisegment messages. System messages DFS970 and the response to a /DISPLAY
command are examples of multisegment messages. Even if a command response is
a single-segment response, the exit routine must be written to handle multisegment
messages; this is because a command always precedes a command response. If the
exit routine does not check for subsequent segments, IMS does not pass the
segments that contain the command response.
You can write the exit routine so that IMS calls it for each segment of a message. If
you write the exit routine to request the remaining segments, the exit routine is
called at least twice for each message, even if the message has only one segment.
In this case, the last entry to the exit routine is not accompanied by a segment; this
is because the message is a single segment. If the message is a multisegment
message, the exit routine is called for the subsequent segments. The exit routine
must test for a segment the last time it is entered.
For subsequent entries to the exit routine for a multisegment message, bit
UEH1SEG is set in the UEHBFLG1 field of the UEHB (user exit header block)
when another segment is being presented. UEHCPYBF points to the next segment
of the message.
The exit routine cannot necessarily tell which segment belongs to which message;
this is because the presentation of segments that are associated with any one
message can be interspersed with segments associated with a different message.
The UEHB is unique for each message, and you can use the UEHURSVD field to
track which message IMS presents to the exit routine.
IMS uses the UEHB (user exit header block) to pass a copy of the message segment
to the exit routine and places the address of that message segment in the
UEHCPYBF field of the UEHB. The format of the copy of a system message,
operator-entered command, or command response is shown in the following
figure.
IMS expands certain commands and places this expanded view into the edited
command buffer. You can examine this buffer by setting the appropriate exit
registers.
One occasion for examining the buffer is when command processing exceptions
occur, indicated by the DFS058 XXX COMMAND COMPLETED EXCEPT message.
When a LINE, LINK, NODE, or PTERM keyword is used with inclusive or range
parameters, or when a LINE, LINK, PTERM, or SUBSYS keyword is used with the
ALL parameter, IMS expands the command in the edited command buffer to
include the actual resource names or numbers, except for the /BROADCAST
command. The PTERM ALL keywords are only expanded for the /PSTOP, /PURGE,
/RSTART, /START, /STOP, and /MONITOR commands. When a NODE, LTERM, or USER
keyword is used with a generic parameter and exceptions occur, IMS expands the
edited command buffer with up to 10 of the specific resource names that are
invalid and that match the generic parameter.
Only parameter passwords (as in the /IAM command) are shown in the edited
command buffer; command passwords are not shown.
The following figure shows the format of the edited command buffer.
Keyword abbreviation
F F F F
L N L L L
A CCC A A A
K
G G C
Parameter D G G
1 2 N or D 2 3
T password L
Keyword Abbreviation
Refer to DFSCKWD0 to obtain the abbreviation. In some cases, the
abbreviation is the first three characters of the keyword.
CNT Number of characters in the parameter or password that immediately
follow the CNT. This field is a 1-byte binary field.
Parameter or Password
Parameter exactly as entered from the terminal.
DDL Delimiter that is entered after the parameter or password. If the ALL
parameter is expanded to individual parameters, the delimiter is X'80'. If
the parameter is generic, the delimiter is X'10'.
FLAG3
Period indicating the end of the command.
Restrictions
The exit routine can change or delete system messages only. It can modify the copy
of the system message that the original destination (the master terminal) receives.
It can also modify the copy that an alternate destination receives. The exit routine
cannot change or delete the original command or command response. It can
modify the copy of a command or command response that is destined for an
alternate destination, but it cannot change the copy that the primary destination
receives.
IMS communicates with this exit routine through the entry and exit registers, and
the user exit header block (UEHB). IMS creates a UEHB for each message and
passes it to the exit routine every time the exit routine is called for that message.
Your exit routine can use the UEHURSVD field in the UEHB to store information
about the message between each call to the exit routine for that message. The
UEHB is freed and any values that were previously saved are lost when processing
of the last segment of the message is complete.
On entry, the exit routine must save all registers in the provided save area. The
registers contain the following information:
Register Contents
0 One of the following entry codes:
Entry Code
Meaning
0 First (initial) entry to the exit routine for the message. A segment is
always presented to the exit routine (and the UEH1SEG field in the
UEHB is set) with this entry code. The buffer pointed to by the
UEHCPYBF field contains the first segment of the message that is
being processed. The flag in the UEHBFLG1 field indicates what
type of message it is.
4 Subsequent entry to the exit routine for the message. This entry code
applies only to multisegment messages with three or more segments.
The segment that is presented with this entry code is not the first or
last segment.
8 Last entry to the exit routine for the message. This entry code
applies only if the exit routine returned a return code of 0, 4, or 20
the last time it was called for this message (indicating that IMS
continues to present the remaining segments to the exit routine).
12 Entry to exit routine after it requests storage. IMS passes the address
of the buffer in the UEHUBUFF field. If storage is not available,
UEHUBUFF contains 0 and the UEH1NSTG flag in the UEHBFLG1
field is set. The exit routine can attempt to get storage a second
time, but if the second attempt is also unsuccessful, one of the
following occurs:
v If IMS is processing a command, it stops further processing of this
command.
v If IMS is processing a system message, it examines the size of the
requested storage. If the size requested is greater than twice the
value of UEHCPYSZ (the size of the current segment plus 20
bytes), IMS stops the exit routine for that message. If the size is
equal to or less than this value, the exit routine waits for the
storage to become available.
16 No message is presented to the exit routine. IMS stopped command
processing because of errors in the command. IMS issues error
messages, termination messages, or both. Command responses that
were built and passed to the exit routine are canceled. A new
response is built if the error is encountered while a /DISPLAY
command response is being built.
1 Address of the UEHB.
7 Address of the communication terminal block (CTB).
9 Address of the communication line block (CLB) or partition specification
table (PST).
11 Address of the system contents directory (SCD).
13 Address of the save area. The exit routine must not change the first 3 words.
For external requests, the exit routine can chain down one save area to obtain
the next available save area.
14 Return address to IMS.
15 Entry point of exit routine.
UEHCPYBF
Address of the copy of the message IMS passed to the exit routine. If the
UEH1SEG flag is set, the buffer contains a pointer to a copy of the
message. If the UEH1CPYP flag in the UEHBFLG1 field is set, the buffer
contains a copy of the first segment of a system message. If the UEH1CMD
flag is set, the buffer contains a copy of the first segment of a command. If
the UEH1CMD flag is set and the entry code is non-0, this field contains a
copy of a segment of a command response.
UEHECMD
Address of the edited command buffer if this is the final entry to the exit
routine and the UEH1ECMD flag in the UEHBFLG1 field was set
(requesting the edited command buffer) the first time IMS called the exit
routine.
UEHUBUFF
Address of an additional storage buffer, if the exit routine requests storage.
If additional storage was not available, this field contains 0, and the
UEH1NSTG flag in the UEHBFLG1 field is set.
Before returning to IMS, the exit routine must restore all registers except for
registers 0, 1, and 15, which contain the following:
Register Contents
0 If register 15 contains a return code of 0 or 8 (and your exit routine sets the
destination for the first time or changes it), this register contains the address
of the alternate destination name. The alternate destination can be a
transaction or an LTERM. The alternate destination name must be 8 bytes,
left-justified with blanks. If the alternate destination is not a valid transaction
or LTERM and the Extended Terminal Option (ETO) is set, a dynamic
LTERM is created. (For more information on the ETO feature, see IMS Version
14 Communications and Connections.)
If the alternate destination was set with a previous return code of 0 (and
your exit routine does not change it), this register contains 0.
1 If register 15 contains a return code of 0 or 8, this register contains the
address of the segment to insert to the alternate destination or register 1
contains 0 to enqueue a previously inserted segment. If the segment to be
inserted is the final segment, register 1 must contain the address of the
message segment.
If the segment is longer than the original segment (such as when your exit
routine changes a message), and the device associated with the LTERM does
not support the segment length, the terminal device can truncate the
segment.
15 One of the following return codes:
Register Contents
Return code Meaning
0 Insert the segment to the alternate destination and continue
presenting the remainder of the segments to the exit routine.
4 Do not insert the segment to an alternate destination. The exit
routine can change the segment, or it can set the segment
length to 0 to delete the segment. IMS continues to present
remaining segments to the exit routine, which it can also
change or delete.
IMS checks to make sure that the return codes and alternate destination name are
valid. If an invalid return code or an invalid alternate destination is returned, the
exit routine is disabled for the remainder of the segments and is not called. IMS
sends a trace record and a DFS2180I AUTOMATED OPERATOR USER EXIT
ERROR - CODE=x message to the master terminal.
UEHURSVD
The 20 bytes of storage reserved for the exit routine. The exit routine can
use UEHURSVD to save the message being processed, entry codes, or flags
between each invocation of the exit routine for a particular message.
When you issue a GU call, and an AO application obtains a message that was
inserted by the exit routine, the application I/O PCB contains an input LTERM
name. IMS will determine the LTERM name as follows:
v If IMS calls the exit routine because of a system message, the input LTERM
name is the master terminal name.
v If IMS calls the exit routine because of command input, the input LTERM name
is the LTERM that entered the command.
You can write this exit routine to perform a number of functions. You can use this
example as a guideline for writing your own exit routine. You can write the exit
routine to support only single-segment messages. This example requests a user
buffer for some of the functions in which to store a copy of the message segment.
You can use a different storage area to store a copy of the message segment.
Related reference:
“Setting up the exit registers” on page 463
The exit routine is called for system messages destined for the master terminal,
operator-entered commands, and command responses regardless of whether the
exit routine is interested in the message. The segment is ignored by setting the
following register:
Register 0 on
entry Registers on exit
0 Register 15 = 12
For the first entry to the exit routine, insert the segment to the alternate destination
and request remaining segments, if there are any, by setting the following register:
Register 0 on
entry Registers on exit
0
Register 0 = address of alternate destination name
Register 1 = address of message (UEHCPYBF)
Register 15 = 0
For subsequent entries that are not the last entry, insert the segment to the
alternate destination and request remaining segments by setting the following
register:
Register 0 on
entry Registers on exit
4
Register 0 = address of alternate destination name
Register 1 = address of message (UEHCPYBF)
Register 15 = 0
For the last entry to the exit routine, insert the segment to the alternate destination,
enqueue all of the segments, and indicate that processing is complete by setting the
following register:
Register 0 on
entry Registers on exit
8
Register 0 = address of alternate destination name
Register 1 = address of message (UEHCPYBF)
Register 15 = 8
For the first entry to the exit routine for this message, the exit routine must request
the storage in which to build each segment of the new message. The buffer
requested during this initial entry must be large enough to fit the largest message
segment you plan to send. The exit routine cannot request additional storage
during subsequent entries for this message. Request enough storage for a message
segment by setting the following register:
Register 0 on
entry Registers on exit
0
Register 0 = size of message segment
Register 15 = 16
For the next entry to the exit routine after successfully getting storage for this
message segment, move the first segment of the new message to the user buffer
(UEHUBUFF), and set the message length in the first 2 bytes. Insert the message
segment to the alternate destination and request remaining segments, if any, by
setting the following register:
Register 0 on
entry Registers on exit
12
Register 0 = address of alternate destination name
Register 1 = address of message segment (UEHUBUFF)
Register 15 = 0
For subsequent entries that are not the last entry, move the next segment of the
new message into the user buffer. The user buffer is reused for each segment of the
message. Set the message length in the first 2 bytes of the user buffer. Insert the
message segment to the alternate destination and request the remaining message
segments by setting the following register:
Register 0 on
entry Registers on exit
4
Register 0 = address of alternate destination name
Register 1 = address of message segment (UEHUBUFF)
Register 15 = 0
For the last entry to the exit routine for this message, move the last segment of the
new message into the user buffer. Set the message length in the first 2 bytes. Insert
the segment to the alternate destination, and indicate that processing is complete
by setting the following register:
Register 0 on
entry Registers on exit
8
Register 0 = address of alternate destination name
Register 1 = address of message segment (UEHUBUFF)
Register 15 = 8
The system message that is passed to the exit routine includes 20 bytes that are
added to the end of the message. The exit routine can use these 20 bytes. Changes
to the system message are limited to the original message length, plus 20 bytes. If
the changed message includes the 20-byte area provided at the end, the exit
routine must increment the message length field by 20.
For each entry to the exit routine for this message, change the system message text.
For the first entry to the exit routine, allow the changed segment to proceed to its
master terminal destination and request remaining message segments by setting
the following register:
Register 0 on
entry Registers on exit
0 or 8 Register 15 = 4
Related reference:
“Change message text and send to alternate destination”
If the copies sent to the master terminal and the alternate destination are different,
your exit routine needs to request storage for the user buffer for the copy sent to
the alternate destination. The exit routine cannot change the copy of the command
or command response that is in the copy buffer.
The copy of the message passed to the exit routine has an additional 20 bytes
added to the end, which the exit routine can use. Changes to the message are
limited to the original message length, plus this 20 bytes. If the changed message
includes the 20-byte area, the exit routine must increment the message length field
by 20.
For the first entry to the exit routine for this message, change the message text. If
the changed message includes the 20-byte area provided at the end, increment the
message length field by 20. Insert the segment to an alternate destination, and
request the remaining segments by setting the following register:
Register 0 on
entry Registers on exit
0
Register 0 = address of the alternate destination name
Register 1 = address of the message (UEHCPYBF)
Register 15 = 0
For subsequent entries that are not the last entry, change the message segment text.
If the changed message includes the 20-byte area provided at the end, increment
the message length field by 20. Insert the message segment, and send it to an
alternate destination by setting the following register:
Register 0 on
entry Registers on exit
4
Register 0 = address of the alternate destination name
Register 1 = address of the message (UEHCPYBF)
Register 15 = 0
For the last entry to the exit routine for this message, change the message text. If
the changed message includes the 20-byte area provided at the end, increment the
message length field by 20. Insert the segment to an alternate destination, enqueue
all of the segments, and indicate that processing is complete by setting the
following register:
Register 0 on
entry Registers on exit
8
Register 0 = address of the alternate destination name
Register 1 = address of the message (UEHCPYBF)
Register 15 = 8
For the first entry to the exit routine for the message, set the length field of the
message to 0, and obtain the second segment by setting the following register:
Register 0 on
entry Registers on exit
0 Register 15 = 4
For subsequent entries that are not the last entry, set the length field of the
message to 0, and obtain the next segment by setting the following register:
Register 0 on
entry Registers on exit
4 Register 15 = 4
For the final entry to the exit routine for the message, set the length field of the
message to 0, and indicate that processing is complete by setting the following
register:
Register 0 on
entry Registers on exit
8 Register 15 = 12
Before deleting the system message, the exit routine must request storage for a
user buffer in which to put a second copy of the message. Your exit routine must
request enough storage to fit the largest segment of the message.
For the first entry to the exit routine for the system message, your exit routine can
request storage by setting the following register:
Register 0 on
entry Registers on exit
0
Register 0 = size of the largest message segment
Register 15 = 16
For the next entry after successfully getting storage for the largest message
segment, move the first segment of the message from UEHCPYBF into the user
buffer (UEHUBUFF), including the length in the first 2 bytes. Delete the message
destined for the master terminal by setting the length field of the message segment
pointed to by UEHCPYBF to 0. Insert the message copy to the alternate
destination, and request the next segment by setting the following register on exit:
Register 0 on
entry Registers on exit
12
Register 0 = address of the alternate destination name
Register 1 = address of message segment (UEHUBUFF)
Register 15 = 0
For the last entry to the exit routine for this message, move the last segment of the
message into the user buffer. The user buffer is reused for each segment of the
message. Delete the last segment destined for the master terminal by setting the
length field of the message segment pointed to by UEHCPYBF to 0. Insert the last
segment, enqueue the entire message, and indicate that processing is complete by
setting the following register on exit:
Register 0 on
entry Registers on exit
8
Register 0 = address of alternate destination name
Register 1 = address of the message segment (UEHUBUFF)
Register 15 = 8
On first entry, request the edited command buffer by setting flag UEH1ECMD on
in the UEHBFLG1 field. Request the next command response segment by setting
the following register on exit:
Register 0 on
entry Registers on exit
0 Register 15 = 4
For subsequent entries that are not the last entry to the exit routine for this
command response, continue requesting the next command response segment by
setting the following register on exit:
Register 0 on
entry Registers on exit
4 Register 15 = 4
For the last entry to the exit routine for this command response message, the
UEHECMD field contains the address of the edited command buffer. If the edited
command buffer is not available (such as when there are command syntax errors),
the UEH1CBNA flag is set in the UEHBFLG1 field, and the UEHECMD field
contains 0.
The following tables describe how to set up exit registers to perform certain
functions for single-segment and multisegment messages. Refer to both tables if
you are writing your exit routine to support single-segment and multisegment
messages. If you can identify which messages are single-segment messages and
which are multisegment messages, you can write the exit routine to handle each
type differently.
Subsections:
v “Single-segment messages”
v “Multisegment messages” on page 464
Single-segment messages
The following table shows how to set up registers on exit for single-segment
messages. If your exit routine only examines single-segment messages, or if you
can identify which messages are single-segment messages (and can use this logic),
you can use this information to write your exit routine.
Table 173. Exit functions for single-segment messages
UEHCPYBF
Register 0 length field Register 0 on Register 1 on Register
Function on entry on exit exit exit 15 on exit
Ignore entire 0 12
message
Send copy of 0 Address of Address of 8
message alternate message
segment to destination (UEHCPYBF)
alternate name
destination
Send new 0 Size of message 16
message to
12 Address of Address of 8
alternate
alternate message
destination
destination (UEHUBUFF)
name
Change system 0 Length + 20 8
message
Multisegment messages
The following table shows how to set up the registers on exit for multisegment
messages. If your exit routine examines multisegment messages, or if you can
identify which messages are multisegment messages (and can use this logic), you
can use the information in this figure to write your exit routine. All values given
are in decimal format.
Table 174. Exit functions for multisegment messages
UEHCPYBF
Register 0 length field Register 0 on Register 1 on Register
Function on entry on exit exit exit 15 on exit
Ignore entire 0 12
message
Send copy of 0 Address of Address of 0
message to alternate message
alternate destination (UEHCPYBF)
destination for name
each segment
4 Address of Address of 0
alternate message
destination (UEHCPYBF)
name
8 Address of Address of 8
alternate message
destination (UEHCPYBF)
name
Related reference:
“AO functions and how to implement them” on page 457
The UEHB contains the following data and flag fields. The following table
indicates the field name, length in bytes, and description of the data fields, and it
indicates the field name, hexadecimal value, and meaning of the flag fields.
Data and flag fields in the UEHB can be grouped into one of three categories,
depending on how the exit routine can use them.
Modifiable
The exit routine can change these fields to communicate with IMS or to
use as a work field.
Read only
The exit routine can read but not modify these fields.
Reserved
The exit routine cannot use these fields. They are reserved for use by IMS.
Table 175. UEHB field descriptions
Field Length/Value Description
UEHSRCE 4 bytes
Address of source CNT.
Usage = read only.
This field points to the source LTERM of the message
segment. For a system message, the source is the
master LTERM. For a command, the source is the
LTERM where the command was entered.
User name or 0.
UEHOCALL 2 bytes Usage = reserved.
UEHBFLG1 1 byte Flag byte 1 for AOI and exit routine as follows:
UEH1ECMD X'80' Indicates that the exit routine requests the edited
command buffer.
Usage = modifiable.
If the exit routine sets this flag on the first entry, the
UEHECMD field points to the edited command buffer
on the last entry. Also see UEH1CBNA flag.
UEH1SEG X'40' Indicates that a segment is presented to the exit
routine.
Usage = reserved.
Used to indicate that a PUT MOVE should not be
done if the exit routine is deleting a system message
to the primary master terminal.
UEHBFLG3 1 byte Flag byte 3 for AOI.
UEH3ILOC X'80'
Current call is INSERT LOCATE.
Usage = reserved.
UEH3PUTM X'40'
Current call is PUT MOVE.
Usage = reserved.
UEH3CANO X'20'
Current call is CANCEL OUTPUT.
Usage = reserved.
UEH3ENQ X'10'
Current call is ENQUEUE.
Usage = reserved.
UEH3TERM X'08'
Current call is AOI TERMINATION.
Usage = reserved.
UEH3VSEG X'04'
Segment exists for M/T.
Usage = reserved.
UEHBFLG4 1 byte Error flag byte.
UEH4ERRM X'80'
AOI error message in progress.
Usage = reserved.
| The AO exit routine intercepts messages before IMS sends the system message,
| executes the terminal command, or sends the terminal command response. The
| AOIE user exit is also called for system messages destined to the secondary master
| if it was specified during IMS initialization.
| You can write two types of Automated Operator (AO) exit routines. The AO exit
| routine described in this topic (AOIE) is called a type 2 AO exit routine. It can be
| used in the DB/DC, DCCTL, and DBCTL environments.
The other AO exit routine (DFSAOUE0) is called a type 1 and can be used in the
DB/DC and DCCTL environments.
This exit is called twice: once for the secondary master system message and then
for the primary master message.
Subsections:
v “About this routine”
v “Restrictions” on page 474
v “Communicating with IMS” on page 474
| The AOIE user exit intercepts these communications before IMS sends the system
| message, executes the command, or sends the command response.
The following table shows the attributes for the type 2 AO exit routine.
| Table 176. Automated operator user exit attributes (AOIE)
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL
| Naming convention You can name this exit routine DFSAOE00 and link it into a library that is included in
| the STEPLIB concatenation.
| Alternatively, you can define one or more exit routine modules with the EXITDEF
| parameter of the USER_EXITS section of the DFSDFxxx member of the [Link]
| data set. The routines are called in the order that they are listed in the parameter.
Binding This exit routine must be reentrant. You must manually link edit the routine with
DFSCSI00 to include the routine.
Including the routine
Draft comment
Dev: Should DFSAOE00 be changed to AOIE in this section? The new paragraph
(#3 below) refers to it as an exit routine named DFSAOE00 – hard to tell which
instances should stay DFSAOE00 and which should be changed to AOIE.
| The AOIE user exit can use IMS AOI callable services to communicate with an AO
| application. Using AOI Services, AOIE can pass a message containing one or more
| message segments to one or more AO applications. AOI callable services functions
| include:
v INSERT, which inserts a message segment to a message buffer.
| v ENQUEUE, which sends a message to one or more AO applications using AOI
| token names. The message sent on the ENQUEUE request can be a
| single-segment or multisegment message built with INSERT requests or a
| single-segment message supplied on the ENQUEUE request. An AO application
| issues a GMSG call, specifying an AOI token name, to retrieve a message sent
| from AOIE.
v CANCEL, which removes inserted segments when you decide not to send the
message to an AO application.
| After IMS shutdown processing has begun, AOIE is disabled and no longer
| receives control.
Restrictions
| You cannot use AOIE to modify or delete commands and command responses.
| This includes commands from a terminal or an application program, or internally
| generated commands.
| IMS communicates with AOIE through the entry registers and a parameter list.
The content of the registers passed from IMS to this exit routine each time it is
activated follows:
Register Content
1 Address of the “IMS standard user exit parameter list” on page 4
13 Address of the save area. Your exit routine must not change the first three
words of this save area. This save area is not chained to any other IMS save
area.
14 Return address to IMS.
15 Entry point of this exit routine.
This exit routine uses the Version 6 standard exit parameter list. The address of the
work area passed to this exit routine in SXPLAWRK will be the same each time
that this exit routine is called.
The following table shows the contents of the function-specific parameter list. The
address of this parameter list is in the standard exit parameter list field SXPLFSPL.
Table 177. Function-specific parameter list for AOIE (mapped by DFSAOE0)
Field Offset Length Description
AOE0VER 0 4 Address of word containing version number for
DFSAOE0.
| AOE0FUNC 4 4 Reason for entering AOIE:
| 1 Initial entry. The AOIE user exit can do
| initialization functions.
2 Message segment to process.
3 Command is aborted.
| 4 A message segment for the secondary
| master terminal is passed to AOIE. The
| AOIE user exit can return to IMS with
| AOE0RPLY=3 (AOE0CNCL) to prevent the
| message from being enqueued to the
| secondary master. AOE0RPLY=0
| (AOE0IGNR) will allow the message to be
| queued to secondary master. Any other
| response value results in message DFS2180,
| the response is ignored, and the message is
| queued to the secondary master.
AOE0SEG 8 4 Address of message buffer or 0 if this is initial entry.
(The next table shows the message buffer.)
AOE0WRKA 12 4 Address of 256-byte work area used by AOIE. The
area is static for the segments of a message, or for a
command and the related command responses.
AOE0FLG1 16 1 Entry codes:
X'80' First segment of multiple segments or first
and only segment when X'20' is also on.
X'40' Middle segment of multiple segments.
X'20' Last or only segment.
X'10' Command response will be sent for this
command. X'20' is also set when X'10' is set.
X'08' No segment presented. Last entry to exit.
Table 177. Function-specific parameter list for AOIE (mapped by DFSAOE0) (continued)
Field Offset Length Description
AOE0FLG2 17 1 Segment or command type:
X'80' Command entered at terminal.
X'40' Command response segment.
X'20' Command (ICMD) issued by AO
application.
X'10' Command generated internally by IMS.
X'08' IMS system message segment.
AOE0FLG3 18 1
X'80' Command input entered at a terminal
exceeded 256 bytes.
AOE0USII 19 1 Indicator for contents of user ID field:
U user ID
L LTERM
P PSB name
O Other name
AOE0DMTK 20 4 Directed message token required to issue AOI
callable service requests.
AOE0IMSI 24 8 IMS subsystem identifier.
AOE0IMSL 32 4 IMS version and release.
AOE0SSTY 36 1
X'01' DB/DC system
X'02' DCCTL system
X'03' DBCTL system
AOE0ROLE 37 1
X'01' XRF active
X'02' XRF alternate IMS
X'03' RSR active IMS
X'04' RSR tracker
AOE0MVSL 38 1 z/OS version and release on which IMS was
generated.
AOE0ENVR 39 1 AO exit routine environment:
X'1' DFSAOUE0 is loaded. Commands and
messages can be passed to DFSAOUE0 to
process.
Table 177. Function-specific parameter list for AOIE (mapped by DFSAOE0) (continued)
Field Offset Length Description
AOE0ORGC 40 4 Origin of the command:
0 Origin fields not set. Fields are set for
commands entered from a terminal, an
MCS console, LU 6.2 conversation, or
OTMA client in a DB/DC or DCCTL
system.
1 Origin other than that defined by a specific
code
2 VTAM terminal
3 LU 6.2 conversation
4 MCS/E-MCS console
5 OTMA client
6 System console
7 Master terminal
AOE0LINE 44 4 Terminal line number (AOE0ORGC=1).
AOE0NODE 44 8 VTAM node name (AOE0ORGC=2).
AOE0NWID 44 8 Network ID (AOE0ORGC=3).
AOE0CONS 44 4 The 4-byte MSC/E-MSC terminal ID
(AOE0ORGC=4).
AOE0TMEM 44 16 OTMA member name (AOE0ORGC=5).
AOE0PTRM 48 4 Physical terminal number (AOE0ORGC=1).
AOE0MCSU 48 8 User identification (AOE0ORGC=4).
AOE0LTRM 52 8 Logical terminal name or blanks if LTERM does not
exist (AOE0ORGC=1,2).
AOE0LUNM 52 8 Logical unit name (AOE0ORGC=3).
AOE0USID 60 8 Signed-on user ID or blanks (AOE0ORGC=1,2).
AOE0LUUS 60 8 User ID (AOE0ORGC=3).
AOE0TPIP 68 8 Pipe (AOE0ORGC=5).
AOE0USER 68 8 VTAM user, subpool name, or blanks
(AOE0ORGC=2).
AOE0ORGC 68 (AOE0ORGC=3)
Table 177. Function-specific parameter list for AOIE (mapped by DFSAOE0) (continued)
Field Offset Length Description
AOE0RPLY 76 4 Return code from AOIE. This is the only field in this
parameter list that AOIE can modify.
0 AOIE is not interested in this message or
command segment. IMS will process the
message as if the user exit did not exist.
Subsequent segments of the message or
command response are presented to AOIE.
1 AOIE is not interested in this message or
command segment. Call DFSAOUE0 for
processing. Do not call AOIE for
subsequent segments of this message.
2 Send no more segments for this message or
command to AOIE.
3 Delete the IMS system message segment.
4 Delete the IMS system message segment
and all subsequent segments of this
message.
5 AOIE modified the IMS system message
segment.
6
Tells IMS to call the AOIE exit routine for
secondary master messages. If secondary
master logging is in effect, AOIE gets called
twice for each segment: first for the
secondary master message, and second for
the AOI exit processing.
This return code can be returned only on
the initial entry to AOIE (AOE0FUNC=1). If
it is returned for any other function call,
message DFS2180 is issued, indicating the
error, and the response is treated as
AOE0RPLY=0.
Message buffer
Command: The message text is one segment long and begins with
the delimiter '/', followed by the command.
There is no requirement for exit registers. AOIE communicates using the reply field
in the function-specific parameter list. AOIE is passed this list when it is entered.
On exit, the registers contain the following:
Register Contents
14 Return Address
15 0
Related concepts:
IMS Automated Operator Interface (AOI) (Operations and Automation)
Related reference:
“Type 1 Automated Operator exit routine (DFSAOUE0)” on page 444
“Routine binding restrictions” on page 8
“IMS callable services” on page 12
“IMS standard user exit parameter list” on page 4
IMS does not pass all system messages, operator-entered commands, and
command responses to DFSAOE00. The following are types of messages IMS does
not pass to DFSAOE00:
v Command responses to an AO application
v Commands issued from an AO application using the CMD call (including the
responses to those commands)
v System messages for which the destination is not the master terminal (secondary
master messages are passed if indicated during INIT call)
v Command responses to IMS internally generated commands
Subsections:
v “Changes the command editor makes”
v “Commands with network-qualified LU names” on page 481
The command editor translates certain control characters in any command you
enter from a terminal or in any ICMD call. You need to accommodate this
translation when writing your exit routine.
IMS
O/S
2
1 console
System
message
generated 3 Secondary
MTO
4
5 Copy of message sent
AO exit
routine to any destination
DFSAOE00 or
DFSAOUE0 6 MTO
Notes:
1. IMS generates a system message destined for the master terminal.
2. A copy of the message can be sent to the z/OS system console. This depends
on the specific message and is determined by IMS.
3. A copy of the message can be sent to the secondary master terminal if it exists
and if you have specified that this is to be done.
4. The copy of the message destined for the master terminal is passed to
DFSAOE00.
5. DFSAOE00 can send a copy of the message to an AO application. This is done
by enqueuing the message to an AOI token. DFSAOE00 can alter or delete any
segment of the message.
6. The message is sent (unless it has been deleted) to the master terminal.
If both DFSAOE00 and DFSAOUE0 had been loaded, this picture would be
conceptually the same. However, when DFSAOE00 got control it could either
process the message, or it could return a code indicating DFSAOUE0 should be
called to do the processing instead.
The following figure shows processing when a command is entered at the terminal.
Command Command
entered
3
Command
response
6
Notes:
1. When a command is entered from a terminal, IMS sends a copy of the
command to DFSAOE00 before executing the command.
2. DFSAOE00 can send a copy of the command to any AO application (using the
AOI token).
3. IMS executes the command and generates a command response.
4. IMS passes the command response to DFSAOE00. DFSAOE00 can send a copy
of the command response to any AO application (using the AOI token).
5. The command response is sent to the terminal that originated the command.
If both AO exit routines (DFSAOE00 and DFSAOUE0) had been loaded, this
picture would be conceptually the same. However, when DFSAOE00 got
control, it could either process the command or return a code indicating
DFSAOUE0 should be called to do the processing instead.
Notes:
1. When a command is entered from an AO application using an ICMD call, IMS
sends a copy of the command to DFSAOE00 before executing the command.
2. DFSAOE00 can send a copy of the command to any AO application (using the
AOI token).
3. IMS executes the command and generates a command response.
4. IMS sends the command response back to the AO application.
The type 1 AO exit routine (DFSAOUE0) cannot process commands entered
from an AO application.
Although there are IMS system message tables containing messages that IMS
returns to edit and exit routines, these messages might not be appropriate for your
installation's needs. If this is the case, you can create your own messages and list
them in your own message table.
v “About this table”
IMS assigns the prefix of the user text from the message table with DFSUxxx,
where xxx is the message number. You can then use this message table with the
following user edit and exit routines:
v Command Authorization exit routine (DFSCCMD0)
v Front-End Switch exit routine (DFSFEBJ0)
v Global Physical Terminal edit routine (DFSGPIX0)
v Logoff exit routine (DFSLGFX0)
v Message Switching Input edit routine (DFSCNTE0)
v Input Message Segment edit routine (DFSME127)
The following table shows the attributes of the User Message table.
Table 180. User message table attributes
Attribute Description
IMS environments DB/DC, DCCTL.
Naming convention
You must name the message table module DFSCMTU0, assemble it,
and place it in the operating system partitioned data set defined by
the USERLIB= operand of the IMSGEN macro.
Related Reading: For details about this, see the IMSGEN macro
statement description in IMS Version 14 System Definition.
Link editing No special steps are required to include this table.
Including the routine You need to specify OPTIONS=(...USERMSGS...) in the COMM
macro.
IMS callable services IMS callable services are not applicable for use with this table.
Sample routine No sample available.
location
In order for a routine to use the messages you've placed in the message table,
you'll need to choose a key that represents a message number in the table. In the
case of the Queue Space Notification exit routine (DFSQSPC0) and the Signon exit
routine (DFSSGNX0), the negative value of the message key needs to be placed in
register 15 on return from the routine. For the other exit routines listed in the
previous topic, the positive value of the message key needs to be placed in register
1 on return from the routine along with a specific return code in register 15.
Related Reading: For more information, see the COMM macro statement
description in IMS Version 14 System Definition.
This example shows how you would use user message tables to change the text of
the messages issued by a revised version of the Queue Space Notification exit
routine.
Subsections:
v “Sample table”
v “Sample routine” on page 486
Sample table
The following table sample contains the messages specified by an IMS user and
has been included in the IMS system.
DFSCMTU0 CSECT
* USER MESSAGE TABLE FOR USER QUEUE
* SPACE NOTIFICATION EXIT EXAMPLE.
BALR 15,14
M013 DC H’513’ QMGR0
DC AL2(M014-M013)
DC C’RECORDS IN QBLKS DATASET EXCEED UPPER THRESHOLD ’
M014 DC H’514’ QMGR0
DC AL2(M015-M014)
DC C’RECORDS IN SMSGQ DATASET EXCEED UPPER THRESHOLD ’
M015 DC H’515’ QMGR0
DC AL2(M016-M015)
DC C’RECORDS IN LMSGQ DATASET EXCEED UPPER THRESHOLD ’
M016 DC H’516’ QMGR0
DC AL2(M017-M016)
DC C’RECORDS IN QBLKS DATASET BELOW LOWER THRESHOLD’
M017 DC H’517’ QMGR0
DC AL2(M018-M017)
DC C’RECORDS IN SMSGQ DATASET BELOW LOWER THRESHOLD’
M018 DC H’518’ QMGR0
DC AL2(M999-M018)
DC C’RECORDS IN LMSGQ DATASET BELOW LOWER THRESHOLD’
M999 DC X’7FFF’
END ,
Sample routine
In this sample routine, the IMS-supplied exit routine (DFSQSPC0) has been
replaced by a modified version of the routine that a user has written. The
user-modified DFSQSPC0 has the following characteristics:
1. Existing IMS message equates have been replaced by user equates.
2. The list of messages used by the routine code has been changed to refer to the
user messages.
3. Load Negative Register (LNR) instructions have been added to store the
negative of the user message key in register 15 before returning to the caller of
DFSQSPC0. This causes IMS to look in the User Message Table (DFSCMTU0)
rather than the system tables for the text of the message.
The following sample shows the modified Queue Space Notification exit routine,
DFSQSPC0:
***********************************************************************
* *
* M O D U L E P R O L O G *
* *
***********************************************************************
* *
* MODULE NAME: DFSQSPC0 *
* *
* DESCRIPTIVE NAME: SAMPLE USER QUEUE SPACE NOTIFICATION EXIT *
* *
* FUNCTION: *
* *
* INTERROGATES NUMBER OF RECORDS CURRENTLY IN USE FOR A *
* DATASET AND DETERMINES WHETHER OR NOT TO DISPLAY *
* THRESHOLD MESSAGES (SEE OUTPUT) *
* *
* NOTES: *
* *
* RESTRICTIONS: *
* *
* DFSQSPC0 MUST NOT IWAIT. THERE IS ONLY ONE PARAMETER AREA *
* (IN QPOOL), HENCE THE QUEUE MANAGER MUST NOT IWAIT BETWEEN *
* THE TIME IT SETS UP THE PARAMETER LIST AND THE TIME IT NO *
* LONGER NEEDS IT, FOLLOWING INVOCATION OF THE EXIT (DFSQSPC0) *
* *
* IN ORDER TO UPDATE THE "IN USE" COUNT WITHOUT FIRST ZEROING *
* THE HIGH ORDER BYTE THE HIGH ORDER BIT OF THE FLAG BYTE MUST *
* ALWAYS BE 0. *
* *
* DEPENDENCIES: NONE *
* *
* REGISTER CONVENTIONS: STANDARD IMS *
* *
* MODULE TYPE: *
* *
* IMS DC - QUEUE MANAGER EXIT (MAY BE REPLACED BY USER EXIT) *
* *
* ATTRIBUTES: REENTRANT *
* *
* ENTRY POINT: DFSQSPC0 *
* *
* PURPOSE: SEE FUNCTION *
* *
Subsections:
v “About this routine”
v “Communicating with IMS” on page 491
The exit name is set by IMS to [Link]. The XRF Hardware Reserve
Notification Exit uses the Dynamic Exit Facility. The Dynamic Exit Facility uses
[Link] for its EXITNAME parameter. You can provide any name for
the exit routine itself.
The following table shows the attributes of the XRF Hardware Reserve Notification
exit routine.
Table 181. XRF Hardware Reserve Notification exit routine attributes
Attribute Description
IMS environments XRF alternate
Naming convention The exit name is set to [Link]. You can provide any
name for the exit routine. Define the name of the exit routine to the
z/OS dynamic exit facility by using either the PROGxx parmlib
member EXIT statement or the SETPROG EXIT operator command.
See the "Dynamic Exits Facility" topic in z/OS MVS Installation Exits
manual.
Binding
You can bind the exit routine into:
v A data set that becomes part of the PLPA, MLPA, or FLPA
during initial program load.
v A data set that is part of the LNKLST concatenation.
v The nucleus initialization program IEANUC0x
v Any PDS or PDSE that is designated by the DSNAME option of:
– The SETPROG EXIT command
– The EXIT ADD statement of a PROGxx parmlib member
Including the routine No additional steps are needed to include this routine.
IMS callable services This exit routine cannot use IMS Callable Storage Services.
Sample routine No sample exit routine is provided.
location
The XRF Hardware Reserve Notification exit routine must be written as reentrant.
This exit routine receives control running in 31-bit addressing mode and it must
return control in that mode. The exit routine is called in TASK mode, key 7, with
no locks held, and in non-cross memory, non-AR mode.
The exit routine is called whenever IMS reserves or releases one or more volumes
that contain log data during XRF takeover. The reserve call is made prior to the
actual reserve and the release call is made after the actual release.
IMS communicates with this routine through the entry registers and a parameter
list.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following content:
Register Content
1 Address of the standard exit parameter list.
13 Address of the standard save area.
14 Return address to Dynamic Exit Service.
Parameter Definition
1 A fullword containing the version number of the parameter list.
2 A fullword containing a function code. Two functions are defined:
v FRBFNRSV EQU 1 ... function = reserve
v FRBFNREL EQU 2 ... function = release
3 A list of devices being reserved or released. The list format is a halfword
containing the number of devices in the list followed by that number of
halfword device addresses. These addresses are obtained from the
UCBCHAN field of the UCBs involved.
4 An eight character field containing the RSENAME.
This topic describes the Base Primitive Environment (BPE) user exit routine
interfaces and services in detail.
Note: Throughout this topic the term “user exit routine” means “user-supplied exit
routine.”
Some IMS components (for example, CQS, OM, RM, and SCI) use BPE services to
define and manage calls to user exit routines. BPE also has its own user exit
routines. BPE also provides a common user exit routine run time environment. The
run time environment includes the following:
v A standard BPE user exit parameter list
v Static work areas for the routines
v Dynamic work areas for the routines
v Callable services for the routines
v A recovery environment to protect against abends in the user exit routines
Recommendation: Write BPE user exit routines in assembler, not in a high level
language. BPE does not support exit routines that run under Language
Environment for z/OS. If you write an exit routine in a high level language, and
that routine runs in the Language Environment for z/OS, you might have abends
or performance problems. Language Environment for z/OS is designed for
applications that run in key 8, problem program state. BPE user exit routines run
in key 7 supervisor state.
All BPE-managed user exit routines receive a pointer to a Standard BPE user exit
parameter list in R1. The format of this parameter list is the same for all exit
routines, and is mapped by the BPEUXPL DSECT (in the BPEUXPL macro). The
following table provides the following information about the fields in the Standard
BPE user exit parameter list:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Each user exit routine is passed two work areas by BPE every time the exit routine
is called. The two work areas are:
v The static work area
v The dynamic work area
The static work area is pointed to by field UXPL_STATICWAP in the Standard BPE
user exit parameter list. The static work area is 256 bytes in length. Each user exit
routine is assigned its own static work area that is not shared between exit routines
of the same type. The same work area is passed every time a particular user exit
routine is called, and the contents of the work area are preserved from call to call.
A user exit routine can use the static work area to save data between calls to the
exit routine. The static work area is cleared (set to zeros) the first time a user exit
routine is invoked.
When a user exit routine is refreshed with the REFRESH USEREXIT command, the
same static work area continues to be passed to the new copy of the module that
was being passed to the old copy. If a user exit routine is removed from an
EXITDEF list and a REFRESH USEREXIT command is issued, the static work area
for the module is deleted. If the exit module is then later added back to the
EXITDEF list and another REFRESH USEREXIT command is issued, the exit
routine gets a new (cleared) static work area.
Each user exit routine type can have multiple exit routine modules associated with
it. By default, BPE calls each module in the order that it was specified on the
EXITS parameter of the EXITDEF= statement. However, some exit types call the
specified modules in reverse order. If an exit type calls modules in reverse order,
that will be explicitly stated in the exit's individual documentation. The EXITDEF=
statement of the BPE user exit PROCLIB member defines the list of exit routines.
Each user exit routine can decide whether subsequent exit routines in the list that
are to be called on return to BPE. For example, a list of exit routines are called to
make a decision about processing for a particular resource. If exit routine ABC
cannot make the decision, it can return an indication that the next exit routine in
the list, routine DEF, is to be called so that it can try to make the decision. If exit
routine ABC is able to make the decision, it can return an indication that the next
exit routine in the list, routine DEF, need not be called because the decision has
already been reached.
Field UXPL_CALLNEXTP in the Standard BPE user exit parameter list is a pointer
to a byte in storage that the user exit routine can use to indicate whether to call the
next exit routine in the list. If the exit routine does not set this byte, the default is
to call the next exit routine in the list. If the exit routine sets this byte, it must set it
to one of the following values, defined by EQUs in the BPEUXPL macro:
UXPL_CALLNEXTYES
Call the next exit routine in the list.
UXPL_CALLNEXTNO
Do not call the next exit routine in the list.
BPE may ignore the value of the UXPL_CALLNEXTP byte for certain types of user
exit routines. In this case, all modules in the EXITDEF list for that exit type are
always called. Exit types that ignore the UXPL_CALLNEXTP setting will explicitly
state this information in their individual exit descriptions. If no information is
given, the default condition is that the exit type will use the UXPL_CALLNEXTP
setting.
All user exit routines are given control in the following environment unless
otherwise stated:
Authorization
Supervisor state, PSW key 7
Dispatchable unit mode
TCB
Cross-memory mode
None (PASN=HASN=SASN)
AMODE
31
ASC mode
Primary
Interrupt Status
Enabled
Locks None
All user exit routines receive control with the following registers set:
Register
Contents
R1 Pointer to Standard BPE user exit parameter list.
R13 Pointer to the first of two pre-chained save areas. The user exit routine can
use the first save area to save the registers of its caller, and can use the
second save area for lower-level calls that it makes. The save areas are
chained together using standard z/OS save area linkage conventions.
Attention: Control must be returned to the return address passed to the user exit
routine in R14. R15 can be set to a return code if appropriate for the specific exit
routine type being called. Ensure that all other registers are restored to the values
they had when the exit routine was called.
The contents of the registers not listed here are unknown and unpredictable.
Ensure that your user exit routines do not modify any fields in any parameter list
that are not explicitly documented as output fields. The results of modifying
non-output fields are unpredictable.
Write your user exit routines so that they are reentrant. User exit routines in the
same EXITS= list are called serially within one occurrence of a call for that exit
routine type. However, it is possible for a user exit routine to be entered
simultaneously for different occurrences of a call, under different TCBs, for the
same exit routine type.
An exit routine receives the same static work area, but receives another dynamic
work area for each call when it is entered simultaneously. Be careful when
updating fields in the static work area. They might be in the process of being
changed by other instances of your exit routine module that are running in
parallel.
Some user exit routines might be called from mainline processing code. The
amount and type of processing that is done by those exit routines can directly
contribute to the total path length and time required to complete a unit of work.
Recommendations:
v Code your user exit routines in assembler language for the best performance. If
you write exit routines in other languages, you might have performance
problems. BPE does not support exit routines that run under Language
Environment for z/OS.
v Use a BPE callable service when possible rather than the operating system
equivalent, because the callable service is usually optimized to perform more
efficiently in a BPE sub-dispatching environment.
v Operating system WAITs, SVCs, and I/O can all contribute to poor performance
and should be used sparingly.
In most cases, BPE recovers from any abends that occur while a user exit routine is
in control, and calls the next exit routine in the list, if any is indicated. When a
user exit routine abends, BPE ignores any value that the abending exit routine may
have set in the byte pointed to by UXPL_CALLNEXTP. BPE resets this byte to
UXPL_CALLNEXTYES and then calls the next exit routine in the list.
500 Exit Routines
IBM Confidential
BPE keeps a count of the number of abends that have occurred in each user exit
routine module. The first time an abend occurs in a module, BPE issues a request
to create an SDUMP to capture diagnostic information about the abend. BPE also
creates a [Link] entry for the abend and issues the message, BPE0019E,
indicating which exit routine module had control when the abend occurred. For
subsequent abends in an exit routine module, BPE creates a [Link] entry
and issues the message, BPE0019E, but does not issue the request to create an
SDUMP.
When the number of abends indicated by the ABLIM parameter has been reached,
BPE stops calling the abending exit routine module. The ABLIM parameter is
specified as part of the EXITDEF= statement for that type of exit routine. The
default value for the ABLIM parameter is 1 (to stop calling the exit routine after
the first abend). You can change this value as required. The abend count for an exit
routine is reset to zero if the exit routine type is refreshed.
Related reference:
BPE exit list members of the IMS PROCLIB data set (System Definition)
BPE REFRESH USEREXIT command (Commands)
Recommendation: Choose the BPE service when there is a choice between using
an operating system service or an equivalent BPE callable service. All callable
services are Product-Sensitive Programming Interfaces (PSPIs).
Subsections:
v “BPEUXCSV macro description”
v “BPEUXCSV macro syntax” on page 503
v “Return from BPEUXCSV” on page 505
The purpose of the BPEUXCSV macro is to issue BPE callable service requests from
a user exit routine called from a BPE environment. You can use this macro only for
BPE-called exit routines (exit routines that are passed the address of a Standard
BPE user exit parameter list in R1). BPE provides callable services that include the
following functions:
v Get and free storage associated with the primary BPE TCB (usually job step).
Some user exit routines can run under a different TCB each time they are called.
Normally, storage obtained with GETMAIN is associated with the current TCB.
If an exit routine obtained storage when it was called under one TCB and tried
to free it when running under a different TCB, the storage free attempt may fail.
The get storage and free storage callable services allow exit routines to get an
area of storage when running under one TCB and to free it when running under
a different TCB.
v Load and delete modules and associate these modules with the primary BPE
TCB. Like the storage get and free services, the load and delete services handle
module management when loaded and deleted from different TCBs.
v Get, retrieve, and free named storage areas. A named storage area is an area of
storage that is associated with a 16-byte name. The address of the storage area
can be retrieved given the name of the area. This allows different user exit
routines to communicate with one another by using a common name for a
shared named storage area.
When a callable service is invoked, the service may have to wait for the
completion of some event. Depending on the environment at the time your user
exit routine is called, such a wait can be either an OS WAIT (that is, the current
TCB is suspended until the event completes) or a BPE-internal wait. For
BPE-internal waits, BPE can run other ready work under the current TCB while
your user exit routine is waiting for the event to complete. When the event does
complete, BPE re-dispatches your exit routine's unit of work and completes the
callable service request.
The possibility of waiting introduces the following situations, which your exit
routine must be able to manage.
v Depending on the nature of the specific user exit routine (where and when it is
called), your exit routine might be entered again for another exit routine call
while the first instance of the exit routine is still waiting in a callable services
request. Note that multiple concurrent calls to user exit routines are, in general,
always possible. However, some user exit routines might normally be
TCB-serialized (that is, their callers always run under a single TCB); these
TCB-serialized routines might be entered multiple times when you use a callable
service.
v Again, depending on the specific user exit routine, your exit routine might have
control passed back from the BPE callable service request running under a
different TCB than when it was originally called. This is because BPE provides
the ability for a program that is using BPE services (such as CQS) to define a
pool of TCBs. In this situation any TCB in the pool can run any unit of work
that is assigned to the pool. So, your exit routine might be running under one
TCB in a pool, make a callable services request, wait, and then be dispatched
under a different TCB after the event completes.
Locks None.
BPEUXCSV can be invoked only from within a BPE-called user exit routine.
BPEUXCSV is a Product-Sensitive Programming Interface.
This macro uses R0, R1, R14, and R15 as work registers. When BPEUXCSV returns
control to the caller, the contents of these registers will be changed. All other
registers remain unchanged.
None.
None.
FUNC = CALL
The FUNC = CALL function is used to invoke a callable service from a user exit
routine. The following figure shows the syntax for the CALL function.
,
FUNC=CALL
BPEUXCSV PARMS=( symbol )
label number
(r2-r12)
FUNC = DSECT
The FUNC = DSECT function is used to generate all of the following items:
v Return code symbols
v BPE callable service codes
v Parameter list DSECT for the BPEUXCSV CALL function
BPEUXCSV FUNC=DSECT
Parameter descriptions
label
An optional assembler label for the macro statement.
FUNC=CALL | DSECT
An optional parameter that specifies the function of the BPEUXCSV macro.
The default is CALL.
CALL Invokes a BPE callable service from a user exit routine.
DSECT
Generates the return code symbols, BPE callable service codes, and the
parameter list DSECT for the BPEUXCSV CALL function.
PARMS=(list_of_parameters)
A required parameter that specifies a list of subparameters (separated by
commas) that are needed for the requested callable service. These
subparameters are positional, and are specific to the service requested.
Subparameters in this list may be in one of the following three forms.
symbol
If coded as a symbol, the value of the symbol (for example, the result
of doing an LA R0,symbol) is passed as the parameter.
number
If coded as a number, the number is passed as the parameter.
(register)
If coded as a register, the content of the register is passed as the
parameter. Valid registers are R2 through R12.
Examples:
v If a parameter is described as “A word in storage to receive a pointer to the
returned storage,” you could use one of the following coding examples.
BPEUXCSV PARMS=(MYWORD),...
. . .
- or -
. . .
- or -
BPEUXCSV PARMS=(1024),...
- or -
LA 5,1024
BPEUXCSV PARMS=((5)),...
The specific parameters and parameter order for each service are described in
SERVICECODE=.
SERVICECODE=symbol | (r2-r12)
A required parameter that specifies a code that identifies the particular callable
service that is being requested.
If SERVICECODE is specified as a symbol, the symbol must be an EQU
symbol that is equated to the function code of the requested callable service. If
SERVICECODE is specified as a register, the register must contain the service
code. For BPE-provided services, the appropriate EQU symbols are generated
when you invoke BPEUXCSV FUNC = DSECT, and are specified as one of the
following service codes.
BPEUXCSV_GETSTG
Get storage service.
BPEUXCSV_FREESTG
Free storage service.
BPEUXCSV_LOAD
Load module service.
BPEUXCSV_DELETE
Delete module service.
BPEUXCSV_NSCREATE
Create named storage service.
BPEUXCSV_NSRETRIEVE
Retrieve named storage service.
BPEUXCSV_NSDESTROY
Destroy named storage service.
SL=symbol | (r0-r12,r14,r15)
A required parameter that specifies an area in storage that is to be used as a
service parameter list. The BPEUXCSV macro uses this storage to build the
parameter list for the call to the callable service. The EQU symbol
BPEUXCSV_MAXSL is generated by this macro and is equated to the size of
the largest service parameter list required by BPE callable services. Ensure that
area of storage you specify on the SL parameter is at least BPEUXCSV_MAXSL
bytes in length when requesting any of the BPE callable services.
If SL is specified as a symbol, the symbol must be a label on the first byte of
the area to be used as the service parameter list. If the SL parameter is
specified as a register, the register must contain the address of the first byte of
the area.
TOKEN=symbol | (r2-r12)
A required parameter that specifies the callable services token address that was
passed to the user exit routine in the Standard BPE user exit parameter list
field UXPL_CSTOKENP. If the TOKEN parameter is specified as a symbol, the
symbol must be the label on a word of storage that contains the callable
services token address. If TOKEN is specified as a register, the register must
contain the callable services token address.
BPEUXCSV FUNC = CALL uses general purpose registers R0, R1, R14, and R15 as
work registers. On exit from the macro, R15 is set to the return code from the
BPEUXCSV macro. This return code indicates the status from the callable service
request router. The possible return code values in R15 are the same for all callable
service requests. R0 might be set to a return code for the specific callable service
that was requested, depending on the value that is in R15 (see R15 return codes in
the following table). The R0 return code is specific to each callable service. R1
might be set to a return value from the callable service, if applicable. See the
specific service descriptions for additional information. R2 through R12 are
unchanged on return from BPEUXCSV.
EQUs for the return codes in R15 are generated by BPEUXCSV FUNC = DSECT.
The following table describes the possible return code values in R15 for FUNC =
CALL, including the symbol, its value, and a description.
Table 183. FUNC=CALL return codes
Symbol Value Description
BPEUXCSV_RC_OK X'00' The callable service was successful.
BPEUXCSV_RC_SERV X'04' The specific callable service returned a
non-zero return code. The return code is in
the R0. Examine R0 to determine the specific
reason that the request failed. The only time
that the value in R0 is valid is when
R15=X'04'. Otherwise, the content of R0 is
unpredictable.
BPEUXCSV_RC_INVCODE X'08' The service code specified on SERVICECODE
is invalid.
BPEUXCSV_RC_BADTOKEN X'0C' The callable service token passed on TOKEN
is invalid.
BPEUXCSV_RC_INT X'F4' An internal BPE error occurred.
BPEUXCSV_RC_VERS X'FC' A callable services parameter list version error
was encountered. The version of the
parameter list generated by this macro is not
valid for your current release of BPE. This is
usually the result of assembling with a
version of BPEUXCSV at a different level than
the BPE runtime system.
The BPEUXCSV get storage service is similar to the z/OS GETMAIN and
STORAGE services; however, the storage obtained by the get storage service is
always associated with the top-level BPE TCB (usually the job step TCB of the
address space). The storage remains allocated until it is explicitly freed or until the
job step TCB terminates. Therefore, you can rely on the fact that the storage stays
allocated even if it is obtained under a subtask TCB which later terminates.
PARMS format:
PARMS=(length,sp,opts) or PARMS=(length,sp,opts,key)
Output: Return code EQUs are generated by BPEUXCSV FUNC = DSECT. If R15 =
0, the address of the obtained storage area is returned in R1. Otherwise, the
content of R1 is unpredictable.
If R15 = 4 on return from this macro, R0 contains the reason code; the following
table lists these return codes, including the symbol, its value, and a description.
Table 184. Get storage service return codes
Symbol Value Description
BPEUXCSV_GETSTG_RCSP X'04' An invalid or unsupported subpool
was specified. Either the subpool is
not supported by z/OS, or it is a
common subpool.
BPEUXCSV_GETSTG_RCLV X'08' A zero or negative storage length
was specified.
A zero storage address was
specified.
Examples:
v This next example shows how to get 64 bytes of storage from subpool 0. The
storage is LOC = BELOW, it is aligned on a page boundary, and it is not cleared.
BPEUXCSV SERVICECODE=BPEUXCSV_GETSTG, X
PARMS=(64,0,BPEUXCSV_GETSTG_BELOW+BPEUXCSV_GETSTG_PAGE),X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
v The following example shows how to get key zero storage for a length of the
value in R2, from the subpool value in R3. The storage is LOC = ANY, it is not
cleared, and it is double-word aligned. R4 contains the callable services token
address that was passed to the user exit routine in the field UXPL_CSTOKENP.
BPEUXCSV SERVICECODE=BPEUXCSV_GETSTG, X
PARMS=((2),(3),0, 0), X
TOKEN=(4), X
SL=WORKAREA
The free storage service is similar to the z/OS FREEMAIN service. It must be used
only to release storage obtained with the get storage service. It should not be used
to release storage that was obtained using any other method (such as GETMAIN).
PARMS format:
PARMS=(address,length,sp) or PARMS=(address,length,sp,key)
address
The address of the first byte of storage being released.
length
The number of bytes of the storage being released.
sp The subpool of the storage being released. This subpool must be the
same as the subpool that was specified when the storage was obtained.
key
The storage key of the storage being released. key is the optional
parameter. If coded, it indicates the storage key of the storage being
freed. If key is omitted, the storage must be key 7 storage.
The value passed for the key parameter must be sixteen times the
actual key value. For example, if you were freeing key 2 storage, you
would specify a value of X'20' for the key parameter.
Note: The key parameter only applies to subpools where KEY= applies
on the z/OS FREEMAIN macro (for example, subpool 229). It is
ignored for all other subpools.
Output: Return code EQUs are generated by BPEUXCSV FUNC = DSECT. If R15 =
4 on return from this macro, R0 contains the reason code; the following table lists
the reason codes, including the symbol, its value, and a description.
Table 185. Free storage service return codes
Symbol Value Description
BPEUXCSV_FREESTG_RCSP X'04' An invalid or unsupported
subpool was specified. Either
the subpool is not supported
by z/OS, or it is a common
subpool.
BPEUXCSV_FREESTG_RCLV X'08' A zero or negative storage
length was specified.
BPEUXCSV_FREESTG_RCADDR X'0C' A zero storage address was
specified.
BPEUXCSV_FREESTG_RCSTG X'10' The service was unable to free
the requested storage.
BPEUXCSV_FREESTG_RCPARM X'F0' An invalid number of
parameters was passed to the
callable services request.
Example:
This example shows how to free STGLEN bytes starting at the byte at label
MYSTG in subpool 129. STGLEN is an EQU for the number of bytes to free, and
MYSTG is the label on the first byte of the area to free (not the label on a word
pointing to the area).
BPEUXCSV SERVICECODE=BPEUXCSV_FREESTG, X
PARMS=(MYSTG,STGLEN,129), X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
It is similar to the z/OS LOAD service; however, the module that is loaded is
always associated with the top level BPE-TCB (usually the job step TCB of the
address space). The module remains allocated until it is explicitly freed or until the
job step TCB terminates. Therefore, you can rely on the module remaining
allocated, even if it is obtained under a subtask TCB that later terminates.
the first byte of the eight-character field. If modname is coded as a register, the
register must contain the address of the eight-character field.
dcb
The address of an opened DCB for a partitioned data set from which to load
the specified module. To use the TASKLIB, STEPLIB, or JOBLIB data sets, code
0 for this parameter.
opts
Options for the load request. opts is a value that is the sum of several EQU
values. opts identifies the options you have requested for the Load Module
Service request. A BPEUXCSV FUNC = DSECT statement must be included in
your module to generate the EQUs required for this function. To specify that
none of the options apply, code 0 for opts.
BPEUXCSV_LOAD_FIXED
Include this EQU if you want the module to be loaded into page-fixed
storage. If this EQU is omitted, the module is loaded into pageable
storage. This parameter applies only if you also specify
BPEUXCSV_LOAD_GLOBAL. Otherwise, BPEUXCSV_LOAD_FIXED is
ignored.
BPEUXCSV_LOAD_GLOBAL
Include this EQU if you want the module to be loaded into global
(common) storage. If this EQU is omitted, it is loaded into private
storage.
BPEUXCSV_LOAD_EOM
Include this EQU if you specified BPEUXCSV_LOAD_GLOBAL and
you want the module to be deleted only after the address space
terminates. If this EQU is omitted, the module is deleted when the
top-level BPE TCB terminates. BPEUXCSV_LOAD_EOM is ignored if
you did not code BPEUXCSV_LOAD_GLOBAL.
Output: If R15 = 0, the address of the loaded module is returned in R1. Otherwise,
the content of R1 is unpredictable.
Examples:
The following example shows how to load the module whose name is at the 8
bytes of storage, beginning at label MODNAME, from the default TASKLIB,
JOBLIB, or STEPLIB data sets.
BPEUXCSV SERVICECODE=BPEUXCSV_LOAD, X
PARMS=(MODNAME,0,0), X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
. . .
This next example shows how to load the module, whose name is at the 8 bytes of
storage pointed to by R8, into global storage. The module is not deleted until the
address space terminates (or until it is explicitly deleted). R2 contains the callable
services token address that was passed to the user exit routine in the
UXPL_CSTOKENP field. The module is loaded from the data set described by DCB
MYDCB.
. . .
The BPEUXCSV delete module service is similar to the z/OS DELETE service. It
must be used only to delete modules obtained with the load module service. It
must not be used to delete modules that were loaded using any other method
(such as z/OS LOAD).
Output: Return code EQUs are generated by BPEUXCSV FUNC = DSECT. If R15 =
4 on return from this macro, then R0 the reason code; the following table lists these
reason codes, including the symbol, its value, and a description.
Table 187. Delete module service return codes
Symbol Value Description
BPEUXCSV_DELETE_RCDELETE X'04' The module that was
specified could not be deleted.
BPEUXCSV_DELETE_RCPARM X'F0' An invalid number of
parameters was passed to the
callable services request.
BPEUXCSV_DELETE_RCINT X'F4' An internal BPE error
occurred.
Example:
The following example shows how to delete the module whose eight character
name is in the storage pointed to by R5.
. . .
In subsequent user exit routine calls (either for the same or different exit routine
types), you can retrieve the named storage area address by providing the same
name to the retrieve named storage service. Named storage services allow a set of
user exit routines to share information but only if they agree on the same name.
Typically, an initialization-type exit routine creates the named storage, and all
subsequent exit routines retrieve the named storage address.
The name of the storage must be unique within the BPE address space. The named
storage is obtained in subpool 0, LOC = ANY storage. The storage is cleared to
zeros when it is created.
Output: If R15 = 0, the address of the named storage area obtained is returned in
R1. Otherwise, the content of R1 is unpredictable.
Example:
This example shows how to create a 1024-byte storage area that is associated with
the 16-byte name in storage. The first byte of the named storage area is at label
MYNAME.
BPEUXCSV SERVICECODE=BPEUXCSV_NSCREATE, X
PARMS=(MYNAME,1024), X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
. . .
Output: If R15 = 0, the address of the named storage area retrieved is returned in
R1. Otherwise, the content of R1 is unpredictable.
Example:
This example shows how to retrieve the address of the named storage area
associated with the 16-byte name in storage at the address contained in R6.
LA 6,MYNAME
BPEUXCSV SERVICECODE=BPEUXCSV_NSRETRIEVE, X
PARMS=((6)), X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
. . .
Output: Return code EQUs are generated by BPEUXCSV FUNC = DSECT. If R15 =
4 on return from this macro, R0 contains the reason code; the following table lists
these reason codes, including the symbol, its value, and a description.
Example:
The following example shows how to destroy the named storage area associated
with the 16-byte name in storage whose first byte is at label NSNAME.
BPEUXCSV SERVICECODE=BPEUXCSV_NSDESTROY, X
PARMS=(NSNAME), X
TOKEN=UXPL_CSTOKENP, X
SL=(1)
. . .
For this example, assume that the following three types of exit routines are being
used:
v An initialization exit routine that gets control when the address space is first
started. Assume that this exit routine runs before any mainline processing is
done (so you can be sure that the other two exit routines will not be called until
the initialization exit routine has returned).
v A processing exit routine that gets control whenever a particular event occurs in
the address space that needs user exit routine provided information.
v A termination exit routine that gets control when the address space is ending.
Important: These user exit routines are presented here for example purposes only.
These examples should not be assumed to be usable exit routines.
Subsections:
v “Sample initialization exit routine” on page 516
v “Sample processing exit routine” on page 517
v “Sample termination exit routine” on page 518
The initialization exit routine uses the create named storage service to obtain a
16-byte area of storage with the name ZZZ_EXIT_AREA. The storage is mapped by
the following DSECT (which is assumed to be available in all of the modules).
ZZZ_EXIT_AREA DSECT ,
ZZZ_TABLE_NAME DS CL8 Name of table module
ZZZ_TABLE_ADDR DS A Address of table module
DS F Available
ZZZ_EXIT_AREA_L EQU *-ZZZ_EXIT_AREA
The initialization exit routine then uses the load module service to load a module
named ZZZUXTB0 (a table that is needed in this example to pass information to
the other user exit routines). The initialization exit routine stores the name of the
table module in the named storage area field ZZZ_TABLE_NAME, and the address
of the loaded table in field ZZZ_TABLE_ADDR. A routine using a table may not
be required for your application.
A sample initialization exit routine that performs these functions is shown in the
following example. The code shown in the following examples is mainline path
only. For simplicity, error paths and exception handling code are not shown.
INITEXIT CSECT ,
INITEXIT AMODE 31
INITEXIT RMODE ANY
STM 14,12,12(13) Save caller’s registers
LR 12,15 Move module entry pt to R12
USING INITEXIT,12 Address module base register
L 13,8(,13) Chain to 2nd provided save area
LR 11,1 Move exit parmlist to R11
USING BPEUXPL,11 Address std BPE user exit PL
L 10,UXPL_DYNAMICWAP Get 512-byte dynamic storage ptr
USING DYNSTG,10 Address module’s dynamic storage
BPEUXCSV SERVICECODE=BPEUXCSV_NSCREATE, Create named stg X
PARMS=(NSNAME,ZZZ_EXIT_AREA_L), for the exits X
TOKEN=UXPL_CSTOKENP, X
SL=UXCSVPL
LTR 15,15 Did NSCreate work?
BNZ ERROR1 No, go handle error
The processing exit routine obtains the address of the table module that was
loaded by the initialization exit routine. For optimum performance, the processing
exit routine uses the first word of the static work area that BPE passes to save the
address of the shared storage area.
On entry, the processing exit routine checks this word of storage. If this word is
non-zero, the processing routine uses this address as the shared storage area
pointer. If the first word is zero, the processing exit routine invokes the named
storage retrieve service to get the address of the shared storage. The processing exit
routine then saves the address in the static storage area. This technique minimizes
the number of BPE requests for callable services that this exit routine must make
(because it needs to do the retrieve only once; on subsequent calls, the address of
the shared storage area is available in the static work area).
A sample processing exit routine that performs these functions is shown in the
following example.
PROCEXIT CSECT ,
PROCEXIT AMODE 31
PROCEXIT RMODE ANY
STM 14,12,12(13) Save caller’s registers
LR 12,15 Move module entry pt to R12
USING PROCEXIT,12 Address module base register
L 13,8(,13) Chain to 2nd provided save area
LR 11,1 Move exit parmlist to R11
USING BPEUXPL,11 Address std BPE user exit PL
L 10,UXPL_DYNAMICWAP Get 512-byte dynamic storage ptr
USING DYNSTG,10 Address module’s dynamic storage
L 9,UXPL_STATICWAP Get 256-byte static storage ptr
ICM 8,15,0(9) Is shared stg ptr set?
BNZ GOTSHRD Yes, continue
BPEUXCSV SERVICECODE=BPEUXCSV_NSRETRIEVE, Get named stg addr X
PARMS=(NSNAME), X
TOKEN=UXPL_CSTOKENP, X
SL=UXCSVPL
LTR 15,15 Did NSRetrieve work?
BNZ ERROR1 No, go handle error
LR 8,1 Yes, set shrd stg ptr in R8
ST 8,0(,9) Save in static stg for next time
GOTSHRD DS 0H
USING ZZZ_EXIT_AREA,8 Address using "ZZZ" DSECT
L 7,ZZZ_TABLE_ADDR Get table address
LTORG ,
The termination exit routine locates the shared storage area, deletes the loaded
table module using the name that was saved in the shared storage area, and then
destroys the shared area.
A sample termination exit routine that performs these functions is shown in the
following example.
TERMEXIT CSECT ,
TERMEXIT AMODE 31
TERMEXIT RMODE ANY
STM 14,12,12(13) Save caller’s registers
LR 12,15 Move module entry pt to R12
USING TERMEXIT,12 Address module base register
L 13,8(,13) Chain to 2nd provided save area
LR 11,1 Move exit parmlist to R11
USING BPEUXPL,11 Address std BPE user exit PL
L 10,UXPL_DYNAMICWAP Get 512-byte dynamic storage ptr
USING DYNSTG,10 Address module’s dynamic storage
BPEUXCSV SERVICECODE=BPEUXCSV_NSRETRIEVE, Get named stg addr X
PARMS=(NSNAME), X
TOKEN=UXPL_CSTOKENP, X
SL=UXCSVPL
LTR 15,15 Did NSRetrieve work?
BNZ ERROR1 No, go handle error
LR 8,1 Yes, set shrd stg ptr in R8
USING ZZZ_EXIT_AREA,8 Address using "ZZZ" DSECT
BPEUXCSV SERVICECODE=BPEUXCSV_DELETE, Delete table X
PARMS=(ZZZ_TABLE_NAME), module X
TOKEN=UXPL_CSTOKENP, X
SL=UXCSVPL
LTR 15,15 Did DELETE work?
BNZ ERROR2 No, go handle error
BPEUXCSV SERVICECODE=BPEUXCSV_NSDESTROY, Destroy named stg X
PARMS=(NSNAME), X
TOKEN=UXPL_CSTOKENP, X
SL=UXCSVPL
DROP 8 R8 no longer is "ZZZ" area
LTR 15,15 Did NSDestroy work?
BNZ ERROR3 No, go handle error
. . . Do other term exit functions
LTORG ,
DYNSTG DSECT , Dynamic storage DSECT
UXCSVPL DS XL(BPEUXCSV_MAXSL) Space for BPEUXCSV parmlist
. . . Other dynamic storage fields
BPE-defined user exit routine types are available to all IMS component address
spaces that run with BPE. You write these exit routines. No sample exit routines
are provided. The BPE user exit routines are given control in the address space in
an authorized state.
Recommendation: Write BPE user exit routines in assembler, not in a high level
language. BPE does not support exit routines that run under Language
Environment for z/OS. If you write an exit routine in a high level language, and
that routine runs in the Language Environment for z/OS, you might have abends
or performance problems. Language Environment for z/OS is designed for
applications running in key 8, problem program state. BPE user exit routines
execute in key 7 supervisor state.
BPE user exit routines enable you to customize and monitor address spaces built
on the Base Primitive Environment. BPE-defined user exit routine types are
available to all IMS component address spaces that run with BPE. You write these
exit routines. No sample exit routines are provided. The BPE user exit routines are
given control in the address space in an authorized state.
Recommendation: Write BPE user exit routines in assembler, not in a high level
language. BPE does not support exit routines that run under Language
Environment for z/OS. If you write an exit routine in a high level language, and
that routine runs in the Language Environment for z/OS, you might have abends
or performance problems. Language Environment for z/OS is designed for
applications running in key 8, problem program state. BPE user exit routines
execute in key 7 supervisor state.
Subsection:
v “About this routine”
The Init-Term exit routine is not called during BPE abnormal termination. This exit
routine is optional.
exit routines of this type. When the init-term exit point is reached, the exit routines
are driven in the order they are specified by the EXITS= keyword.
On entry to the Init-Term exit routine, R1 points to a Standard BPE user exit
parameter list. Field UXPL_EXITPLP in this list contains the address of the
Init-Term user exit routine parameter lists (mapped by the BPEITXP macro). The
following table provides the following information about the BPE Init-Term user
exit routine parameters:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
Recommendation: Write BPE user exit routines in assembler, not in a high level
language. BPE does not support exit routines that run under Language
Environment for z/OS. If you write an exit routine in a high level language, and
that routine runs in the Language Environment for z/OS, you might have abends
or performance problems. Language Environment for z/OS is designed for
applications running in key 8, problem program state. BPE user exit routines
execute in key 7 supervisor state.
Subsection:
v “About this routine”
The BPE Statistics user exit routine enables you, at regular intervals, to gather
statistics related to an IMS component that is running with a BPE address space.
The exit routine is also called a final time during normal shutdown of the address
space. The BPE Statistics user exit routine is optional.
The statistics exit routine is called on a time-driven basis. The interval between
successive statistics exit routine calls is specified on the STATINTV parameter in
the BPE configuration PROCLIB member. The exit routine is first called soon after
BPE initialization completes. Subsequent calls occur every STATINTV seconds after
the previous call returns.
The BPE statistics exit routine is also called one final time during normal address
space shutdown processing. When it is called for normal shutdown, the function
code passed in the BPESTXP parameter list will be BPESTXP_FUNC_FINALSTATS
(2), indicating that this is the final statistics exit routine call.
The BPE Statistics user exit routine is defined as TYPE = STATS, COMP=BPE in the
EXITDEF statement in the BPE user exit PROCLIB member. You can specify one or
more user exit routines of this type. When this exit routine is invoked, all routines
of this type are driven in the order specified by the EXITS= keyword.
Important: All statistics passed to the BPE Statistics user exit routine are
considered Diagnosis, Modification, or Tuning Information.
13 Address of two pre-chained save areas. The first save area can be used by
the exit routine to save registers on entry. The second save area can be
used by routines that are called from the user exit routine.
14 Return address.
15 Entry point of the exit routine.
On entry to the Statistics exit routine, R1 points to a Standard BPE user exit
parameter list. Field UXPL_EXITPLP in the Standard BPE user exit parameter list
contains the address of the BPE Statistics user exit routine parameter list (mapped
by the BPESTXP macro). The following table provides the following information
about the Statistics user exit routine parameters:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Table 191. BPE statistics user-supplied exit routine parameter list
Field name Offset Length Field usage Description
BPESTXP X'00' N/A N/A DSECT label for the BPE statistics exit parameter list
BPESTXP_VERSION X'00' X'04' Input Parameter list version number (00000001)
BPESTXP_FUNC X'04' X'04' Input Function code
1 Statistics (BPESTXP_FUNC_STATS)
2 Final statistics
(BPESTXP_FUNC_FINALSTATS)
BPESTXP_BPESTATS_PTR X'08' X'04' Input Address of BPE system statistics area header. This
header points to detailed BPE system statistics. All of
the BPE statistics areas are mapped by macro
BPESSTA.
BPESTXP_COMPSTATS_PTR X'0C' X'04' Input Address of the IMS component statistics area, or
zero if none. An IMS component that runs with BPE
has the ability to define its own statistics area, to be
passed along with the BPE statistics area when the
BPE statistics exit is called. However, not all IMS
components provide their own statistics in that
manner. If a component does not provide statistics,
this field in the BPESTXP parameter list is zero.
Related reference:
“CSL RM statistics available through BPE statistics user exit” on page 620
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
“CQS statistics available through the BPE statistics user-supplied exit” on page 583
“CSL ODBM statistics available through BPE statistics user exit” on page 597
“CSL OM statistics available through BPE statistics user exit” on page 612
“CSL SCI statistics available through BPE statistics user exit” on page 628
The BPE system statistics area contains statistics on the following system resources
managed by BPE.
v TCBs
v Control block services
v AWE servers
v Storage services
The field BPESTXP_BPESTATS_PTR in the BPE statistics exit parameter list points
to this area. The following figure shows the structure of the BPE system statistics
area.
The BPE system statistics area begins with the BPESSTA header. The header
contains general information about the BPE address space and the IMS component
running in it. The offset table appears immediately after the header (BPESSTA +
SSTA_LENGTH). Each area for which statistics are reported is assigned a fixed slot
within this table. Each slot contains the offset to the particular area's statistics block
from the start of the offset table. Each area may have one or more blocks for the
statistics pertaining to the area.
All “pointers” among the BPE system statistics area blocks are really offsets, not
addresses. Having offsets allows statistics to be written to a log or other data set,
where the original block addresses are no longer meaningful. All offsets are
relative to the beginning of the DSECT in which the offset field resides.
The total length of the BPE statistics area is not fixed (static). The length depends
on the resource definitions and number of active resources in the system. Many of
the area blocks contain entries for each resource type.
Recommendation: Always use the lengths passed in the area fields to refer to the
length of a particular statistics area. Do not use lengths generated as EQUs
(assembler equates) at assembly time. Using the passed lengths ensures that your
exit routine code works correctly, even if the format of the statistics areas changes
in the future.
The following table provides the following information about the fields in the BPE
system statistics area:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Table 192. BPE system statistics area
Field name Offset Length Field usage Description
BPESSTA X'00' N/A N/A DSECT label for the BPE system statistics
area.
SSTA_ID X'00' X'08' Input Eye catcher (“BPESSTA ”).
SSTA_LENGTH X'08' X'04' Input BPESSTA header section length
(SSTA_END minus BPESSTA). The offset
table starts immediately after the
BPESSTA header (BPESSTA +
SSTA_LENGTH).
SSTA_VER X'0C' X'04' Input BPESSTA header version number within
a BPE release. The current version is
X'00000001' (SSTA_VER_1).
SSTA_BPEVER X'10' X'03' Input BPE version number.
The BPE statistics offset table is immediately after the BPE statistics header
(BPESSTA + SSTA_LENGTH). The offset table contains offsets to the various
statistics blocks in the area.
Attention: The values in the table are offsets from the start of the offset table, not
from BPESSTA. You must use the offset table to locate the different statistics
sections to allow for changes to the lengths of these sections.
The following example demonstrates how to locate the dispatcher statistics area,
assuming that R2 points to the BPESSTA header:
USING BPESSTA,R2 Address SSTA header
LR R3,R2 Copy SSTA header addr
AL R3,SSTA_LENGTH Add length to get ofst tble addr
USING SSTA_OFSTTBL,R3 Address offset table
Check offset fields for values of zero before using them. A zero offset field means
that the particular statistics block is not present in the area.
The following table provides the following information about the fields in the BPE
statistics offset table:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Table 193. BPE statistics offset table
Field name Offset Length Field usage Description
SSTA_OFSTTBL X'00' N/A N/A DSECT label for the BPE statistics
offset table.
SSTA_OFST_DISP X'00' X'04' Input Offset to dispatcher statistics.
SSTA_OFST_CBS X'04' X'04' Input Offset to control block services
statistics.
SSTA_OFST_AWE X'08' X'04' Input Offset to AWE statistics.
SSTA_OFST_STG X'0C' X'04' Input Offset to general storage statistics. This
field is present only if the BPE version
(SSTA_BPEVER) is X'010400' or greater.
The following table provides the following information about the fields in the BPE
dispatcher statistics area:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Table 194. BPE dispatcher statistics area
Field
Field name Offset Length usage Description
SSTADS X'00' N/A N/A DSECT label for BPE dispatcher statistics area.
SSTADS_ID X'00' X'04' Input Dispatcher section eye catcher (“DISP”).
SSTADS_LENGTH X'04' X'04' Input Length of dispatcher section (includes TCB statistics
table).
SSTADS_VERSION X'08' X'04' Input Dispatcher statistics version number. The current
version is X'00000001' (SSTADS_VER_1).
SSTADS_TBLOFST X'0C' X'04' Input Offset from SSTADS to the first TCB statistics table
entry.
SSTADS_NUMENT X'10' X'02' Input Number of TCB statistics table entries.
The following table provides the following information about the BPE TCB
statistics table entry:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Each active BPE-managed dispatchable unit (TCB or SRB) in the address space has
one table entry. In the case of DU types that support multiple DUs, each instance
of a DU has one entry.
Important: The BPE and the IMS component running on the BPE can define a DU
type with the same name. Use the SSTADS_F1_SYS flag to differentiate between
the DUs in this case.
The following table provides the following information about the fields in the BPE
control block services (CBS) statistics area:
v The field name
v The offset
v The length
v The field usage
v A description of the field
The control blocks services area contains a header with global statistics and
information, followed by a table with one entry for each CBS-defined block type in
the system.
Table 196. BPE control block services statistics area
Field name Offset Length Field usage Description
SSTACB X'00' N/A N/A DSECT label for BPE control block
services statistics area.
SSTACB_ID X'00' X'04' Input Control block services section eye
catcher (“CBS”).
SSTACB_LENGTH X'04' X'04' Input Length of CBS section (includes block
statistics table).
SSTACB_VERSION X'08' X'04' Input Control block services statistics version
number. The current version is
X'00000001' (SSTACB_VER_1).
The following table provides the following information about the BPE control
block statistics table entry:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Each control block type in the system has one table entry.
Important: The BPE and the IMS component running on the BPE can define a
block type with the same name. Use the SSTACB_F1_SYS flag to differentiate
between the blocks in this case.
Table 197. BPE control block statistics table entry
Field name Offset Length Field usage Description
SSTACB_BTE X'00' N/A N/A DSECT label for BPE control block
statistics table entry.
SSTACB_TYPE X'00' X'04' Input Block type.
SSTACB_FLG1 X'04' X'01' Input CBTE flag 1 (unlabeled bits are
reserved by IBM).
SSTACB_F1_COMP (X'20')
Blocks are compressible.
SSTACB_F1_SYS (X'10')
Block is a BPE block.
SSTACB_F1_FIXED (X'08')
Block storage is page fixed.
SSTACB_FLG2 X'05' X'01' Input CBTE flag 2 (unlabeled bits are
reserved by IBM).
SSTACB_F2_31ONLY (X'10')
Block is in 31-bit only storage.
SSTACB_F2_PAGE (X'02')
Get BPAGE on 4 KB page
boundary.
SSTACB_F2_ANY (X'01')
Block in LOC=ANY storage.
SSTACB_IDX X'06' X'01' Input Block index number.
SSTACB_SP X'07' X'01' Input Block storage subpool.
SSTACB_#GET X'08' X'04' Input Number of gets for this block type.
The following table provides the following information about the BPE AWE
services statistics area:
v The field name
v The offset
v The length
v The field usage
v A description of the field
The AWE services area contains a header with global statistics and information,
followed by a table with one entry for each instance of an AWE server running in
the system.
Table 198. BPE AWE services statistics area
Field name Offset Length Field usage Description
SSTAAW X'00' N/A N/A DSECT label for BPE AWE services
statistics area.
SSTAAW_ID X'00' X'04' Input AWE services section eye catcher
(“AWE”).
SSTAAW_LENGTH X'04' X'04' Input Length of AWE section (includes AWE
server statistics table).
SSTAAW_VERSION X'08' X'04' Input AWE services statistics version
number. The current version is
X'00000001' (SSTAAW_VER_1).
SSTAAW_TBLOFST X'0C' X'04' Input Offset from SSTAAW to first AWE
statistics table entry.
SSTAAW_NUMENT X'10' X'02' Input Number of AWE server statistics table
entries.
SSTAAW_ENTLEN X'12' X'02' Input Length of each AWE server statistics
table entry.
The following table provides the following information about the BPE AWE
services statistics table entry:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Each active AWE server running in the system has one table entry.
Important: It is possible for BPE and the IMS component running on the BPE to
define an AWE server type with the same name. Use the SSTAAW_F1_SYS flag to
differentiate between the identically-named BPE and user-product AWE servers.
Table 199. BPE AWE services statistics table entry
Field name Offset Length Field usage Description
SSTAAW_ASTE X'00' N/A N/A DSECT label for AWE server statistics
table entry.
SSTAAW_TYPE X'00' X'04' Input AWE server type.
SSTAAW_SERVID X'04' X'04' Input Unique server ID number.
SSTAAW_FLG1 X'08' X'01' Input Flag 1 (AQSB_FLG1) (unlabeled bits
are reserved by IBM).
SSTAAW_F1_INIT X'80'
Server init is in progress.
SSTAAW_F1_TERM X'40'
All servers should terminate.
SSTAAW_F1_MULTI X'20'
Queue is multi-server.
SSTAAW_FLG2 X'09' X'01' Input Flag 2 (AQHE_FLG1) (unlabeled bits
are reserved by IBM).
SSTAAW_F2_GENERIC X'80'
Generic AWE server.
SSTAAW_F2_AUTO X'40'
Server is AUTOSTARTed.
SSTAAW_F2_SYSTCB X'20'
Server runs under system TCB.
SSTAAW_F2_SYS X'10'
System (BPE) server.
SSTAAW_F2_LOC24 X'08'
Thread blocks in 24-bit storage.
SSTAAW_F2_FORCEMAX X'04'
Force maximum threads on
AUTOSTART.
SSTAAW_TCBID X'0A' X'01' Input ID number of owning TCB.
SSTAAW_NUMTHDS X'0B' X'01' Input Number of server threads for this
queue header.
SSTAAW_QHDR X'0C' X'04' Input Address of AWE queue header.
X'10' X'04' Input Reserved.
SSTAAW_TQCOUNT X'14' X'04' Input Number times an extra server was
woken up off of the AQSB_THREADQ
(multi-server queue headers only).
SSTAAW_NUMAWE X'18' X'1C' Input Number of AWEs processed off of this
queue header.
SSTAAW_NUMEQS X'1C' X'04' Input Number of times one or more AWEs
were dequeued from this queue
header (NUMAWE/NUMDEQS is the
average number of AWEs on the
queue header).
The following table provides the following information about the BPE storage
services statistics area:
v The field name
v The offset
v The length
v The field usage
v A description of the field
Table 200. BPE storage services statistics area
Field name Offset Length Field usage Description
SSTASG X'00' N/A N/A DSECT label for BPE storage services
statistics area.
SSTASG_ID X'00' X'04' Input Storage services section eye catcher
(“STG”).
SSTASG_LENGTH X'04' X'04' Input Length of storage section.
SSTASG_VERSION X'08' X'04' Input Storage services statistics version
number. The current version is
X'00000001' (SSTASG_VER_1).
X'0C' X'0C' Input Reserved.
SSTASG_STGPVT24 X'18' X'04' Input Number of bytes of private storage
currently allocated in 24-bit storage by
the BPE GETMAIN service,
BPEGETM. Note that the values for
the stack, control block, and buffer
pool services are included in this
number.
SSTASG_STGPVT31 X'1C' X'04' Input Number of bytes of private storage
allocated in 31-bit storage by the BPE
GETMAIN service, BPEGETM. Note
that the values for the stack, control
block, and buffer pool services are
included in this number.
SSTASG_STKPVT24 X'20' X'04' Input Number of bytes of private storage
currently allocated in 24-bit storage by
the BPE stack manager service.
SSTASG_STKPVT31 X'24' X'04' Input Number of bytes of private storage
currently allocated in 31-bit storage by
the BPE stack manager service.
Subsections:
v “About this routine”
v “Communicating with IMS” on page 540
The DBRC Request exit routine is an optional exit routine, and is a diagnosis,
modification, or tuning interface.
To call this exit, set the EXITDEF statement in the BPE user exit list PROCLIB
member to TYPE=REQUEST. When the EXITDEF statement is set to
TYPE=REQUEST, all user exits on the list are always called. Setting the value of
UXPL_CALLNEXTP to UXPL_CALLNEXTNO does not prevent user exits on the
list from being called. The START request function invokes all the listed exits in the
specified order. The END request function invokes all the listed exits in reverse
order. All of the defined user exits are always called regardless of the setting of
UXPL_CALLNEXTP, the exit function code, or the setting of BRQX_DONOTCALL.
IMS uses the entry and exit registers to communicate with this type of
user-supplied exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the BPE user exit parameter list (mapped by macro BPEUXPL)
13 Address of two pre-chained save areas. The first save area can be used by
the exit routine to save registers on entry. The second save area can be used
by routines that are called from the user exit routine.
14 Return point address of the exit routine.
15 Entry point address of the exit routine.
The following table describes the DBRC Request exit routine parameters.
Table 202. DBRC Request user exit parameter list
Length in Field
Field name Offset bytes Usage Description
BRQX_ID X'00' X'08' Input Eye catcher “DSPBRQX”
BRQX_LEN X'08' X'04' Input Length of the DSPBRQX block
BRQX_PVER X'0C' X'04' Input Parameter list version number
BRQX_FUNC X'10' X'04' Input Function code:
1 Start request processing
(BRQX_FUNC_START)
2 End request processing
(BRQX_FUNC_END)
BRQX_BRLSBPTR X'14' X'04' Input Address of DFSBRLSB
BRQX_ASCD X'18' X'04' Input Address of SCD
Register Contents
15 Register 15 contains the return code. Any return code other than 0 is ignored.
Related concepts:
DBRC API (System Programming APIs)
Related reference:
BPE exit list members of the IMS PROCLIB data set (System Definition)
Subsections:
v “About this routine”
v “Communicating with IMS” on page 542
The DBRC Security exit routine is an optional exit routine and is selected using the
[Link] or [Link] commands. The exit can be used with RACF or
another security product. The security product is invoked first, and return and
reason codes are passed to the routine. The return code then determines the
success or failure of the authorization. The exit overrides the outcome of the
security product. DBRC messages issued as a result of unsuccessfully invoking the
security product are suppressed.
This exit routine is required if the COMMAND AUTH setting in the RECON status
record is EXIT or BOTH, and an EXITDEF statement exists in the BPE user exit list
If an EXITDEF statement exists, when the exit is invoked, all user exits of a
TYPE=SECURITY are called in the order specified by the EXIT= keyword.
Table 203. Command authorization exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, DCCTL
Naming convention Using standard z/OS conventions, you can give the routine any
name up to 8 characters in length. Be sure that the name is unique
and does not conflict with the existing members of the data set in
which this routine is stored. Because most IMS-supplied routines
begin with the prefixes BPE, CQS, CSL, DFS, DBF, DSP, DXR, IMS,
or HWS, choose a name that does not begin with these letters.
Binding You must bind this routine into an authorized data set as a
reentrant (RENT) load module.
Including the routine No special steps are needed to include this routine. The exit is only
included if DBRC command authorization (CMDAUTH) is set to
EXIT or BOTH.
IMS callable services This exit is not eligible to use IMS callable services. It is eligible to
use BPE user exit callable services.
Sample routine DSPDCAX0 is provided in the [Link] data set, and you
location can modify it to work in both BPE and non-BPE DBRC
environments.
IMS uses the entry and exit registers to communicate with the routines.
Upon entry, the exit routine must save all registers using the provided save area.
The registers contain the following:
Register Contents
1 Address of the BPE user exit parameter list (mapped by macro BPEUXPL)
13 Address of two pre-chained save areas. The first save area can be used by
the exit routine to save registers on entry. The second save area can be used
by routines that are called from the user exit routine.
14 Return address
15 Entry point address of exit routine
On entry to the DBRC Security exit routine, register 1 points to a standard BPE
user exit parameter list. In that list, the field UXPL_EXITPLP contains the address
of the DBRC Security user exit routine parameter lists (mapped by the DBRC
command authorization (DCA) interface parameter block (DSPDCABK). The
parameters are described in the following table.
The following fields are used only for the non-BPE DBRC command authorization
exit routine (DSPCAX0) and are set to 0 for this routine:
v DCAExitAddr
v DCAUserAreaPtr
v DCAUserAreaLen
Table 204. DBRC Security User Exit parameter list
Length in Field
Field name Offset bytes Usage Description
DCABLKID X'00' X'08' Input Eye catcher “DSPCABK”
DCABLKLN X'08' X'04' Input Length of the block
DCARNPTR X'0C' X'04' Input Address of the resource name (RN)
DCARNLEN X'10' X'04' None Resource name length
DCARHPTR X'14' X'04' Input Address of RN high-level qualifier
DCARHLEN X'18' X'04' Input Length of RN high-level qualifier
DCARVPTR X'1C' X'04' Input Address of RN command verb
DCARVLEN X'20' X'04' Input Length of RN command verb
DCARMPTR X'24' X'04' Input Address of RN command modifier
DCARMLEN X'28' X'04' Input Length of RN command modifier
DCARQPTR X'2C' X'04' Input Address of RN command qualifier
DCARQLEN X'30' X'04' Input Length of RN command qualifier
DCAUserID X'34' X'08' Input User ID of command issuer
DCAExitAddr X'3C' X'04' None Address is 0 for BPE user exit
DCAFlags X'40' X'04' Input Miscellaneous flags:
X'80' Security product was called.
X'40' Security exit DSPDCAX0 was
called.
X'20' 1st call (REQUEST=LIST) done.
Before returning to DBRC, the exit routine must restore all registers except for
register 15, which contains the following return code.
Register Contents
15 Return code:
0 User is authorized to use the DBRC command.
Non-zero
Reject the command because of an unauthorized user ID.
This return code is ignored unless the exit routine is one of the
following:
v The exit routine is the last routine defined in the exit list for the
security exit.
v The exit routine sets the byte pointed to by UXPL_CALLNEXTP
to the value UXPL_CALLNEXTNO.
Related reference:
“DBRC Command Authorization exit routine (DSPDCAX0)” on page 325
“Routine binding restrictions” on page 8
Subsections:
v “About this routine”
v “Communicating with IMS” on page 547
The RECON I/O exit routine tracks changes to the RECON data set, which you
can log in a journal. You can code the RECON I/O exit routine so that it updates
the journal each time a record of the data set is updated, inserted, deleted, or read.
You can also record changes that are internal to the RECON access modules, such
as header record extension control item changes, or the addition and deletion of
multiple update control records within the data set.
You can use the journal, in turn, as a trace facility, to monitor the activity of
specific record types, or as a means of writing your own recovery utility for the
RECON data set.
To call the RECON I/O exit routine, the EXITDEF statement in the BPE user exit
list PROCLIB member must be set for a TYPE=RECONIO. If the EXITDEF
statement is not specified, the user exit DSPCEXT0 will be called. When the
EXITDEF statement is specified, all user exits of TYPE=RECONIO will be called in
the order specified by the EXITS=keyword.
You can use the RECON I/O exit routine when RECON access is either serial or
parallel.
Recommendation: Do not use the BPE REFRESH USEREXIT for a DBRC address
space during periods of high activity. No DBRC request processing will occur
while the BPE user exit is being refreshed.
The following table shows the attributes of the RECON I/O exit routine.
Table 205. RECON I/O exit routine attributes
Attribute Description
IMS environments DB/DC, DBCTL, and DCCTL.
Naming convention Using standard z/OS conventions, you can give the routine any
name up to 8 characters in length. Be sure that the name is unique
and does not conflict with the existing members of the data set in
which this routine is stored. Because most IMS-supplied routines
begin with the prefixes BPE, CQS, CSL, DFS, DBF, DSP, DXR, IMS,
or HWS, choose a name that does not begin with these letters.
Binding You must write and bind this routine as reentrant (RENT).
Including the routine No special steps are needed to include this routine.
IMS callable services This exit is not eligible to use IMS callable services. It is eligible to
use BPE user exit callable services.
Sample routine The [Link] data set contains member name DSPCEXT1,
location which you can modify to provide support for both BPE and
non-BPE based DBRC environments. DSPCEXT1 must be linked as
DSPCEXT0
You must write and bind the RECON I/O exit routine as reentrant. It is entered
from DBRC in 31-bit addressing mode and must return to DBRC in 31-bit
addressing mode. All parameters and data areas supplied to RECON I/O exit
routine by DBRC are located above the 16 MB line.
If the RECON I/O exit routine terminates abnormally, calls to the routine will
continue to be made up to the limit specified by the ABLIM parameter.
Control is passed to the RECON I/O exit routine whenever a RECON record has
been successfully read, written, or modified on COPY 1 of the RECON data set,
not necessarily for every physical I/O operation. Changes to the header record
extension also cause the RECON I/O exit routine to be called.
When RECON access is parallel, the RECON data set can be accessed by multiple
DBRC instances concurrently. In this case, multiple instances of the RECON I/O
exit routine can be invoked concurrently.
With serial access, the user can rely on all updates written to the RECON data set.
If an error occurs, and the update is backed out by DBRC, the exit is called for all
the updates made during backout. If the exit is used to mirror updates, the exit can
immediately make the equivalent updates to a mirror data set.
With parallel access, the backout of data is not done by DBRC, which means that
the exit is not called for the backout updates. Updates made during a given series
should not be considered hardened in the RECON data set until a commit call is
made. If the exit is used to mirror updates, it must either be capable of backing out
the updates it mirrors, or it must collect all updates for a given series and only
mirror them if the exit is called with a commit call.
The records passed to the exit routine are in the format of the release level of the
RECON data set, and rather than the release level of the DBRC that calls the exit.
In order for the DBRCs of multiple IMS systems at different release levels to
coexist, the RECON data set must be at the level of the highest level system. An
indication of the RECON data set release level exists in the parameter list that is
passed to the exit. When the RECON is upgraded to a new release, the exit routine
can use both the old release format and the new release format. During the
upgrade process, the release level in the parameter list shows the old release level.
A flag in the parameter list indicates that an upgrade is in progress.
The release level of the RECON can change from one Begin Series call to another.
Except during the upgrade process, the release level does not change between the
Begin Series call and the Terminate Series call.
Any modifications to storage that this routine makes must be made to storage that
is obtained by the routine, not to the data areas pointed to by DBRC or IMS or to
those contained within the routine itself.
Each series of I/O accesses that DBRC makes to the RECON data set is indicated
to the routine by a Begin Series call. When the series of I/O operations is complete,
the routine receives a Terminate Series call.
Performance recommendations
While this routine is running, the RECON data set is reserved so that no other jobs
can access RECON records. To minimize the affect that this routine's execution has
on your system's performance, you need to:
v Limit the I/O operations that the routine itself performs and simplify the
routine's functions to make efficient use of processing time.
v Be sure that any resources needed solely by the routine (that is, those not
needed by DBRC/IMS in general) are immediately available to z/OS when
DBRC is initialized and in control. You should therefore avoid operations that
can put the routine, and therefore DBRC, in a prolonged wait state (for example,
the ENQUEUE/DEQUEUE of resources that cannot be readily accessed by the
routine or write to operator messages that require waiting for a reply).
v Be aware that with parallel RECON access, the RECON data set is not reserved.
In addition, multiple instances of the RECON I/O exit routine can be invoked
concurrently.
DBRC enables the size of a record in the RECON data set to not be limited by the
defined RecordSize. DBRC divides its own records into segments, each of which
fits into a single Control Interval (CI) and is sent by VSAM as a complete record.
Segmenting allows a logical RECON record to be as large as 16 777 215 bytes. The
RECON I/O exit routine will be presented with complete, unsegmented logical
records.
To minimize the performance impact that the routine's execution has on DBRC, the
routine spools its copy of RECON data records to a data set (specified by a DD
statement with the name DBRCDATA) for later offline processing outside the
DBRC environment. Any data sets that your routine references need to be accessed
by DD statements as well.
IMS uses the entry and exit registers to communicate with the exit routine.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the BPE user exit parameter list (mapped by macro BPEUXPL)
13 Address of two pre-chained save areas. The first save area can be used by
the exit routine to save registers on entry. The second save area can be used
by routines that are called from the user exit routine.
14 Return address
15 Entry point address of exit routine
Description of parameters
When control is given to the BPE-based DBRC RECON I/O exit routine, register 1
contains the address of the standard BPE user exit parameter list (BPEUXPL). In
this list, the field UXPL_EXITPLP contains he address of the RECON I/O user exit
parameter list, which is mapped by the DBRC RECON I/O interface parameter
block (DSPPRIOX).
This routine receives the parameter list from the calling RECON access module at
the first Begin Series call for a job. The parameter list points to the same data area
for all subsequent calls for that job.
The data area pointed to by the parameter list is 24 words (96 bytes) long and
starts on a fullword boundary. Fields 9 through 16 of the list are free to be used by
the exit routine and remain unchanged by DBRC after the first Begin Series call.
They initially contain all zeros.
The first byte of word 17 of the list indicates the release level of the RECON in
hexadecimal format. RECON release levels by IMS version are:
Byte 2 of Field 17 contains flags. Bytes 3 and 4 of Field 17, and Fields 22 through
24 are reserved for future use.
The following tables list the exit parameter list at various exit points in the routine.
Table 206. Begin Series parameter list
Field Name Offset Length Field Description
Usage
RIOX_EYEC X'00' X'04' Input Eye catcher “CEXT”
RIOX_FUNC X'04' X'04' Input Function Code 1 - “Begin Series”
Before returning to DBRC, the exit routine must restore all registers except register
15, which must contain one of the following return codes:
Related concepts:
Initializing and maintaining the RECON data sets (System Administration)
Related reference:
“RECON I/O exit routine (DSPCEXT0)” on page 424
“Routine binding restrictions” on page 8
To minimize the performance impact that the routine's execution has on DBRC, the
routine spools its copy of RECON data records to a data set (specified by a DD
statement with the name DBRCDATA) for later off-line processing outside the
DBRC/IMS environment. Any data sets that your routine references need to be
accessed by DD statements as well.
DBRC statistics
You can use the BPE Statistics user-supplied exit to gather both BPE and DBRC
statistics.
Subsections:
v “DBRC statistics header”
v “DBRC statistics record DSPBST1”
v “DBRC statistics record DSPBST2” on page 557
The following table describes the contents of the DBRC Statistics header. The
statistics header is mapped by DSPBSTX.
Table 214. DBRC statistics header data
Field
Field Name Offset Length usage Description
BSTX_ID X'00' X'08' Input Eye catcher "DSPBSTX".
BSTX_LEN X'08' X'04' Input Length of header.
BSTX_PVER X'0C' X'04' Input Header version number (X'00000001').
BSTX_CLIENT_CNT X'10' X'04' Input Number of active clients for which statistics are
available.
BSTX_ST1OFF X'14' X'04' Input Offset to statistics area for first client. The offset
points to the DSPBST1 area.
X'18' X'04' None Reserved.
Record DSPBST2 contains statistics that are related to specific DBRC request types.
The statistics are cumulative. Some of the data in record DSPBST1 might reflect
information for a request that is being processed when the BPE statistics exit
routine is called.
The following table describes the DBRC request entry statistics record
BST2_REQUEST_DATA, which represents an entry in the DSPBST2 statistics
record. The address of the first entry is the address of the DSPBST2 record plus the
offset value in BST2_rqstlist. To obtain the address of subsequent entries, add
BST2_rqstLen to the address of the current entry.
Table 217. DBRC request entry statistics record BST2_REQUEST_DATA
Field
Field name Offset Length usage Description
BST2_rqst_ID X'00' X'01' Input Request ID - this is the BRLBF2 value in the DFSBRLSB
control block used for the request.
X'01' X'03' None Reserved.
BST2_rqst_cnt X'04' X'04' Input Number of requests for this function.
BST2_rqst_retry X'08' X'04' Input Number of times that the function required a retry.
X'0C' X'04' None Reserved.
BST2_rqst_time X'10' X'08' Input Total time spent processing this function.
X'18' X'08' None Reserved.
BST2_rqst_loc X'20' X'04' Input Number of record LOCATE requests made processing this
function.
Related reference:
“BPE Statistics user-supplied exit routine” on page 523
Note: Throughout this topic the term “user exit routine” means “user-supplied
exit routine.”
You write these exit routines, no samples are provided. The CQS user exit routines
receive control in the CQS address space in an authorized state. CQS uses Base
Primitive Environment (BPE) services to call and manage the CQS user exit
routines.
In addition, you can use the BPE Statistics User exit to gather CQS statistics.
CQS uses BPE services to call and manage its user exit routines. BPE allows you to
externally specify the user exit routine modules to be called for a particular exit
routine type using EXITDEF= statements in BPE user exit PROCLIB members. BPE
also provides a common user exit routine execution environment. This
environment includes:
v Standard BPE user exit parameter list
v Static work areas for the routines
v Dynamic work areas for the routines
v Callable services for the routines
v A recovery environment to protect against abends in the user exit routines
Recommendation: Write CQS user exit routines in assembler, not in a high level
language. CQS does not support exit routines running under Language
Environment for z/OS. If you write an exit routine in a high level language, and
that routine is executing in the Language Environment for z/OS, you might have
Related reading
v For complete information about displaying and refreshing user exits, see IMS
Version 14 Commands, Volume 1: IMS Commands A-M.
Related reference:
Part 3, “CQS client exit routines,” on page 633
The CQS Init-Term user exit routine is driven for the following events:
v CQS initialization, after CQS has completed its initial processing, but before it
connects to any structures.
v CQS normal termination, during CQS address space termination, after CQS has
disconnected from all structures.
On entry to the Init-Term exit routine register 1 points to a Standard BPE user exit
parameter list. The field UXPL_EXITPLP in this list contains the address of the
Init-Term user exit routine parameter lists (mapped by the CQSINTMX macro). The
parameters are described in the following two tables.
Table 218. CQS init-term user-supplied exit routine parameter list: CQS initialization
Field name Offset Length Field Usage Description
ITXPVSN X'00' X'04' Input Parameter list version number
(X'00000001')
ITXFUNC X'04' X'04' Input Function code
1 CQS initialization (ITXFINIT)
ITXCQSID X'08' X'08' Input CQS identifier
ITXCQSVN X'10' X'04' Input CQS version number
Table 219. CQS init-term user-supplied exit routine parameter list: CQS termination
Field name Offset Length Field usage Description
ITXPVSN X'00' X'04' Input Parameter list version number
(X'00000001')
ITXFUNC X'04' X'04' Input Function code
2 CQS normal termination
(ITXFNTRM)
ITXCQSID X'08' X'08' Input CQS identifier
ITXCQSVN X'10' X'04' Input CQS version number
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
The Client Connection exit routine is driven for the following events:
v Client connect; after a client successfully connects to one or more structures.
v Client disconnect; after a client disconnects normally or abnormally from one or
more structures.
1 Address of the “Standard BPE user exit parameter list” on page 495. The
UXPL_EXITPLP field contains the address of the CQS Client Connection
exit parameter list, which is mapped by macro CQSCLNCX.
13 Address of two pre-chained save areas. The first save area can be used by
the exit routine to save registers on entry. The second save area can be
used by routines that are called from the user exit routine.
14 Return address.
15 Entry point of the exit routine.
On entry to the Client Connection exit routine, R1 points to a Standard BPE user
exit parameter list. The field UXPL_EXITPLP in this list contains the address of the
Client Connection user exit routine parameter list (mapped by the CQSCLNCX
macro). The parameters for client connection and client disconnect are described in
the following two tables.
Table 220. CQS client connection user-supplied exit routine parameter list: client connection
Field
Field name Offset Length usage Description
CCXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
CCXFUNC X'04' X'04' Input Function code
1 Client connect (CCXFCONN).
CCXCQSID X'08' X'08' Input CQS identifier.
CCXCQSVN X'10' X'04' Input CQS version number.
CCXCLNNM X'14' X'08' Input Client name.
CCXCSNUM X'1C' X'04' Input Number of structure name entries in the list.
CCXCSENL X'20' X'04' Input Length of each structure name list entry.
CCXCSLST X'24' X'04' Input Address of first structure name entry. Each entry contains the
16-byte name of a structure that the client connected to.
Table 221. CQS client connection user-supplied exit routine parameter list: client disconnect
Field
Field name Offset Length usage Description
CCXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
CCXFUNC X'04' X'04' Input Function code
2 Client disconnect (CCXFDISC).
CCXCQSID X'08' X'08' Input CQS identifier.
CCXCQSVN X'10' X'04' Input CQS version number.
Table 221. CQS client connection user-supplied exit routine parameter list: client disconnect (continued)
Field
Field name Offset Length usage Description
CCXCLNNM X'14' X'08' Input Client name.
CCXDFLG1 X'1C' X'01' Input Flag byte indicates whether the client disconnect is abnormal
X'80' Client disconnect is abnormal (CCXDABND).
N/A X'1D' X'03' Reserved.
CCXDSNUM X'20' X'04' Input Number of structure name entries in the list.
CCXDSENL X'24' X'04' Input Length of each structure name list entry.
CCXDSLST X'28' X'04' Input Address of first structure name entry. Each entry contains the
16-byte name of a structure that the client disconnected from.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
During overflow processing the Queue Overflow exit routine is called to verify
that a queue name selected by CQS is eligible for overflow processing. When CQS
determines that the structure has reached its overflow threshold, overflow
threshold processing begins. Then CQS determines which queues are using the
most storage in the structure. The queues using the most storage in the structure
become candidates for overflow and are moved to the overflow structure. Or, if no
overflow structure is defined, the queues using the most storage in the structure no
longer allow CQSPUT requests for the queue.
Restriction: The queue overflow user exit does not apply to the resource structure.
During queue selection processing the Queue Overflow exit routine is invoked
once per selected queue name to approve or veto the queue name for overflow
processing. If the exit routine approves the move or the exit routine is not
specified, all data objects for that queue (such as IMS messages for that
destination) are moved to the overflow structure. All additional processing for that
queue name is done in the overflow structure, if the overflow structure exists. If no
overflow structure exists, CQSPUT requests to the queue are rejected. If the move
is vetoed, the queue name is removed from the overflow candidate list, and
another queue name is selected.
Because multiple overflow exit routines might exist, the last exit routine called is
the one that determines whether the queue name is selected for overflow. If an exit
routine accepts a queue name as one that is valid for overflow processing or does
not recognize the name, the exit routine must set R15 to 0 and specify that the next
exit in the list should be called. This allows the next exit routine to have a chance
to veto the name selection. If an exit routine determines that a queue name is
ineligible as a candidate for overflow processing, the exit routine must set R15 to 4
and specify that no more exit routines are to be called.
Within the Standard BPE user exit parameter list is the field UXPL_CALLNEXTP,
which is a pointer to a byte of storage which is set by the exit routine to indicate
whether the next exit routine in the list is to be called. When the byte of storage is
set to UXPL_CALLNEXTYES, the next exit is called (if one exists). When the byte
of storage is set to UXPL_CALLNEXTNO, no more exits are called for this queue
name.
If a Queue Overflow exit routine determines that a queue name is not a candidate
for overflow, the exit routine can set the byte pointed to by field
UXPL_CALLNEXTP to the value of UXPL_CALLNEXTNO (X'04') so that no other
exit routines are called for the queue name.
On entry to the Queue Overflow exit routine, R1 points to a Standard BPE user
exit parameter list. The field UXPL_EXITPLP in this list contains the address of the
CQS Queue Overflow user exit routine parameter list (mapped by the CQSQOFLX
macro). The parameters are described in detail in the following table.
Table 222. CQS queue overflow user-supplied exit routine parameter list
Field
Field name Offset Length usage Description
QOXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
QOXFUNC X'04' X'04' Input Function code
1 Queue name selection (QOXFQOFL).
QOXQOFL1 X'08' X'01' Input Flag byte indicating whether this is the first overflow exit call
for this overflow threshold process. The exit routine is called
once per selected queue name for each occurrence of overflow
threshold processing. This bit will be on for the first queue
name for an occurrence of overflow threshold processing.
X'80' This is the initial entry for this overflow threshold
process (QOXQ11ST)
N/A X'09' X'03' None Reserved.
QOXCQSID X'0C' X'08' Input CQS identifier.
QOXCQSVN X'14' X'04' Input CQS version number.
QOXSTRNM X'18' X'10' Input Structure name.
QOXQNAME X'28' X'10' Input Queue name selected for overflow processing.
QOXDOBJN X'38' X'04' Input Number of data objects on the selected queue name.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
The exit routine is driven at the end of a successful system checkpoint. All
statistical data that CQS gathers, including rebuild statistics and checkpoint
statistics, are passed to the Structure Statistics user exit at the end of each
successful system checkpoint. All statistical data is logged in the Structure Statistics
log record. You can also obtain this same statistical data with the CQSQUERY
FUNC=STRSTAT request.
The CQS Structure Statistics user exit routine is defined as TYPE = STRSTAT in the
EXITDEF statement in the BPE user exit PROCLIB member. You can specify one or
more user exit routines of this type. When this exit routine is invoked, all routines
of this type are driven in the order specified by the EXITS= keyword.
Subsections:
v “CQS structure statistics user-supplied exit routine parameter list”
v “CQS structure process statistics record” on page 567
v “CQS request statistics record” on page 568
v “Data object statistics record for CQS” on page 568
v “Queue name statistics record for CQS” on page 570
v “z/OS request statistics record for CQS” on page 571
v “Structure rebuild statistics record for CQS” on page 572
v “Structure checkpoint statistics record for CQS” on page 575
v “Structure checkpoint statistics gathered by CQS” on page 575
On entry to the Structure Statistics exit routine, R1 points to a Standard BPE user
exit parameter list. The field UXPL_EXITPLP in this list contains the address of the
CQS Structure Statistics user exit routine parameter list (mapped by the
CQSSTATX macro). The parameters are described in the following table.
Table 223. CQS structure statistics user-supplied exit routine parameter list
Field
Field name Offset Length usage Description
SAXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
SAXFUNC X'04' X'04' Input Function code
1 System checkpoint (SAXFCSYS).
SAXCQSID X'08' X'08' Input CQS identifier.
SAXCQSVN X'10' X'04' Input CQS version number.
SAXSTRNM X'14' X'10' Input Structure name.
SAXSSTT1 X'24' X'04' Input Address of structure process statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT1 macro). See the following section
for a description of the process statistics record.
SAXSSTT2 X'28' X'04' Input Address of CQS request statistics record for activity
performed for CQS requests for this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT2 macro).
SAXSSTT3 X'2C' X'04' Input Address of data object statistics record for activity performed
on data objects in this structure for all clients since restart or
the last successful structure checkpoint (mapped by the
CQSSSTT3 macro). See Table 226 on page 569 for a
description of the object statistics record.
SAXSSTT4 X'30' X'04' Input Address of queue name statistics record for activity
performed on queue names in this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT4 macro). See Table 227 on page 571
for a description of the queue name statistics record.
SAXSSTT5 X'34' X'04' Input Address of z/OS request statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT5 macro). See Table 228 on page 571
for a description of the z/OS request statistics record.
SAXSSTT6 X'38' X'04' Input Address of rebuild statistics record containing data from the
last rebuild in which this CQS acted as master (mapped by
the CQSSSTT6 macro). See Table 229 on page 572 for a
description of the rebuild statistics record.
SAXSSTT7 X'3C' X'04' Input Address of structure checkpoint statistics record containing
data from the last three structure checkpoints in which this
CQS acted as master (mapped by the CQSSSTT7 macro). See
Table 230 on page 575 for a description of the structure
checkpoint statistics record.
The following table describes the CQS Structure Statistics user exit routine
structure process statistics record.
Table 224. CQS structure process statistics record
Field
Field name Offset Length usage Description
SS1ID X'00' X'08' Input Eye catcher CQSSSTT1
The following table describes the Structure Statistics user exit routine CQS request
statistics record.
Table 225. CQS request statistics record
Field
Field name Offset Length usage Description
SS2ID X'00' X'08' Input Eye catcher CQSSSTT2
SS2LN X'08' X'04' Input Length of valid data
SS2PVSN X'0C' X'04' Input Parameter list version number (X'00000002')
SS2BRWSE X'10' X'04' Input Number of CQSBRWSE requests for this structure
SS2CHKPT X'14' X'04' Input Number of CQSCHKPT requests for this structure
SS2CONN X'18' X'04' Input Number of CQSCONN requests for this structure
SS2DEL X'1C' X'04' Input Number of CQSDEL requests for this structure
SS2DISC X'20' X'04' Input Number of CQSDISC requests for this structure
SS2INFRM X'24' X'04' Input Number of CQSINFRM requests for this structure
SS2MOVE X'28' X'04' Input Number of CQSMOVE requests for this structure
SS2PUT X'2C' X'04' Input Number of CQSPUT requests for this structure
SS2QUERY X'30' X'04' Input Number of CQSQUERY requests for this structure
SS2READ X'34' X'04' Input Number of CQSREAD requests for this structure
SS2RECVR X'38' X'04' Input Number of CQSRECVR requests for this structure
SS2RSYNC X'3C' X'04' Input Number of CQSRSYNC requests for this structure
SS2UNLCK X'40' X'04' Input Number of CQSUNLCK requests for this structure
SS2UPD X'44' X'04' Input Number of CQSUPD requests for this structure
The following table describes the Structure Statistics user exit routine data object
statistics record.
The following table describes the Structure Statistics user exit routine queue name
statistics record.
Restriction: The queue name statistics record does not apply to resource structures.
Table 227. Queue name statistics record
Field
Field name Offset Length usage Description
SS4ID X'00' X'08' Input Eye catcher CQSSSTT4
SS4LN X'08' X'04' Input Length of valid data
SS4PVSN X'0C' X'04' Input Parameter list version number (X'00000001')
SS4INFQN X'10' X'04' Input Number of queue names for which an inform was performed
SS4UNFQN X'14' X'04' Input Number of queue names for which an uninform was
performed
SS4NFYQN X'18' X'04' Input Number of queue name notifications (when a queue goes
from empty to non-empty)
The following table describes the Structure Statistics user exit routine z/OS request
statistics record.
Table 228. z/OS request statistics record
Field
Field name Offset Length usage Description
SS5ID X'00' X'08' Input Eye catcher CQSSSTT5.
SS5LN X'08' X'04' Input Length of valid data.
SS5PVSN X'0C' X'04' Input Parameter list version number (X'00000002').
SS5IXGWR X'10' X'04' Input Number of IXGWRITE requests for the structure. This
represents the number of log records written during
processing on the structure.
SS5IXGBR X'14' X'04' Input Number of IXGBRWSE requests for the structure.
SS5IXLDQ X'18' X'04' Input Number of IXLLIST DEQ_EVENTQ requests for the structure.
SS5IXLWR X'1C' X'04' Input Number of IXLLIST WRITE requests for the structure.
SS5IXLRD X'20' X'04' Input Number of IXLLIST READ requests for the structure.
SS5IXLMV X'24' X'04' Input Number of IXLLIST MOVE requests for the structure.
SS5IXLDL X'28' X'04' Input Number of IXLLIST DELETE requests for the structure.
SS5IXLMG X'2C' X'04' Input Number of IXLMG requests for the structure.
SS5IXLUS X'30' X'04' Input Number of IXLUSYNC requests for the structure.
SS5IXEWR X'34' X'04' Input Number of IXLLSTE WRITE requests for the structure.
SS5IXERD X'38' X'04' Input Number of IXLLSTE READ requests for the structure.
SS5IXMRL X'3C' X'04' Input Number of IXLLSTM READ_LIST requests for the structure.
SS5IXEDL X'40' X'04' Input Number of IXLLSTE DELETE requests for the structure.
SS5IXMDL X'44' X'04' Input Number of IXLLSTM DELETE_ENTRYLIST requests for the
structure.
Structure rebuild statistics are gathered only by the CQS that is the master of the
structure rebuild process. A CQS has access only to the data it gathers. Each CQS
keeps structure rebuild statistics for the last rebuild for which it was the master.
The following table describes the Structure Statistics user exit routine structure
rebuild statistics record.
Table 229. Structure rebuild statistics record
Field
Field name Offset Length usage Description
SS6ID X'00' X'08' Input Eye catcher CQSSSTT6.
SS6LN X'08' X'04' Input Length of valid data.
SS6PVSN X'0C' X'04' Input Parameter list version number (X'00000003').
SS6ELMIO X'10' X'04' Input Data elements in use on old structure.
SS6ELMAO X'14' X'04' Input Data elements allocated on old structure.
SS6ENTIO X'18' X'04' Input Data entries in use on old structure (data object count).
SS6ENTAO X'1C' X'04' Input Data entries allocated on old structure.
SS6MCIO X'20' X'04' Input Event monitoring controls (EMCs) in use on old structure
(active informs).
SS6EMCAO X'24' X'04' Input EMCs in use on old structure (active informs).
SS6SIZEO X'28' X'04' Input Old structure size in 4 KB blocks.
SS6CFTO X'2C' X'04' Input Old CF total space in 4 KB blocks.
SS6CFFO X'30' X'04' Input Old CF free space in 4 KB blocks.
SS6CFNMO X'34' X'08' Input Old CF name in which structure was allocated before rebuild.
X'3C' X'04' Unused.
SS6ELMIN X'40' X'04' Input Data elements in use on new structure.
SS6ELMAN X'44' X'04' Input Data elements allocated on new structure.
SS6ENTIN X'48' X'04' Input Data entries in use on new structure (data object count).
SS6ENTAN X'4C' X'04' Input Data entries allocated on new structure.
SS6EMCIN X'50' X'04' Input EMCs in use on new structure (active informs).
SS6EMCAN X'54' X'04' Input EMCs in use on new structure (active informs).
SS6SIZEN X'58' X'04' Input New structure size in 4 KB blocks.
SS6CFTN X'5C' X'04' Input New CF total space in 4 KB blocks.
SS6CFFN X'60' X'04' Input New CF free space in 4 KB blocks.
SS6CFNMN X'64' X'08' Input New CF name in which structure is allocated after rebuild.
X'6C' X'04' Unused.
SS6RBTIM X'70' X'08' Input Rebuild time stamp (STCK).
SS6POPCT X'78' X'04' Input Repopulation from SRDS count (RCVRY) or objects copied
count (COPY).
SS6MVQCT X'7C' X'04' Input Entries moved to moveq during phase 2 count.
SS6PUTCT X'80' X'04' Input Entries written during phase 3 count.
SS6MOVCT X'84' X'04' Input Entries moved during phase 3 count.
SS6OBJCT X'88' X'04' Input Data objects affected by recovery count (recoverable and
nonrecoverable).
Structure checkpoint statistics are gathered only by the CQS that is the master of
the structure checkpoint process. A CQS has access only to the data it gathers. Each
CQS keeps structure checkpoint statistics for the last three checkpoints for which it
was the master. Structure checkpoint data is not reset at the end of a structure
checkpoint.
The following table describes the Structure Statistics user exit routine structure
checkpoint statistics record.
Table 230. Structure checkpoint statistics record
Field
Field name Offset Length usage Description
SS7ID X'00' X'08' Input Eye catcher CQSSSTT7.
SS7LN X'08' X'04' Input Length of valid data.
SS7PVSN X'0C' X'04' Input Parameter list version number.
SS7FLAG1 X'10' X'01' Input Flag byte.
X'80' These statistics are from last attempted structure
checkpoint taken for the structure.
X'40' Structure Checkpoint is in progress.
X'11' X'03' Unused.
SS7ENCNT X'14' X'04' Input Number of structure checkpoint statistics entries in record.
SS7ENLEN X'18' X'04' Input Length of structure checkpoint statistics entry
SS7CUR X'1C' X'04' Input Offset to current structure checkpoint statistics entry.
SS7STATS X'20' X'' Start of structure checkpoint statistics entries. See the next
table for a description of the structure checkpoint statistics
entry.
Structure checkpoint statistics are gathered only by the CQS that is the master of
the structure checkpoint process. A CQS has access only to the data it gathers. Each
CQS keeps structure checkpoint statistics for the last three checkpoints for which it
was the master. Structure checkpoint data is not reset at the end of a structure
checkpoint.
The following table describes the Structure Statistics user exit routine structure
checkpoint statistics entry.
Table 231. Structure checkpoint statistics entry
Field
Field name Offset Length usage Description
SS7RETCD X'00' X'04' Input Return code for this structure checkpoint
SS7QSCB X'04' X'08' Input Structure quiesce start time in STCK format
SS7QSCE X'0C' X'08' Input Structure quiesce complete time in STCK format
SS7DSPB X'14' X'08' Input Start data space/data set capture time in STCK format
SS7DSPE X'1C' X'08' Input End data space capture time in STCK format
SS7RSMB X'24' X'08' Input Structure resume start time in STCK format
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
For certain events, CQS structure event user-supplied exit routine also allows you
to gather statistics related to the structure. This exit routine is optional.
The Structure Event user exit routine applies to both resource and queue
structures, but not all events are applicable to resource structures. The CQS
Structure Event exit routine is driven for the following events:
v Structure Connection
– When structure connect occurs, after CQS connects to a structure, but before
rebuild or restart is performed for the structure.
– At structure disconnect; after CQS disconnects from a structure.
v Checkpoint
– When a system checkpoint begin, end, or failure occurs.
– When a structure checkpoint begin, end, or failure occurs.
Important: The structure failure event for a resource structure means that the
structure has failed and a new structure could not be reallocated. No structure
recovery is done, because resource structures do not support structure recovery.
v Structure Overflow
– When one or more queues moved to the overflow structure.
– When one or more queues moved from the overflow structure back to the
primary structure. This event also indicates when the structure is no longer in
overflow mode.
Subsections:
v “Routine parameter lists” on page 578
v “CQS structure event exit routine parameter list” on page 578
v “CQS structure event exit routine checkpoint parameter list” on page 579
v “CQS structure event exit routine rebuild parameter list” on page 580
v “CQS structure event exit routine overflow parameter list” on page 581
v “CQS structure event exit routine status change parameter list” on page 582
15 Return code
0 Always set this to zero.
On entry to the Structure Event exit routine, register 1 points to a Standard BPE
user exit parameter list. Field UXPL_EXITPLP in this list contains the address of
the CQS Structure Event user exit routine parameter list (mapped by the
CQSSTREX macro).
The following table describes the Structure Event user exit routine connect
parameter list.
Table 232. CQS structure event user-supplied exit routine parameter list: connect
Field
Field name Offset Length usage Description
STXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
STXEVENT X'04' X'04' Input Function code
1 Connect event (STXCONDS).
STXSCODE X'08' X'04' Input Event subcode
1 Structure connect (STXCONN).
2 Structure disconnect (STXDISC).
STXCQSID X'0C' X'08' Input CQS identifier.
STXCQSVN X'14' X'04' Input CQS version number.
STXSTRNM X'18' X'10' Input Structure name.
STXSTRVN X'28' X'08' Input Structure version number (mapped by the CQSSTREX
macro).
STXDSTT1 X'34' X'04' Input Address of structure process statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT1 macro). For structure disconnect
only.
STXDSTT2 X'38' X'04' Input Address of CQS request statistics record for activity
performed for CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT2 macro). For structure disconnect
only.
STXDSTT3 X'3C' X'04' Input Address of data object statistics record for activity performed
on data objects in this structure for all clients since restart or
the last successful structure checkpoint (mapped by the
CQSSSTT3 macro). For structure disconnect only.
STXDSTT4 X'40' X'04' Input Address of queue name statistics record for activity
performed on queue names in this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT4 macro). For structure disconnect
only.
Table 232. CQS structure event user-supplied exit routine parameter list: connect (continued)
Field
Field name Offset Length usage Description
STXDSTT5 X'44' X'04' Input Address of z/OS request statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT5 macro). For structure disconnect
only.
STXDSTT6 X'48' X'04' Input Address of rebuild statistics record containing data from the
last rebuild in which this CQS acted as master (mapped by
the CQSSSTT6 macro). For structure disconnect only.
STXDSTT7 X'4C' X'04' Input Address of structure checkpoint statistics record containing
data from the last three structure checkpoints in which this
CQS acted as master (mapped by the CQSSSTT7 macro).For
structure disconnect only.
The following table describes the Structure Event user exit routine checkpoint
parameter list.
Table 233. CQS structure event user-supplied exit routine parameter list: checkpoint
Field
Field name Offset Length usage Description
STXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
STXEVENT X'04' X'04' Input Structure event code
2 Checkpoint event (STXCHKPT).
STXSCODE X'08' X'04' Input Structure event subcode
1 Structure checkpoint begin (STXCSTRB).
2 Structure checkpoint end (STXCSTRE).
3 Structure checkpoint failure (STXCSTRF).
4 System checkpoint begin (STXCSYSB).
5 System checkpoint end (STXCSYSE).
6 System checkpoint failure (STXCSYSF).
STXCQSID X'0C' X'08' Input CQS identifier.
STXCQSVN X'14' X'04' Input CQS version number.
STXSTRNM X'18' X'10' Input Structure Name.
STXCMCQS X'28' X'08' Input CQS identifier of the master CQS performing the checkpoint
process. For system checkpoint, this is the same as the CQS
identifier.
STXCFLG1 X'30' X'01' Input Flag byte
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same
(STXC1MST).
N/A X'31' X'03' Input Reserved.
Table 233. CQS structure event user-supplied exit routine parameter list: checkpoint (continued)
Field
Field name Offset Length usage Description
STXCSTT1 X'34' X'04' Input Address of structure process statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT1 macro). For system checkpoint
end and structure checkpoint end only.
STXCSTT2 X'38' X'04' Input Address of CQS request statistics record for activity
performed for CQS requests on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT2 macro). For system checkpoint
end and structure checkpoint end only.
STXCSTT3 X'3C' X'04' Input Address of data object statistics record for activity performed
on data objects in this structure for all clients since restart or
the last successful structure checkpoint (mapped by the
CQSSSTT3 macro). For system checkpoint end and structure
checkpoint end only.
STXCSTT4 X'40' X'04' Input Address of queue name statistics record for activity
performed on queue names in this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT4 macro). For system checkpoint
end and structure checkpoint end only.
STXCSTT5 X'44' X'04' Input Address of z/OS request statistics record for activity
performed by CQS processes on this structure for all clients
since restart or the last successful structure checkpoint
(mapped by the CQSSSTT5 macro). For system checkpoint
end and structure checkpoint end only.
STXCSTT6 X'48' X'04' Input Address of rebuild statistics record containing data from the
last rebuild in which this CQS acted as master (mapped by
the CQSSSTT6 macro). For system checkpoint end and
structure checkpoint end only.
STXCSTT7 X'4C' X'04' Input Address of structure checkpoint statistics record containing
data from the last three structure checkpoints in which this
CQS acted as master (mapped by the CQSSSTT7 macro). For
system checkpoint end and structure checkpoint end only.
The following table describes the Structure Event user exit routine rebuild
parameter list.
Table 234. CQS structure event user-supplied exit routine parameter list: rebuild
Field
Field name Offset Length usage Description
STXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
STXEVENT X'04' X'04' Input Structure event code
3 Structure rebuild event (STXRBLD).
Table 234. CQS structure event user-supplied exit routine parameter list: rebuild (continued)
Field
Field name Offset Length usage Description
STXSCODE X'08' X'04' Input Structure eventSubcode
1 Structure rebuild begin (STXRBLB).
2 Structure rebuild (copy) end (STXCPYE).
3 Structure rebuild (copy) failure (STXCPYF).
4 Structure rebuild failure (STXRBLF).
5 Structure rebuild (recovery) end (STXRCOVE).
6 Structure rebuild (recovery) failure (STXRCOVF).
STXCQSID X'0C' X'08' Input CQS identifier.
STXCQSVN X'14' X'04' Input CQS version number.
STXSTRNM X'18' X'10' Input Structure Name.
STXRMCQS X'28' X'08' Input CQS identifier of the master CQS performing the rebuild
process.
STXRFLG1 X'30' X'01' Input Flag byte
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same
(STXR1MST).
N/A X'31' X'03' Input Reserved.
The following table describes the Structure Event user exit routine overflow
parameter list.
Table 235. CQS structure event user-supplied exit routine parameter list: overflow
Field
Field name Offset Length usage Description
STXPVSN X'00' X'04' Input Parameter list version number (X'00000001').
STXEVENT X'04' X'04' Input Structure event code
4 Structure overflow event (STXOVFLW).
STXSCODE X'08' X'04' Input Structure event subcode.
1 Move queues to overflow. One or more queues were
selected as candidates to be moved to the overflow
structure and were approved by the Queue
Overflow user exit routine (STXTOOFL).
2 Move queues from overflow. One or more queues
moved from the overflow structure back to the
primary structure, because the queues were drained
on the overflow structure. New work for these
queues is placed on the primary structure
(STXFROFL).
STXCQSID X'0C' X'08' Input CQS identifier.
STXCQSVN X'14' X'04' Input CQS version number.
STXSTRNM X'18' X'10' Input Structure Name.
Table 235. CQS structure event user-supplied exit routine parameter list: overflow (continued)
Field
Field name Offset Length usage Description
STXOMCQS X'28' X'08' Input CQS identifier of the master CQS performing the overflow
process.
STXOFLG1 X'30' X'01' Input Flag byte
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same
(STX01MST).
X'40' The structure is no longer in overflow mode. This
applies only to subcode 2 (STX01END).
N/A X'31' X'03' Input Reserved.
STXOLSTN X'34' X'04' Input Number of Queue Names entries in the list.
STXOLSTE X'38' X'04' Input Length of each Queue Name list entry.
STXOLSTA X'3C' X'04' Input Address of Queue Name list. Each Queue Name list entry
contains the 16-byte name of a queue that is being moved to
or from the overflow structure.
The following table describes the Structure Event user exit routine status change
parameter list.
Table 236. CQS structure event user-supplied exit routine parameter list: status change
Field
Field name Offset Length usage Description
STXPVSN X'00' X'04' Input Parameter list version number (X'00000003').
STXEVENT X'04' X'04' Input Structure event code
5 Structure status change event (STXSCHNG).
STXSCODE X'08' X'04' Input Structure event subcode
1 Structure available again after a loss (STXAVAIL).
2 The structure failed (STXFAIL).
3 CQS lost its connection to the structure
(STXLCONN).
4 The log stream is becoming available, making the
structure available (STXAVLOG).
Important: This subcode applies only to queue
structures.
5 The log stream is becoming available, making the
structure available (STXFLOG).
Important: This subcode applies only to queue
structures.
6 The structure failed. It needs to be repopulated
because this structure does not support structure
recovery (STXREPOP).
Important: This subcode applies only to resource
structures.
Table 236. CQS structure event user-supplied exit routine parameter list: status change (continued)
Field
Field name Offset Length usage Description
STXCQSID X'0C' X'08' Input CQS identifier.
STXCQSVN X'14' X'04' Input CQS version number.
STXSTRNM X'18' X'10' Input Structure Name.
STXSTYPE X'28' X'01' Input Input structure type (X'01' queue structure, X'02' resource
structures).
STXRSTVN X'40' X'08' Input Input structure version.
Related reference:
“CQS structure statistics user-supplied exit routine” on page 565
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
The following table describes the contents of the CQS Statistics header. The
statistics header is mapped by CQSSSTTX.
Table 237. CQS statistics header data
Offset Length Field usage Description
X'00' X'08' Input Eye catcher "CQSSTTX"
X'08' X'04' Input Length of header
X'0C' X'04' Input Header version number (X'00000001')
X'10' X'04' Input Number of structures for which statistics are available
X'14' X'04' Input Number of statistics areas available for each structure
X'18' X'04' Input Length of all statistics areas for each structure
X'1C' X'04' Input Offset to statistics area for first structure (offset from CQSSSTTX)
X'20' X'04' Input CQSSSTAT offset within the statistics area for each structure
X'24' X'04' Input CQSSSTTI offset within the statistics area for each structure
X'28' X'04' Input CQSSSTT2 offset within the statistics area for each structure
X'2C' X'04' Input CQSSSTT3 offset within the statistics area for each structure
X'30' X'04' Input CQSSSTT4 offset within the statistics area for each structure
X'34' X'04' Input CQSSSTT5 offset within the statistics area for each structure
X'38' X'04' Input CQSSSTT6 offset within the statistics area for each structure
X'3C' X'04' Input CQSSSTT7 offset within the statistics area for each structure
X'40' X'04' Input Reserved
X'44' X'04' Input Reserved
X'48' X'04' Input Reserved
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
ODBM uses BPE services to call and manage its user exits. BPE enables you to
externally specify the user exit modules to be called for a particular user exit type
by using EXITDEF= statements in the BPE user exit list PROCLIB members. BPE
also provides a common user exit runtime environment for all user exits. This
environment includes a standard user exit parameter list, callable services, static
and dynamic work areas for the exits, and a recovery environment for user exit
abends.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
The CSL ODBM Initialization and Termination user exit is driven for the following
events:
v ODBM initialization, after ODBM has completed initialization
v IMSplex initialization, after each IMSplex has initialized
v ODBM normal termination, when ODBM is terminating
v IMSplex normal termination, when an IMSplex is terminating
The CSL ODBM Initialization and Termination user exit is invoked in 31-bit
addressing mode (AMODE 31) and should be reentrant.
On entry, the CSL ODBM Initialization and Termination user exit routine must
save all registers using the provided save area. The registers contain the following:
Register Contents
1 Address of BPE user exit parameter list (mapped by macro BPEUXPL).
13 Address of 2 pre-chained save areas. The first save area may be used by the
exit to save registers on entry. The second save area is for use by routines
called from the user exit.
14 Return address.
15 Entry point of exit routine.
Parameter list
On entry to the CSL ODBM Initialization and Termination user exit routine,
register 1 points to a standard BPE user exit parameter list. Field UXPL_EXITPLP
in this list contains the addresses of the ODBM Initialization and Termination user
exit parameter list (mapped by macro CSLDITX). Field UXPL_COMPTYPEP in this
list points to the character string “ODBM” indicating an ODBM type address
space.
The following table lists the user exit parameter list for ODBM Initialization and
Termination user exit parameter list: ODBM initialization.
Table 238. Initialization and Termination user exit routine parameter list: ODBM initialization
Field
Offset Length Usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
1 ODBM Initialization
The following table lists the user exit parameter list for ODBM Initialization and
Termination user exit parameter list: ODBM termination.
Table 239. Initialization and Termination user exit parameter list: ODBM termination
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
2 ODBM Normal Termination
The following table lists the user exit parameter list for the CSL ODBM
Initialization and Termination user exit parameter list: IMSplex initialization.
Table 240. Initialization and Termination user exit parameter list: IMSplex initialization
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
3 IMSplex Initialization
X'08' X'08' Input IMSplex name
The following table lists the user exit parameter list for ODBM Initialization and
Termination user exit parameter list: IMSplex termination.
586 Exit Routines
IBM Confidential
Table 241. Initialization and Termination user exit parameter list: IMSplex termination
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
4 IMSplex Termination
X'08' X'08' Input IMSplex name
Register Contents
15 Return code Meaning
0 Always zero
All other registers must be restored.
The CSL ODBM Input user exit routine is driven for the following events:
v All CSLDMI FUNC=ODBMCI requests
v FUNC=ODBMCLIENT APSB requests
The CSL ODBM Input user exit routine is defined as TYPE=INPUT in the
EXITDEF statement in the BPE user exit list PROCLIB member. The user may
specify one or more user exits of this type. When this exit is invoked, all user exits
of this type are driven in the order specified by the EXITS keyword.
The CSL ODBM Input user exit routine is invoked in 31-bit addressing mode
(AMODE 31) and should be reentrant.
The CSL ODBM Input user exit can capture the end-user client ID from any
transaction that uses the CSLDMI FUNC=ODBMCI request. The client ID is passed
to the exit as a parameter of the ODBM APSB thread token. This information can
be associated with the transaction details from the relevant IMS type X'08' log
record to create a charge-back profile, an audit trail, or to drive other business
processes.
On entry to the CSL ODBM Input user exit routine, register 1 points to a standard
BPE user exit parameter list. The registers contain the following:
Register Contents
1 Address of BPE User Exit Parameter List (mapped by macro BPEUXPL).
Register Contents
13 Address of 2 pre-chained save areas. The first save area may be used by the
exit to save registers on entry. The second save area is for use by routines
called from the user exit.
14 Return address.
15 Entry point of exit routine.
Parameter list
Field UXPL_EXITPLP in this list contains the address of the CSL ODBM Input user
exit routine parameter list (mapped by macro CSLDINX). Field
UXPPL_COMPTYPEP in this list points to the character string “ODBM” indicating
an ODBM-type address space.
Note: When the function code is 2, all parameter list fields are zero except the
following:
v Client ID fields (if available)
v z/OS Resource Recovery Services parent UR token (if available)
v ODBM APSB call thread token
v User-defined request token (if available)
Table 242. ODBM Input User Exit Parameter List
Offset Length Field usage Description
X'00' X'04' Input Parameter list version
number (X'00000001').
X'04' X'04' Input Function code:
1 ODBM CSLDMI
FUNC = ODBMCI
request
2 ODBM CSLDMIC
FUNC =
ODBMCLIENT APSB
request
X'08' X'04' Input Length of AIB
X'0C' X'04' Input Address of copy of
AIB
X'10' X'04' Output AIB change indicator:
X'00'=AIB not
modified
X'01'=AIB modified.
Use modified AIB.
X'14' X'04' Input Length of the client
ID (CLIENTIDLEN)
X'18' X'04 Input Address of the client
ID (CLIENTID)
X'1C' X'04' Input Function code
specified on
DLIFUNC parameter
X'01'=IO area
modified. Used
modified IO area.
Note: If the user exit
modifies the IO area,
then you must set the
AIB field AIBOALEN
to the length of the
IO area to be used on
the actual IMS DLI
call. You must also
indicate to ODBM
that the AIB has been
modified. On return
to ODBM from the
exit, if the length
specified in field
AIBOALEN is greater
than the length
specified on the
IOAREALEN
parameter for the
CSLDMI call, ODBM
will reject the
CSLDMI call.
X'2C' X'04' Input Length of SSA1 or 0
X'30' X'04' Input Address of copy of
SSA1 or 0
X'34' X'04' Output SSA1 change
indicator:
X'00'=SSA1 not
modified
X'01'=SSA1 modified.
Use modified SSA1.
X'38' X'04' Input Length of SSA2 or 0
X'3C' X'04' Input Address of copy of
SSA2 or 0
X'00'=SSA2 not
modified
X'01'=SSA2 modified.
Use modified SSA2.
X'44' X'04' Input Length of SSA3 or 0
X'48' X'04' Input Address of copy of
SSA3 or 0
X'4C' X'04' Output SSA3 Change
indicator:
X'00'=SSA3 not
modified
X'01'=SSA3 modified.
Use modified SSA3.
X'50' X'04' Input Length of SSA4 or 0
X'54' X'04' Input Address of copy of
SSA4 or 0
X'58' X'04' Output SSA4 change
indicator:
X'00'=SSA4 not
modified
X'01'=SSA4 modified.
Use modified SSA4.
X'5C' X'04' Input Length of SSA5 or 0
X'60' X'04' Input Address of copy of
SSA5 or 0
X'64' X'04' Output SSA5 change
indicator:
X'00'=SSA5 not
modified
X'01'=SSA5 modified.
Use modified SSA5.
X'68' X'04' Input Length of SSA6 or 0
X'6C' X'04' Input Address of copy of
SSA6 or 0
X'70' X'04' Output SSA6 change
indicator:
X'00'=SSA6 not
modified
X'01'=SSA6 modified.
Use modified SSA6.
X'74' X'04' Input Length of SSA7 or 0
X'00'=SSA7 not
modified
X'01'=SSA7 modified.
Use modified SSA7.
X'80' X'04' Input Length of SSA8 or 0
X'84' X'04' Input Address of copy of
SSA8 or 0
X'88' X'04' Output SSA8 change
indicator:
X'00'=SSA8 not
modified
X'01'=SSA8 modified.
Use SSA8.
X'8C' X'04' Input Length of SSA9 or 0
X'90' X'04' Input Address of copy of
SSA9 or 0
X'94' X'04' Output SSA9 change
indicator:
X'00'=SSA9 not
modified
X'01'=SSA9 modified.
Use SSA9.
X'98' X'04' Input Length of SSA10 or 0
X'9C' X'04' Input Address of copy of
SSA10 or 0
X'A0' X'04' Output SSA10 change
indicator:
X'00'=SSA10 not
modified
X'01'=SSA10
modified. Use SSA10.
X'A4' X'04' Input Length of SSA11 or 0
X'A8' X'04' Input Address of copy of
SSA11 or 0
X'AC' X'04' Output SSA11 change
indicator:
X'00'=not modified
X'01'=SSA11
modified. Use SSA11.
X'00'=not modified
X'01'=SSA12
modified. Use SSA12.
X'BC' X'04' Input Length of SSA13 or 0
X'C0' X'04' Input Address of copy of
SSA13 or 0
X'C4' X'04' Output SSA13 change
indicator:
X'00'=not modified
X'01'=SSA13
modified. Use SSA13.
X'C8' X'04' Input Length of SSA14 or 0
X'CC' X'04' Input Address of copy of
SSA14 or 0
X'D0' X'04' Output SSA14 change
indicator:
X'00'=not modified
X'01'=SSA14
modified. Use SSA14.
X'D4' X'04' Input Length of SSA15 or 0
X'D8' X'04' Input Address of copy of
SSA15 or 0
X'DC' X'04' Output SSA15 change
indicator:
X'00'=not modified
X'01'=SSA15
modified. Use SSA15.
X'E0' X'10' Input RRS parent UR token
or 0 (URTOKEN)
X'F0' X'10' Input Context Services
private context token
or 0 (CTXTOKEN)
X'100' X'10' Input ODBM APSB call
thread token or 0
(APSBTOKEN)
X'110' X'10' Input User defined request
token or 0
(RQSTTKN1)
Register Contents
15 Return code: Meaning:
0 Continue processing
All other
registers
must be
restored.
The CSL ODBM Output user exit routine is driven for the following events:
v All CSLDMI FUNC=ODBMCI requests
The CSL ODBM Output user exit routine is defined as TYPE=OUTPUT in the
EXITDEF statement in the BPE user exit list PROCLIB member. The user may
specify one or more user exits of this type. When this exit is invoked, all user exits
of this type are driven in the order specified by the EXITS= keyword. Refer to the
ODBM User Exit List PROCLIB Member for more information on how to define
user exit module names.
The exit is invoked in 31-bit addressing mode (AMODE 31) and should be
reentrant.
On entry, the CSL ODBM Output user exit routine must save all registers using the
provided save area. The registers contain the following:
Register Contents
1 Address of the “Standard BPE user exit parameter list” on page 495. The
UXPL_EXITPLP field in this parameter list contains the address of the ODBM
Output user exit parameter list, which is mapped by macro CSLDOUX.
13 Address of 2 pre-chained save areas. The first save area may be used by the
exit to save registers on entry. The second save area is for use by routines
called from the user exit.
14 Return address.
15 Entry point of exit routine.
Parameter list
Register Contents
15 Return code: Meaning:
0 Always zero
All other registers must be restored.
The CSL ODBM Client Connect and Disconnect user exit routine is optional.
The CSL ODBM Client Connect and Disconnect user exit routine is called for the
following events:
v A client issues the CSLDMREG request to indicate that the client is ready to
communicate with ODBM.
v A client issues the CSLDMDRG request to indicate that the client is no longer
communicating with ODBM.
The CSL ODBM Client Connect and Disconnect user exit routine is defined as
TYPE=CLNTCONN in the EXITDEF statement in the BPE user exit list PROCLIB
member. You may specify one or more user exits of this type. When this exit is
invoked, all user exits of this type are driven in the order specified by the EXITS=
keyword.
The CSL ODBM Client Connect and Disconnect user exit routine is invoked in
31-bit addressing mode (AMODE 31) and should be reentrant.
On entry, the CSL ODBM Client Connect and Disconnect user exit routine must
save all registers using the provided SAVEAREA. The registers contain the
following:
Register Contents
1 Address of Standard BPE user exit parameter list (mapped by the BPEUXPL
macro).
13 Address of 2 pre-chained saveareas. The first savearea may be used by exit to
save registers on entry. The second savearea is for use by routines called
from the user exit.
14 Return address.
15 Entry point of exit routine.
Parameter list
On entry to the CSL ODBM Client Connect and Disconnect user exit routine,
register 1 points to a standard BPE user exit parameter list. Field UXPL_EXITPLP
in this list contains the address of the ODBM Client Connect and Disconnect user
exit parameter list (mapped by macro CSLDCLX). Field UXPL_COMPTYPEP in
this list points to the character string "ODBM" indicating an ODBM type address
space.
The following tables lists the user exit parameter list for the ODBM Client
Connection and ODBM Client Disconnection. Included are the offset value and
length, both in hexadecimal, how the field is used, and a brief description of the
field.
Table 244. ODBM client connection user exit parameter list: Client Connect
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
Table 245. ODBM client connection user exit parameter list: Client Disconnect
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
Table 245. ODBM client connection user exit parameter list: Client Disconnect (continued)
Offset Length Field usage Description
X'04' X'04' Input Function code:
Register Contents
15 Return code Meaning
0 Always zero
All other registers must be restored.
Subsections:
v “CSL ODBM statistics header”
v “CSL ODBM statistics record CSLDST1” on page 598
v “CSL ODBM statistics record CSLDST2” on page 599
The following table lists the CSL ODBM statistics header. Included are the offset
value and length (both in hexadecimal), how the field is used, and a brief
description of the field. The header is mapped by CSLDSTX.
OM uses BPE services to call and manage its user exits. BPE enables you to
externally specify the user exit modules to be called for a particular user exit type
by using EXITDEF= statements in the BPE user exit list PROCLIB members. BPE
also provides a common user exit runtime environment for all user exits. This
environment includes a standard user exit parameter list, callable services, static
and dynamic work areas for the exits, and a recovery environment for user exit
abends.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
The exit is invoked in 31-bit addressing mode (AMODE 31) and should be
reentrant.
The following table lists the user exit parameter list for OM Client Connection.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 249. OM client connection user exit parameter list: Client Connect
Field name Offset Length Field usage Description
OCLX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OCLX_FUNC X'04' X'04' Input Function code::
Table 249. OM client connection user exit parameter list: Client Connect (continued)
Field name Offset Length Field usage Description
OCLX_MBRNAME X'08' X'08' Input Client (IMSplex member) name.
OCLX_MBRTYPE X'10' X'02' Input IMSplex member type (mapped by CSLSTPIX).
X'12' X'02' None Reserved.
OCLX_MBRSTYPE X'14' X'08' Input IMSplex member subtype.
X'1C' X'04' None Reserved.
The following table lists the user exit parameter list for OM Client Disconnect.
Included are the offset value and length, both in hexadecimal, how the field is
used, and a brief description of the field.
Table 250. OM client connection user exit parameter list: Client Disconnect
Offset Length Field usage Description
X'00' X'04' Input Parameter list version number (X'00000001').
X'04' X'04' Input Function code:
This exit is defined as TYPE=INITTERM in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are driven in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the OM BPE user exit list PROCLIB member topic in IMS
Version 14 System Definition.
Subsections:
v “OM init/term user exit parameter list: OM Initialization”
v “OM init/term user exit parameter list: OM Termination”
v “OM init/term user exit parameter list: IMSplex Initialization” on page 603
v “OM init/term user exit parameter list: IMSplex Termination” on page 603
The following table lists the user exit parameter list for OM Initialization. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 251. OM init/term user exit parameter list: OM Initialization
Field name Offset Length Field usage Description
OITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OITX_FINIT X'04' X'04' Input Function code:
1 OM initialization.
The following table lists the user exit parameter list for OM Termination. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 252. OM init/term user exit parameter list: OM Termination
Field name Offset Length Field usage Description
OITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
The following table lists the user exit parameter list for IMSplex initialization.
Included are the offset value and length (both in hexadecimal), how the field is
used, and a brief description of the field.
Table 253. OM init/term user exit parameter list: IMSplex Initialization
Field name Offset Length Field usage Description
OITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OITX_FPLXINIT X'04' X'04' Input Function code:
3 IMSplex normal termination.
OITX_IPLEXNM X'08' X'08' Input IMSplex name.
The following table lists the user exit parameter list for IMSplex termination.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 254. OM init/term user exit parameter list: IMSplex Termination
Field name Offset Length Field usage Description
OITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OITX_FPLXTERM X'04' X'04' Input Function code:
4 IMSplex normal termination.
OITX_TPLEXNM X'08' X'08' Input IMSplex name.
This exit is defined as TYPE=INPUT in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are driven in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the OM BPE user exit list PROCLIB Member topic in IMS
Version 14 System Definition.
Subsection
v “OM input user exit parameter list: Command Input”
The following table lists the user exit parameter list for command input. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 255. OM input user exit parameter list: Command Input
Field name Offset Length Field usage Description
OINX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OINX_FUNC X'04' X'04' Input Function code
1 Command input.
OINX_MBRNAME X'08' X'08' Input Client (IMSplex member) where command
originated.
OINX_MBRTYPE X'10' X'02' Input IMSplex member type where command
originated.
OINX_CMDMOD X'12' X'01' Output Command input modified field. This field
indicates that the exit modified the command
input string and that the updated command
input should be processed.
4 Command input was modified by the
exit. This is the only valid value. All
other values are ignored.
X'13' X'01' None Reserved.
OINX_MBRSTYPE X'14' X'08' Input IMSplex member subtype where command
originated.
Table 255. OM input user exit parameter list: Command Input (continued)
Field name Offset Length Field usage Description
OINX_USERID X'1C' X'08' Input user ID of application where the command
originated.
OINX_INPUTLEN X'24' X'04' Input Length of the command input string. This length
does not include 80 bytes for command
expansion.
OINX_INPUTPTR X'28' X'04' Input Address of the command input string. The
command input string is followed by 80 blanks
that can be used by the exit to expand the
command input.
OINX_INMODLEN X'2C' X'04' Output New length of command input string after being
modified by the exit. The exit must set this field
if it modifies the command input string. If the
exit indicates that the command input string was
modified and this field does not contain a value,
the command will be rejected.
OINX_ROUTLLEN X'30' X'04' Input Length of the ROUTE list. If this field is zero,
there is no ROUTE list; the default option of
routing to all clients was selected.
OINX_ROUTLPTR X'34' X'04' Input Address of the ROUTE list. The ROUTE list
cannot be modified by this exit. The ROUTE list
is a list of client names separated by commas.
The ROUTE list can contain a single asterisk as a
client name, which routes to all clients.
X'38' X'10' None Reserved.
This exit is defined as TYPE=OUTPUT in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are driven in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the OM BPE user exit list PROCLIB member topic in IMS
Version 14 System Definition.
Subsections:
v “OM output user exit parameter list: Command Response”
v “OM output user exit parameter list: Undeliverable Output” on page 607
v “OM output user exit parameter list: Unsolicited Output” on page 609
The following table lists the user exit parameter list for command response.
Included are the field name, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 256. OM output user exit parameter list: command response
Field name Offset Length Field usage Description
OOUX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OOUX_FUNC X'04' X'04' Input Function code
2 Command response.
OOUX_MBRNAME X'08' X'08' Input Client (IMSplex member) name that sent the
command to OM.
OOUX_MBRTYPE X'10' X'02' Input IMSplex member type that sent the command to
OM.
Table 256. OM output user exit parameter list: command response (continued)
Field name Offset Length Field usage Description
OOUX_OUTMOD X'12' X'01' Output Output modified indicator. This field indicates
that the command output has been modified.
The field should be set to 4 to have OM process
the modified command response; otherwise, set
the field to 0.
v 1 Output was not modified.
v 4 Output modified by the exit.
X'13' X'01' None Reserved.
OOUX_MBRSTYPE X'14' X'08' Input IMSplex member subtype that sent the command
to OM.
OOUX_INPUTLEN X'1C' X'04' Input Length of the command input, if available.
OOUX_INPUTPTR X'20' X'04' Input Address of the command input, if available.
OOUX_OUTPTLEN X'24' X'04' Input Length of the command response.
OOUX_OUTPTPTR X'28' X'04' Input Address of the command response. Command
response output is in XML format wrapped with
the tags <imsout>...</imsout>.
OOUX_OUTMDLEN X'2C' X'04' Output Modified command output length. The exit must
set this field if it modifies the command
response output. This field must not be greater
than the input command response length passed
to this exit. If the exit does not set this field
appropriately and does modify the command
response output, the modified command
response output will not be delivered to the
client. Instead, the original command response
output will be sent to the client.
OOUX_RQTKN1 X'30' X'10' Input Request token 1.
OOUX_RQTKN2 X'40' X'10' Input Request token 2.
OOUX_RETCODE X'50' X'04' Input Return code being sent to the client.
OOUX_RSNCODE X'54' X'04' Input Reason code being sent to the client
X'58' X'10' None Reserved.
The following table lists the user exit parameter list for undeliverable output.
Included are the field name, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 257. OM output user exit parameter list--undeliverable output
Field name Offset Length Field usage Description
OOUX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OOUX_FUNC X'04' X'04' Input Function code
The following table lists the user exit parameter list for unsolicited output.
Included are the field name, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 258. OM output user exit parameter list: unsolicited output
Field name Offset Length Field usage Description
OOUX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
OOUX_FUNC X'04' X'04' Input Function code
This exit is defined as TYPE=SECURITY in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are driven in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the OM BPE user exit list PROCLIB member topic in IMS
Version 14 System Definition.
The following table lists the user exit parameter list for the security user exit.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 259. OM security user exit parameter list
Field name Offset Length Field usage Description
OSCX_PVER X'00' X'04' Input Parameter list version number (X'00000002').
OSCX_FUNC X'04' X'04' Input Function code
Subsections:
v “CSL OM statistics header”
v “CSL OM statistics record CSLOST1”
v “CSL OM statistics record CSLOST2” on page 615
The following table lists the OM statistics header. Included are the offset value and
length (both in hexadecimal), how the field is used, and a brief description of the
field.
Table 260. OM statistics header
Field name Offset Length Field usage Description
OSTX_ID X'00' X'08' Input Eye catcher “CSLOSTX”.
OSTX_LEN X'08' X'04' Input Length of header.
OSTX_PVER X'0C' X'04' Input Header version number (X'0000001').
OSTX_PLEXCNT X'10' X'04' Input Number of IMSplexes for which statistics are
available.
OSTX_STATCNT X'14' X'04' Input Number of statistics areas available for each
IMSplex.
OSTX_STATLEN X'18' X'04' Input Length of all statistics areas for each IMSplex.
OSTX_STATOFF X'1C' X'04' Input Offset to statistics area for first IMSplex. This is
the offset from the beginning of CSLOSTX. The
offset points to the CSLOST1 area for the first
IMSplex.
OSTX_OST1OFF X'20' X'04' Input Offset to the OM request statistics record for
activity performed by OM requests (mapped by
macro CSLOST1). The offset is from the start of
the statistics area for this IMSplex. Refer to the
next table for a description of the OM Request
statistics record.
OSTX_OST2OFF X'24' X'04' Input Offset to OM IMSplex statistics record for
activity performed by OM for an IMSplex
(mapped by macro CSLOST2). The offset is from
the start of the statistics area for this IMSplex.
Refer to Table 262 on page 615 for a description
of the OM IMSplex statistics record.
X'28' X'04' None Reserved.
X'2C' X'04' None Reserved.
CSLOST1 contains statistics related to specific requests and commands that are
processed by OM. The following table lists the OM statistics record CSLOST1.
Included are the field names, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 261. OM statistics record CSLOST1
Field name Offset Length Field usage Description
OST1_ID X'00' X'08' Input Eye catcher “CSLOST1”.
OST1_LEN X'08' X'04' Input Length of valid data.
OST1_PVER X'0C' X'04' Input Statistics version number (X'00000001').
OST1_OMREG X'10' X'04' Input Number of CSLOMREG requests.
OST1_OMRDY X'14' X'04' Input Number of CSLOMRDY requests.
X'18' X'04' None Reserved.
OST1_OMDRG X'1C' X'04' Input Number of CSLOMDRG requests.
OST1_OMDRGIN X'20' X'04' Input Number of internal deregister (normal term)
requests.
OST1_OMDRGIA X'24' X'04' Input Number of internal deregister (abnormal term)
requests.
OST1_OMICMD X'28' X'04' Input Number of CSLOMI command requests.
OST1_OMIQRY X'2C' X'04' Input Number of CSLOMI query requests.
X'30' X'04' None Reserved.
X'34' X'04' None Reserved.
X'38' X'04' None Reserved.
X'3C' X'04' None Reserved.
OST1_OMCMD X'40' X'04' Input Number of CSLOMCMD requests.
OST1_OMQRYCLN X'44' X'04' Input Number of CSLOMQRY client requests.
OST1_OMQRYSYN X'48' X'04' Input Number of CSLOMQRY syntax requests.
X'4C' X'04' None Reserved.
X'50' X'04' None Reserved.
X'54' X'04' None Reserved.
X'58' X'04' None Reserved.
OST1_OMRSP X'5C' X'04' Input Number of CSLOMRSP requests.
OST1_OMOUT X'60' X'04' Input Number of CSLOMOUT requests.
X'64' X'04' None Reserved.
X'68' X'04' None Reserved.
X'6C' X'04' None Reserved.
X'70' X'04' None Reserved.
X'74' X'04' None Reserved.
OST1_ZQRY X'78' X'04' Input Number of CSLZQRY requests.
OST1_ZSHUT X'7C' X'04' Input Number of CSLZSHUT requests.
X'80' X'04' None Reserved.
X'84' X'04' None Reserved.
X'88' X'04' None Reserved.
OST1_QRYIPLX X'8C' X'04' Input Number of QRY IMSPLEX commands.
X'90' X'04' None Reserved.
CSLOST2 contains statistics that are related to an IMSplex, but not to a specific
request or command. The following table lists the OM statistics record CSLOST2.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 262. OM statistics record CSLOST2
Field name Offset Length Field usage Description
OST2_ID X'00' X'08' Input Eye catcher “CSLOST2”.
OST2_LEN X'08' X'04' Input Length of valid data.
OST2_PVER X'0C' X'04' Input Parameter list version number (X'00000001').
OST2_PLEXNAME X'10' X'08' Input IMSplex name.
OST2_CLIENTS X'18' X'04' Input Number of active clients in the IMSplex.
OST2_CMDTOUT X'1C' X'04' Input Number of times a command was timed out.
OST2_UNDELIV X'20' X'04' Input Number of times a command response output
could not be returned to the client.
X'24' X'04' None Reserved.
X'28' X'04' None Reserved.
X'2C' X'04' None Reserved.
X'30' X'04' None Reserved.
X'34' X'04' None Reserved.
X'38' X'04' None Reserved.
X'3C' X'04' None Reserved.
X'40' X'04' None Reserved.
X'44' X'04' None Reserved.
X'48' X'04' None Reserved.
X'50' X'04' None Reserved.
X'54' X'04' None Reserved.
X'58' X'04' None Reserved.
Related reference:
“BPE Statistics user-supplied exit routine” on page 523
RM uses BPE services to call and manage its user exits. BPE enables you to
externally specify the user exit modules to be called for a particular user exit type
by using EXITDEF= statements in the BPE user exit list PROCLIB members. BPE
also provides a common user exit runtime environment for all user exits. This
environment includes a standard user exit parameter list, callable services, static
and dynamic work areas for the exits, and a recovery environment for user exit
abends.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
Subsections:
v “RM client connection user exit parameter list: Client Connect” on page 617
v “RM client connection user exit parameter list: Client Disconnect” on page 617
On entry to the Client Connection exit, register 1 points to a standard BPE user
exit parameter list. Field UXPL_EXITPLP in this list contains the address of the RM
Client Connection user exit parameter list, which is mapped by macro CSLRCLX.
Field UXPL_COMPTYPEP in this list points to the character string “RM” indicating
an RM address space.
The following table lists the user exit parameter list for client connect. Included are
the field name, the offset value and length (both in hexadecimal), how the field is
used, and a brief description of the field.
Table 263. RM client connection user exit parameter list: Client Connect
Field name Offset Length Field usage Description
RCLX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RCLX_FUNC X'04' X'04' Input Function code
1 Client Connect.
RCLX_MBRNAME X'08' X'08' Input Client (IMSplex member) name.
RCLX_MBRTYPE X'10' X'02' Input IMSplex member type (mapped by CSLSTPIX).
X'12' X'02' None Reserved.
RCLX_MBRSTYPE X'14' X'08' Input IMSplex member subtype
X'1C' X'04' None Reserved.
The following table lists the user exit parameter list for client disconnect. Included
are the field name, the offset value and length, both in hexadecimal, how the field
is used, and a brief description of the field.
Table 264. RM client connection user exit parameter list: Client Disconnect
Field name Offset Length Field usage Description
RCLX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RCLX_FUNC X'04' X'04' Input Function code
2 Client Disconnect.
RCLX_MBRNAME X'08' X'08' Input Client (IMSplex member) name.
RCLX_MBRTYPE X'10' X'02' Input IMSplex member type (mapped by CSLSTPIX).
RCLX_FLAG1 X'12' X'01' Input Flag byte indicates whether the client disconnect
is normal or abnormal.
This exit is not called during RM address space abnormal termination or IMSplex
abnormal termination. This exit is optional.
This exit is defined as TYPE=INITTERM in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are called in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the RM BPE user exit List PROCLIB member information in
IMS Version 14 System Definition.
Subsections:
v “RM init/term user exit parameter list: RM Initialization”
v “RM init/term user exit parameter list: RM Termination” on page 619
v “RM init/term user exit parameter list: IMSplex Initialization” on page 619
v “RM init/term user exit parameter list: IMSplex Termination” on page 619
The following table lists the user exit parameter list for RM initialization. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 265. RM init/term user exit parameter list: RM Initialization
Field
Field name Offset Length usage Description
RITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RITX_FUNC X'04' X'04' Input Function code:
1 RM initialization
The following table lists the user exit parameter list for RM termination. Included
are the field name, offset value and length (both in hexadecimal), how the field is
used, and a brief description of the field.
Table 266. RM init/term user exit parameter list: RM Termination
Field name Offset Length Field usage Description
RITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RITX_FTERM X'04' X'04' Input Function code
2 RM normal termination
The following table lists the user exit parameter list for IMSplex initialization.
Included are the field name, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 267. RM init/term user exit parameter list: IMSplex Initialization
Field name Offset Length Field usage Description
RITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RITX_FPLXINIT X'04' X'04' Input Function code
3 IMSplex normal initialization
RITX_IPLEXNM X'08' X'08' Input IMSplex name.
RITX_ISTRNM X'10' X'10' Input Resource structure name.
The following table lists the user exit parameter list for IMSplex termination.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 268. RM init/term user exit parameter list: IMSplex Termination
Field name Offset Length Field usage Description
RITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
RITX_FUNC X'04' X'04' Input Function code
4 IMSplex normal termination
RITX_TPLEXNM X'08' X'08' Input IMSplex name.
RITX_TSTRNM X'10' X'10' Input Resource structure name.
The following describes the RM statistics that are available to the BPE Statistics
user exit and are returned on a CSLZQRY FUNC=STATS request directed to the
RM address space. When the user exit is called, field BPESTXP_COMPSTATS_PTR
in the BPE Statistics user exit parameter list, BPESTXP, contains the pointer to the
RM statistics header. When the CSLZQRY FUNC=STATS request is called, the
OUTPUT= buffer points to the output area mapped by CSLZQRYO. The output
area field ZQYO_STXOFF contains the offset to the RM statistics header. The
header is mapped by CSLRSTX.
Subsections:
v “CSL RM statistics header”
v “CSL RM statistics record CSLRST1” on page 621
v “CSL RM statistics record CSLRST2” on page 622
v “CSL RM statistics record CSLRST3” on page 622
The following table lists the RM statistics header. Included are the offset value and
length (both in hexadecimal), how the field is used, and a brief description of the
field.
Table 269. RM statistics header
Field name Offset Length Field usage Description
RSTX_ID X'00' X'08' Input Eye catcher “CSLRSTX”.
RSTX_LEN X'08' X'04' Input Length of header.
RSTX_PVER X'0C' X'04' Input Header version number (X'0000001').
RSTX_PLEXCNT X'10' X'04' Input Number of IMSplexes for which statistics are
available.
RSTX_STATCNT X'14' X'04' Input Number of statistics areas available for each
IMSplex.
RSTX_STATLEN X'18' X'04' Input Length of all statistics areas for each IMSplex.
RSTX_STATOFF X'1C' X'04' Input Offset to statistics area for first IMSplex. This is
the offset from the beginning of CSLRSTX. The
offset points to the CSLRST1 area.
RSTX_RST1OFF X'20' X'04' Input Offset to the RM request statistics record for
activity performed by RM requests (mapped by
macro CSLRST1). The offset is from the start of
the statistics area for this IMSplex. Refer to the
next table for a description of the RM request
statistics record.
RSTX_RST2OFF X'24' X'04' Input Offset to RM IMSplex statistics record for
activity performed by RM for an IMSplex
(mapped by macro CSLRST2). The offset is
from the start of the statistics area for this
IMSplex. Refer to Table 271 on page 622 for a
description of the RM IMSplex statistics record.
RSTX_RST3CNT X'28' X'04' Input Number of CSLRST3 RM statistics areas (0 if
none).
CSLRST1 contains statistics that are related to specific requests processed by RM.
The following table lists the RM statistics record CSLRST1. Included are the offset
value and length (both in hexadecimal), how the field is used, and a brief
description of the field.
Table 270. RM statistics record CSLRST1
Field name Offset Length Field usage Description
RST1_ID X'00' X'08' Input Eye catcher “CSLRST1”.
RST1_LEN X'08' X'04' Input Length of valid data.
RST1_PVER X'0C' X'04' Input Parameter list version number (X'00000001').
RST1_RMUPD X'10' X'04' Input Number of CSLRMUPD FUNC=UPDATE
requests.
RST1_RMQRY X'14' X'04' Input Number of CSLRMQRY FUNC=QUERY
requests.
RST1_RMDEL X'18' X'04' Input Number of CSLRMDEL FUNC=DELETE
requests.
X'1C' X'04' None Not used.
RST1_RMREG X'20' X'04' Input Number of CSLRMREG FUNC=REGISTER
requests.
RST1_RMDRG X'24' X'04' Input Number of CSLRMDRG FUNC=DEREGISTER
requests.
RST1_RMDRGIN X'28' X'04' Input Number of internal deregister requests for
client normal termination.
RST1_RMDRGIA X'2C' X'04' Input Number of internal deregister requests for
client abnormal termination.
X'30' X'10' Input Not used.
RST1_RMPRCI X'40' X'04' Input Number of CSLRMPRI FUNC=INITIATE
initiate IMSplex-wide process requests.
RST1_RMPRCT X'44' X'04' Input Number of CSLRMPRT FUNC=TERMINATE
terminate IMSplex-wide process requests.
RST1_RMPRCS X'48' X'04' Input Number of CSLRMPRS FUNC=PROCESS
IMSplex-wide step requests.
RST1_RMPRCR X'4C' X'04' Input Number of CSLRMPRR FUNC=RESPOND
IMSplex-wide step response requests.
RST1_ZQRY X'50' X'04' Input Number of CSLZQRY requests.
X'54' X'04' None Not used
RST1_ZSHUT X'58' X'04' Number of CSLZSHUT requests
CSLRST2 contains statistics that are related to an IMSplex, but not to specific
requests. The following table lists the RM statistics record CSLRST2. Included are
the offset value and length (both in hexadecimal), how the field is used, and a brief
description of the field.
Table 271. RM statistics record CSLRST2
Field name Offset Length Field usage Description
RST2_ID X'00' X'08' Input Eye catcher “CSLRST2”
RST2_LEN X'08' X'04' Input Length of valid data
RST2_PVER X'0C' X'04' Input Parameter list version number (X'00000001')
RST2_PLEXNAME X'10' X'08' Input IMSplex name
blank X'18' X'08' None Not used
RST2_STRNAME X'20' X'10' Input Resource structure name
RST2_STRVER X'30' X'08' Input Resource structure version
RST2_CQSID X'38' X'08' Input CQS ID
RST2_CLIENTS X'40' X'04' Input Number of registered clients
RST2_CREATES X'44' X'04' Input Number of resource creates
RST2_UPDATES X'48' X'04' Input Number of resource updates
RST2_DELETES X'4C' X'04' Input Number of resource deletes
blank X'50' X'40' None Not used
CSLRST3 contains statistics that are related to an IMSRSC repository. There is one
CSLRST3 per active repository to which RM is connected. Locate the first CSLRST3
area by adding the value in field RSTX_RST3OFF to the address of the start of the
CSLRSTX area. Locate the next CSLRST3 area by adding the value in field
RST3_LEN to the address of the first CSLRST3 area. The number of CSLRST3 areas
is in field RSTX_RST3CNT. The CSLRST3 statistics are per repository, not per
IMSplex, and are separate from the IMSplex statistics described by fields
RSTX_STATCNT and RSTX_STATLEN.
All statistics fields in CSLRST3 are cumulative since the time RM connected to the
repository. Unless otherwise noted, all time value fields are in microseconds.
The following table lists the RM statistics record CSLRST3. Included are the offset
value and length of each field, how the field is used, and a brief description of the
field.
Related reference:
“BPE Statistics user-supplied exit routine” on page 523
SCI uses BPE services to call and manage its user exits. BPE enables you to
externally specify the user exit modules to be called for a particular user exit type
by using EXITDEF= statements in the BPE user exit list PROCLIB members. BPE
also provides a common user exit runtime environment for all user exits. This
environment includes a standard user exit parameter list, callable services, static
and dynamic work areas for the exits, and a recovery environment for user exit
abends.
Related reference:
Chapter 5, “BPE user-supplied exit routine interfaces and services,” on page 495
Part 4, “CSL SCI IMSplex member exit routines,” on page 651
On entry to the Client Connection exit, register 1 points to a standard BPE user
exit parameter list. Field UXPL_EXITPLP in this list contains the address of the SCI
Client Connection user exit parameter list, which is mapped by macro CSLSCLX.
Field UXPL_COMPTYPEP in this list points to the character string “SCI”,
indicating an SCI address space.
The following sections describe the following user exit parameter lists for SCI:
v client connection
v client disconnect
v client ready
v client quiesce
Subsection:
v “SCI client connection user exit parameter list”
The following table lists the user exit parameter list for SCI client connection.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 273. SCI client connection user exit parameter list
Field name Offset Length Field usage Description
SCLX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
SCLX_FUNC X'04' X'04' Input Function code:
1 Client connect.
2 Client disconnect.
3 Client ready.
4 Client quiesce.
SCLX_MBRNAME X'08' X'08' Input Client (IMSplex member) name.
Table 273. SCI client connection user exit parameter list (continued)
Field name Offset Length Field usage Description
SCLX_MBRTYPE X'10' X'02' Input IMSplex member type (mapped by CSLSTPIX).
SCLX_FLAG1 X'12' X'01' Input Flag byte:
X'80' Client disconnect is abnormal.
X'40' Client is authorized.
X'13' X'01' None Reserved.
SCLX_MBRSTYPE X'14' X'08' Input IMSplex member subtype.
SCLX_MBRVSN X'1C' X'04' Input Member version number.
SCLX_JOBNAME X'20' X'08' Input Member jobname.
SCLX_USERID X'28' X'08' Input Member user ID.
SCLX_OSNAME X'30' X'08' Input Name of the member's operating system.
SCLX_SCITOKEN X'38' X'16' Input Member SCI token.
X'48' X'04' None Reserved.
X'4C' X'04' None Reserved.
This exit is defined as TYPE=INITTERM in the EXITDEF statement in the BPE user
exit list PROCLIB member. You can specify one or more user exits of this type.
When this exit is invoked, all user exits of this type are driven in the order
specified by the EXITS= keyword. For more information on how to define user exit
module names, see the SCI BPE user exit list PROCLIB member information in
IMS Version 14 System Definition.
Subsections:
v “SCI init/term user exit parameter list: SCI Initialization” on page 627
v “SCI init/term user exit parameter list: SCI Termination” on page 627
626 Exit Routines
IBM Confidential
The following table lists the user exit parameter list for SCI initialization. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 274. SCI init/term user exit parameter list: SCI Initialization
Field name Offset Length Field usage Description
SITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
SITX_FUNC X'04' X'04' Input Function code
1 SCI initialization.
The following table lists the user exit parameter list for SCI termination. Included
are the field name, the offset value and length (both in hexadecimal), how the field
is used, and a brief description of the field.
Table 275. SCI init/term user exit parameter list: SCI Termination
Field name Offset Length Field usage Description
SITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
SITX_FUNC X'04' X'04' Input Function code
The following table lists the user exit parameter list for IMSplex initialization.
Included are the field name, the offset value and length (both in hexadecimal),
how the field is used, and a brief description of the field.
Table 276. SCI init/term user exit parameter list: IMSplex Initialization
Field name Offset Length Field usage Description
SITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
SITX_FUNC X'04' X'04' Input Function code
The following table lists the user exit parameter list for IMSplex termination.
Included are the field name, the offset value and length, both in hexadecimal, how
the field is used, and a brief description of the field.
Table 277. SCI init/term user exit parameter list: IMSplex Termination
Field name Offset Length Field usage Description
SITX_PVER X'00' X'04' Input Parameter list version number (X'00000001').
SITX_FUNC X'04' X'04' Input Function code
The following describes SCI statistics that are available to the BPE Statistics User
Exit and are returned on a CSLZQRY FUNC=STATS request directed to SCI. When
the user exit is driven, field BPESTXP_COMPSTATS_PTR in the BPE Statistics user
exit parameter list, BPESTXP, contains the pointer to the SCI statistics header.
When the CSLZQRY FUNC=STATS request is driven, the OUTPUT= buffer points
to the output area mapped by CSLZQRYO. The output area field ZQYO_STXOFF
contains the offset to the SCI statistics header. The header is mapped by CSLSSTX.
Subsections:
v “SCI statistics header CSLSSTX” on page 629
v “SCI statistics record CSLSST1” on page 629
v “SCI statistics record CSLSST2” on page 630
v “SCI member statistics record CSLSST3” on page 631
The following table lists the SCI Statistics Header CSLSSTX. Included are the field
name, the offset value and length (both in hexadecimal), how the field is used, and
a brief description of the field.
Table 278. SCI statistics header CSLSSTX
Field name Offset Length Field usage Description
SSTX_ID X'00' X'08' Input Eye catcher “CSLSSTX”.
SSTX_LEN X'08' X'04' Input Length of header.
SSTX_PVER X'0C' X'04' Input Header version number (X'0000001').
SSTX_PLEXCNT X'10' X'04' Input Number of IMSplexes for which statistics are
available.
SSTX_STATOFF X'14' X'04' Input Offset to statistics area for first IMSplex. This is
the offset from the beginning of CSLSSTX. The
offset points to the CSLSST1 area.
SSTX_SST1OFF X'18' X'04' Input Offset to the SCI request statistics record for
activity performed by SCI requests (mapped by
macro CSLSST1). The offset is from the start of
the statistics area for this IMSplex. Refer to the
next table for a description of the SCI Request
statistics record.
SSTX_SST2OFF X'1C' X'04' Input Offset to SCI IMSplex statistics record for
activity performed by SCI for an IMSplex
(mapped by macro CSLSST2). The offset is from
the start of the statistics area for this IMSplex.
Refer to Table 280 on page 630 for a description
of the SCI IMSplex statistics record.
SSTX_SST3OFF X'20' X'04' Input Offset to first SCI member statistics record for
SCI activity performed by each member in an
IMSplex (mapped by the CSLSST3 macro). The
offset is from the start of the statistics area for
each IMSplex. Refer to Table 281 on page 631.
X'24' X'04' Input Reserved.
X'28' X'04' None Reserved.
X'2C' X'04' None Reserved.
CSLSST1 contains statistics that are related to requests that are processed by SCI.
The following table lists the SCI Statistics Record CSLSST1. Included are the field
name, the offset value and length (both in hexadecimal), how the field is used, and
a brief description of the field.
Table 279. SCI statistics record CSLSST1
Field name Offset Length Field usage Description
SST1_ID X'00' X'08' Input Eye catcher “CSLSST1”.
SST1_LEN X'08' X'04' Input Length of CSLSTT1 data.
SST1_PVER X'0C' X'04' Input Statistics Version Number (X'00000001').
SST1_SCREG X'10' X'04' Input Number of local registrations.
SST1_RREG X'14' X'04' Input Number of remote registrations.
Related reference:
“BPE Statistics user-supplied exit routine” on page 523
CQS routines are written and supplied by a client (such as IMS). Each client must
write its own exit routines tailored to the needs of that client product, to be
supplied as part of the product. No sample CQS client exit routines are provided.
The exit routines are given control in the client's address space in one of these two
ways:
v For authorized clients (those running in supervisor state, key 0-7), the exits
receive control in service request block (SRB) mode.
v For non-authorized clients (those running in problem state or non-key 0-7), the
exits receive control as an interrupt request block (IRB) under the client task
control block (TCB) that owns the cross memory resources for the address space
(the TCB pointed to by ASCBXTCB).
Because each call to a client exit routine runs under its own SRB, the order in
which the exits are driven is not guaranteed. It is possible for client exit routines to
be driven out of order (different from the order from which CQS scheduled them).
Your exit routines must be able to tolerate events that are received out of order. All
client exit routine parameter lists contain an 8-byte time stamp in STCK format
that is the time when CQS scheduled the SRB for the exit routine. This time stamp
can be used to help determine the original order of events.
Related reference:
Chapter 8, “BPE-based CQS user-supplied exit routines,” on page 559
The client loads the exit routine and passes the exit routine address on the
CQSREG request. This exit routine is driven in the client address space, either as
an SRB (for authorized clients), or as an IRB (for non-authorized clients). The CQS
Event exit routine is required.
The following CQS events drive the CQS Event exit routine:
v CQS initialization - client can reconnect to CQS
v CQS termination - abnormal termination
Subsections:
v “CQS restart entry parameter list” on page 636
v “CQS abnormal termination parameter list” on page 636
v “Client processing after CQS abnormal termination or restart” on page 637
Restriction: All addresses passed to the CQS Event Exit routine are valid only
until the exit routine returns to its caller. These addresses should never be stored
and used after the CQS Event exit routine has returned. Doing so can cause
unpredictable results, because the storage pointed to by the addresses might have
changed, or it might have been freed.
The CQS Event exit routine must preserve the contents of register 13; it does not
need to preserve any other register's contents. Therefore, it is free to use the save
area pointed to by register 13 for any calls to other services as needed (it can also
use the 18-word area following the save area for additional save area or work area
storage).
Register
Contents
13 The same value it had on entry to the CQS Event exit routine.
15 Return code
0 Always set this to zero.
The following table describes the CQS restart entry parameters for the Client CQS
Event exit routine.
Table 282. Client CQS Event exit routine parameter list: CQS restart entry
Field name Offset Length Description
CEVX_PVSN X'00' X'04' Parameter list version number (X'00000001').
CEVX_EVENT X'04' X'04' CQS event code
X'1' CQS Initialization Event
(CEVX_INIT).
CEVX_SCODE X'08' X'04' CQS event subcode
X'1' Client can re-register and reconnect
to CQS (CEVX_RESTART).
CEVX_DATA X'0C' X'04' Event exit routine client data that was passed
to CQS on the CQSREG request.
CEVX_CQSID X'10' X'08' CQS identifier.
CEVX_CQSVER X'18' X'04' CQS version number.
CEVX_TSTMP X'1C' X'08' Time stamp representing the time the exit
routine was scheduled (in STCK format).
The following table describes the CQS abnormal termination parameters for the
Client CQS Event exit routine.
Table 283. Client CQS Event exit routine parameter list: CQS abnormal termination
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' CQS event code
2 CQS Termination Event.
X'08' X'04' CQS Event subcode
1 CQS abnormal termination entry. The CQS address
space is terminating abnormally.
X'0C' X'04' Event exit routine client data that was passed to CQS on the
CQSREG request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'24' X'04' Abnormal Termination reason code. (CQS abend code)
If a client is registered with CQS and CQS terminates abnormally, the client's CQS
Event exit routine is called with a CQS abnormal termination event. The client can
choose to wait for CQS to be restarted, at which time the client's CQS Event exit
routine is scheduled for a CQS restart event. When the CQS restart event is
received, the client must perform the following steps before it can resume making
CQS requests:
1. The client must reregister with CQS using the CQSREG macro. This step is
necessary to reestablish the cross-memory connections between the client and
CQS. Failure to reregister can result in an S0D6 abend when the next CQS
request is issued.
2. The client must reconnect, using the CQSCONN macro, to any structures it was
using prior to the CQS failure.
3. The client must resync indoubt UOWs with CQS, using the CQSRSYNC macro.
4. The client must register interest in queues, using the CQSINFRM request. If
CQS terminated abnormally, it lost all previous client registration information.
The client loads the exit routine and passes the address of the exit routine on the
CQSCONN request. This exit routine is driven in the client address space, either as
an SRB (for authorized clients), or as an IRB (for non-authorized clients). This exit
routine is required, and applies both to resource and queue structures.
The following structure events drive the Client Structure Event exit routine:
v Resync UOW processing
– When CQS Resync processing completes for an individual UOW, which had
been deferred.
– When CQS Resync processing occurs for the list of client UOWs that were not
passed during the CQS Resync request.
– Important: Resync UOW Processing only applies to queue structures.
v Checkpoint event
– When structure checkpoint begin, end, or failure occurs.
– Important: The Checkpoint event only applies to queue structures.
v Structure rebuild event
– When structure copy (rebuild) begin, end, or failure occurs.
– When structure recovery (rebuild) begin, end, or failure occurs.
– When structure recovery lost UOWs occurs.
v Structure overflow event
– When one or more queues move to the overflow structure.
– When one or more queues move from the overflow structure. This event also
indicates when the structure is no longer in overflow mode.
– Important: The Structure Overflow event only applies to queue structures.
v Structure status change event
– When the structure is available again after a loss.
– When the structure fails. For resource structures only, failure means that CQS
cannot allocate a new resource structure.
– When CQS is able to repopulate (allocate) a new resource structure.
– When CQS loses its connection to the structure.
– When the log stream becomes available, making the structure available.
Subsections:
v “Deferred resync complete parameter list for CQS Client Structure Event” on
page 640
v “CQS resync parameter list” on page 641
v “CQS resync UOW entry” on page 642
v “Checkpoint parameter list for CQS Client Structure Event” on page 643
v “Structure rebuild parameter list for CQS Client Structure Event” on page 643
v “Structure rebuild lost UOWs parameter list for CQS Client Structure Event” on
page 644
v “Rebuild lost UOW entry for CQS Client Structure Event” on page 645
v “Structure overflow parameter list for CQS Client Structure Event” on page 645
v “Structure status change parameter list for CQS Client Structure Event” on page
646
Restriction: All addresses that are passed to the Client Structure Event exit
routine are valid only until the exit routine returns to its caller. These addresses
should never be stored and used after the CQS Client Structure Event exit routine
has returned. Doing so can cause unpredictable results, because the storage
pointed to by the addresses might have changed, or it might have been freed.
The Client Structure Event exit routine must preserve the contents of R13; it does
not need to preserve any other register contents. Therefore, it is free to use the save
area pointed to by R13 for any calls to other services as needed. The exit routine
can also use the 18-word area following the save area for additional save area or
work area storage.
Register
Contents
13 The same value it had on entry to the Client Structure Event exit routine.
15 Return code
X'00' Always set this to zero.
The following table describes the deferred resync complete parameters for the
Client Structure Event exit routine.
Table 284. Client Structure Event exit routine parameter list: deferred resync complete
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
1 Resync UOW event.
Table 284. Client Structure Event exit routine parameter list: deferred resync
complete (continued)
Offset Length Description
X'08' X'04' Structure event subcode
1 Deferred resync complete.
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'10' Structure Name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'20' Unit of work (UOW) identifier.
X'54' X'10' Queue name.
X'64' X'10' Deferred resync token. This is the Put token that is used for Put
Forget processing.
X'74' X'02' CQS UOW state
X'0010' Put Insync
Client status is Put Complete. CQS status is Put
Complete. CQS knows about the UOW and all data
objects for the UOW are out on the coupling facility. A
PUT token is returned for the UOW. The client should
use the PUT token to issue the CQSPUT FUNC=FORGET
request.
X'00F2' Unknown
Client status is Put Complete. CQS has no knowledge
of the UOW.
If the client believes the UOW is in Put Complete
status, the client must determine whether to reissue the
CQSPUT requests.
X'76' X'02' Reserved.
The following table describes the CQS initiated resync parameters for the Client
Structure Event exit routine.
Table 285. Client Structure Event Routine exit parameter list: CQS initiated resync
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
1 Resync UOW event.
X'08' X'04' Structure event subcode
2 CQS Initiated resync processing.
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
Table 285. Client Structure Event Routine exit parameter list: CQS initiated
resync (continued)
Offset Length Description
X'18' X'04' CQS version number.
X'1C' X'10' Structure name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'04' Number of unit of work (UOW) list entries.
X'38' X'04' Length of each UOW list entry.
X'3C' X'04' Offset into parameter list of start of UOW list. The parameter
list is one contiguous piece of storage, including the UOW list.
The following table describes the CQS resync UOW entry parameters for the Client
Structure Event exit routine.
Table 286. CQS resync UOW entry parameters
Offset Length Description
X'00' X'20' Unit of work (UOW) identifier.
X'20' X'10' Queue name.
X'30' X'10' Resync token.
v If the CQS UOW status is locked, this field contains a lock
token. This lock token is to be used on subsequent requests,
such as CQSREAD and CQSUNLCK to process the locked
data object.
v If the CQS UOW status is COLD QUEUE, this field contains a
cold queue token. This cold queue token is to be used along
with the UOW on a CQSRECVR request to recover the data
object on the cold queue.
X'40' X'02' CQS UOW status
X'00F1' Locked. This data object is locked. A lock token is
passed back to the client in the Resync token field. This
token field is required on subsequent requests to
process the locked data object.
X'00F3' Cold Queue: CQS-Client Cold Start. This data object is
on the cold queue because of either a CQS cold start or
client cold start. A cold queue token is passed back to
the client in the Resync token field. This token field is
required on a subsequent CQSRECVR request to
process the data object on the cold queue.
X'00F4' Cold Queue: Unknown. This data object is on the cold
queue. CQS warm started after a structure rebuild
from the log took place and the object was found
locked by CQS. A cold queue token is passed back to
the client in the Resync token field. This token field is
required on a subsequent CQSRECVR request to
process the data object on the cold queue.
X'42' X'02' Reserved.
The following table describes the checkpoint parameters for the Client Structure
Event exit routine.
Table 287. Client Structure Event exit routine parameter list: checkpoint
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
2 Checkpoint event.
X'08' X'04' Structure event subcode
1 Structure checkpoint begin.
2 Structure checkpoint end.
3 Structure checkpoint failure.
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'10' Structure name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'08' CQS identifier of the master CQS performing the checkpoint
process.
X'3C' X'01' Flag byte.
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same.
X'3D' X'03' Reserved.
The following table describes the structure rebuild parameters for the Client
Structure Event exit routine.
Table 288. Client Structure Event exit routine parameter list: structure rebuild
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
3 Structure rebuild event.
X'08' X'04' Structure event subcode
1 Structure rebuild begin.
2 Structure rebuild (copy) end.
3 Structure rebuild (copy) failure.
4 Structure rebuild failure.
5 Structure rebuild (recovery) end.
6 Structure rebuild (recovery) failure.
Table 288. Client Structure Event exit routine parameter list: structure rebuild (continued)
Offset Length Description
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'10' Structure name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'08' CQS identifier of the master CQS performing the rebuild
process.
X'3C' X'01' Flag byte.
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same.
X'3D' X'03' Reserved.
The following table describes the structure rebuild lost UOW parameters for the
Client Structure Event exit routine. These UOWs are nonrecoverable and were lost
by the last structure recovery. Some of the UOWs in the list might belong to other
clients if the structure recovery occurred while CQS was down.
Table 289. Client Structure Event exit routine parameter list: structure rebuild lost UOWs
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
3 Structure rebuild event.
X'08' X'04' Structure event subcode
7 Structure recovery lost UOWs.
Important: This subcode applies only to queue
structures.
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'10' Structure name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'08' CQS identifier of the master CQS performing the rebuild
process.
X'3C' X'01' Flag byte.
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same.
X'3D' X'03' Reserved.
Table 289. Client Structure Event exit routine parameter list: structure rebuild lost
UOWs (continued)
Offset Length Description
X'40' X'04' Number of Lost UOW list entries.
X'44' X'04' Length of each Lost UOW list entry.
X'48' X'04' Offset into parameter list of start of Lost UOW list. The
parameter list is one contiguous piece of storage, including the
Lost UOW list.
The following table describes the CQS rebuild lost UOW entry parameters for the
Client Structure Event exit routine.
Table 290. CQS rebuild lost UOW entry parameters
Offset Length Description
X'00' X'20' Unit of work (UOW) identifier.
X'20' X'10' Client queue name.
X'30' X'01' Lost UOW status.
X'80' Lost UOW was on client queue.
X'40' Lost UOW was locked.
X'20' Lost UOW was on COLDQ.
X'10' Lost UOW was on CQS private queue.
X'31' X'03' Reserved.
The following table describes the structure overflow parameters for the Client
Structure Event exit routine.
Table 291. Client Structure Event exit routine parameter list: structure overflow
Offset Length Description
X'00' X'04' Parameter list version number (X'00000001').
X'04' X'04' Structure event code
4 Structure overflow event.
X'08' X'04' Structure event subcode
1 Move queues to overflow. One or more queues was
selected as candidates to be moved to the overflow
structure and was approved by the Queue Overflow
user exit routine.
2 Move queues from overflow. One or more queues
moved from the overflow structure back to the primary
structure, because the queues were drained on the
overflow structure. New work for these queues is
placed on the primary structure.
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
Table 291. Client Structure Event exit routine parameter list: structure overflow (continued)
Offset Length Description
X'18' X'04' CQS version number.
X'1C' X'10' Structure name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'08' CQS identifier of the master CQS performing the overflow
process.
X'3C' X'01' Flag byte.
X'80' This CQS is the master of the process. The CQS
identifier and master CQS identifier are the same.
X'40' The structure is no longer in overflow mode. This
value applies only to subcode 2.
X'3D' X'03' Reserved.
X'40' X'04' Number of queue name entries in the list.
X'44' X'04' Length of each queue name list entry.
X'48' X'04' Offset into parameter list of start of queue name list. Each
queue name list entry contains the 16-byte queue name of a
queue that is being moved to the overflow structure. The
parameter list is one contiguous piece of storage, including the
queue name list.
The following table describes the structure status change parameters for the Client
Structure Event exit routine.
Table 292. Client Structure Event exit routine parameter list: structure status change
Offset Length Description
X'00' X'04' Parameter list version number (00000002).
X'04' X'04' Structure event code.
5 Structure status change event.
X'08' X'04' Structure event subcode
1 Structure available again after a loss.
2 The structure failed.
3 CQS lost its connection to the structure (STXLCONN).
4 The log stream is becoming available, making the
structure available (STXAVLOG).
Important: This subcode applies only to queue
structures.
5 The log stream is becoming unavailable, making the
structure unavailable (STXFLOG).
Important: This subcode applies only to queue
structures.
6 Structure repopulation required due to structure
failure.
Table 292. Client Structure Event exit routine parameter list: structure status
change (continued)
Offset Length Description
X'0C' X'04' Structure Event exit routine client data that was passed to CQS
on the CQSCONN request.
X'10' X'08' CQS identifier.
X'18' X'04' CQS version number.
X'1C' X'10' Structure Name.
X'2C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'34' X'01' Structure type
1 Queue structure
2 Resource structure
X'38' X'18' Not used.
X'50' X'08' Structure version of new structure that requires repopulation,
because old structure failed.
The exit routine is also scheduled whenever a queue goes from an empty to
non-empty state (when the first data object for a queue is written to the structure).
If additional data objects are added to the queue, the inform exit routine, which
has already been run once, is not notified again while there are still data objects on
the queue.
The client loads the exit routine and passes the address of the exit routine on the
CQSCONN request. This exit routine is driven in the client address space, either as
an SRB (for authorized clients), or as an IRB (for non-authorized clients).
Important: This exit routine is optional; however, if it is not supplied, the client is
not notified when work is placed on the queues.
Restriction: All addresses that are passed to the CQS Structure Inform exit routine
are valid only until the exit routine returns to its caller. These addresses should
never be stored and used after the CQS Structure Inform exit routine has returned.
Doing so can cause unpredictable results, because the storage pointed to by the
addresses might have changed, or it might have been freed.
The CQS Structure Inform exit routine must preserve the contents of register 13
and it does not need to preserve any other register's contents. Therefore, it is free
to use the save area pointed to by register 13 for any calls to other services as
needed. It might also use the 18-word area following the save area for additional
save area or work area storage.
Register
Contents
13 Same value as it had on entry to the CQS Structure Inform exit routine.
15 Return code
0 Always set this to zero.
The following table describes the parameters for the Client Structure Inform exit
routine.
Table 293. Client Structure Inform exit routine parameter list
Offset Length Description
X'00' X'04' Parameter list version number (X'00000002').
X'04' X'04' Structure Inform exit routine client data that was passed to
CQS on the CQSCONN request.
X'08' X'08' CQS identifier.
X'10' X'04' CQS version number.
X'14' X'10' Structure name.
X'24' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
X'2C' X'04' Number of queue name entries in the list.
X'30' X'04' Length of each queue name list entry.
X'34' X'04' Offset into parameter list of start of queue name list. Each
queue name entry in the list contains the 16-byte queue name
for which a message has been queued. The parameter list is
one contiguous piece of storage, including the queue name
list.
X'38' X'08' Time stamp of the time that the CQS list transition exit was
driven in STCK format. This field only exists when the
parameter list version number (at offset X'00') is X'00000002' or
higher.
SCI member exits are written and supplied by an IMSplex member (such as the
IMS control region). Each member must write its own exit routines tailored to the
needs of that member product, to be supplied as part of the product. No sample
SCI exit routines are provided. The exit routines are given control in the member's
address space in one of two ways:
v For authorized members (those running in supervisor state, key 0-7), the exits
receive control in SRB mode.
v For non-authorized members (those running in problem state or non-key 0-7),
the exits receive control as an IRB under the member TCB associated with the
SCI registration.
Because each call to a member exit routine runs under its own SRB, the order in
which the exits are driven is not guaranteed. It is possible for member exit routines
to be driven out of order (different from the order in which SCI scheduled them).
Your exit routines must be able to tolerate events that are received out of order. All
member exit routine parameter lists contain an 8-byte time stamp in STCK format,
which is the time when SCI scheduled the SRB for the exit routine. This time
stamp can be used to help determine the original order of events.
Related reference:
“BPE-based CSL SCI user exit routines” on page 624
The IMSplex member loads the exit routine and passes the exit routine address on
the CSLSCREG request. The exit is driven in the member's address space, either as
an SRB (for authorized members) or as an IRB (for non-authorized members).
Subsections:
v “CSL SCI input exit parameter list” on page 654
Restriction: All addresses passed to the SCI Input Exit routine are valid only
until the exit routine returns to its caller (with the exception of the member
parameter list address). These addresses should never be stored and used after the
SCI Input Exit routine has returned. Doing so can cause unpredictable results,
because the storage pointed to by the addresses can change or be reassigned by
IMS after the exit returns. The member parameter list address is the exception to
this restriction. It is available until the storage is released by issuing the CSLSCBFR
FUNC=RELEASE request (for messages), or the CSLSCRQR FUNC=RETURN
request (for requests).
The SCI Input exit routine must preserve the contents of R13; it does not need to
preserve any other register's contents. Therefore, it can use the save areas pointed
to by R13 for any calls to other services as needed.
Register
Contents
13 The same value it had on entry to the SCI Input exit routine.
15 Return code
0 The message or request was successfully received.
4 The message or request was not received because the destination
member did not understand the function. If the input data is for a
request, SCI sends a response with return code=SRC_PARM
(parameter error) and reason code=SRSN_FUNCTION (invalid
The following table describes the entry parameters for the parameter list header of
the Client SCI Input exit routine. The field name is provided, with its offset and
length in hexadecimal, and a brief description of the field.
Table 294. Client SCI input exit routine parameter list: parameter list header
Field name Offset Length Description
INXP_PVER X'00' X'04' Parameter list version number (X'00000001').
INXP_PLEN X'04' X'04' Total length of parameter list.
INXP_SCIVSN X'08' X'04' Version of SCI on the system from which this message or
request originated.
INXP_EXITPARM X'0C' X'08' Input exit routine member data that was passed to SCI
on the CSLSCREG request with the INPUTPARM
parameter. If no data was passed on the CSLSCREG
request, this field contains zeros.
INXP_PLEXNAME X'14' X'08' IMSplex name.
INXP_TIMESTMP X'1C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
INXP_DATAOFF X'24' X'04' Offset of Message Data Section from the start of the
parameter list header.
INXP_SRCOFF X'28' X'04' Offset of Source Member Data Section from the start of
the parameter list header
The following table describes the entry parameters for the message data of the
Client SCI Input exit routine. The field name is provided, with its offset and length
in hexadecimal, and a brief description of the field.
Table 295. Client SCI input exit routine parameter list: message data
Field name Offset Length Description
INXP_FUNC X'00' X'04' Function code.
INXP_SFUNC X'04' X'04' Subfunction code.
Table 295. Client SCI input exit routine parameter list: message data (continued)
Field name Offset Length Description
INXP_DATAFL1 X'08' X'01' Data Flag.
X'80' INXP_RQST
This bit indicates that the input data is a
request. When the receiver of the request has
completed processing the request, it must be
returned using the CSLSCRQR request. If the
bit is not set, the input data is a message. When
the receiver of the message has completed
processing the message, it should return the
storage to SCI using the CSLSCBFR request.
X'40' INXP_FTYPSND
When this bit is on, the function code in
INXP_FUNC is defined by the sender. When
this bit is off, the function code is defined by
the destination.
X'09' X'03' Reserved.
INXP_MBRPLCNT X'0C' X'04' The number of parameters (pairs of lengths and
addresses) passed in the member parameter list.
INXP_MBRPLPTR X'10' X'04' The address of the member parameter list.
X'14' X'04' Reserved.
INXP_RQSTTKN X'18' X'08' Request token. This field is valid only if bit INXP_RQST
is set (indicating that this is a request). The request token
is used to return the request to the sender when issuing
the CSLSCRQR request. If INXP_RQST is not set
(indicating this is a message), this field is unused.
X'20' X'04' Reserved.
X'24' X'04' Reserved.
The following table describes the entry parameters for the input source data of the
Client SCI Input exit routine. The field name is provided, with its offset and length
in hexadecimal, and a brief description of the field.
Table 296. Client SCI input exit routine parameter list: input source data
Field name Offset Length Description
INXP_SCITKN X'00' X'10' The SCITOKEN of the IMSplex member that is the
source of this data.
INXP_MBRNAME X'10' X'08' The name of the IMSplex member that is the source of
this data.
INXP_MBRVSN X'18' X'04' The version of the IMSplex member that is the source of
this data. If the source IMSplex member did not pass a
MBRVSN on the CSLSCREG request, this field is set to
zeros.
INXP_TYPE X'1C' X'02' The IMSplex member type of the IMSplex member that
is the source of this data.
X'1E' X'02' Reserved.
Table 296. Client SCI input exit routine parameter list: input source data (continued)
Field name Offset Length Description
INXP_SUBTYPE X'20' X'08' The subtype of the IMSplex member that is the source of
this data. If the source IMSplex member did not pass a
SUBTYPE on the CSLSCREG request, this field is set to
zeros.
INXP_JOBNAME X'28' X'08' The jobname of the IMSplex member that is the source
of this data.
INXP_USERID X'30' X'08' The user ID of the IMSplex member that is the source of
this data.
INXP_SRCFL1 X'38' X'01' Source Flag
X'80' This bit indicates that the member that sent this
data is authorized.
X'39' X'03' Reserved.
X'3C' X'04' Reserved.
X'40' X'04' Reserved.
X'44' X'04' Reserved.
The IMSplex member loads the exit routine and passes the exit routine address on
the CSLSCREG request. The exit is driven in the member's address space, either as
an SRB (for authorized members) or as an IRB (for non-authorized members).
Note that some fields are not available in the Notify exit parameter list when the
exit is driven for CSLSCDRG-related events (normal and abnormal termination)
and when an IMSplex member is not reachable.
If the local SCI is the IMSplex member for which the Notify exit is being driven,
the NXFP_LOCALSCI (X'40') bit in the NXFP_FLAG1 is set. When an SCI
terminates, processing on the z/OS image for the IMSplex that was managed by
the inactive SCI is limited until the SCI restarts:
v No messages or requests can be sent or received by any local IMSplex member.
v The SCI Notify exit cannot be driven for local IMSplex members for the
following events:
– CSLSCREG FUNC=REGISTER
– CSLSCRDY FUNC=READY
– CSLSCQSC FUNC=QUIESCE
– CSLSCDRG FUNC=DEREGISTER (non-authorized member)
– Termination without CSLSCDRG FUNC=DEREGISTER (non-authorized
member)
The Notify exit continues to be driven for normal and abnormal deregistrations
for authorized members.
v No new members can join the IMSplex on the z/OS image.
v No SCI requests can be processed by local IMSplex members (for example,
CSLSCQRY and CSLSCDRG requests).
When SCI restarts on the z/OS image, SCI re-registers each IMSplex member that
is still active. The SCITOKEN for each IMSplex member is still valid. The Notify
exit routine for each local member is driven for the following events:
v Registration for the local SCI
v Registration and Ready (if appropriate) for the local IMSplex members
v Ready for the local SCI
v Registration and Ready (if appropriate) for IMSplex members that are not local
Events for members that are not local can be scheduled before the Ready for the
local SCI; however, events for local members are all scheduled before the SCI
Ready event is scheduled. Local IMSplex members should not use SCI services
until they have received the Ready event for the local SCI.
Note: Since these events are sent using an SRB or an IRB, they might not be
received by the member in their logical order. This is especially true with
non-authorized members because the exit is called using an IRB. If the next event
occurs before the exit has been called by the IRB, the new IRB will interrupt the
previous IRB, and the notification for the newer event will be received first. For
example, the abnormal deregistration event could be received before the
NOT-REACHABLE event. Since the abnormal deregistration event should occur
later that the NOT-REACHABLE event, your program should be able to handle a
NOT-REACHABLE event for a member that has already been abnormally
deregistered.
Subsection:
v “CSL SCI notify exit parameter list” on page 659
Restriction: All addresses passed to the SCI Notify exit routine are valid only
until the exit routine returns to its caller. These addresses should never be stored
and used after the SCI Notify exit routine has returned. Doing so can cause
unpredictable results, because the storage pointed to by the addresses can be
changed or reassigned by IMS after the exit returns.
The SCI Notify exit routine must preserve the contents of register 13; it does not
need to preserve any other register's contents. Therefore, it is free to use the save
areas pointed to by register 13 for any calls to other services as needed.
Register
Contents
13 The same value it had on entry to the SCI Notify exit routine.
15 Return code
0 Always set this to zero.
The following table describes the parameter list header of the SCI Notify Client
exit routine. The field name is provided, with its offset and length in hexadecimal,
and a brief description of the field.
Table 297. SCI notify client exit routine parameter list header
Field name Offset Length Description
NFXP_PVER X'00' X'04' Parameter list version number (X'00000001').
NFXP_PLEN X'04' X'04' Total length of parameter list.
NFXP_EXITPARM X'08' X'08' Notify exit routine member data that was passed to SCI
on the CSLSCREG request with the NOTIFYPARM
parameter. If no data was passed on the CSLSCREG
request, this field contains zeros.
NFXP_PLEXNAME X'10' X'08' IMSplex name.
NFXP_SCIVSN X'18' X'04' SCI Version
NFXP_TIMESTMP X'1C' X'08' Time stamp representing the time the exit routine was
scheduled (in STCK format).
NFXP_SUBJOFF X'24' X'04' Offset of Subject Data Section.
X'28' X'04' Reserved.
The following table describes the subject data of the SCI Notify Client exit routine.
The field name is provided, with its offset and length in hexadecimal, and a brief
description of the field.
Table 298. SCI notify client exit routine parameter list - subject data
Field name Offset Length Description
NFXP_SCITKN X'00' X'10' The SCITOKEN of the member that is the subject of this
event.
NFXP_EVENT X'10' X'02' The event that initiated this notification.
1 CSLSCREG FUNC=REGISTER
2 CSLSCRDY FUNC=READY
3 CSLSCQSC FUNC=QUIESCE
4 CSLSCDRG FUNC=DEREGISTER
5 Termination without CSLSCDRG
FUNC=DEREGISTER
6 The member cannot be reached because the
local SCI is not active.
NFXP_FLAG1 X'12' X'01' The event that initiated this notification.
X'80' This bit indicates that the subject of this event is
authorized.
X'40' This bit indicates that the subject of this event is
the local SCI.
X'13' X'01' Reserved.
NFXP_MBRNAME X'20' X'08' The Name of the IMSplex member that is the subject of
this event.
Table 298. SCI notify client exit routine parameter list - subject data (continued)
Field name Offset Length Description
NFXP_MBRVSN X'28' X'04' The Version of the IMSplex member that is the subject of
this event. If the subject IMSplex member did not pass a
MBRVSN on the CSLSCREG request, this field is set to
zeros.
The user message exit routines can perform a number of tasks related to the
management of messages, including:
v Translating input messages into the protocol or format required by IMS and the
IMS Open Transaction Manager component
v Rerouting messages
v Checking security for input messages
v Returning user-defined messages in response to certain user-defined criteria
For security checking, the IMS Connect user message exit routines allow you to
call IMSLSECX, the security message exit routine, issue the RACF function in these
user message exit routines, or use the IMS Connect user RACF function.
Note: Do not issue any MVS calls in the user message exit that result in an MVS
WAIT because the MVS WAIT will halt all work on the port. If you modify the user
message exit routine and add code that results in an MVS WAIT, all work on the
TCP/IP PORT will halt until the WAIT has been posted. The user message exit
routines cannot be modified to free any storage passed to the exit routine, and IMS
Connect will not free any storage obtained by the user message exit routine when
the exit routine returns to IMS Connect. All storage obtained by IMS Connect must
be released by IMS Connect and cannot be freed by the user message exit routine
without causing failures.
The HWSSMPL0 and HWSSMPL1 exit routines and the related macros are shipped
with IMS both as source code and as load modules. If you do not need to modify
the exit routines, you can use the load modules. If you use the source code, you
must assemble and bind the source code after you modify it for your needs.
If you need customized exit routines to support your user-provided IMS Connect
clients, you can modify the source of either HWSSMPL0 or HWSSMPL1. You can
also create new exit routines by modifying the source and renaming the modified
exit routine. You can customize exit routines for specific clients without having to
combine the logic for numerous clients in a single exit routine. Each different exit
routine is identified by a unique name in the IRM_ID field of input messages.
The HWSSMPL0 and HWSSMPL1 user message exit routines provide the following
functions:
v Perform data translation of ASCII to EBCDIC for input messages.
v Perform data translation of EBCDIC to ASCII for output messages.
v Support for Unicode transaction codes and application data. IMS Connect only
translates the transaction code. Unicode application data is passed to the IMS
host application without being translated.
v Build the IMS Connect message structure (BPE and OTMA headers).
v If IMSLSECX (the security message exit) is bound with either of these message
exits, then the security message exit is called.
v Optionally, return a user-defined message with reason and return codes back to
a client application as a reply to an input message without terminating the
persistent socket connection. After sending the message, IMS Connect will
terminate or keep a socket connection open depending on the return code set in
the EXPREA_RETCODE parameter pointed to by register 1 at the READ
subroutine exit.
Important: IMS Connect does not support this function for Local Option
connections. Additionally, the message length must be from a minimum of 1 to
the maximum of 128 characters. If the specified message length is greater than
128, the message will be truncated to 128.
v By default, set the commit mode processing to 1 (send then commit) on input
messages.
v By default, set the synchronization processing to NONE (SYNC LEVEL =
NONE) on input messages, so that client is not required to return an
acknowledgment.
v Set RACF options or passwords.
v If no Client ID is passed to the exit, the message exit generates the Client ID.
v Analyze the following option specifications in the headers of messages:
– COMMIT MODE to override default.
– SYNC LEVEL to override default.
– LTERM to override logical terminal names
– MFS MOD name.
– ACK/NAK/DEALLOCATE.
– RACF options.
v Optionally, issue a DFS2082 message for both RESPONSE and NONRESPONSE
mode CM0 transactions when the IMS application does not reply to the IOPCB
or complete a message switch to another transaction.
By default, the COMMIT mode is set to 1, and the SYNC LEVEL is set to NONE.
These values can be overridden by supplying the COMMIT mode, the sync level,
or both in the IRM_FLG2 and IRM_FLG3 fields of the message prefix received
from the client. Alternatively, you can change the exit to set a different default
values for COMMIT mode and SYNC level.
If the input from the client is in ASCII, the IMS Connect HWSSMPL0 and
HWSSMPL1 exits translate ASCII to EBCDIC and build the required message
structure containing the OTMA headers for messages received from the client. This
exit performs the translation from EBCDIC to ASCII and removes the OTMA
headers for messages being transmitted to the client. You can also modify the
translation function of the exit routines to suit the needs of your client application.
These user exits call the user-provided security exit if one is defined to this exit
and passes a parameter list in register 1.
Related concepts:
Ping support for IMS Connect (Communications and Connections)
User-defined messages (Communications and Connections)
Related tasks:
Changing RACF passwords by using client messages (Communications and
Connections)
Related reference:
HWSSMPL0 and HWSSMPL1 security actions (Communications and
Connections)
IRM structures for IMS Connect client messages (Communications and
Connections)
Input message from client and passed to message exit (Communications and
Connections)
Input message returned from message exit (Communications and Connections)
The HWSJAVA0 exit routine and its related macros are provided as both load
modules and source code. Use the load module if you do not want to alter the
way HWSJAVA0 operates. Edit the source code if you want to use a modified
version of the exit in your installation. After modifying the source code, you must
assemble and link edit it to replace the pre-assembled load module in your system.
The HWSJAVA0 exit routine is bound into the [Link] data set. This exit
does not perform a translation or build to the OTMA headers. Both the translation
and insertion or deletion of the OTMA header is done by IMS TM Resource
Adapter.
By default, the HWSJAVA0 exit routine sets the COMMIT mode to 1, and the
SYNC level to NONE. However, IMS TM Resource Adapter can override these
settings.
The HWSJAVA0 exit routine can return user-defined messages and return and
reason codes when user-defined criteria are met. The HWSJAVA0 exit routine can
also request that IMS Connect keep the socket connection open after returning a
user-defined message depending on the return code set in the EXPREA_RETCODE
parameter pointed to by register 1 at the READ subroutine exit.
Important: IMS Connect does not support user-defined messages for Local Option
connections. Additionally, the message length must be from a minimum of 1 to the
maximum of 128 characters. If the specified message length is greater than 128, the
message will be truncated to 128.
This user exit also calls the user-provided security exit (IMSLSECX) if one is
defined to this exit and passes a parameter list in register 1.
Related concepts:
Ping support for IMS Connect (Communications and Connections)
User-defined messages (Communications and Connections)
Related tasks:
Changing RACF passwords by using client messages (Communications and
Connections)
Related reference:
“z/OS TCP/IP IMS Listener security exit (IMSLSECX)” on page 694
Message structures (Communications and Connections)
The HWSSOAP1 exit routine is shipped with IMS Connect and link-edited into the
[Link] data set. The source code for HWSSOAP1 is not shipped and
cannot be modified or replaced.
The HWSDPWR1 exit routine is shipped with IMS Connect and link-edited into
the [Link] data set. The source code for HWSDPWR1 is not shipped and
cannot be modified or replaced.
This exit routine performs the same basic functions as the HWSSMPL1 exit routine,
but with modifications to support the DataPower message format. The
HWSDPWR1 exit adds the required internal message headers to incoming
messages (received from a DataPower client) and removes them from outgoing
messages (sent to a DataPower client).
HWSCSLO0 and HWSCSLO1 are delivered as object code only (OCO) with IMS
Connect. The exit is formatted OCO to allow IMS Connect and the user message
exit for the IMS Control Center to be synchronized without requiring simultaneous
upgrades of other products when message exit functions change.
If your installation activates the IMS Control Center to communicate with OM, you
must include the HWSCSLO0 and HWSCSLO1 exit names in the EXIT= parameter
of the TCPIP statement.
HWSCSLO0 provides the following functions required by the IMS Control Center:
v Performs data translation of ASCII to EBCDIC for input messages.
v Performs data translation of EBCDIC to ASCII for output messages.
v Builds the IMS Connect message structure (BPE and OM headers required by
IMS Connect) for input messages.
v Removes the IMS Connect internal OM headers for output messages.
v Defaults to COMMIT MODE=1.
v Defaults to SYNCH LEVEL=NONE.
v Analyzes the following message header options:
– COMMIT MODE override of the default
– SYNC LEVEL override of the default
– If no client ID is passed to the exit, then the message exit generates the client
ID
HWSCSLO1 provides the following functions required by the IMS Control Center:
v Performs no translation output messages.
v Builds the IMS Connect message structure (BPE and OM headers required by
IMS Connect) for input messages.
v Removes the IMS Connect internal OM headers for output messages.
v Defaults to COMMIT MODE=1.
v Defaults to SYNCH LEVEL=NONE.
v Analyzes the following message header options:
– COMMIT MODE override of the default
– SYNC LEVEL override of the default
– If no client ID is passed to the exit, then the message exit generates the client
ID.
HWSCSLO0 and HWSCSLO1 IMSplex message exits are shipped with IMS
Connect and bound into the [Link] data set. You must use these exits for
the IMSplex support which supports the IMS Control Center. The source code for
HWSCLSO0 and HWSCSLO1 are not shipped and cannot be modified or replaced.
The COMMIT mode is set to 1, and the SYNC level is set to NONE. These values
can be overridden by supplying either the COMMIT mode, the sync level, or both
in the IRM_F2 and IRM_F3 fields in the user section of the IRM prefix of the
message received from the IMS Control Center client.
The IMS Connect HWSCSLO0 and HWSCSLO1 exits translate ASCII to EBCDIC
and build the required message structure containing the required internal headers
for messages received from the client. HWSCSLO0 exit performs the translation
from EBCDIC to ASCII and removes the internal headers for messages being
transmitted to the client. HWSCSLO1 exit does not perform any translation on the
output data, but it does remove the internal headers for messages being
transmitted to the client.
Note: You do not need to specify the HWSCSLO0 and HWSCSLO1 exit names in
the TCPIP statement EXIT= parameter if the IMS Control Center is not used.
Related reference:
Input message from client and passed to message exit (Communications and
Connections)
Output message from message exit to client (Communications and
Connections)
Format of user portion of IRM for HWSSMPL0, HWSSMPL1, and user-written
message exit routines (Communications and Connections)
You might use the Port Message Edit exit routine if you have application programs
that access IMS Connect from platforms that prevent the application programs
from conforming to the standard message formats supported by IMS Connect.
The Port Message Edit exit routine is assigned to an individual, unique port. After
a port is defined as using the Port Message Edit exit routine, all messages received
and sent to the client on that port are passed to the exit routine.
On input, the Port Message Edit exit routine receives control after IMS Connect has
received the complete message from TCP/IP, but before IMS Connect starts
processing the message.
On output, the Port Message Edit exit routine receives control after IMS Connect
has formatted the output message but before the message is sent to TCP/IP.
Attention: Do not issue any z/OS calls in the user message exit that result in an
MVS WAIT. If the exit routine triggers an MVS WAIT, all work on the TCP/IP port
stops until the WAIT is posted.
You specify a Port Message Edit exit routine as a 1- to 8-character name on the
EDIT parameter of the PORT keyword in the TCP/IP configuration statement in
the HWSCFGxx PROCLIB member.
The Port Message Edit exit routine runs as a type-2 BPE exit and can be managed
by the BPE commands, such as DISPLAY USEREXIT and REFRESH USEREXIT. As
a type-2 BPE exit routine, the Port Message Edit exit routine is defined to BPE
dynamically and you do not need to define it during BPE configuration.
Entry to and exit from this exit routine are recorded as trace events for the IMS
Connect Event Recorder exit routine (HWSTECL0).
IMS provides the source code for a sample Port Message Edit exit routine,
HWSPIOX0.
The Port Message Edit exit routine is not supported for the following clients:
v IMS Universal database driver clients that use DRDA® ports that are defined on
the IMS Connect ODACCESS configuration statement.
v User-written DRDA source servers that use DRDA ports that are defined on the
IMS Connect ODACCESS configuration statement.
v SSL clients that use a SSL port defined on the IMS Connect TCPIP configuration
statement.
v Local option clients
On entry, the exit routine must save all registers using the provided save area. On
entry to the IMS Connect Port Message Edit exit routine, R1 points to a Standard
BPE user exit parameter list. The field UXPL_EXITPLP in this list contains the
address of the IMS Connect Port Message Edit exit routine parameter list (mapped
by the HWSEXPIO macro). The registers contain the following contents:
Register Contents
1 Address of BPE User Exit Parameter list (mapped by macro BPEUXPL)
13 Pointer to first of two pre-chained save areas
Register Contents
14 Return address
15 Entry point address
Parameter list
The following table describes the IMS Connect Port Message Edit exit routine
parameters:
Table 299. IMS Connect Port Message Edit exit routine parameter list
Field Offset Length Contents
PIOPRM_FUNCTION X'00' 4 Call type:
'INIT' INITIALIZATION
'READ' INPUT FROM CLIENT
'XMIT' OUTPUT TO CLIENT
'TERM' TERMINATION
PIOPRM_FUNC_LVL X'04' 1 Exit function level
PIOPRM_FUNC_BASE X'01' Base function
PROPRM_FLAG1 X'05' 1 Flag byte
PIOPRM_FLG1UPD X'80' Message was updated
PIOPRM_FLG1IPV6 X'40' IPV6 enabled, map with CLNT_IPV6
PIOPRM_RESV1 X'06' 2 Reserved
PIOPRM_PORT X'08' 8 IMS Connect port number
PIOPRM_XIB X'10' 4 Address of exit interface block
PIOPRM_RETCODE X'14' 4 Return code
PIOPRM_RSNCODE X18' 4 Reason code
PIOPRM_END_COMM X'1C' 0
The following table describes the IMS Connect Port Message Edit exit routine
initialization parameters:
Table 300. IMS Connect Port Message Edit exit routine initialization parameter list
Field Offset Length Contents
PIOPRM_BUFSIZE X'1C 4 Buffer size required for updated message
The following table describes the IMS Connect Port Message Edit exit routine
READ and XMIT parameters:
Table 301. IMS Connect Port Message Edit exit routine READ and XMIT parameter list
Field Offset Length Contents
PIOPRM_ORG_BUF X'1C' 4 Address of original message buffer
PIOPRM_ORG_SIZE X'20' 4 Size of original message
PIOPRM_NEW_BUF X'24' 4 Address of updated message buffer
PIOPRM_NEW_SIZE X'28' 4 Size of updated message
PIOPRM_CLIENTID X'2C' 0 Client ID structure
Table 301. IMS Connect Port Message Edit exit routine READ and XMIT parameter
list (continued)
Field Offset Length Contents
PIOPRM_CLNT_IPV4 X'2C' 8 IPV4 mapping
PIOPRM_CLNT_4FMLY X2E'' 2 Client family type
PIOPRM_CLNT_4PORT X30'' 2 Client port
PIOPRM_CLNT_4IPA X'2C' 4 Client IP address
PIOPRM_CLNT_IPV6 X'2C' 28 IPV6 mapping
PIOPRM_CLNT_6LEN X'2C' 1 Client socket length
PIOPRM_CLNT_6FMLY X'2D' 1 Client family type
PIOPRM_CLNT_6PORT X'2E' 2 Client port
PIOPRM_CLNT_6FLOW X'30' 4 Client flow information
PIOPRM_CLNT_6IPA X'34' 16 Client IP address
PIOPRM_CLNT_6SCOP X'44' 4 Client scope ID
IMS Connect loads USREXIT1 first and calls the USREXIT1 INIT subroutine. After
successfully loading USREXIT1, IMS Connect loads USREXIT2 and calls the
USREXIT2 INIT subroutine, and then repeats this process for USREXIT3. Any
unsuccessful loading or INIT failure prevents IMS Connect from connecting with
TCP/IP.
Important: If you define a user exit name in the IMS Connect configuration
member, but that user exit cannot be loaded during IMS Connect startup, the job
abends with Abend 806, RC=4.
In order to provide full user exit support in the IMS Connect environment, every
user exit routine must include the subroutines INIT, READ, XMIT, TERM, and
EXER. IMS Connect only supports assembler language exits.
When a user exit takes control, it saves the contents of the registers and restores
them when returning to the caller. IMS Connect provides a 1 KB buffer in the
parameter list to be used for this purpose.
The following table provides a brief description of the contents of the register on a
subroutine entry.
The following table provides a brief description of the contents of the register on a
subroutine exit.
Table 303. Register contents on subroutine exit
Register Contents
1 Pointer to a parameter list that is defined in the HWSEXPRM macro.
INIT subroutine
After a user exit has been successfully loaded, the INIT subroutine for that user
exit is called and a parameter list is passed to that user exit.
The following table lists the contents of the parameter list that is passed to the user
exit at entry.
Table 304. Contents of parameter list pointed to by register 1 at INIT subroutine entry
Field Length Meaning
EXPRM_FUNCTION 4 bytes Character string of value INIT.
Specifies that the function to be
performed is: Initialize user
exit.
EXPRM_TOKEN 4 bytes Address of a 1 KB buffer for user
exit use. The user exit can use
this storage for a save area and
for local variables.
EXPRM_XIB 4 bytes Address of XIB (exit interface
block).
The user exit finishes all its initialization processes here. It returns two MSGID
identifiers for the messages that it is to handle, as well as the increase to the
output buffer size for its READ, XMIT, and EXER subroutines. The user exit
returns the increase in buffer size, but not the actual buffer size. The only reason to
return anything other than 0 is to allow the exit to add data to the data portion of
the message. The storage required for the BPE headers and OTMA headers is
computed by IMS Connect. Typically, one of the MSGIDs is used by ASCII clients
and the other by EBCDIC clients. IMS Connect computes the actual size of the
output buffer, and it allocates the buffer size before it passes control to the user
exit for READ, XMIT and EXER. The two identifiers can take any value, in
EBCDIC or ASCII, other than the reserved MSGIDs (see "Important," which
follows), provided that the values are both unique among user exits called by a
given IMS Connect. Blanks and binary 0 are significant. The IMS Connect saves
these identifiers to identify the owner of the incoming request messages. Any
conflict in the identifiers must be resolved before a TCP/IP connection can be
made.
If duplicate MSGID identifiers exist, one of the user exits that uses the conflicting
identifier must either be dropped or be rewritten with a unique identifier. A system
administrator should coordinate the assignment of MSGIDs.
If the INIT subroutine fails to complete the initialization function successfully, the
IMS Connect does not connect with TCP/IP. A system programmer can start the
connection after the problem has been fixed by issuing the OPENPORT command.
When all user exits have been loaded and initialized, the IMS Connect is ready to
receive messages from TCP/IP application programs. The IMS Connect uses the
TCP/IP Socket API to receive stream data across the net. The completion of a
message is determined by its MSGLength value returned by TCP/IP to IMS Connect.
The IMS Connect receives data up to the value specified in MSGLength and uses
MSGID to determine which user exit receives control for processing the request
message.
The following table lists the contents of the parameter list that is pointed to by
Register 1 and then passed to the user exit during exit.
Table 305. Contents of parameter list pointed to by register 1 at INIT subroutine exit
Field Length Meaning
Reserved 68 bytes Reserved space.
Field EXPINI_BUFINC is an
increased size for input and
output messages above what is
needed for the BPE and OTMA
headers. If, for example, you
want to have the exit add data to
the message either on input or
output, then there will be increase
in buffer size.
READ subroutine
After a complete request message that originated at a TCP/IP client has been
received, control is passed to the READ subroutine in the user exit whose MSGID
matches the MSGID of that request message and a parameter list is passed to that
user exit.
Subsections:
v “Contents of parameter list pointed to by register 1 at READ subroutine entry”
on page 676
v “Contents of parameter list pointed to by register 1 at READ subroutine exit” on
page 677
The following table lists the contents of the parameter lists which are pointed to by
Register 1 during the READ subroutine entry.
Table 306. Contents of parameter list pointed to by register 1 at READ subroutine entry
Field Length Meaning
EXPRM_FUNCTION 4 bytes Character string of value READ.
Specifies that the function to be
performed is: Read client data
and convert it to OTMA format.
EXPRM_TOKEN 4 bytes Address of a 1 KB buffer for user
exit use. The user exit can use
this storage for a save area and
local variables.
EXPRM_XIB 4 bytes Address of XIB (exit interface
block).
EXPREA_INBUF 4 bytes Address of the input buffer.
EXPREA_IBUFSIZE 4 bytes Binary. Specifies the size of the
input buffer.
EXPREA_OUTBUF 4 bytes Address of the output buffer.
EXPREA_OBUFSIZE 4 bytes Binary. Specifies the size of the
output buffer.
EXPREA_FLAG1 1 byte Data string flag:
v X'80' - Input data contains a
MSGID matching
EXPINI_STRING1.
v X'40' - Input data contains a
MSGID matching
EXPINI_STRING2.
EXPREA_FLAG2 1 byte Data flag:
v X'01' - Data moved by exit
from INBUF to OUTBUF.
v X'02' - If this EXPREA_IPV6 bit
is turned on, IPV6 is enabled.
Map EXPREA_SOCKET6 to
AF-INET6 socket address
structure.
v X'04' - EXPREA_FL2SOCD
indicates that Socket Descriptor
is present in
EXPREA_SOCDESC.
Reserved 2 bytes Reserved space.
EXPREA_RACFID 8 bytes Character string. Specifies the
default user ID for RACF.
The following 28 bytes have two definitions: one definition is for a 4 byte IPV4 address
(EXPREA_NAMEID) and another definition is for a 16 byte IPV6 address
(EXPREA_SOCKET6).
For a 4 byte IPV4 address:
EXPREA_NAMEID 0 bytes Pointer referenced to the next 16
bytes.
EXPREA_IBUFSIZE and EXPREA_OBUFSIZE are the sizes of the input buffer and output
buffer, respectively. These sizes are not related to the actual length of the input
data and output data. The input buffer contains an exact copy of the data that was
received from the client. The user exit might need to perform an ASCII-to-EBCDIC
conversion on the data so that the data can be properly interpreted by the IMS
application. The user exit can use EXPREA_FLAG1 to determine where the data
originated and whether additional processing is required by the exit.
IMS Connect also supplies the default RACF user ID and the client's TCP/IP
connection information to the user exit. At this point, the user exit might edit or
filter its client's input data, then translate that data to OTMA message segments
and place them in the output buffer. The user exit also must specify the length of
the output data in EXPREA_DATALEN.
The following table lists the contents of the parameter list that are pointed to by
Register 1 during the subroutine exit.
Table 307. Contents of parameter list pointed to by register 1 at READ subroutine exit
Field Length Meaning
Reserved 68 bytes Reserved space.
The output buffer contains data when the return code is 0 or 4. When the return
code is 4, the data in the output buffer is sent back to the user exit's client, and
then the connection is closed and cleaned up. When the return code is 0, IMS
Connect prepares to present the data to a data store. EXPREA_UFLAG1 is also saved
by IMS Connect. This flag is set by the user exit during READ subroutine
processing and is used for recording user selected characteristics of the request
message. This flag is passed back to the user exit in the input parameter list
pointed to by Register 1 on the next subroutine call, which is either an XMIT or an
EXER subroutine call. You define the value of EXPREA_UFLAG1 in the user exit code.
IMS Connect uses this value to provide a communication vehicle between the
READ and XMIT or EXER subroutines on a per request/response message basis.
The XMIT and EXER subroutines can thus format the message in a better manner.
If IMS Connect detects an error in the output data that would prevent it from
properly presenting the data to the data store (for example, the output data is not
formatted properly to conform to the IMS OTMA protocol), the EXER subroutine is
called where the error can be dealt with appropriately. IMS Connect then waits
until it receives the response message from IMS OTMA. After receiving a response,
it calls the XMIT subroutine of the appropriate user exit (based on the MSGID in
the response) and passes it an exact copy of the response data that it received from
IMS OTMA.
XMIT subroutine
After a complete response message has been received from the data store, control
is passed to the XMIT subroutine in the user exit whose MSGID matches the
MSGID of the response message (which in turn matches the MSGID of the original
request message) and a parameter list is passed to that user exit.
Subsections:
v “Contents of parameter list pointed to by register 1 at XMIT subroutine entry”
v “Contents of parameter list pointed to by register 1 at XMIT subroutine exit” on
page 680
The following table lists the contents of the parameter list that are pointed to by
Register 1 during the XMIT subroutine entry and passed to the user exit.
Table 308. Contents of parameter list pointed to by register 1 at XMIT subroutine entry
Field Length Meaning
EXPRM_FUNCTION 4 bytes Character string of value XMIT.
Specifies that the function to be
performed is: Read OTMA data and
convert it to client format.
EXPRM_TOKEN 4 bytes Address of a 1 KB buffer for user
exit use. The user exit can use
this storage for a save area and
local variables.
EXPRM_XIB 4 bytes Address of XIB (exit interface
block).
EXPXMT_INBUF 4 bytes Address of the input buffer.
EXPXMT_IBUFSIZE 4 bytes Binary. Specifies the size of the
input buffer.
EXPXMT_OUTBUF 4 bytes Address of the output buffer.
EXPXMT_OBUFSIZE 4 bytes Binary. Specifies the size of the
output buffer.
EXPXMT_FLAG1 1 byte Data string flag:
v X'80' - Input data contains a
MSGID matching
EXPINI_STRING1.
v X'40' - Input data contains a
MSGID matching
EXPINI_STRING2.
v X'20' - EXPXMT_F1_SYNC indicates
a synchronous callout message.
EXPXMT_IBUFSIZE and EXPXMT_OBUFSIZE are the sizes of the input buffer and output
buffer, respectively. These sizes are not related to the actual length of the input
data and output data. The input buffer contains an exact copy of the OTMA
message segments that were received from the data store. The user exit might need
to perform an EBCDIC-to-ASCII conversion on the data so that the data can be
properly interpreted by the client application. The user exit translates OTMA
message segments to its client's data format, places the data in the output buffer,
and specifies the length of the output data in EXPXMT_DATALEN. The user exit might
also edit or filter the output data at this point.
The following table lists the contents of the parameter list that are pointed to by
Register 1 during the XMIT subroutine exit.
Table 309. Contents of parameter list pointed to by register 1 at XMIT subroutine exit
Field Length Meaning
Reserved 68 bytes Reserved space.
EXPXMT_RETCODE 4 bytes Binary. Specifies the return code,
which can be one of the following
values:
v 0=XMIT function was
successful. Process the data.
v 8=XMIT function was not
successful. Just clean up.
EXPXMP_RSNCODE 4 bytes Binary. Specifies the reason code.
EXPXMT_DATALEN 4 bytes Binary. Specifies the size of data
in the EXPXMT_OUTBUF to be
returned to IMS Connect. This
field is only meaningful when
EXPXMT_RETCODE = 0.
When the return code is 0, the data in the output buffer is sent back to the
originator of the client request message. If the return code is not 0, the connection
is dropped. If the user exit sets a non-zero return code value, the connection closes
without sending a response back to the originator of the client request message.
TERM subroutine
When IMS Connect is shutting down, control is passed, in turn, to the TERM
subroutine in each user exit that is currently active, and a parameter list is passed
to that user exit.
Subsections:
The following table lists the contents of the parameter list that are pointed to by
Register 1 during TERM Subroutine entry and passed to the user exit.
Table 310. Contents of parameter list pointed to by register 1 at TERM subroutine entry
Field Length Meaning
EXPRM_FUNCTION 4 bytes Character string of value TERM.
Specifies that the function to be
performed is: Clean up in
preparation for IMS Connect
shutdown.
EXPRM_TOKEN 4 bytes Address of a 1 KB buffer for user
exit use. The user exit can use
this storage for a save area and
local variables.
EXPRM_XIB 4 bytes Address of XIB (exit interface
block).
IMS Connect shutdown proceeds independently of the return code value. The
return code merely indicates the completeness of the user exit cleanup.
The following table lists the contents of the parameter list that are pointed to by
Register 1 during the TERM subroutine exit.
Table 311. Contents of parameter list pointed to by register 1 at TERM subroutine exit
Field Length Meaning
Reserved 68 bytes Reserved space.
EXPTRM_RETCODE 4 bytes Binary. Specifies the return code,
which can be one of the following
values:
v 0=TERM function was
successful.
v 4=TERM function was not
successful.
EXPTRM_RSNCODE 4 bytes Binary. Specifies the reason code.
The reason codes are set by the
exits (HWSSMPL0, HWSSMPL1,
and HWSJAVA0).
EXER subroutine
When IMS Connect detects an error in the output buffer after execution of the
previous READ subroutine completes, control is passed to the EXER subroutine in
the same user exit where the READ subroutine executed and a parameter list is
passed to that user exit.
Subsections:
v “Contents of parameter list pointed to by register 1 at EXER subroutine entry”
v “Contents of parameter list pointed to by register 1 at EXER subroutine exit” on
page 683
The following table lists the contents of the parameter list that are pointed to by
Register 1 during EXER subroutine entry and passed to the user exit.
Table 312. Contents of parameter list pointed to by register 1 at EXER subroutine entry
Field Length Meaning
EXPRM_FUNCTION 4 bytes Character string of value EXER. Specifies that the
function to be performed is: Process error found
in output buffer after previous READ subroutine
processing completed.
EXPRM_TOKEN 4 bytes Address of a 1 KB buffer for user exit use. The user
exit can use this storage for a save area and local
variables.
EXPRM_XIB 4 bytes Address of XIB (exit interface block).
EXPXER_OUTBUF 4 bytes Address of the output buffer.
EXPXER_OBUFSIZE 4 bytes Binary. Specifies the size of the output buffer.
EXPXER_FLAG1 1 byte Data string flag, which can be one of the following
values:
v X'80' - Input data contains a MSGID matching
EXPINI_STRING1.
v X'40' - Input data contains a MSGID matching
EXPINI_STRING2.
EXPXER_UFLAG1 1 byte User flag. X'xx' - User-defined value. The value was
set in READ subroutine.
Reserved 2 bytes Reserved space.
EXPXER_CODE 4 bytes Binary. Specifies the failure code.
v 4=Error in the output buffer from the previous
READ function.
EXPXER_REASON 4 bytes Binary. Specifies the failure reason, which can be
one of the following:
v 20=Segment length error
v 24=Missing first in chain flag
v 28=Missing last in chain flag
v 32=Sequence number error
The user exit could have experienced difficulties in forming OTMA message
segment format and should notify its client of this situation (for example, through
an error message). The user exit can use EXPXER_FLAG1 to determine where the
request message from the client originated and whether to compose an ASCII or
EBCDIC data stream for sending back to the originating client.
The following table lists the contents of the parameter list that are pointed to by
Register 1 during the EXER subroutine exit.
Table 313. Contents of parameter list pointed to by register 1 at EXER subroutine exit
Field Length Meaning
Reserved 68 bytes Reserved space.
EXPXER_RETCODE 4 bytes Binary. Specifies the return code,
which can be one of the following
values:
v 4=Send the data in
EXPXER_OUTBUF back to client.
v 8=Just clean up.
EXPXER_RSNCODE 4 bytes Binary. Specifies the reason code.
EXPXER_DATALEN 4 bytes Binary. Specifies the size of data
in the EXPXER_OUTBUF to be
returned to clients. This field is
only meaningful when
EXPER_RETCODE=4.
When the return code is 4, IMS Connect sends the data in the output buffer back
to the client. If the user exit sets the return code value to 8, the connection closes
without a response.
HWSIMSCB
Maps the IMS request message (IRM) header and BPE header formats used
by the HWSSMPL0 and HWSSMPL1 user message exit routines. A copy of
this macro is in SDFSMAC. To see the structure, assemble the macro.
HWSIMSEA
Maps the storage area used by the HWSSMPL0 and HWSSMPL1 user
message exit routines. A copy of this macro is in SDFSMAC. To see the
structure, assemble the macro.
HWSROUPM
Maps the parameter list that is passed to the IMS Connect DB Routing user
exit routine (HWSROUT0) on each subroutine call. A copy of this macro is
in SDFSMAC. To see the structure, assemble the macro.
HWSXIB
Maps the exit interface block used by IMS Connect user message exit
routines and the HWSUINIT exit routine. Contains the addresses of the
data store list (HWSXIBDS) and the HWSXIB1 control block used by the
IMS Connect DB Routing user exit routine. A copy of this macro is in
SDFSMAC. To see the structure, assemble the macro.
HWSXIB1
Maps the exit interface block used by the HWSROUT0 user exit routine.
HWSXIB1 contains the address of the ODBM list and optional user data.
The HWSXIB1 exit interface block is pointed to by HWSXIB. A copy of this
macro is in SDFSMAC. To see the structure, assemble the macro.
HWSXIBDS
Maps the entry in the exit interface block data store list used by the IMS
Connect user message exit routines and the HWSUINIT exit routine. The
list contains the data store name, the data store availability and status
information, and a user field. A copy of this macro is in SDFSMAC. To see
the structure, assemble the macro.
HWSXIBOD
Maps the ODBM list that contains the name and status of each ODBM
instance known to IMS Connect, as well as a user field and the names and
statuses of the IMS aliases associated with each ODBM instances. The
address of HWSXIBOD is stored in the HWSXIB1 exit interface block. A
copy of this macro is in SDFSMAC. To see the structure, assemble the
macro or refer to the macro prologue.
For example, you can modify the HWSUINIT exit routine to display a specific
message when IMS Connect starts up or shuts down.
The HWSUINIT routine contains two user control blocks that enable further
customization: XIB and XIBDS. The XIB control block can be used to store any data
that you want. The XIBDS control block keeps track of the status of the IMS
Connect data stores. All of the IMS Connect user message exits can access both the
XIB and XIBDS user control blocks.
For example, you can modify HWSUINIT to load a specific table when IMS
Connect starts up, then store the table address into the XIB control block area.
After the IMS Connect user message exits get control, they access that table and
perform their customized processing. When IMS Connect shuts down, you can
modify HWSUINIT to unload the updated table.
The HWSUINIT user initialization exit routine that comes with IMS Connect does
not do any processing. HWSUINIT is provided as a load module for ease of use.
Source code is also provided for modification, but you must assemble and link edit
the source to use a modified version. Modify HWSUINIT only if you want to use
it.
HWSUINIT contains two subroutines: INIT and TERM. When IMS Connect starts,
HWSUINIT loads and gives control to the INIT subroutine. When IMS Connect
shuts down, HWSUINIT gives control to the TERM subroutine.
HWSUINIT contains two of its own user control blocks: XIB and XIBDS. The
HWSXIB and HWSXIBDS DSECTs map the XIB and XIBDS user control blocks.
The message exit routines in the INIT, READ, XMIT, TERM, and EXER subroutines
can also use the XIB and XIBDS user control blocks. The XIB user control block
contains a fixed length header section and a variable length user area.
Restriction: You cannot modify the fixed header section. You can only modify the
user area.
You specify the size of the XIB control block user area, in full words, with the
xibarea parameter (in the HWS statement of the IMS Connect configuration file).
The default value is 20; the maximum value is 500. If you do not specify a value
for the xibarea parameter, or you specify a value outside of the 20 to 500 range,
IMS Connect uses the default value of 20.
The XIBDS user control block represents an entry in a list of data stores that are
defined in the configuration file. The second word in the fixed header area of the
XIB user control block points to the data store list. The XIBDS user control block is
16 bytes long. Each data store list entry contains the data store name, the data store
status (active or inactive), a flag byte, and a 4 byte field that you can use to store
any kind of data. The last entry is indicated by a value of X'80' (hexadecimal) in
the flag byte. The number of entries in the list is equal to the number of data stores
defined in the IMS Connect configuration file.
Because the XIBDS user control block keeps track of all IMS Connect data store
statuses, you can enable any user message exit to take action based on the status of
one or more of the IMS Connect data stores. For example, before a user message
exit passes a client message to an IMS Connect data store for processing, you could
have the user message exit query the XIBDS control block area for the target data
store's status. If the target data store is not active, you could enable the user
message exit to switch to an active data store by modifying the data store name in
the message header.
When the HWSUINIT routine takes control, it saves the contents of the registers
and restores them when returning to the caller. IMS Connect provides a 1 KB
buffer in the parameter list to be used for this purpose.
The following table lists the contents of each register on the HWSUINIT entry.
Table 314. Register contents on HWSUINIT entry
Register Contents
1 Pointer to a parameter list:
v +0 — XIB address
v +4 — Function to perform (INIT or TERM)
v +8 — 1 KB buffer for exit to use
14 Return address of IMS Connect.
15 Entry point address to HWSUINIT.
The following table lists the contents of each register on the HWSUINIT exit.
Table 315. Register contents on HWSUINIT exit
Register Contents
0–14 Restored.
15 0 — completed successfully. 1 to 7 — warning, but IMS Connect
initialization continues. 8 or higher — force IMS Connect termination.
Related reference:
“Macros that support IMS Connect user message exits” on page 683
//SYSPUNCH DD UNIT=SYSVIO,DISP=(,PASS),SPACE=(TRK,(1,1,1)),
// DSN=&&TEXT(HWSUINIT)
//SYSPRINT DD SYSOUT=*,
// DCB=(BLKSIZE=605),
// SPACE=(605,(100,50),RLSE,,ROUND)
//SYSUT1 DD UNIT=SYSDA,DISP=(,DELETE),
// DCB=BLKSIZE=13024,
// SPACE=(CYL,(16,15))
//SYSIN DD DSN=[Link](xxxxxx),DISP=SHR
//UINIT2 EXEC PGM=IEWL,
// PARM=’SIZE=(880K,64K),RENT,REFR,NCAL,LET,XREF,LIST,TEST’
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link],DISP=SHR
//SYSUT1 DD UNIT=SYSVIO,DISP=(,DELETE),SPACE=(CYL,(10,1),RLSE)
//TEXT DD UNIT=SYSVIO,DISP=(OLD,DELETE),DSN=&&TEXT
//SYSLIN DD *
INCLUDE TEXT(HWSUINIT)
ENTRY HWSUINIT
NAME HWSUINIT(R)
//
The HWSROUT0 user exit routine can override the IMS alias name specified by the
IMS Connect client. If the HWSROUT0 user exit routine overrides the IMS alias
name, IMS Connect uses the IMS alias name specified by the exit routine.
The HWSROUT0 user exit routine can also select a specific instance of the CSL
Open Database Manager (ODBM) to which to route an incoming message.
After the HWSROUT0 user exit routine returns the message and control to IMS
Connect, IMS Connect routes the message based on the alias name or the ODBM
instance name specified in the message.
If the HWSROUT0 user exit routine selects an ODBM, IMS Connect uses that
ODBM and will not perform the round robin routing method.
If the HWSROUT0 user exit routine does not select an ODBM, the IMS alias name
determines how IMS Connect selects the ODBM instance to deliver the message to.
If an alias name is specified, IMS Connect routes the message to the ODBM
instance that supports the alias name. If multiple ODBM instances support the
alias name, IMS Connect uses a round-robin algorithm to distribute incoming
messages among the ODBM instances. If the IMS alias name is blank, IMS Connect
uses a round-robin algorithm to distribute the messages among all active ODBM
instances.
IMS Connect validates the alias name and the ODBM instance after the exit routine
returns control to IMS Connect.
The HWSROUT0 user exit routine runs as a BPE type-1 exit routine and must
conform to the BPE type-1 interface. The HWSROUT0 user exit routine can be
managed with the BPE DISPLAY USEREXIT and REFRESH USEREXIT commands.
The HWSROUT0 user exit routine is also passed the standard BPE user exit
parameter list that is mapped by the BPEUXPL macro. The exit-type-specific
parameter list (UXPL_EXITPLP) points to the HWSROUT0 exit parameter list
(HWSROUPM).
Note: Do not issue any MVS calls in the user message exit that result in an MVS
WAIT because the MVS WAIT will halt all work on the port. If you modify the exit
routine and add code that results in an MVS WAIT, all work on the TCP/IP PORT
will halt until the WAIT has been posted. The exit routine cannot be modified to
free any storage passed to the exit routine, and IMS Connect will not free any
storage obtained by the exit routine when the exit routine returns to IMS Connect.
All storage obtained by IMS Connect must be released by IMS Connect and cannot
be freed by the user message exit routine without causing failures.
To use the HWSROUT0 user exit routine, perform the following basic steps:
1. Create a new or modify an existing BPE exit list PROCLIB member with any
name, for example HWSEXIT0.
2. In the BPE exit list PROCLIB member, define HWSROUT0 as an exit in the
following EXITDEF statement:
EXITDEF(TYPE=ODBMROUT,EXITS=(HWSROUT0),ABLIM=8,COMP=HWS)
All of the parameters must be coded as shown except for ABLIM, which sets
the number of times the exit can abend before it is disabled.
3. Set the BPE exit list PROCLIB member in the BPE configuration parameter
PROCLIB member by adding an EXITMBR statement. For example, if the BPE
exit list PROCLIB member is HWSEXIT0, then add the following statement to
the BPE configuration member:
EXITMBR=(HWSEXIT0,HWS) /* IMS CONNECT EXITS */
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “Standard BPE user exit parameter list” on page 495, mapped
by macro BPEUXPL
13 Save area address
14 Return address
15 Entry point address
On entry to the IMS Connect DB routing user exit, register 1 points to a standard
BPE user exit parameter list. Field UXPL_EXITPLP in this list contains the address
of the IMS Connect DB routing user exit parameter list, which is mapped by macro
HWSROUPM. Field UXPL_COMPTYPEP in this list points to the character string
"HWS" indicating an IMS Connect address space.
Parameter list
Table 316. HWSROUT0 user exit routine parameter list
Field name Offset Length Description
ROUPM_PVer X'00' X'04' Version number of the parameter list:
1 Base version for IMS Version 11.
2 Current version for IMS Version 11. Introduced with APAR
PM22144.
17 Base and current version for IMS Version 12.
ROUPM_Function X'04' X'04' Function type:
INIT Initialization
ROUT Routing
TERM Termination
ROUPM_Aclstruct X'08' X'04' Address of the client ID structure
ROUPM_Flag1 X'0C' X'01' Flag byte:
X'80'
EBCDIC encoding
X'40'
IPv6 client IP address
X'20'
Client request for ODBM z/OS Resource Recovery Services
X'0D' X'07' Reserved
ROUPM_AUsrdataL X'14' X'04' Address of the user data length
ROUPM_AUsrdata X'18' X'04' Address of the DRDA user data
ROUPM_AInAlias X1C' X'04' Address of the 4-character IMS alias name
ROUPM_AInPsbnm X'20' X'04' Address of the 8-character PSB name
ROUPM_Xib X'24' X'04' XIB address
ROUPM_AOutlias X'28' X'04' Address of the 4-character IMS alias set by the exit (output)
ROUPM_AOutOdbm X'2C' X'04' Address of the 8-character ODBM name set by the exit (output)
ROUPM_ARetcode X'30' X'04' Address of the fullword return code set by the exit (output)
ROUPM_ARsncode X'34' X'04' Address of the fullword reason code set by the exit (output)
IMS Connect always calls the HWSAUTH0 user exit routine before invoking any
installed security facility, such as RACF, if one is enabled.
The HWSAUTH0 user exit routine can override the input user ID with a different
user ID. The HWSAUTH0 user exit routine can provide a RACF group ID to be
authenticated further by IMS Connect.
The HWSAUTH0 user exit routine runs as a BPE type-1 exit routine and must
conform to the BPE type-1 interface. The HWSAUTH0 user exit routine can be
managed with the BPE DISPLAY USEREXIT and REFRESH USEREXIT commands.
The HWSAUTH0 user exit routine is passed the standard parameter list for BPE
user exit routines, which is mapped by the BPEUXPL macro. The exit-type-specific
parameter list (UXPL_EXITPLP) points to the HWSAUTH0 exit parameter list
(HWSAUTPM).
Note: Do not issue any MVS calls in the user message exit that result in an MVS
WAIT because the MVS WAIT will halt all work on the port. If you modify the exit
routine and add code that results in an MVS WAIT, all work on the TCP/IP PORT
will halt until the WAIT has been posted. The exit routine cannot be modified to
free any storage passed to the exit routine, and IMS Connect will not free any
storage obtained by the exit routine when the exit routine returns to IMS Connect.
All storage obtained by IMS Connect must be released by IMS Connect and cannot
be freed by the user message exit routine without causing failures.
To use the HWSAUTH0 user exit routine, perform the following basic steps:
1. Create a new or modify an existing BPE exit list PROCLIB member with any
name, for example HWSEXIT0.
2. In the BPE exit list PROCLIB member, define HWSAUTH0 as an exit in the
following EXITDEF statement:
EXITDEF(TYPE=ODBMAUTH,EXITS=(HWSAUTH0),ABLIM=8,COMP=HWS)
All of the parameters must be coded as shown except for ABLIM, which sets
the number of times the exit can abend before it is disabled.
3. Set the BPE exit list PROCLIB member in the BPE configuration parameter
PROCLIB member by adding an EXITMBR statement. For example, if the BPE
exit list PROCLIB member is HWSEXIT0, then add the following statement to
the BPE configuration member:
EXITMBR=(HWSEXIT0,HWS) /* IMS CONNECT EXITS */
HWSAUTH0 security exit is shipped with IMS Connect and link-edited into the
[Link] data set.
On entry, the exit routine must save all registers using the provided save area. The
registers contain the following:
Register Contents
1 Address of the “Standard BPE user exit parameter list” on page 495. The
UXPL_EXITPLP field in this parameter list contains the adress of the IMS
Connect DB security user exit parameter list, which is maped by macro
HWSAUTPM.
13 Save area address
Register Contents
14 Return address
15 Entry point address
Parameter list
Table 317. HWSAUTH0 user exit routine parameter list
Field name Offset Length Description
AUTPM_PVer X'00' X'04' Version number of the parameter list:
1 Base version for IMS Version 11.
2 Current version for IMS Version 11. Introduced with APAR
PM22144.
17 Base and current version for IMS Version 12.
AUTPM_Aclstruct X'04' X'04' Address of the client's ID structure
AUTPM_Flag1 X'08' X'01' Flag byte:
X'80'
EBCDIC encoding
X'40'
IPv6 client IP address
X'09' X'07' Reserved
AUTPM_AusrDataL X'10' X'04' Address of user data length
AUTPM_AusrData X'14' X'04' Address of DRDA user data
AUTPM_AIUserid X'18' X'04' Address of user ID
AUTPM_APssword X1C' X'04' Address of password
AUTPM_ARetcode X'20' X'04' Address of fullword return code set by the exit (output)
AUTPM_ARsncode X'24' X'04' Address of the fullword reason code set by the exit (output)
Reason code 0 - if return code is 0
Reason code ¬0 - if return code is 4
AUTPM_AOUserid X'28' X'04' Address of 8-character user ID set by the exit (output)
AUTPM_AOGrpid X'2C' X'04' Address of 8-character group ID set by the exit (output)
The exit is passed the Standard BPE User Exit Parameter List (mapped by the
BPEUXPL macro). The exit-type-specific parameter list (UXPL_EXITPLP) points to
the HWSAUTH0 exit parameter list (HWSAUTPM). If you want to use this exit
you must perform the following steps:
1. Create or modify a BPE exit list PROCLIB member with any name, for example
HWSEXIT0. In the BPE exit list PROCLIB member, define HWSAUTH0 in the
following EXITDEF statement:
IMS Connect provides a sample OTMA User Data Formatting exit routine named
HWSYDRU0. You can either modify the HWSYDRU0 exit routine to work with
your installation, or provide your own OTMA User Data Formatting exit routine.
Regardless of which you use, the OTMA Destination Resolution exit routine runs
in the IMS control region and not in the IMS Connect address space.
OTMA allows transaction pipe names (TPIPEs) to be the same as an IMS LTERM
name. In IMS Connect, the LTERM name is analogous to the unique CLIENTID
name. To clarify whether a destination is for IMS Connect (through OTMA), IMS
provides OTMA exit routines that can specify where IMS should look to resolve
the destination names. In this case, the IMS needs to look at the IMS Connect
CLIENTIDs. The DRU exit cannot change the actual destination name. Determining
the destination for an OTMA (IMS Connect client) message requires two phases.
1. The OTMA Destination Resolution user exit (OTMAYPRX) is called to
determine the initial destination for the output.
The user exit can determine whether the message should be directed to OTMA
(IMS Connect clients) or to IMS TM for processing. The user exit cannot
determine the final destination.
2. The DRU exit routine (for example, the IMS Connect supplied exit
HWSYDRU0) is called to determine the final destination for the output.
Each OTMA client can specify a separate DRU exit routine. In other words,
each OTMA client can specify a single DRU exit for each copy of IMS Connect
that is connected to a given data store (IMS). This means that one IMS Connect
can have the same or a different DRU exit for each of the data store definitions
in the IMS Connect configuration file.
HWSYDRU0, the IMS Connect supplied OTMA DRU exit, provides only a sample
of what the DRU exit can do. You can use this exit only under one of the following
conditions:
v The IMS Connect CLIENTIDs are named CLIENT01 through CLIENT09 and
they all belong to the same member name.
v The non-IMS Connect CLIENTIDs are as follows:
– TPIPE001 through TPIPE099 all belong to member MEMBER0
The HWSYDRU0 exit is only an example, and when you use it, the following
sequence of events will occur:
1. The OTMA Destination Resolution user exit (OTMAYPRX) sets up
addressability to the parameters that are passed to the HWSYDRU0 exit.
2. The output member name in the output parameter list is set to blanks.
3. HWSYDRU0 determines the action to take based on whether the name in the
input destination parameter (that is, the destination where the message is to be
sent) is an IMS LTERM or an IMS Connect destination. After HWSYDRU0
makes this determination, it takes a course of action, and sets the contents of
register 15 on exit.
4. If an IMS application was initiated by a non-IMS Connect client, then
HWSYDRU0 must build the OTMA user data.
5. If HWSYDRU0 places the character string, ICONNECT, into the OTMA user
data header field, OMUSR_PORTID, (whether built by HWSYDRU0 or passed
to HWSYDRU0) then IMS Connect will determine the correct PORTID to be
used for the selected output client ID.
The following table describes the register settings and the action taken for the
specific return code.
Table 318. Register settings and HWSYDRU actions
Register settings HWSYDRU actions
Register 15 = X'00' v The input destination name is an IMS Connect client name
and the member name for the destination is the same as the
member name for the origin.
v No changes made to the output parameters.
Register 15 = X'04' v LTERM exists in IMS (LEGACY), is not an IMS Connect
client.
v No changes made to the output parameters.
Register 15 = X'08' v The input destination name is an IMS Connect client name,
and the member name for the destination is a different
name from the member name for the origin.
v The output member name in the output parameters is set to
the new member name.
Register 15 = X'0C' The input destination name is not an LTERM for IMS, and
IMS Connect does not know the client name.
To review how JCL can be modified, refer to the following HWSYDRU0 sample
OTMA DRU exit.
//HWSYDRU JOB (ACTINF01),’PGMRNAME’,
// CLASS=A,MSGCLASS=Z,MSGLEVEL=(1,1),REGION=4M
//YDRU01 EXEC PGM=ASMA90,REGION=32M,
// PARM=’DECK,NOOBJECT,SIZE(MAX,ABOVE),SYSPARM(HWSYDRU0)’
//SYSLIB DD DSN=[Link],DISP=SHR
// DD DSN=[Link],DISP=SHR
// DD DSN=[Link],DISP=SHR
//SYSPUNCH DD UNIT=SYSVIO,DISP=(,PASS),SPACE=(TRK,(1,1,1)),
// DSN=&&TEXT(HWSYDRU0)
//SYSPRINT DD SYSOUT=*,
// DCB=(BLKSIZE=605),
// SPACE=(605,(100,50),RLSE,,ROUND)
//SYSUT1 DD UNIT=SYSDA,DISP=(,DELETE),
// DCB=BLKSIZE=13024,
// SPACE=(CYL,(16,15))
//SYSIN DD DSN=[Link](xxxxxx),DISP=SHR
//YDRU02 EXEC PGM=IEWL,
// PARM=’SIZE=(880K,64K),RENT,REFR,NCAL,LET,XREF,LIST,TEST’
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link],DISP=SHR
//SYSUT1 DD UNIT=SYSVIO,DISP=(,DELETE),SPACE=(CYL,(10,1),RLSE)
//TEXT DD UNIT=SYSVIO,DISP=(OLD,DELETE),DSN=&&TEXT
//SYSLIN DD *
INCLUDE TEXT(HWSYDRU0)
ENTRY HWSYDRU0
NAME HWSYDRU0(R)
//
If any IMS Connect user message exit performs security checking, you must
provide a security exit or use the z/OS TCP/IP IMS Listener security exit
(IMSLSECX).
IMS does not provide a sample security exit due to the many options available for
security and the fact that most installations have their own specific security
method.
The call to RACF or other security product is performed by IMS Connect if RACF
parameters are provided in the OTMA header when the user message exit routine
returns the message to IMS Connect.
By default, IMSLSECX is the name of the security exit routine called by the
following IMS Connect user message exit routines:
v HWSSMPL0
v HWSSMPL1
v HWSSOAP1
v HWSCSLO0
You can also define the name of the security exit called by HWSJAVA0 in the
HWSJAVA0 message exit routine.
If you use HWSSMPL0 or HWSSMPL1, you can change the name of the security
exit that is called by changing EXTRN IMSLSECX to a name of your choice. If you
change the name of the security exit, you must define the security exit in the
HWSSMPL0 or HWSSMPL1 user message exit.
Following is the list and order of parameters being passed to the security exit,
IMSLSECX. The order of the parameters is fixed for the exits supplied by IMS
Connect: HWSSMPL0 and HWSSMPL1. The parameters are mapped in the
HWSIMSEA macro at IMSEA_SecParml.
v Address of fullword client's IP address
v Address of halfword client's port
v Address of 8-char string IMS transaction
v Address of halfword data type (data type setting: 0=ASCII, 1=EBCDIC)
v Address of fullword length of user data
v Address of user-supplied data
v Address of fullword set by security exit
v Address of fullword set by security exit
v Address of RACF user ID
If blanks are returned (in the field pointed to) from the security exit, then the
RACF fields in the OTMA security header are not set.
The address points to a field containing blanks.
v Address of RACF group ID
The address points to a field containing blanks.
Related reference:
“IMS TM Resource Adapter user message exit routine (HWSJAVA0)” on page 666
For performance or basic data analysis, you can record events such as:
v TCP/IP read/write
v RACF calls
v OTMA sends and receives
v User exit calls
v Session errors
v Two-phase commit events
v Connection and message events for IMS-to-IMS TCP/IP communication
v Connection and message events for ISC TCP/IP communication
IMS Connect provides a sample HWSTECL0 user exit for you to customize.
Subsections:
v “HWSTECL0 initialization”
v “Invoking the HWSTECL0 for user exit event recording” on page 697
v “Error message format” on page 698
HWSTECL0 initialization
When IMS Connect initializes, IMS Connect automatically loads the HWSTECL0
module and calls the module for event recording initialization. If event and trace
recording is detected and is active, module HWSTECL0 sets the Event Interface
Control Block (EICB) fields, which is used to control event recording, to the
appropriate values needed for event and trace recording.
The EICB area is allocated by IMS Connect and passed to HWSTECL0 at the
initialization request. The DSECT name is HWSECIB. If trace or event recording is
active, HWSTECL0 completes the EICB and returns it to the caller. The contents of
the control block that are returned from HWSTECL0 are shown in the following
table.
Table 320. Contents of Event Interface Control Block (EICB) pointed to by HWSTECL0
Element Length Usage and meaning
EYECATCHER 4 Value of EICB identifying this block in
working storage. Set by caller.
FLAGS 1 Interface control flags:
1. Event recording is enabled.
EVENT_TOKEN 4 Address of the token used by the event
recording routine. The token must be
passed to the event recording routine when
an event-recording request is made.
EVENT_ADDRESS 4 Entry address of event recording routine.
4 Reserved space.
4 Reserved space.
If trace or event recording is not active, HWSTECL0 does not complete the EICB
and instead returns with a return and reason code indicating that trace or event
recording, or both is not active. The following table describes the registers at return
from HWSTECL0. Note: Module HWSTECL0 always returns a return code of 0.
The EICB flags must be inspected to determine if event or trace recording is active.
Table 321. Registers at return from HWSTECL0
Register number Contents and meaning
R0 Reason code associated with any non-zero return codes passed.
R15 Return code
v 0 = Initialization was successful. Check the EICB to see if trace or
event recording is active.
v 8 = Initialization was not successful. See reason code for additional
information.
When IMS Connect records an event, IMS Connect calls the event recording
routine address, EVENT_ADDRESS, indicated in the EICB. For each event that is
recorded, the event recording routine passes the Event Record Parameter List
(ERPL), which is used to define the event type and event data. The ERPL defines
which event data to capture. The ERPL records an IMS Connect event and
associated data to an event-recording log.
When event recording has been initialized, the EICB contains the entry address for
event recording and calls the event recording routine. The routine points to the
ERPL address and records the event. To record an event, the caller requesting event
recording must be in primary TCB mode and the caller must return the event
recording token which is provided in the EICB by HWSTECL0.
The following table shows the registers at return from EICB, the event recording
interface.
Table 323. Registers at return from event recording
Register number Contents and meaning
R0 Reason code associated with any non-zero return codes passed.
R1 When R1 is not equal to zero, it contains the address of a message
providing additional information about initialization of trace and event
recording.
R15 Return code
v 0 = Event recording was successful.
v 4 = Event recording is not active -- event was not recorded.
v 16 = Event recording was not successful. See reason code for
additional information. An error message is present if R1 is not zero.
Related reference:
“Event Interface Control Block (EICB)” on page 758
“Event recording parameter list (ERPL)” on page 757
The source code for the HWSTECL0 user exit is located in the ADFSSMPL source
library.
After you have customized the sample HWSTECL0 user exit, you must install it
into your IMS Connect resource library (SDFSRESL). To install HWSTECL0 into the
resource library, you must compile and bind the user exit before you execute IMS
Connect to create the load module, HWSTECL0. IMS Connect will load your
HWSTECL0 module from the resource library and call it during initialization and
termination.
The following steps describe how to customize, modify, and re-install the
HWSTECL0 exit.
1. Insert your changes to the source code provided in the ADFSSMPL source
library.
2. Assemble the exit. The exit and its associated macro files are members of the
partitioned data set into which you receive the ADFSSMPL data set.
3. Bind the output from the assembled job to create a load module named
HWSTECL0.
4. Bind HWSTECL0 into the IMS Connect resource library, SDFSRESL. IMS
Connect loads the module from the resource library during initialization.
Related reference:
“DSECTS for event recording” on page 763
Event types
The IMS Connect Event Recorder exit routine stores and categorizes event
notifications using key values, event numbers, and event keys.
Each event is assigned a numeric value called an event number. Each event also
has an associated key value, such as EVNT or SVTOKEN.
An event with an event number of 255 includes a 2-byte extended event number
that follows the event number field. For these events, the extended event number
identifies the event.
Event keys
The event key value is an identifier of the type of the event.
The key value EVNT indicates a single event. The key value SVTOKEN indicates a
multiple event process.
The following table describes the key values and the length of the event key.
Table 325. Keys associated with events
Key value Length Usage and meaning
EVNT 8 This is a constant value (EVNT) used to indicate
the event is not associated with a multi-event
process. The constant is left-justified and padded
right with blanks.
SVT token value 8 SVT Token. A token representing the SVT control
block for the remote client name associated with
the transaction or multi-event process. The token
is the STCK time of when the SVT was created.
Session token value 8 Session token. A token representing a sequence of
related events. The token is the STCK time of the
first event in the sequence
Command token 8 Command token. The token is the STCK time of
value when the command was entered to the
Operations Manager (OM).
The following table identifies the events that are categorized as a single event type.
The following table lists the possible single events that may be recorded.
The following table identifies the events that are categorized as a multiple event
type. The following table lists the possible multiple events that can be recorded.
Table 327. Multi-process events
Extended
Event number event number Event key Event description
12 SVT Token Begin close socket.
13 SVT Token End close socket.
60 SVT Token Prepare for socket read. This is the
start-of-frame event for a multi-event
process. It is the first event associated with
an SVT Token.
61 SVT Token User message exit entered for READ, XMIT,
or EXER. This event is recorded just prior
to calling the user message exit.
62 SVT Token User message exit return for READ, XMIT,
or EXER. This event is recorded just after
the user message exit returns.
63 SVT Token Begin SAF security request.
64 SVT Token End SAF security request.
65 SVT Token Message sent to OTMA. This entry is made
after the message has been sent to OTMA.
66 SVT Token Message received from OTMA. This entry is
made when a message has been received
from OTMA. It is recorded after all parts of
the message have been assembled.
67 SVT Token or Message sent to SCI. TYPE=CMDINPUT or
command TYP2RESP.
token
68 SVT Token or Message received from SCI.
command TYPE=CMDRESP or TYP2INPT.
token
69 SVT Token OTMA timeout. This event signals that a
timeout occurred for an OTMA request.
70 SVT Token De-allocate request. This event is generated
when IMS Connect honors a request from
the remote client to disconnect the session.
The following tables list the format for all event records. Each table identifies each
possible event in the ERPL that can be recorded to the HWSTECL0 module and
provides the format for each event.
The following table identifies the parameter list content associated with the IMS
Connect region initialization event.
Table 328. Connect region initialization event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 1 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 4 2
VAR_DATA Start of variable data area. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_VVRR IMS Connect Version and Release data. 2
The following table identifies the parameter list contents associated with the
Connect region termination.
Table 329. Connect region termination event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 2 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 6 2
VAR_DATA Start of variable data area. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_COMPCODE Completion code associated with region 4
termination.
The following table identifies the parameter list contents associated with the
Support Task Created event.
Table 330. Support task created event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 3 2
The following table identifies the parameter list contents associated with the
Support Task Terminating event.
Table 331. Support task terminating event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 4 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 6 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_FLAG Flag field indicating TCB type: 2
1. port
2. local
3. recorder
VAR_PORT Port number if port task. 2
The following table identifies the parameter list contents associated with the event,
Begin Initialize API.
The following table identifies the parameter list contents associated with the event,
End Initialize API.
Table 333. End initialize API event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 6 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the Begin
Bind Socket event. If this is a secure socket (SSL), the TCPIB (TCP/IP Information
Block) contains a flag indicating the operation is executing against an SSL port.
Table 334. Begin bind socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 7 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with the End
Bind Socket event. If this is a secure socket (SSL), the TCPIB (TCP/IP Information
Block) contains a flag indicating the operation is executing against an SSL port.
The following table identifies the parameter list contents associated with the Listen
on Socket event. If this is a secure socket, the TCPIB contains a flag indicating the
operations is executing against an SSL port.
Table 336. Listen on socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 9 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with the Begin
Accept Socket event. If this is a secure socket, the TCPIB contains a flag indicating
the operation is executing against an SSL port.
Table 337. Begin accept socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 10 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the End
Accept Socket event. If this is a secure socket, the TCPIB contains a flag indicating
the operation is executing against an SSL port.
Table 338. End accept socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 11 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the TCPIB. 4
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the Begin
Close Socket event. If this is a secure socket (SSL), the TCPIB (TCP/IP Information
Block) contains a flag indicating that the operations is executing against an SSL
port.
Table 339. Begin close socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 12 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the End
Close Socket event. If this is a secure socket, the TCPIB contains a flag indicating
the operations is executing against an SSL port.
Table 340. End close socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 13 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
The following table identifies the parameter list content associated with the Begin
Initialization of Message Exits event.
Table 341. Begin initialization of message exits
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 14 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the Data
Store Available event.
Table 342. Data Store available event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 16 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the Data
Store Unavailable event.
Table 343. Data Store unavailable event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 17 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the
TMEMBER Joins z/OS cross-system coupling facility Group event.
Table 344. TMEMBER joins XCF group event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 18 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the
TMEMBER Leaves XCF Group event.
Table 345. TMEMBER leaves XCF group event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 19 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the Begin
SCI Registration event.
Table 346. Begin SCI registration event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 20 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the End
SCI Registration event.
The following table identifies the parameter list contents associated with the Begin
SCI De-registration event.
Table 348. Begin SCI de-registration event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 22 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the End
SCI De-registration event.
Table 349. End SCI de-registration event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 23 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB. 4
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the
Recorder Trace DCB Opened event.
Table 350. Recorder trace DCB opened event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 24 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the recorder trace DCB. 4
The following table identifies the parameter list contents associated with the
Recorder Trace DCB Pre-close event.
Table 351. Recorder trace DCB pre-close event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 25 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the
Message Exit INIT Call event.
Table 352. Message exit INIT call event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 26 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 18 2
EVENT_DATA_ADDR Address of the exit parameter list. 4
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
VAR_EXIT_NAME Name of the user message exit. 8
The following table identifies the parameter list contents associated with the
Message Exit TERM Call event.
Table 353. Message exit TERM call event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 27 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 18 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
VAR_EXIT_NAME Name of the user message exit. 8
The following table identifies the parameter list contents associated with the Begin
Secure Environment Open event.
Table 354. Begin secure environment open event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 28 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the End
Secure Environment Open event.
Table 355. End secure environment open event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 29 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the TCPIB.
VAR_DATA Start of the variable data. 0
The following table identifies the parameter list contents associated with the Begin
Secure Environment Close event.
Table 356. Begin secure environment close event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 32 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the End
Secure Environment Close event.
Table 357. End secure environment close event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 33 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the Begin
Local Port Setup event.
Table 358. Begin local port setup event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 34 2
The following table identifies the parameter list contents associated with the End
Local Port Setup event.
Table 359. End local port setup event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 35 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 14 2
EVENT_DATA_ADDR Address of the TCPIB. 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the Begin
z/OS Resource Recovery Services Connect event.
Table 360. Begin RRS connect event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 36 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the End
RRS Connect event.
Table 361. End RRS connect event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 37 2
The following table identifies the parameter list contents associated with the List
In-doubt Context event.
Table 362. List in-doubt context event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 38 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 162 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_URTOKEN The UR_INTEREST_TOKEN returned by 16
RRS.
VAR_XID The XID associated with this transaction 140
The following table identifies the parameter list contents associated with the Begin
RRS Disconnect event.
Table 363. Begin RRS disconnect event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 39 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the End
RRS Disconnect event.
The following table identifies the parameter list contents associated with the
ODBM registration begin event.
Table 365. ODBM registration begin event 41
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 41 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB 4
The following table identifies the parameter list contents associated with the
ODBM registration end event.
Table 366. ODBM registration end event 42
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 42 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
EVENT_DATA_ADDR Address of DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code. 4
VAR_RSNCODE Reason code 4
The following table identifies the parameter list contents associated with the
ODBM de-registration begin event.
The following table identifies the parameter list contents associated with the
ODBM de-registration end event.
Table 368. ODBM de-registration end event 44
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 44 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_RSNCODE Reason code 4
The following table identifies the parameter list contents associated with the Exit
Interface Block Data Store (XIBDS) status update event.
Table 369. XIBDS status update event 45
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 45 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the XIBDS 4
The following table identifies the parameter list contents associated with the Port
Edit exit INIT event.
The following table identifies the parameter list contents associated with the Port
Edit exit TERM event.
Table 371. Port Edit exit TERM event 47
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 47 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 18 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_RC Return code from exit 4
VAR_RSN Reason code form exit 4
VAR_EXITN Name of User Exit 8
The following table identifies the parameter list contents associated with the begin
IMS Connect ODBM routing exit routine initialization event.
Table 372. IMS Connect ODBM Routing exit routine initialization begin event 48
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 48 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data 0
Table 372. IMS Connect ODBM Routing exit routine initialization begin event 48 (continued)
Parameter list item Content Length in bytes
VAR_APAR APAR sequence number for control block 2
VAR_EXITNAME Exit routine name 8
The following table identifies the parameter list contents associated with the end
IMS Connect ODBM routing exit routine initialization event.
Table 373. IMS Connect ODBM Routing exit routine initialization end event 49
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 49 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 18 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_RSNCODE Reason code 4
VAR_EXITNAME Exit routine name 8
The following table identifies the parameter list contents associated with the begin
IMS Connect ODBM routing exit routine termination event.
Table 374. IMS Connect ODBM Routing exit routine termination end event 50
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 50 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_EXITNAME Exit routine name 8
The following table identifies the parameter list contents associated with the end
IMS Connect ODBM routing exit routine termination event.
Table 375. IMS Connect ODBM Routing exit routine termination end event 51
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 51 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 18 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_RSNCODE Reason code 4
VAR_EXITNAME Exit routine name 8
The following table identifies the parameter list content associated with the XML
Adapter INIT call begin event.
Table 376. XML Adapter INIT call begin event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 52 4
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_ADAPTER_NAME Adapter name 8
The following table identifies the parameter list content associated with the XML
Adapter INIT call end event.
Table 377. XML Adapter INIT call end event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 53 4
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 18 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RC Return code 4
VAR_RSN Reason code 4
VAR_ADAPTER_NAME Adapter name 8
The following table identifies the parameter list content associated with the XML
Adapter TERM call begin event.
Table 378. XML Adapter TERM call begin event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 54 4
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_ADAPTER_NAME Adapter name 8
The following table identifies the parameter list content associated with the XML
Adapter TERM call end event.
Table 379. XML Adapter TERM call end event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 55 4
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 18 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RC Return code 4
VAR_RSN Reason code 4
VAR_ADAPTER_NAME Adapter name 8
The following table identifies the parameter list content associated with the OM
registration event.
Table 380. OM registration event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 56 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 20 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
The following table identifies the parameter list content associated with the OM
deregistration event.
Table 381. OM deregistration event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 57 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 12 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
Reserved 2
VAR_RC Return code 4
VAR_RSN Reason code 4
The following table identifies the parameter list contents associated with the
Prepare Socket Read event.
Table 382. Prepare socket read event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 60 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the
Message Exit Called for READ, XMIT, or EXER event.
Table 383. Message exit called for READ, XMIT, or EXER event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 61 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 2 2
VAR_DATA_LL 18 2
EVENT_DATA_ADDR Address of the parameter list at entry (R1). 4
EVENT_DATA_ADDR2 If READ or EXER, address of the IRM (IMS 4
request message) header. If XMIT, address
of the OTMA header.
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_EXIT_NAME Exit name. 8
VAR_TRACKINGID_ADDRS Address of the tracking ID on output. 4
VAR_TRACKINGID_LEN Length of the tracking ID on output. 4
The following table identifies the parameter list contents associated with the
Message Exit Return for READ, XMIT, or EXER event.
Table 384. Message exit return for READ, XMIT, or EXER event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 62 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 2 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the parameter list at entry (R1). 4
EVENT_DATA_ADDR2 If XMIT or EXER, address of the remote 4
client message. If READ, address of the
OTMA header.
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
VAR_EXIT_NAME Exit name. 8
VAR_TRACKINGID_ADDRS Address of the tracking ID on output. 4
VAR_TRACKINGID_LEN Length of the tracking ID on output. 4
The following table identifies the parameter list contents associated with the Begin
SAF Request event.
The following table identifies the parameter list contents associated with the End
SAF Request event.
Table 386. End SAF request event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 64 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the SAFIB. 4
The following table identifies the parameter list contents associated with the
Message Sent to OTMA event.
Table 387. Message sent to OTMA event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 65 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB. 4
The following table identifies the parameter list contents associated with the
Message Received from OTMA event.
Table 388. Message received from OTMA event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 66 2
Reserved 2
The following table identifies the parameter list contents associated with a Message
Sent to SCI event.
Table 389. Message sent to SCI event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 67 2
Reserved 2
EVENT_KEY 8
SVT token
Client-initiated command input
Command token
SPOC/OM-initiated type-2
command reply
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB. 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE CMDINPT or TYP2RESP 8
The following table identifies the parameter list contents associated with a Message
Received from SCI event.
Table 390. Message received from SCI event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 68 2
Reserved 2
EVENT_KEY 8
SVT token
Client-initiated command reply
Command token
SPOC/OM-initiated type-2
command input
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB. 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
The following table identifies the parameter list contents associated with an OTMA
timeout event.
Table 391. OTMA timeout event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 69 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 6 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control block. 2
VAR_TO_VALUE Timeout value. 4
The following table identifies the parameter list contents associated with a
De-allocate Session event.
Table 392. De-allocate session event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 70 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 6 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_DEALC_RSN Reason for session de-allocation. Note: Can 4
be a flag or constant type of reason.
The following table identifies the parameter list contents associated with a Session
Error event.
Table 393. Session error event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 71 2
Reserved 2
EVENT_KEY SVT Token or EVNT 8
The following table identifies the parameter list contents associated with a Trigger
event.
Table 394. Trigger event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 72 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_TRIG_TYPE Constant identifying triggers type. Values 8
can be TRAN or TPIPE or anything else that
is needed.
The following table identifies the parameter list contents associated with a Read
Socket event.
The following table identifies the parameter list contents associated with the Write
Socket event.
Table 396. Write socket event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 74 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the Local
Client Connect event.
Table 397. Local client connect event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 75 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the Local
Message Send event. This event is completed following the event recording of the
SRB scheduling and may not precisely mark the actual completion of the
operation.
Table 398. Local message send event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 76 2
The following table identifies the parameter list contents associated with the Local
Message Receive event. This event is completed following the event recording of
the SRB scheduling and may not precisely mark the actual completion of the
operation.
Table 399. Local message receive
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 77 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the Local
Message Send/Receive event. This event is completed following the copy of the
SRB scheduling and may not precisely mark the actual completion of the
operation.
Table 400. Local message send/receive event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 78 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB. 4
The following table identifies the parameter list contents associated with the Local
Client Disconnect event.
Table 401. Local client disconnect event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 79 2
The following table identifies the parameter list contents associated with the Begin
Create Context event.
Table 402. Begin create context event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 80 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the End
Create Context event.
Table 403. End create context event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 81 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 162 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC RRS return code. 4
VAR_URTOKEN UR Interest token returned from RRS. 16
VAR_XID The remote client XID associated with the 140
transaction.
The following table identifies the parameter list contents associated with the Begin
RRS Prepare event.
Table 404. Begin RRS prepare event
Parameter list item Content Length in bytes
TOKEN Token address 4
The following table identifies the parameter list contents associated with the End
RRS Prepare event.
Table 405. End RRS prepare event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 83 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 24 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_RC Return code. 4
VAR_FLAG Result flags: 2
1. At least 1 participant replied abort.
Note: The results flag is set if any
participant has requested the context be
aborted.
VAR_URTOKEN URTOKEN associated with the request. 16
The following table identifies the parameter list contents associated with the Begin
RRS Commit/Abort event.
Table 406. Begin RRS commit/abort event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 84 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 20 2
The following table identifies the parameter list contents associated with the End
RRS Commit/Abort event.
Table 407. End RRS commit/abort event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 85 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 24 2
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_FLAG Result flags: 2
1. request to abort
2. request to commit
3. could not find the URTOKEN
Note: The results flag is set if any
participant has requested the context be
aborted.
VAR_RC Return code. 4
VAR_URTOKEN URTOKEN associated with the request. 16
The following table identifies the parameter list contents associated with the Begin
Secure Environment Select event.
Table 408. Begin secure environment select event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 86 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
The following table identifies the parameter list contents associated with the End
Secure Environment Select event.
Table 409. End secure environment select event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 87 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 12 2
EVENT_DATA_ADDR Address of the TCPIB. 4
VAR_DATA Start of the variable data. 0
VAR_APAR APAR sequence number for the control 2
block.
VAR_FLAG Result flags: 2
1. Select for Read.
2. Select for Writer.
VAR_RC Return code. 4
VAR_RSN Reason code. 4
The following table identifies the parameter list contents associated with the
Message Received from OTMA event by the Resume Tpipe call.
Table 410. Message received from OTMA event by the Resume Tpipe call
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 88 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 2 2
VAR_DATA_LL 8 2
EVENT_DATA_ADDR1 Address of the parameter list at entry 4
EVENT_DATA_ADDR2 Address of the SVT TOKEN of INPUT SVI 4
Table 410. Message received from OTMA event by the Resume Tpipe call (continued)
Parameter list item Content Length in bytes
VAR_DATA Start of variable data 0
VAT_EXIT_NAME Exit name 8
The following table identifies the parameter list contents just before the IMS
Connect Port Message Edit exit routine call.
Table 411. Port Edit exit begin event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 89 2
Reserved 2
EVENT_KEY SVT TOKEN 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 14 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_PARML HWSEXPIO parameter list address 4
VAR_EXITN Exit name 8
The following table identifies the parameter list contents associated with the return
from the IMS Connect Port Message Edit exit routine call.
Table 412. Port Edit exit return event
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 90 2
Reserved 2
EVENT_KEY SVT TOKEN 8
DATA_ADDR_COUNT 2 2
VAR_DATA_LL 8 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_PARML HWSEXPIO parameter list address 4
VAR_RC Return code 4
VAR_RSN Reason code 4
VAR_EXITN Name of User Exit 8
The following table identifies the parameter list contents associated with the DRDA
distributed data management (DDM) command event.
The following table identifies the parameter list contents associated with the DRDA
DDM command reply event.
Table 414. DRDA DDM command reply event 92
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 92 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 4 2
EVENT_DATA_ADDR Address of the DRDA DDM reply 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_CODEPOINT DRDA DDM reply codepoint 2
The following table identifies the parameter list contents associated with the APSB
Begin event.
Table 415. APSB Begin event 93
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 93 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 30 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_PSBNAME PSB name 8
VAR_ALIAS IMS alias name 4
The following table identifies the parameter list contents associated with the APSB
end event.
Table 416. APSB end event 94
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 94 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 28 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_PSBNAME PSB name 8
VAR_CODEPOINT Codepoint 2
VAR_STCKE Store clock 16
The following table identifies the parameter list contents associated with the DPSB
begin event.
Table 417. DPSB begin event 95
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 95 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 26 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_PSBNAME PSB name 8
VAR_STCKE Store clock 16
The following table identifies the parameter list contents associated with the DPSB
end event.
Table 418. DPSB end event 96
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 96 2
The following table identifies the parameter list contents associated with the enter
routing exit event.
Table 419. Enter routing exit event 97
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 97 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 14 2
EVENT_DATA_ADDR Address of the parameter list at entry (R1) 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_ALIAS Pre-selected IMS alias name 4
VAR_CLID Client ID 8
The following table identifies the parameter list contents associated with the return
from routing exit event.
Table 420. Return from routing exit event 98
Length in
Parameter list item Content bytes
TOKEN Token address 4
EVENT_NUMBER 98 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 34 2
EVENT_DATA_ADDR Address of the parameter list at entry (R1) 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code from the exit 4
VAR_RSNCODE Reason code from the exit 4
The following table identifies the parameter list contents associated with the enter
security exit event.
Table 421. Enter security exit event 99
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 99 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR1 Address of the parameter list at entry (R1) 4
The following table identifies the parameter list contents associated with the return
from security exit event.
Table 422. Return from security exit event 100
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 100 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 22 2
EVENT_DATA_ADDR Address of the parameter list at entry (R1) 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for the control 2
block
VAR_RETCODE Return code from the exit 4
VAR_RSNCODE Reason code from the exit 4
VAR_SERVRTN Service return code 4
VAR_SERVRSN Service reason code 8
The following table identifies the parameter list contents associated with the RRS
parent UR begin event.
The following table identifies the parameter list contents associated with the RRS
parent UR end event.
Table 424. RRS parent UR end event 102
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 102 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 162 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_PURTOKEN Parent UR token returned 16
VAR_XID The XID associated with the parent UR 140
The following table identifies the parameter list contents associated with the RRS
SWID begin event.
Table 425. RRS SWID begin event 103
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 103 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 158 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_PURTOKEN Parent UR token returned 16
VAR_XID The XID associated with the parent UR 140
The following table identifies the parameter list contents associated with the RRS
SWID end event.
Table 426. RRS SWID end event 104
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 104 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 162 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_PURTOKEN Parent UR token 16
VAR_XID The XID associated with the parent UR 140
The following table identifies the parameter list contents associated with the
message sent to ODBM event.
Table 427. Message sent to ODBM event 105
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 105 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB 4
The following table identifies the parameter list contents associated with the
message received from ODBM event.
Table 428. Message received from ODBM event 106
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 106 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the DSIB 4
The following table identifies the parameter list contents associated with the begin
RRS delegate commit event.
Table 429. RRS delegate commit begin event 107
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 107 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 158 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_PURTOKEN Parent UR token 16
VAR_XID The XID associated with the parent UR 140
The following table identifies the parameter list contents associated with the end
RRS delegate commit event.
Table 430. RRS delegate commit end event 108
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 108 2
Reserved 2
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 162 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_RETCODE Return code 4
VAR_PURTOKEN Parent UR token 16
VAR_XID The XID associated with the parent UR. 140
The following table identifies the parameter list content associated with the XML
Adapter RXML and XXML call begin event.
Table 431. XML Adapter RXML and XXML call begin event 109
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 109 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 22 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
Table 431. XML Adapter RXML and XXML call begin event 109 (continued)
Parameter list item Content Length in bytes
VAR_ADAPTER_NAME Adapter name 8
VAR_ADAPTER_FUNC Adapter function (RXML or XXML) 4
VAR_CONV_NAME Converter name 8
The following table identifies the parameter list content associated with the XML
Adapter RXML and XXML call end event.
Table 432. XML Adapter RXML and XXML call end event 110
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 110 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 30 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_RC Return code 4
VAR_RSN Reason code 4
VAR_ADAPTER_NAME Adapter name 8
VAR_ADAPTER_FUNC Adapter function (RXML or XXML) 4
VAR_CONV_NAME Converter name 8
The following table identifies the parameter list content associated with the XML
converter call begin event.
Table 433. XML converter call begin event 111
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 111 4
EVENT_KEY SVT Token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_CONV_NAME Converter name 8
The following table identifies the parameter list content associated with the XML
converter call end event.
Table 434. XML converter call end event 112
Parameter list item Content Length in bytes
TOKEN Token address 4
The following table identifies the parameter list contents associated with the
Connected to remote IMS Connect event.
Table 435. Connected to remote IMS Connect event 113
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 113 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with the
Disconnected from remote IMS Connect event.
Table 436. Disconnected from remote IMS Connect event 114
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 114 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block. 2
VAR_TMEMBER TMEMBER name if the connection is for 8
OTMA, otherwise this field contains blanks.
VAR_LCLPLKID MSC LCLPLKID name if the connection is 8
for MSC, otherwise this field contains
blanks.
Table 436. Disconnected from remote IMS Connect event 114 (continued)
Parameter list item Content Length in bytes
VAR_LINK LINK name if the connection is for MSC, 8
otherwise this field contains blanks.
The following table identifies the parameter list contents associated with the
Communications thread started for a remote IMS Connect connection event.
Table 437. Communications thread started for a remote IMS Connect connection event 115
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 115 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number for control block 2
VAR_RMTICON RMTIMSCON name 8
The following table identifies the parameter list contents associated with the
Message received from OTMA for OTMA remote ALTPCB function event.
Table 438. Message received from OTMA for OTMA remote ALTPCB function event 116
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 116 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST or ACK/NACK 8
The following table identifies the parameter list contents associated with the
Message sent to remote IMS Connect over TCP/IP for OTMA remote ALTPCB
function event.
Table 439. Message sent to remote IMS Connect over TCP/IP for OTMA remote ALTPCB
function event 117
Parameter list item Content Length in bytes
TOKEN Token address 4
Table 439. Message sent to remote IMS Connect over TCP/IP for OTMA remote ALTPCB
function event 117 (continued)
Parameter list item Content Length in bytes
EVENT_NUMBER 117 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST or ACK/NACK 8
VAR_TMEMBER TMEMBER name 8
VAR_TPIPE TPIPE name 8
The following table identifies the parameter list contents associated with the
Message received from remote IMS Connect over TCP/IP for OTMA remote
ALTPCB function event.
Table 440. Message received from remote IMS Connect over TCP/IP for OTMA remote
ALTPCB function event 118
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 118 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST or ACK/NACK 8
VAR_TMEMBER TMEMBER name 8
VAR_TPIPE TPIPE name 8
The following table identifies the parameter list contents associated with the
Message sent to OTMA for an OTMA remote ALTPCB function event.
Table 441. Message sent to OTMA for OTMA remote ALTPCB function event 119
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 119 2
Reserved 2
EVENT_KEY Session token 8
Table 441. Message sent to OTMA for OTMA remote ALTPCB function event 119 (continued)
Parameter list item Content Length in bytes
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST or ACK/NACK 8
The following table identifies the parameter list contents associated with the MSC
message received from MSC event.
Table 442. MSC message received from MSC event 120
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 120 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST, REQRESP, RESTART, RSTRESP, 8
RSTBWRSP, PST/SBI, PST/BIS, or
SHUTDDIR
The following table identifies the parameter list contents associated with the MSC
message sent to remote IMS Connect event.
Table 443. MSC message sent to remote IMS Connect event 121
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 121 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data. 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST, REQRESP, RESTART, RSTRESP, 8
RSTBWRSP, PST/SBI, PST/BIS,
SHUTDDIR, or ERRORRSP
VAR_LCLPLKID MSC LCLPLKID name 8
VAR_LINK LINK name 8
The following table identifies the parameter list contents associated with the MSC
message received from remote IMS Connect event.
Table 444. MSC message received from remote IMS Connect event 122
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 122 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 26 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST, REQRESP, RESTART, RSTRESP, 8
RSTBWRSP, PST/SBI, PST/BIS,
SHUTDDIR, or ERRORRSP
VAR_LCLPLKID MSC LCLPLKID name 8
VAR_PARTNER MSC partner ID name 8
The following table identifies the parameter list contents associated with the MSC
message sent to MSC event.
Table 445. MSC message sent to MSC event 123
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 123 2
Reserved 2
EVENT_KEY Session token or EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 10 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_MSGTYPE REQUEST, REQRESP, RESTART, RSTRESP, 8
RSTBWRSP, PST/SBI, PST/BIS,
SHUTDDIR, ERRORSP, or ICONTERM
The following table identifies the parameter list contents associated with the
Connection to remote IMS Connect timed out event.
Table 446. Connection to remote IMS Connect timed out event 124
Parameter list item Content Length in bytes
TOKEN Token address 4
Table 446. Connection to remote IMS Connect timed out event 124 (continued)
Parameter list item Content Length in bytes
EVENT_NUMBER 124 2
Reserved 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with the start
of session event.
Table 447. Start of session event 125
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 125 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 10 2
VAR_DATA Start of variable data 0
VAR_APAR APAR sequence number 2
VAR_TOKEN SVT token value 8
The following table identifies the parameter list contents associated with the end of
session trigger event.
Table 448. End of session trigger event 126
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 126 2
Reserved 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 0 2
The following table identifies the parameter list contents associated with the
establishment of a socket connection with a remote CICS subsystem.
Table 449. Socket connected on RMTCICS event 256
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 256 2
The following table identifies the parameter list contents associated with the
disconnection of a socket from a remote CICS subsystem.
Table 450. Socket disconnected on RMTCICS event 257
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 257 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with IMS
Connect refreshing a RACF user ID.
Table 451. IMS Connect refreshed a RACF user ID event 258
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 258 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 14 2
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_UIDRFRSHD Refreshed RACF user ID 8
VAR_RACF_RSN Reason from the RACF 4
security server for
refreshing the ID. This
value is passed to IMS
Connect in the IRR_ENF2Q
field of the RACF
parameter list for ENF
event 71.
The following table identifies the parameter list contents associated with IMS
Connect sending a health status report to Work Load Manager (WLM).
Table 452. IMS Connect sent a health status report to WLM event 259
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 259 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 0 2
VAR_DATA_LL 6 2
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_HLTHVAL Health status sent 4
The following table identifies the parameter list contents associated with the start
of a communication thread for a connection with a remote CICS subsystem.
Table 453. Communication thread started for a RMTCICS connection event 2050
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2050 2
EVENT_KEY EVNT 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 0 2
EVENT_DATA_ADDR Address of the TCPIB 4
The following table identifies the parameter list contents associated with receiving
an ISC message from IMS.
Table 454. ISC message received from IMS event 2051
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2051 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 20 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
VAR_MSGTYPE Message type 8
Table 454. ISC message received from IMS event 2051 (continued)
Parameter list item Content Length in bytes
VAR_ASTOKEN Associated event token if 8
available when
MSGTYPE=CAPEXREQ,
CAPEXRSP, BISREQ, or
BISRSP
The following table identifies the parameter list contents associated with the
sending of an ISC message to IMS.
Table 455. ISC message sent to IMS event 2052
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2052 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 20 2
EVENT_DATA_ADDR Address of the DSIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
VAR_MSGTYPE Message type 8
VAR_ASTOKEN Associated event token if 8
available when
MSGTYPE=CAPEXREQ,
CAPEXRSP, BISREQ, or
BISRSP
The following table identifies the parameter list contents associated with receiving
an ISC message from CICS on a RMTCICS socket connection.
Table 456. ISC message received on RMTCICS socket connection event 2053
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2053 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 12 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
Table 456. ISC message received on RMTCICS socket connection event 2053 (continued)
Parameter list item Content Length in bytes
VAR_MSGTYPE Message type 8
The following table identifies the parameter list contents associated with sending
an ISC message to CICS on a RMTCICS socket connection.
Table 457. ISC message sent on RMTCICS socket connection event 2054
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2054 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 28 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
VAR_MSGTYPE Message type 8
VAR_ISCNODE ISC node 8
VAR_ISCUSER ISC user 8
The following table identifies the parameter list contents associated with receiving
an ISC message from CICS on a CICSPORT socket connection.
Table 458. ISC message received on CICSPORT socket connection event 2055
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2055 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 12 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
VAR_MSGTYPE Message type 8
The following table identifies the parameter list contents associated with sending
an ISC message to CICS on a CICSPORT socket connection.
Table 459. ISC message sent on CICSPORT socket connection event 2056
Parameter list item Content Length in bytes
TOKEN Token address 4
EVENT_NUMBER 255 2
EXTD_EVENT_NUMBER 2056 2
EVENT_KEY Session token 8
DATA_ADDR_COUNT 1 2
VAR_DATA_LL 28 2
EVENT_DATA_ADDR Address of the TCPIB 4
VAR_DATA Start of variable data area 0
VAR_APAR APAR sequence number 2
for the control block
VAR_ISFLTYPE IS field type 2
VAR_MSGTYPE Message type 8
VAR_ISCNODE ISC node 8
VAR_ISCUSER ISC user 8
The parameter list contains mandatory and optional fields. The content and usage
of the list arguments is dependent on the event being recorded. The DSECT name
is HWSERPL. The contents of the ERPL which are pointed to by HWSTECL0 are
shown in the following table.
Table 460. Event recording parameter list (ERPL) pointed to by HWSTECL0
Element Length Usage and meaning
TOKEN 4 Address of the token for event recording. This is
the token returned in the EICB when event
recording was initialized. Required.
EVENT_NUMBER 2 A number that identifies the type of a recorded
event. Required.
EXTENDED_EVENT_ 2 An additional event number that is included in
NUMBER events that have an event number of 255. For
events that include an extended event number,
the extended event number identifies the type
of event.
EVENT_KEY 8 The event key that is associated with the event
being recorded. Required.
DATA_ADDR_COUNT 2 Count of the number of EVENT_DATA_ADDR
entries in the parameter list. A count of 0
indicates that no entries are present. Required,
but can be 0.
Table 460. Event recording parameter list (ERPL) pointed to by HWSTECL0 (continued)
Element Length Usage and meaning
VAR_DATA_LL 2 Length of the variable data element. The
variable data length does not include this length
field. A length of 0 indicates that no variable
data is present. Required, but can be 0.
EVENT_DATA_ADDR 4 The address of a data element that begins with
a two-byte length field. The parameter list can
contain any number of element addresses. The
number of element addresses is contained in
DATA_ADDR_COUNT. Optional.
VAR_DATA VAR A variable length field containing event
dependent data. The length of the data element
is defined by VAR_DATA_LL. Only one variable
data element can be present in the parameter
list. Optional.
The block is formatted by IMS Connect and passed to HWSTECL0 with the
initialization request. The DSECT name is HWSEICB.
The block contains a length field that allows the recording routine to capture the
block information regardless of the content or length. When the block is recorded,
the entire block is moved to the event record based on the length field. The DSECT
is HWSTCPIB.
The DSIB is also used with the SYSPLEX interface. The block contains a length
field that allows the recording routine to capture the block information regardless
of the content or length. When the block is recorded, the entire block is moved to
the event record. The DSECT name is HWSDSIB.
The block contains a length field that allows the recording routine to capture block
information regardless of the content or length. When the block is recorded, the
entire block is moved to the event record. The DSECT name is HWSSAFIB.
The block is contained within the event parameter list. The block does not contain
a length field. The length of this block is specified in the even parameter lists. This
allows the block information to be captured regardless of the content or length.
When the block is recorded, the entire block is moved to the event record.
The DSECT name for events 1 to 245 is HWSVDBxx, where xx is the event number.
The DSECT name for events 255 and higher is HWSVxxxx, where xxxx is the
four-digit event number.
Table 466. Event recording macros shipped with IMS Connect (continued)
Macro Function
HWSV2053 EVENT 2053 VARIABLE DATA BLOCK
HWSV2054 EVENT 2054 VARIABLE DATA BLOCK
HWSV2055 EVENT 2055 VARIABLE DATA BLOCK
HWSV2056 EVENT 2056 VARIABLE DATA BLOCK
HWSVDB01 EVENT 01 VARIABLE DATA BLOCK
HWSVDB02 EVENT 02 VARIABLE DATA BLOCK
HWSVDB03 EVENT 03 VARIABLE DATA BLOCK
HWSVDB04 EVENT 04 VARIABLE DATA BLOCK
HWSVDB06 EVENT 06 VARIABLE DATA BLOCK
HWSVDB08 EVENT 08 VARIABLE DATA BLOCK
HWSVDB11 EVENT 11 VARIABLE DATA BLOCK
HWSVDB13 EVENT 13 VARIABLE DATA BLOCK
HWSVDB21 EVENT 21 VARIABLE DATA BLOCK
HWSVDB23 EVENT 23 VARIABLE DATA BLOCK
HWSVDB26 EVENT 26 VARIABLE DATA BLOCK
HWSVDB27 EVENT 27 VARIABLE DATA BLOCK
HWSVDB29 EVENT 29 VARIABLE DATA BLOCK
HWSVDB33 EVENT 33 VARIABLE DATA BLOCK
HWSVDB35 EVENT 35 VARIABLE DATA BLOCK
HWSVDB37 EVENT 37 VARIABLE DATA BLOCK
HWSVDB38 EVENT 38 VARIABLE DATA BLOCK
HWSVDB40 EVENT 40 VARIABLE DATA BLOCK
HWSVDB42 EVENT 42 VARIABLE DATA BLOCK
HWSVDB44 EVENT 44 VARIABLE DATA BLOCK
HWSVDB46 EVENT 46 VARIABLE DATA BLOCK
HWSVDB47 EVENT 47 VARIABLE DATA BLOCK
HWSVDB48 EVENT 48 VARIABLE DATA BLOCK
HWSVDB49 EVENT 49 VARIABLE DATA BLOCK
HWSVDB50 EVENT 50 VARIABLE DATA BLOCK
HWSVDB51 EVENT 51 VARIABLE DATA BLOCK
HWSVDB61 EVENT 61 VARIABLE DATA BLOCK
HWSVDB62 EVENT 62 VARIABLE DATA BLOCK
HWSVDB69 EVENT 69 VARIABLE DATA BLOCK
HWSVDB70 EVENT 70 VARIABLE DATA BLOCK
HWSVDB71 EVENT 71 VARIABLE DATA BLOCK
HWSVDB72 EVENT 72 VARIABLE DATA BLOCK
HWSVDB81 EVENT 81 VARIABLE DATA BLOCK
HWSVDB82 EVENT 82 VARIABLE DATA BLOCK
HWSVDB83 EVENT 83 VARIABLE DATA BLOCK
HWSVDB84 EVENT 84 VARIABLE DATA BLOCK
Table 466. Event recording macros shipped with IMS Connect (continued)
Macro Function
HWSVDB85 EVENT 85 VARIABLE DATA BLOCK
HWSVDB86 EVENT 86 VARIABLE DATA BLOCK
HWSVDB87 EVENT 87 VARIABLE DATA BLOCK
HWSVDB89 EVENT 89 VARIABLE DATA BLOCK
HWSVDB90 EVENT 90 VARIABLE DATA BLOCK
HWSVDB91 EVENT 91 VARIABLE DATA BLOCK
HWSVDB92 EVENT 92 VARIABLE DATA BLOCK
HWSVDB93 EVENT 93 VARIABLE DATA BLOCK
HWSVDB94 EVENT 94 VARIABLE DATA BLOCK
HWSVDB95 EVENT 95 VARIABLE DATA BLOCK
HWSVDB96 EVENT 96 VARIABLE DATA BLOCK
HWSVDB97 EVENT 97 VARIABLE DATA BLOCK
HWSVDB98 EVENT 98 VARIABLE DATA BLOCK
HWSVDBA0 EVENT 100 VARIABLE DATA BLOCK
HWSVDBA1 EVENT 101 VARIABLE DATA BLOCK
HWSVDBA2 EVENT 102 VARIABLE DATA BLOCK
HWSVDBA3 EVENT 103 VARIABLE DATA BLOCK
HWSVDBA4 EVENT 104 VARIABLE DATA BLOCK
HWSVDBA7 EVENT 107 VARIABLE DATA BLOCK
HWSVDBA8 EVENT 108 VARIABLE DATA BLOCK
HWSVDBB0 EVENT 110 VARIABLE DATA BLOCK
HWSVDBB1 EVENT 111 VARIABLE DATA BLOCK
HWSVDBB2 EVENT 112 VARIABLE DATA BLOCK
HWSVDBB4 EVENT 114 VARIABLE DATA BLOCK
HWSVDBB5 EVENT 115 VARIABLE DATA BLOCK
HWSVDBB7 EVENT 117 VARIABLE DATA BLOCK
HWSVDBB8 EVENT 118 VARIABLE DATA BLOCK
HWSVDBC1 EVENT 121 VARIABLE DATA BLOCK
HWSVDBC2 EVENT 122 VARIABLE DATA BLOCK
HWSVDBC4 EVENT 124 VARIABLE DATA BLOCK
Terminating HWSTECL0
To end event recording, IMS Connect calls the event recording routine address in
the EICB.
The routine is passed to the ERPL, which defines the event and event data. The
event number which is passed to the event recording routine corresponds to the
Connect Region Termination event.
When the termination processing for event recording has completed, HWSTECL0
must return to the caller otherwise IMS will hang.
Note: The termination call to HWSTECL0 is made even if the event recording flag
in the EICB is not on. If the EICB contains a token and event recording address,
the termination call is made so that event recording can terminate the event
recording environment.
The event recording termination call can only occur when the caller is executing
under the JOBSTEP TCB, the caller is in primary TCB mode, and all tasks as
potential event records have terminated.
Related reference:
“Event record formats” on page 707
The HWSPWCH0 exit routine validates the format of the password change request
before issuing a RACF call to change the password. If an error is detected,
HWSPWCH0 sets the error code, message text, message length, SAF return code,
RACF return code, and RACF reason code in appropriate fields defined in
HWSIMSEA.
To enable the HWSPWCH0 exit routine, include the HWSPWCH0 object code and
specify the statement INCLUDE TEXT(HWSPWCH0) in the bind JCL of either
HWSSMPL0, HWSSMPL1, or HWSJAVA0.
The following JCL binds the object code to enable client password change.
//HWSSMPL JOB (ACTINF01),’PGMRNAME’,
// CLASS=A,MSGCLASS=Z,MSGLEVEL=(1,1),RECION=4M
//SMPL01 EXEC PGM=ASMA90,REGION=32M,
// PARM=’DECK,NOOBJECT,SIZE(MAX,ABOVE)’
//SYSLIB DD DSN=[Link],DISP=SHR
// DD DSN=[Link],DISP=SHR
// DD DSN=[Link],DISP=SHR
// DD DSN=[Link],DISP=SHR
//SYSPUNCH DD UNIT=SYSVIO,DISP=(,PASS),SPACE=(TRK,(1,1,1)),
// DSN=&&TEXT(HWSSMPL0)
//SYSPRINT DD SYSOUT=*,
// DCB=(BLKSIZE=605),
// SPACE=(605,(100,50),RLSE,,ROUND)
//SYSUT1 DD UNIT=SYSDA,DISP=(,DELETE),
// DCB=BLKSIZE=13024,
// SPACE=(CYL,(16,15))
//SYSIN DD DSN=[Link](HWSSMPL0),DISP=SHR
//* Put your HWSSMPL0 source code here
//SMPL02 EXEC PGM=IEWL,
// PARM=’SIZE=(180K,28K),RENT,REFR,NCAL,LET,XREF,LIST,TEST’
//SYSPRINT DD SYSOUT=A
//SYSLMOD DD DSN=[Link],DISP=SHR
//SYSUT1 DD UNIT=SYSVIO,DISP=(,DELETE),SPACE=(CYL,(10,1),RLSE)
//TEXT DD UNIT=SYSVIO,DISP=(OLD,DELETE),DSN=&&TEXT
//SYSLIN DD *
//* Put HWSPWCH0 object code here
INCLUDE TEXT(HWSSMPL0)
INCLUDE TEXT(HWSPWCH0)
ENTRY HWSSMPL0
MODE RMODE(24),AMODE(31)
NAME HWSSMPL0(R)
//
The exit routines can use the ISPF commands VGET and VPUT to view and alter
variables used by the TSO SPOC.
Program exits are called with a z/OS batch program parameter list. All command
exits are called before program exits.
On entry to the routine, register 1 points to the parameter list, which is a standard
parameter list. Register 1 points to a fullword, which points to the half-word
length followed by the parameter string. The contents of the registry are controlled
by ISPF.
The following example shows an example of using the EXITPGM exit routine:
DFSSPOC EXITPGM(UEP1, UEP2)
The values specified in the parameter list are the names of the input user exits.
Each exit can view or change variables in the ISPF shared pool.
Contents of registers
Register
Contents
1 Points to the address of the parameter data (from the PAR keyword) field
(halfword length) followed by the data
2-12 Not used
13 72-byte save area
14 Return address
15 Entry address / Return code on exit
Note: The names of the exit routines are standard 1- to 8-character module names.
REXX program names can also be specified. A REXX program name can be
prefixed by a percent sign (%).
On entry to the routine, register 1 points to the parameter list. The parameters list
is a Command Processor Parameter List (CPPL). Register 1 is defined by macro
IKJCPPL. The contents of the registry are controlled by ISPF.
Contents of registers
Register
Contents
1 Points to a CPPL, which is a list of four addresses that point to the
following parameters:
v Command buffer
v UPT
v PSCB
v ECT
2-12 Not used
13 72-byte save area
14 Not applicable
15 Return code on exit
The following table provides details about the variables in the ISPF shared pool
that can be changed by using the TSO SPOC exit routines:
Table 467. Variables in the ISPF shared pool
Variable name Usage Pool Description
EXITTYPE input shared
A read-only variable that indicates the
function type for this call to the exit.
Related concepts:
Using variables
In the following REXX program, the EXITCMD exit routine checks the routing
information and rejects a command sent to IMS1 (production IMS).
"VGET (EXITTYPE) SHARED" If exittype = 1 then
Do
"VGET (ROUTE) SHARED"
If pos("IMS1", route)> 0 Then RTC = 8
MSGTEXT = "REJECTED - IMS1 IS RESTRICTED FOR PRODUCTION USE"
"VPUT (RTC, MSGTEXT) SHARED
End
The original command parameters and changes made by the user exit with a
return code 4 or 8 are logged in an ISPF log file.
After the REXX program is executed, the following example shows an ISPF log file
in which the QUERY TRAN command was rejected:
NAME EXITTYPE PLEX ROUTE CMDTXT RTC RSN MSGTXT
-------- ---------- ----- ----- ---------- ---- ---- -------------
ORIGINAL 1 PLEX1 IMS1 QRY TRAN 0 0
USEREXIT1 1 PLEX1 IMS2 QRY TRAN 4 0 CHANGED ROUTE
USEREXIT2 1 PLEX2 IMS2 QRY TRAN 8 0 REJECTED
Related concepts:
Using variables
Part 7. Appendixes
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003
U.S.A.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
All statements regarding IBM's future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
programs are provided "AS IS," without warranty of any kind. IBM shall not be
liable for any damages arising out of your use of the sample programs.
Each copy or any portion of these sample programs or any derivative work, must
include a copyright notice as follows:
© (your company name) (year). Portions of this code are derived from IBM Corp.
Sample Programs. © Copyright IBM Corp. _enter the year or years_. All rights
reserved.
Trademarks
IBM, the IBM logo, and [Link]® are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the web at “Copyright and
trademark information” at [Link]/legal/[Link].
Notices 783
IBM Confidential
v Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered
trademarks or trademarks of Adobe Systems Incorporated in the United States,
and/or other countries.
v Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
v Java™ and all Java-based trademarks and logos are trademarks or registered
trademarks of Oracle and/or its affiliates.
v Linux is a registered trademark of Linus Torvalds in the United States, other
countries, or both.
v UNIX is a registered trademark of The Open Group in the United States and
other countries.
Other product and service names might be trademarks of IBM or other companies.
This Software Offering does not use cookies or other technologies to collect
personally identifiable information.
If the configurations deployed for this Software Offering provide you as customer
the ability to collect personally identifiable information from end users via cookies
and other technologies, you should seek your own legal advice about any laws
applicable to such data collection, including any requirements for notice and
consent.
For more information about the use of various technologies, including cookies, for
these purposes, See IBM’s Privacy Policy at [Link] and
IBM’s Online Privacy Statement at [Link] the
section entitled “Cookies, Web Beacons and Other Technologies” and the “IBM
Software Products and Software-as-a-Service Privacy Statement” at
[Link]
Bibliography
This bibliography lists all of the publications in the IMS 14 library, supplemental
publications, publication collections, and accessibility titles cited in the IMS 14
library.
IMS 14 library
Title Acronym Order number
IMS Version 14 Application Programming APG ZES1-3156
IMS Version 14 Application Programming APIs APR ZES1-3157
IMS Version 14 Commands, Volume 1: IMS CR1 ZES1-3158
Commands A-M
IMS Version 14 Commands, Volume 2: IMS CR2 ZES1-3159
Commands N-V
IMS Version 14 Commands, Volume 3: IMS CR3 ZES1-3160
Component and z/OS Commands
IMS Version 14 Communications and Connections CCG ZES1-3161
IMS Version 14 Database Administration DAG ZES1-3162
IMS Version 14 Database Utilities DUR ZES1-3163
IMS Version 14 Diagnosis DGR ZES1-3164
IMS Version 14 Exit Routines ERR ZES1-3165
IMS Version 14 Installation INS ZES1-3166
IMS Version 14 Licensed Program Specifications LPS XXXX-XXXX
IMS Version 14 Messages and Codes, Volume 1: DFS MC1 ZES1-3167
Messages
IMS Version 14 Messages and Codes, Volume 2: MC2 ZES1-3168
Non-DFS Messages
IMS Version 14 Messages and Codes, Volume 3: IMS MC3 ZES1-3169
Abend Codes
IMS Version 14 Messages and Codes, Volume 4: IMS MC4 ZES1-3170
Component Codes
IMS Version 14 Operations and Automation OAG ZES1-3171
IMS Version 14 Release Planning RPG ZES1-3172
IMS Version 14 System Administration SAG ZES1-3173
IMS Version 14 System Definition SDG ZES1-3174
IMS Version 14 System Programming APIs SPR ZES1-3175
IMS Version 14 System Utilities SUR ZES1-3176
Supplementary publications
Title Order number
Program Directory for Information Management System Transaction GI10-8914
and Database Servers V13.0
Program Directory for Information Management System Transaction GI10-8966
and Database Servers V13.0 Database Value Unit Edition
IRLM Messages and Codes GC19-2666
Publication collections
Title Format Order number
IMS 14 Product Kit CD XXXX-XXXX
Index
Numerics AO (automated operator) exit routine
activating 445
AO (automated operator) exit routine
(continued)
2 Edit exit routine (DFSLUEE0). 214 commands and responses passed to type 2 (DFSAOE00)
2972/2980 Input edit routine (DFS29800) exit routine command editor 479
attributes 141 asynchronous messages 445 network-qualified LU name 479
binding 141 editing IMS 445 types of messages received 479
data format on entry 141 commands and responses passed to UEHB
description 141 the exit contents 445, 466
example 141 entering 445 flags 445, 466
IMS callable services 141 IMS-generated 445 AOI (automated operator interface)
IMS environments 141 data fields See AO (automated operator) 472
including the routine 141 on entry 445 See AO exit routine or AO
interfaces 141 on exit 445 application 445
link editing 141 edited command buffer 445 AOI (automated operator interface)
naming convention 141 exit routine interface callable services 27
registers entry codes 445 AOIE
contents on entry 141 exit codes 445 AO (automated operator) exit
contents on exit 141 exit codes validation 445 routine 472
required functions 141 Extended Terminal Option (ETO) associated printing 281
sample routine location 141 considerations 445 authorization
system definition requirements 141 messages not passed to exit Resource Access Security exit
using callable services 141 routine 445 routine 435
4701 Transaction Input edit routine messages passed to exit routine authorization checking
(DFS36010) 143 format 445 /SIGN ON 289
4701 Transaction Input edit routine network-qualified LU name 445 commands 321
(DFS36010) registers resource 311
binding 143 contents on entry 445 transaction 311
IMS callable services 143 contents on exit 445 AWE server type 523, 536
including the routine 143 restrictions AWE services statistics area 523, 535
attributes 143 queue unavailable 445
IMS environments 143 use with secondary master
including the routine 143
interfaces 143
terminal 445
sample exit routine 445
B
link editing 143 Base Primitive Environment (BPE)
system messages passed to exit
naming convention 143 common user exit routine execution
routine 445
registers environment 559
type 1 (DFSAOUE0)
contents on entry 143 customizing address spaces 521, 523
callable services 445
contents on exit 143 gathering statistics 523
described 445, 472
sample routine location 143 monitoring address spaces 521, 523
functions 445
using callable services 143 RM exit routines 616
naming 445
system statistics area 523, 525
specifying 445
batch application exit routine 45
type 2 (AOIE)
A activating 472
Batch Application exit routine (DFSISVI0)
Batch Application exit routine
abnormal termination or restart, client attributes 472
(DFSISVI0)
processing after 633, 637 callable services 472
including the routine 45
Abort Continue exit routine 343 communicating with an AO
link editing 45
accessibility application 472
sample routine location 45
features viii communicating with IMS 472
IMS callable services 45
keyboard shortcuts viii described 472
IMS environments 45
accessing control blocks 9 function-specific parameter
naming convention 45
accessing real storage list 472
registers 45
register save conventions 10 functions 472
contents on entry 45
address spaces message buffer 472
BPE (Base Primitive Environment)
customizing 521, 523 naming 472
common user exit routine execution
monitoring 521, 523 registers on entry 472
environment 559
affinity routing 298 registers on exit 472
customizing address spaces 521, 523
AIB Interface restrictions 472
gathering statistics 523
DL/I calls sample user exit 472
monitoring address spaces 521, 523
Data Capture exit routine 58 specifying 472
system statistics area 523, 525
AO (automated operator) application standard exit parameter list 472
BPE statistics area
command editor 445 BPE AWE statistics area 523, 535
BPE statistics area (continued) Build Security Environment user exit changed-data propagation 58
BPE CBS statistics area 523, 533 (BSEX) (continued) client
BPE dispatcher statistics area 523, naming convention 144 exit routines (CQS) 633
529 registers Event 633, 635
BPE storage services statistics contents on entry 144 Structure Event 633, 639
area 523, 537 contents on exit 144 Structure Inform 649
BPE system statistics 523, 526 sample routine location 144 Client Connect/Disconnect
BPE TCB statistics table 523, 531 using callable services 144 user exit routines 595
recommendations 523, 526 Client Connection user-supplied exit
statistics offset table 523, 528 routine, CQS 561
BPE Statistics exit routine 523
BPE Statistics user exit 583
C Client Structure Event exit 633, 639
Client Structure Event exit
callable services
BPE user-supplied exit routines parameters 633, 640
AOI (automated operator
abends in 495, 500 Client Structure Inform exit 649
interface) 27
BPEUXCSV macro 501 parameters 649
associated exits 12
callable services 501 Command Authorization exit routine
BPE user-supplied exit routines 501
dynamic work areas 495 (DFSCCMD0) 321
BPEUXCSV macro 501
environment 495, 499 attributes 321
CANCEL function 28
execution environment 495 binding 321
control block services 22
exit routines, calling subsequent 495, Command Authorization exit routine
DELETE module function 21
498 (DFSCCMD0)
described 12
general information 495 AO applications 321
ENQUEUE AOI service reason
initalization-termination 521 IMS callable services 321
codes 34
initialization sample 516 LU 6.2 application program 321
ENQUEUE function 27
interface information 495 sample routine location 321
example 515
interfaces and services 495 description 321
example of a request 35
Language Environment, and 521, 523 environments supported 321
FIND control block function 22
performance considerations 495, 500 ETO terminals 321
FIND control block service reason
processing sample 517 IMS environments 321
codes 32
recommendations 495, 500, 521, 523 IMS Open Transaction Manager
FREE storage function 19
reentrant 495, 500 Access 321
FREE storage service reason codes 30
registers 495, 499 including the routine 321
function-specific parameter list 17
sharing data 515 link editing 321
functions of 501
standard parameter list 495 naming convention 321
GET storage function 19
static work areas 495 non-shared queues environment 321
GET storage service reason codes 30
statistics exit routine 523 registers 321
how they work 14
termination sample 518 contents on entry 321
how to use 14
work areas 495 contents on exit 321
initializing 16
BPEUXCSV macro 501 sample routine location 321
initializing callable services parameter
environmental requirements 501 shared queues environment 321
list 17
examples 501 static terminals 321
INSERT AOI service reason codes 34
other macro requirements 501 with callable services 321
INSERT function 27
performance implications 501 with MCS/E-MCS consoles 321
invoking 18
register information 501 command editor 445, 479
linking exit routines 15
restrictions and limitations 501 Command exit routine 344
LOAD module function 20
return from 501 command keyword table
LOADE storage service reason
syntax 501 contents 383
codes 31
BSEX error messages 383
requesting 19
Build Security Environment user exit listing 383
return and reason codes 28, 34
(BSEX) 144 modification 383
SCAN control block function 24
BST2_REQUEST_DATA 555 Command language modification facility
SCAN control block service reason
Buffer Size Specification facility (DFSCKWD0) 383
codes 33
example 321 commands and responses
sharing data 515
Buffer Size Specification Facility 319 not passed to exit routine 445
storage services 19
Build Security Environment Exit passed to exit routine 445
types 12
Parameter List 144 Commit Continue exit routine 346
callable services parameter list
Build Security Environment exit routine Commit Prepare exit routine 347
overview 17
(DFSBSEX0) Commit Verify exit routine 348
CANCEL function 28
including the routine 144 control block callable services 22
catalog
Build Security Environment user exit control block mapping
batch processing 46
(BSEX) EEVT 342
defining 46
attributes 144 EEVTP 342
catalog exit routine 46
binding 144 control blocks
CBS (control block services) statistics
IMS callable services 144 access by exit routines 37
area 523, 533
IMS environments 144 EEVT 341
CCTLattributes
including the routine 144 EEVTP 341
exit routines 49
link editing 144 mapping control blocks. 340
CEEBXITA 388
control blocks (continued) CQS user-supplied exit routines Data Entry Database Partition Selection
restrictions 37 (continued) exit routine (continued)
Control exit routine 50 Structure Statistics (continued) using callable services 82
Conversational Abnormal Termination structure checkpoint statistics Data Entry Database Randomizing
exit routine (DFSCONE0) entry 565 routine
attributes 149 structure checkpoint statistics attributes 85
binding 149 record 565 IMS environments 85
description 149 structure process statistics including the routine 85
IMS callable services 149 record 565 link editing 85
IMS environments 149 structure rebuild statistics naming convention 85
including the routine 149 record 565 sample routine location 85
interface 149 z/OS request statistics record 565 using callable services 85
link editing 149 create named storage service Data Entry Database Randomizing
naming convention 149 example 501, 513 Routine (DBFHDC40/ DBFHDC44)
registers output 501, 513 callable services 85
contents on entry 149 parameters 501, 512 IMS environments 85
contents on exit 149 Create Thread exit routine 350 including the routine 85
sample location 149 cross-memory naming convention 85
sample routine location 149 considerations 11 sample routine location 85
using callable services 149 mode 11 Data Entry Database Resource Name
CQS (Common Queue Server) CSCBLK parameter list 22 Hash Routine (DBFLHSH0)
client exit routines CSLDST1 597 binding 92
Event 633, 635 CSLDST2 597 IMS callable services 92
Structure Event 633, 639 CSLDSTX 597 IMS environments 92
Structure Inform 649 CSLRST1 620 including the routine 92
exit routines 559 CSPARMS parameter list 17 naming convention 92
CQS event exit 191 CSPLRESN field 29 sample routine location 92
CQS Event exit CSPLRTRN field 29 Data Entry Database Sequential
abnormal termination 633, 637 DELETE storage service reason Dependent Scan Utility exit routine
parameters 633, 636 codes 31 (DBFUMSE1)
parameters, abnormal CSSTRG parameter list 19 attributes 95
termination 633, 636 IMS environments 95
CQS statistics including the routine 95
using BPE Statistics user exit 583
CQS structure event exit 193
D link editing 95
naming convention 95
Data Capture exit routine 58
CQS user-supplied exit routine sample routine location 95
AIB Interface 58
writing in assembler 559 using callable services 95
attributes 58
CQS user-supplied exit routines 559 data formatting, exit routine 117
calling order with data capture
Client Connection data propagation 58, 78
figure 58
general 561 data store information block (DSIB)
control blocks 58
parameters 561 contents 760
data security/integrity 58
register contents 561 data validation, exit routine 117
description 58
general information 559 database segment, load/insert 119
registers
Initialization-Termination (Init-Term) DB2, propagating DL/I updates to 58
contents on entry 58
general 560 DBB (database buffer pool) size,
return and reason codes 58
parameters 560 specification 127
sample COBOL routine 70
register contents 560 DBFHAGU0. 164
sample PL/I routine 70
Queue Overflow DBFHDC40/DBFHDC44. 85
supported languages 58
general 563 DBFLHSH0. 92
synchronous data capture 58
parameters 563 DBFUMSE1. 95
data compression 125, 131
register contents 563 DBRC Command Authorization exit
data compressiontips
Structure Event routine (DSPDCAX0)
Hardware data compression
checkpoint parameters 576 binding 325
support 135
connection parameters 576 IMS callable services 325
Data Conversion exit routine 80
general 576 IMS environments 325
data entry database (DEDB). 85
overflow parameters 576 including the routine 325
Data Entry Database Partition Selection
rebuild parameters 576 naming convention 325
exit routine
register contents 576 sample routine location 325
attributes 82
routine parameters 576 DBRC SCI registration exit routine
calling 82
status change parameters 576 (DSPSCIX0)
description 82
Structure Statistics sample 330
IMS environments 82
CQS request statistics record 565 DBRC SCI Registration exit routine
including the routine 82
data object statistics record 565 (DSPSCIX0)
naming convention 82
general 565 binding 328
registers
parameters 565 IMS callable services 328
contents on entry 82
queue name statistics record 565 IMS environments 328
contents on exit 82
register contents 565 including the routine 328
sample routine location 82
Index 789
IBM Confidential
DBRC SCI Registration exit routine DEDB Sequential Dependent Scan Utility [Link]
(DSPSCIX0) (continued) exit routine (DBFUMSE1) XRF hardware reserve notification exit
naming convention 328 attributes 95 routine 490
sample routine location 328 binding 95 DFS29800
DBRC statistics record calling 95 2972/2980 Input edit routine
BST2_REQUEST_DATA 555 description 95 (DFS29800) 141
DSPBST1 555 randomizing module 95 DFSAOUE0
DSPBST2 555 registers 95 Type 1 Automated Operator exit
DEDB (data entry database) contents on entry 95 routine (DFSAOUE0) 445
Sequential Dependent Scan exit contents on exit 95 DFSBXITA 388
routine 276 sample routine 97 DFSCAOI
DEDB Partition Selection exit routine DELETE module function 21 macro 27
attributes 82 delete module service parameter list 27
calling 82 example 501, 512 DFSCCBLK macro 22
description 82 output 501, 512 DFSCCMD0
IMS environments 82 parameters 501, 511 Command Authorization exit routine
including the routine 82 Dependent Region Preinitialization (DFSCCMD0) 321
naming convention 82 routines 331 DFSCKWD0
registers activating 331 IMS command language modification
contents on entry 82 description 331 facility (DFSCKWD0) 383
contents on exit 82 interfaces 331 DFSCMLR0/DFSCMLR1
sample routine location 82 registers Link Receive exit routine 298
using callable services 82 contents on entry 331 DFSCMPR0
DEDB Randomizing routine contents on exit 331 Program Routing exit routine 298
(DBFHDC40/DBFHDC44) 85 Dependent Region Preinitialization DFSCMPX0
attributes 85 Routines Segment edit/compression exit
binding 85 binding 331 routine 117
description 85 IMS callable services 331 DFSCMTR0
invoking 85 IMS environments 331 Terminal Routing exit routine 298
loading 85 including the routine 331 DFSCMTU0
naming 85 naming convention 331 User Message Table 483
parameters 85 sample routine location 331 DFSCMUX0
randomizing module 85 descriptors, ETO default actions 229
registers 85 logon 213 Message Control/Error exit routine
contents on entry 85 user 154, 159, 286 (DFSCMUX0) 219
contents on exit 85 Destination Creation exit routine valid flags 229
sample routine 89 (DFSINSX0) DFSCNTE0
DBFHDC40 89 attributes 154 Message Switching (Input) edit
XCI registers 89, 90 binding 154 routine (DFSCNTE0) 230
contents on entry for a creating transactions DFSCONE0
randomizing call 89, 90 dynamically 154, 161 Conversational Abnormal Termination
contents on entry for a termination description 154 exit routine (DFSCONE0) 149
call 89, 91 dynamic resource definition 154, 161 DFSCSGN0
contents on entry for an environments supported 154, 161 Sign On/Off Security exit routine
initialization call 89, 90 IMS callable services 154 (DFSCSGN0) 289
contents on exit from a IMS environments 154 DFSCSI00 module 15
randomizing call 89 including the routine 154 DFSCSIF0 entry point 18
contents on exit from a termination naming convention 154 DFSCSII0 entry point 16
call 89, 92 queuing messages in shared DFSCSMB0
contents on exit from an queues 160 Transaction Code Input edit routine
initialization call 89, 92 registers 154 (DFSCSMB0) 315
DEDB Resource Name Hash routine contents on entry 154 DFSCSTRG macro 19
(DBFLHSH0) contents on exit 154 DFSCTRN0
assembling 92 Resource Manager requirements 154, Transaction Authorization exit routine
binding 92 161 (DFSCTRN0) 311
default routine 92 sample routine location 154 DFSCTSE0
description 92 supplying data 154, 158 Security Reverification exit routine
EPST 92 system default transactions 154, 161 (DFSCTSE0) 273
EPST fields 92 user descriptors 154, 159 DFSCTTO0
EPST input to the routine 92 using callable services 154 Physical Terminal Output edit routine
EPSTDMAA 92 Destination Resolution exit, sample (DFSCTTO0) 263
EPSTRSHS 95 OTMA 692 DFSDLOC0, randomizing module,
naming 92 destroy named storage service loading 105
parameters 92 example 501, 515 DFSFDOT0
registers, contents on entry 92 output 501, 514 Dump Override Table 333
sample result format 95 parameters 501, 514
DEDB segment edit/compression 117
Index 791
IBM Confidential
Event Interface Control Block event record format (continued) exit routines (continued)
(EICB) 695 recorder trace DCB pre-close 707 database support (continued)
contents 695, 758 session error 707 Segment edit/compression exit
event record format support task created 707 routine (DFSCMPX0) 117
begin accept socket 707 support task terminating 707 Sequential Buffering Initialization
begin bind socket 707 TMEMBER joins XCF group 707 exit routine (DFSSBUX0) 136
begin close socket 707 TMEMBER leaves XCF group 707 Event 633, 635
begin create context 707 trigger 707 EXITCMD
begin initialization of message write socket 707 example 777
exits 707 event record formats 707 overview 773
begin initialize API 707 Event record parameter list (ERPL) 695 EXITPGM
begin local port setup 707 event recording overview 771
begin RRS commit/abort 707 DSECTs 763 Extended Terminal Option (ETO) 9
begin RRS disconnect 707 event recording parameter list (ERPL) Fast Path
begin RRS prepare 707 contents 757 DEDB Sequential Dependent Scan
begin SAF request 707 event recording routine 695 exit routine 276
begin SCI de-registration 707 EVENT_ADDRESS 695 Fast Path Input Edit/Routing exit
begin SCI registration 707 event type routine (DBFHAGU0) 164
begin secure environment close 707 keys 699 IMS Connect
begin secure environment open 707 multiple 699 failures from MVS calls 663
begin secure environment select 707 single 699 HWSUINIT sample JCL 687
Connect region initialization 707 EVENT_ADDRESS 695 HWSYDRU0 sample JCL 694
Connect region termination 707 EXER subroutine 682 initialization and termination
data store available 707 exit parameter list (EPL) 338, 375 exit 386
data store unavailable 707 exit routine LU 6.2
deallocate session 707 destination resolution 249 LU 6.2 Edit exit routine 214
end accept socket 707 DFSYDRU0 249 naming conventions 3
end bind socket 707 OTMA User Data Formatting exit Open Database Manager
end close socket 707 routine 249 ODBM statistics 597
end create context 707 input/output edit 245 OTMA Resume TPIPE Security user
end initialize API 707 DFSYIOE0 245 exit (OTMARTUX) 256
end local port setup 707 Input/Output Edit exit performance 11
end RRS commit/abort 707 routine 245 RECON I/O
end RRS Connect 707 Open Transaction Manager Access system performance impact 434
end RRS disconnect 707 OTMAYPRX 241 Remote Site Recovery
end RRS prepare 707 prerouting input messages 241 Log Filter exit routine
end SAF request 707 samples, location of 40 (DFSFTFX0) 409
end SCI de-registration 707 exit routine interface control blocks 340 requesting edited command
end SCI registration 707 exit routines buffer 462
end secure environment close 707 Buffer Size Specification Facility 319 Resource Manager
end secure environment open 707 client 633 client connection 616
end secure environment select 707 control block usage 37 initialization/termination 616, 618
event record format control blocks 4 RM statistics 620
begin RRS Connect 707 CQS event exit 191 Resume 50
Exit Interface Block Data Store ( 707 CQS structure event 193 samples
list in-doubt context 707 data communication DBRC SCI registration exit routine
listen on socket 707 Signoff exit routine (DSPSCIX0) 330
local client connect 707 (DFSSGFX0) 277 HALDB Partition Selection exit
local client disconnect 707 database support routine (DFSPSE00) 103
local message receive 707 Control exit routine 50 security
local message send 707 Data Capture exit routine 58 Command Authorization exit
local message send/receive 707 Data Conversion exit routine 80 routine (DFSCCMD0) 321
message exit called for READ, XMIT, DEDB Partition Selection exit Resource Access Security user exit
or EXER 707 routine 82 (RASE) 435
message exit INIT call 707 DEDB Randomizing routine Security Reverification exit routine
message exit return for READ, XMIT, (DBFHDC40/DBFHDC44) 85 (DFSCTSE0) 273
or EXER 707 DEDB Resource Name Hash Sign On/Off Security exit routine
message exit TERM call 707 routine (DBFLHSH0) 92 (DFSCSGN0) 289
message received from OTMA 707 DEDB Sequential Dependent Scan Transaction Authorization exit
message received from SCI 707 Utility exit routine routine (DFSCTRN0) 311
message sent to OTMA 707 (DBFUMSE1) 95 sending message to alternate
message sent to SCI 707 HALDB Partition Selection exit destination 458
OTMA messages received 707 routine 99 Signon
OTMA time-out 707 HDAM and PHDAM Randomizing DFSUSER descriptor use 287
prepare socket read 707 routines (DFSHDC40) 105 Status 57
read socket 707 Secondary Index Database Structured Call Interface
recorder trace DCB opened 707 Maintenance exit routine 111 input 653
exit routines (continued) exit routines (continued) external subsystem attach facility
support for LU 6.2 devices 9 transaction manager (continued) ESAF In-Doubt Notification exit
Suspend 49 Message Switching Input edit routine 336
system support routine (DFSCNTE0) 230 ESMT
Automated Operator exit routine Non-Discardable Messages exit for loading exit routines 338
(DFSAOUE0) 445 routine (DFSNDMX0) 232 External Subsystem exit routines 338
Dependent Region Preinitialization Physical Terminal Input edit external subsystem routines 370
routines 331 routine (DFSPIXT0) 259 Abort Continue exit routine 343
Dump Override Table Physical Terminal Output edit Command exit routine 344
(DFSFDOT0) 333 routine (DFSCTTO0) 263 Commit Continue exit routine 346
IMS command language Queue Space Notification exit Commit Prepare exit routine 347
modification facility routine (DFSQSPC0) 267 Commit Verify exit routine 348
(DFSCKWD0) 383 Shared Printer exit routine Create Thread exit routine 350
Large System Definition Sort/Split (DFSSIML0) 276 Echo exit routine 352
Output exit routine Sign-On exit routine 281 EEVT mapping 342
(DFSSS060) 392 Time-Controlled Operations (TCO) EEVTP 341
Log Archive exit routine Communication Name Table EPL 338, 375
(IMSEXIT) 395 (CNT) exit routine ESMT
Logger user exit (LOGWRT) 413 (DFSTCNT0) 292 for loading exit routines 338
Partner Product exit routine Transaction Code Input edit exit routine interface control
(DFSPPUE0) 420 routine (DFSCSMB0) 315 blocks 340
RECON I/O exit routine TSO Single Point of Control exit routines 338
(DSPCEXT0) 424 input 769 Identify exit routine 353
Restart exit routine TSO SPOC Initialization exit routine 356
(DFSRST00) 422 altering ISPF shared pool 775 Log Service exit routine 376
System Definition input exit user-supplied, CQS 559 Message Service exit routine 378
routine (DFSSS050) 389 exit routines, writing 9 Normal Call exit routine 358
System Definition Preprocessor exit exit routinesattributes Resolve In-Doubt exit routine 360
routine (input phase) coordinator controller CCTL 49 Signoff exit routine 363
(DFSPRE60) 440 exit routineschanged, to alternate Signon exit routine 364
System Definition Preprocessor exit destination Startup Service exit routine 380
routine (name check complete) system messages 460 Subsystem Not Operational exit
(DFSPRE70) 442 exit routineschanging routine 366
Time-Controlled Operations (TCO) system messages 459 Subsystem Termination exit
exit routine (DFSTXIT0) 294 exit routinesdeleted, to alternate routine 370
User Message Table destination system services 375
(DFSCMTU0) 483 system messages 461 Terminate Identify exit routine 372
XRF hardware reserve notification exit routinesdeleting Terminate Thread exit routine 373
exit routine 490 system messages 461 Termination Service exit routine 382
transaction manager exit routinesignoring
2972/2980 Input edit routine system messages 457
(DFS29800) 141
4701 Transaction Input edit routine
exit routinesIMS Connect Password
Change
F
Fast Path
(DFS36010) 143 IMS Connect 766
DEDB
Build Security Environment exit exit routinesoverview 3
Sequential Dependent Scan exit
routine (DFSBSEX0) 144 exit routinessending to alternate
routine (DFSSIML0) 276
Conversation Abnormal destination
DL/I exit routines 7
Termination exit routine system messages 458
exit routines
(DFSCONE0) 149 exit routinessetting up
DEDB Partition Selection exit
Destination Creation exit routine exit registers 463
routine 82
(DFSINSX0) 154 EXIT=
Fast Path Input Edit/Routing exit routine
Global Physical Terminal Input Data Capture exit routine 58
(DBFHAGU0)
edit routine (DFSGPIX0) 183 EXITDEF statement
attributes 164
Greeting Messages exit routine static work areas, and 495
binding 164
(DFSGMSG0) 187 expansion routine 122
description 164
Initialization exit routine extended call interface (XCI) option 89
example 164
(DFSINTX0) 194 extended program communication
IMS callable services 164
Input Message Field edit routine block 76
IMS environments 164
(DFSME000) 199 Extended Program Communication
including 164
Input Message Segment edit Block 58
including the routine 164
routine (DFSME127) 202 extended segment data block 78
link editing 164
Logoff exit routine Extended Segment Data Block 58
naming convention 164
(DFSLGFX0) 207 Extended Terminal Option 194
registers
Logon exit routine external entry vector table (EEVT) 341
contents on entry 164
(DFSLGNX0) 210 external entry vector table prefix
contents on exit 164
Message Control/Error exit routine (EEVTP) 341
sample routine location 164
(DFSCMUX0) 219
using with shared EMH queues 164
Index 793
IBM Confidential
Fast Path. 85, 92, 95, 164 Global Physical Terminal Input edit Hardware Data Compression Dictionary
Field edit routine 199 routine (DFSGPIX0) (continued) (HDCD) utility (DFSZLDU0) (continued)
definition 201, 207 IMS environments 183 return codes 136
interface 199 including the routine 183 hash routine. 92
use 199 link editing 183 HDAM and PHDAM Randomizing
filtering log data 409 naming convention 183 routines (DFSHDC40)
FIND control block function 22 operation 183 binding 105
format of standard BPE user exit registers HDAM and PHDAM Randomizing
parameter list 495 contents on entry 183 Routines (DFSHDC40)
FREE storage function 19 contents on exit 183 attributes 105
free storage service sample routine location 183 calling 105
example 501, 509 using callable services 183 description 105
output 501, 509 Greeting Messages exit routine IMS callable services 105
parameters 501, 508 (DFSGMSG0) 187 IMS environments 105
Front-End Switch exit routine attributes 187 [Link] 105
(DFSFEBJ0) 168 binding 187 including the routine 105
Basic Edit 177 IMS callable services 187 loading 105
binding 169 IMS environments 187 naming convention 105
description 168 including the routine 187 parameters 105
example 180 link editing 187 registers
FEIB naming convention 187 contents on entry 105
description 172 registers 187 contents on exit 105
fields 173 contents on entry 187 sample generalized routine 110
FEIB DSECT 172 contents on exit 187 sample routine location 105
IBE input processing 172 sample routine location 187 sample routines 105
IMS callable services 169 using callable services 187 HWSAUTH0
IMS environments 169 usage 691
including the routine 169 user exit routine 690, 691
input and output fields 175
message expansion 178
H HWSCSLO0 668
HWSCSLO1 668
HALDB Partition Selection exit routine
message flow 171 HWSDSIB DSECT (event recording
(DFSPSE00) 99
MFS edit 177 parameter list)
binding 99
naming convention 169 format 760
description 99
registers HWSERPL DESCT (event recording
IMS callable services 99
contents on entry 169 parameter list)
IMS environments 99
contents on exit 170 format 757
including the routine 99
restrictions 169 HWSEXPRM macro 683
naming convention 99
routing 177, 180 HWSIMSCB macro 683
Partition definition area mapping
sample routine location 169 HWSIMSEA macro 683
(DFSPDA) 104
timer facility 179 HWSJAVA0 666
Partition exit communication area
Timer Facility 179 JCL sample 667
mapping (DFSPECA) 103
full-function database segment HWSOMPFX macro 683
sample 103
edit/compression 117 HWSPIOX0 sample IMS Connect Port
sample routine location 99
function-specific parameter list Message Edit exit routine 670
Hardware Data Compression (HDC)
AO exit routine (AOIE) 472 HWSROUPM macro 683
Support
described 17 HWSROUT0
building HDC dictionary 132
user exit routine 687
DD name descriptions 133
HWSSMPL0
HDCD utility
G building HDC dictionary 132
JCL sample 665
HWSSMPL0 user message exit
general user data area 194 compression statistics
routine 663
GET storage function 19 program 132
HWSSMPL1
get storage service data integrity validation
JCL sample 666
examples 501, 508 option 132
HWSSMPL1 user message exit
output 501, 507 object file, HDC dictionary 132
routine 663
parameters 501, 506 return codes 136
HWSSOAP1 IMS Connect exit
Global Physical Terminal (Input) edit how HDC works 131
routine 667
routine (DFSGPIX0) Segment length 131
HWSTCPIB DSECT (TCP/IP information
binding 183 how to implement 132
block)
IMS callable services 183 introduction 131
format 758
IMS environments 183 sample JCL procedure 133
HWSTECL0 695
including the routine 183 using HDCD utility 132
data store information block (DSIB)
naming convention 183 Hardware Data Compression Dictionary
contents 760
sample routine location 183 (HDCD) utility (DFSZLDU0)
DSECTs 763
Global Physical Terminal Input edit building HDC dictionary 132
DSIB (data store information block)
routine (DFSGPIX0) compression statistics program 132
contents 760
attributes 183 data integrity validation option 132
description 183 object file, HDC dictionary 132
HWSTECL0 (continued) IMS Command Language Modification IMS Connect Event Recorder exit routine
ERPL (event recording parameter list) Facility (DFSCKWD0) (continued) (HWSTECL0)
contents 757 error messages 383 data store information block (DSIB)
error message format 695 IMS callable services 383 contents 760
Event Interface Control Block 695 IMS environments 383 DSIB (data store information block)
event keys 699 including the routine 383 contents 760
event record formats 707 KEYWD macro 383 ERPL (event recording parameter list)
Event record parameter list 695 naming convention 383 contents 757
event recording parameter list (ERPL) routine location 383 event keys 699
contents 757 SYN macro 383 event recording parameter list (ERPL)
event types IMS Connect contents 757
multiple process 703 communication with user message event types
single process 699 exits 672 multiple process 703
HWSDSIB DSECT (event recording data store information block (DSIB) single process 699
parameter list) contents 760 HWSDSIB DSECT (data store
format 760 DataPower message exit routine 668 information block)
HWSERPL DSECT (event recording DSIB (data store information block) format 760
parameter list) contents 760 HWSERPL DSECT (event recording
format 757 ERPL (event recording parameter list) parameter list)
HWSTCPIB DSECT (TCP/IP contents 757 format 757
information block) event keys 699 HWSTCPIB DSECT (TCP/IP
format 758 event recording parameter list (ERPL) information block)
initializing 695 contents 757 format 758
installing 698 event types keys 699
invoking 695 multiple process 703 multiple process events 703
keys 699 single process 699 single process events 699
modifying 698 HWSCSLO0 668 TCP/IP information block (TCPIB)
multiple process events 703 HWSCSLO1 668 contents 758
registers at entry 695 HWSDPWR1 user message exit TCPIB (TCP/IP information block)
registers at return 695 routine 668 contents 758
single process events 699 HWSDSIB DSECT (data store IMS Connect sample OTMA User Data
TCP/IP information block (TCPIB) information block) Formatting exit routine
contents 758 format 760 sample JCL 694
TCPIB (TCP/IP information block) HWSERPL DSECT (event recording IMS Connect User Initialization
contents 758 parameter list) (HWSUINIT) exit routine
terminating 765 format 757 sample JCL 687
HWSUINIT 683, 685 HWSJAVA0 666 IMS ConnectIMS Connect Password
control blocks 685 JCL sample 667 Change
register contents 685 HWSSMPL0 exit routines 766
subroutines 685 JCL sample 665 IMS Data Capture exit/function 58
HWSXIB macro 683 HWSSMPL0 user message exit IMS Data Conversion exit/function 80
HWSXIB1 macro 683 routines 663 IMS DataPropagator 58
HWSXIBDS macro 683 HWSSMPL1 IMS log 413, 490
HWSXIBOD macro 683 JCL sample 666 IMS Standard User Exit Parameter
HWSYDRU0 692 HWSSMPL1 user message exit List 144, 435
exit for asynchronous output 692 routines 663 IMS system services 375
using 692 HWSSOAP1 667 IMS TM resource adapter
HWSTCPIB DSECT (TCP/IP HWSJAVA0 666
information block) IMS Connect user message exit
I format 758
macros 683
routine 666
IMSEXIT 395
Identify exit routine 353
multiple process events 703 IMSplex
IMS Adapter for REXX exit routine
Port Message Edit exit routine 670 creating transactions
binding 189
security for 694 dynamically 154, 161
IMS callable services 189
single process events 699 IMS Connect
IMS environments 189
TCP/IP information block (TCPIB) HWSCSLO0 668
including the routine 189
contents 758 HWSCSLO1 668
naming convention 189
TCPIB (TCP/IP information block) IMS Control Center exit routines 668
sample routine location 189
contents 758 INIT subroutine 673
IMS catalog
user message exit routines Init-Term exit routine
batch processing 46
failures from MVS calls 663 contents of registers 521
defining 46
HWSDPWR1 668 parameter list 521
IMS catalog exit routine 46
HWSJAVA0 666 recommendations 521
IMS Command Language Modification
HWSSMPL0 663 Initialization and Termination
Facility (DFSCKWD0)
HWSSMPL1 663 user exit routine 585
binding 383
initialization and termination exit 386
command keyword table,
Initialization exit routine 356
modifying 383
Index 795
IBM Confidential
Initialization exit routine (DFSINTX0) IRB 633 log (data) recovery (continued)
attributes 194 isolated log sender 409 emergency restart (online) 415
binding 194 ISWITCH macro Log Recovery utility 413
description 194 changing for migration 4 Log Archive exit routine (IMSEXIT)
ETO= keyword setting 194 description 7 Binding 395
IMS callable services 194 exiting cross-memory mode 11 description 395
IMS environments 194 IMS callable services 395
including the routine 194 IMS environments 395
naming convention 194
registers 194
K including the routine 395
naming convention 395
key compression 125
contents on entry 194 parameters 395
keyboard shortcuts viii
contents on exit 194 record types 397
KEYWD macro statement
sample routine location 194 sample routine 397
modifying command keyword
using callable services 194 sample routine location 395
table 383
Initialization-Termination (Init-Term) termination 395
user-supplied exit routine written log 397
CQS 560 Log edit exit routine 404
INPUT L Log edit user exit (LOGEDIT)
user exit routine 587 Language Environment user exit binding 404
input edit/routing sample routine 388 IMS callable services 404
Fast Path 164 binding 388 IMS environments 404
Input Message Field edit routine IMS callable services 388 including the routine 404
(DFSME000) IMS environments 388 naming convention 404
attributes 199 including the routine 388 registers 404
binding 199 naming convention 388 contents on entry 404
calling 201 registers 388 sample routine location 404
defining edit routines 201 contents on entry 388 Log Filter exit routine (DFSFTFX0) 409
description 199 sample routine location 388 attributes 409
example 199 Large System Definition Sort/Split Input binding 409
IMS callable services 199 exit routine (DFSSS050) communicating with IMS 409
IMS environments 199 attributes 389 IMS callable services 409
including the routine 199 binding 389 IMS environments 409
interfaces 199 description 389 IMS-supplied Log Filter exit
link editing 199 IMS callable services 389 routine 409
naming convention 199 IMS environments 389 including the routine 409
parameter list format 199 including the routine 389 initialization and termination
performance considerations 202 naming convention 389 calls 409
registers registers naming convention 409
contents on entry 199 contents on entry 389 recovery environment 409
contents on exit 199 contents on exit 389 sample routine location 409
sample routine location 199 restrictions 389 Log Service exit routine 376
using callable services 199 sample routine location 389 log volumes 490
Input Message Segment edit routine using callable services 389 LOGEDIT 404
(DFSME127) Large System definition Sort/Split Logger user exit (LOGWRT) 413
attributes 202 Output exit routine (DFSSS060) attributes 413
binding 202 description 392 binding 413
calling 206 IMS environments 392 description 413
defining edit routines 206 Large System Definition Sort/Split IMS callable services 413
description 202 Output exit routine (DFSSS060) IMS environments 413
example 202 binding 392 including the routine 413
IMS callable services 202 IMS callable services 392 initialization call 413
IMS environments 202 including the routine 392 naming convention 413
including the routine 202 naming convention 392 OLDS/SLDS write call 413
interfaces 202 registers parameter list 413
naming convention 202 contents on entry 392 registers 413
parameter list format 202 contents on exit 392 contents on entry 413
performance considerations 207 restrictions 392 contents on exit 413
registers sample routine location 392 sample routine location 413
contents on entry 202 legal notices termination call 413
contents on exit 202 notices 781 using callable services 413
sample routine location 202 trademarks 783 Logoff exit routine (DFSLGFX0) 207
Segment edit routine 202 LOAD module function 20 attributes 207
using callable services 202 load module service binding 207
INSERT function 27 examples 501, 511 description 207
interface information 495 output 501, 510 IMS callable services 207
intermediate/back-end (IBE) links 169 loading TM exit routines 194 IMS environments 207
interrupt request block 633 log (data) recovery 413 including the routine 207
Logoff exit routine (DFSLGFX0) Message Control/Error exit routine Non-Discardable Messages exit routine
(continued) default actions 229 (DFSNDMX0) 232
naming convention 207 valid flags 229 alternate destinations 232
registers 207 Message Control/Error exit routine attributes 232
contents on entry 207 (DFSCMUX0) 219 binding 232
contents on exit 207 attributes 220 description 232
sample routine location 207 binding 220 IMS callable services 232
using callable services 207 calling the routine 220 IMS environments 232
XRF considerations 207 default actions 229 including the routine 232
Logon exit routine (DFSLGNX0) 210 description 219 naming convention 232
attributes 210 exit flags 229 processing options 232
binding 210 IMS callable services 220 registers 232
description 210 IMS environments 220 contents on entry 232
IMS callable services 210 interface block (MSNB) 224 contents on exit 232
IMS environments 210 contents on entry 224 restrictions 232
including the routine 210 contents on exit 226 sample routine location 232
logon descriptors 213 interface block (MSNB), using callable services 232
LOGOND= keyword 213 description 224 non-shared queues environment 321
naming convention 210 naming convention 220 Normal Call exit routine 358
registers 210 registers 221 NULLVAL operand, use 111
contents on entry 210 contents on entry 221
contents on exit 210 contents on exit 221
sample routine location 210
using callable services 210
rerouting messages 222
sample routine location 220
O
ODBM (Open Database Manager)
LOGOND= keyword 213 using callable services 220
user exit routines 585
LSO= 11 X'6701' log record 228
OLDS (online log data set) 413
LTERM support for APPC 214 message routing routines
open database
LTERM, remote non-discardable messages 232
user exit routines
ETO, and 154, 160 Message Service exit routine 378
Client Connect/Disconnect 595
LU 6.2 Edit exit routine (DFSLUEE0) Message Switching (Input) edit routine
HWSAUTH0 690, 691
attributes 214 (DFSCNTE0)
Initialization and Termination 585
binding 214 attributes 230
INPUT 587
changing a message 214 binding 230
OUTPUT 593
changing local LU name 214 description 230
Open Database Manager (ODBM)
description 214 example 232
CSLDST1 597
IMS callable services 214 IMS callable services 230
CSLDST2 597
including the routine 214 IMS environments 230
CSLDSTX 597
LTERM support for APPC 214 including the routine 230
exit routines
MOD name support for APPC 214 naming convention 230
ODBM statistics 597
naming convention 214 registers
statistics record 597
parameter list format 214 contents on entry 230
user exit routines 585
registers 214 contents on exit 230
Operations Manager
contents on entry 214 sample routine location 230
user exit routines
contents on exit 214 using callable services 230
client connection 600
sample routine location 214 MOD name support for APPC 214
input 603
using callable services 214 module service load 501, 509
security 610
LU 6.2 user data area 194 parameters 501, 509
Operations Manager (OM)
MSC (Multiple Systems Coupling)
statistics header 612
ETO, and 154, 160
user exit routines 599
M LTERM, remote 154, 160
Message Control/Error exit
BPE Statistics 612
macros output 605
routine 219
DFSCAOI 27 OTMA
TM and MSC exit routine 298
DFSCCBLK 22 sample DRU exit for IMS
MSC message routing control user
DFSCSTRG 19 Connect 692
exit 298
HWSEXPRM 683 OTMA Destination Resolution user exit
MSC Routing exit routine 298
HWSIMSCB 683 (OTMAYPRX)
description 298
HWSIMSEA 683 attributes 242
MSNB interface block 219
HWSOMPFX 683 IMS callable services 242
multiple event 699
HWSROUPM 683 IMS environments 242
types 699
HWSXIB 683 including the routine 242
multisegment messagessetting up
HWSXIB1 683 link editing 242
exit registers 463
HWSXIBDS 683 naming convention 242
HWSXIBOD 683 prerouting input messages 241
mapping control blocks. 340 registers at entry 242
message N registers at exit 244
CQS0242E 565 network-qualified LU name 445, 479 sample routine location 242
non-discardable messages 232 using callable services 242
Index 797
IBM Confidential
OTMA Input/Output Edit exit routine parameter lists (continued) Physical Terminal (Output) edit routine
(DFSYIOE0) 245 Initialization user exit 560 (DFSCTTO0) (continued)
attributes 245 load module service 501, 509 IMS callable services 263
binding 245 Queue Overflow user exit 563 IMS environments 263
IMS callable services 245 restart entry 633, 636 including the routine 263
IMS environments 245 retrieve named storage service 501, naming convention 263
including the routine 245 513 registers
naming convention 245 standard BPE user exit 495 contents on entry 263
registers at entry 245 Structure Event exit routine contents on exit (if cancel
registers at exit 245 checkpoint 633, 643 request) 263
sample routine location 245 Deferred Resync Complete 633, contents on exit (if no cancel
using callable services 245 640 request) 263
OTMA Resume TPIPE Security user exit resync, CQS 633, 641 sample routine location 263
(OTMARTUX) structure overflow 633, 645 Port Message Edit exit routine 670
attributes 256 structure rebuild 633, 643 prechained save area 10
IMS environments 256 structure rebuild lost UOWs 633, propagating data 58
link editing 256 644
naming convention 256 structure status change 633, 646
sample routine location 256
using callable services 256
Structure Event user exit 576
checkpoint 576
Q
Queue Overflow user-supplied exit
OTMA User Data Formatting exit routine connect 576
routine
(DFSYDRU0) 249 overflow 576
CQS 563
registers at exit 255 rebuild 576
Queue Space Notification exit routine
OTMA User Data Formatting user exit status change 576
(DFSQSPC0/DFSQSSP0) 267
(OTMAYDRU) Structure Inform exit routine 649
attributes 267
attributes 250 Structure Statistics user exit 523, 565
binding 267
binding 251 Termination user exit 560
call types 267
IMS callable services 251 Partner Product exit routine (DFSPPUE0)
description 267
IMS environments 250 binding 420
IMS environments 267
including the routine 251 description 420
including the routine 267
naming convention 250, 251 IMS callable services 420
naming convention 267
registers at entry 251 IMS environments 420
parameters 267
sample routine location 251 including the routine 420
Queue Space Notification exit routine
using callable services 250 naming convention 420
(DFSQSPC0/DFSQSSP0)
OTMA User Data Formatting user exit registers
IMS callable services 267
OTMAYDRU) content on entry 420
registers
including the routine 250 contents on exit 420
contents on entry 267
OTMAYPRX 241 sample routine location 420
contents on exit 267
OUTPUT password verification
sample routine location 267
user exit routine 593 bypass 187
special considerations 267
disable 194
threshold values 267
enable 194
using callable services 267
P PDS (partition data set) member
sections 392
parameter list
PDSE resource restrictions 375
Field edit routine 199
Segment edit routine 202, 206
performance R
exit routines 11 randomizing modules 85
parameter list format
Physical Terminal (Input) edit routine READ subroutine 675
in DFSPRE60 440
(DFSPIXT0) reason codes
in DFSPRE70 442
binding 259 callable service 28
parameter lists
description 259 rebuild lost UOW entry, CQS 633, 645
abnormal termination 633, 636
example 262 RECON data sets
BPE Statistics user exit 523
IMS callable services 259 tracking changes 544
Client Connection user exit 561
IMS environments 259 RECON I/O exit routine
Client Disconnect user exit 561
including the routine 259 system performance impact 434
create named storage service 501,
interface 259 RECON I/O exit routine
512
naming convention 259 (DSPCEXT0) 424
CSCBLK 22
operation 259 attributes 424
CSSTRG 19
registers binding 424
delete module service 501, 511
contents on entry 259 description 424
destroy names storage service 501,
contents on exit 259 IMS callable services 424
514
sample routine location 259 IMS environments 424
DFSCAOI 27
Physical Terminal (Output) edit routine including the routine 424
free storage service 501, 508
(DFSCTTO0) naming convention 424
generating in your exit routine 14
binding 263 parameters 424
get storage services 501, 506
description 263 performance considerations 424
initialization and termination user exit
example 266
routine 521
RECON I/O exit routine (DSPCEXT0) Restart exit routine (continued) security (continued)
(continued) using callable services 422 DBRC application programming
registers Resume exit routine 50 interface (API) request 541
contents on entry 424 resync UOW entry, CQS 633, 642 security exit
contents on exit 424 retrieve named storage service IMSLSECX 694
sample routine location 424 example 501, 514 Security Information Block (SAFIB)
using callable services 424 output 501, 514 contents 762
reentrant code restrictions 375 parameters 501, 513 Security Reverification exit routine
REFRESH USEREXIT command return codes (DFSCTSE0)
static work area, and 495 callable service 28 attributes 273
register REXX, IMS adapter binding 273
contents entry parameters 189 description 273
Client Connection user exit 561 environment 189 IMS callable services 273
Client Structure Event exit 633, exec name, choosing 189 IMS environments 273
640 installation 189 including the routine 273
Client Structure Inform exit 649 user exit routine (DFSREXXU) 189 naming convention 273
CQS Event exit 633, 635 routines registers
Initialization-Termination user client 633 contents on entry 273
exit 560 user-supplied, CQS 559 contents on exit 273
Queue Overflow user exit 563 routines, location of 40 sample routine location 273
Structure Event user exit 576 routing messages using callable services 273
Structure Statistics user exit 565 when applications abend 232 security support 694
register contents Segment edit routine 202
subroutine entry 672 interface 206
subroutine exit 672
registers
S use 201, 202
Segment edit/compression exit routine
Sample
prechained save area 10 (DFSCMPX0) 117
initialization exit routine 516
saving 10 activating 120
processing exit routine 517
single save area 10 attributes
termination exit routine 518
Remote Site Recovery 409 DEDB 119
sample AO exit 445
RENT code restrictions 375 full-function database 118
samples
rerouting messages 219 binding 118
IMS Command Language
resetting significant status 207, 277 compression routine 121
Modification facility
Resolve In-Doubt exit routine 360 description 117
(DFSCKWD0) 386
Resource Access Security user exit entry codes 124, 125
samples, code 42
(RASE) entry parameters, DL/I 124
samples, location of 40
attributes 435 how it works 119
save area
binding 435 IMS callable services 118
for registers 10
callable services, with 435 IMS environments 118
prechained 10
description 435 including the routine 118
single, registers 10
environments supported 435 loading 119
SCAN control block function 24
IMS callable services 435 naming convention 118
SDFSSMPL
IMS environments 435 parameters 126
data set contents 42
including the routine 435 CSECTs used for parameter
Secondary Index Database Maintenance
link editing 435 passing 126
exit routine 111
naming convention 435 registers 124
attributes 111
registers 435 contents on entry 124
binding 111
contents on entry 435 contents on exit 125
Calling 111
sample routine location 435 sample routine location 118
CSECTs 111
Resource Manager Segment edit/compression exit
description 111
exit routines routine (DFSCMPX0)
IMS callable services 111
initialization/termination 616, 618 attributes 118
IMS environments 111
Resource Manager (RM) segment types, applicable 119
including the routine 111
CSLRST1 620 tabled data information 123
indexing, suppression 111
DFSINSX0 154, 161 Segment Edit/Compression exit routine
loading 111
exit routines (DFSCMPX0)
naming convention 111
client connection 616 initialization routine 129
parameters 111
RM statistics 620 messages and codes 129
registers
statistics record 620 sample routine 127
contents on entry 111
resource restrictions 375 DFSCMPX0 127
contents on exit 111
Restart exit routine DFSKMPX0 128
residing 111
attributes 422 Sequential Buffering Initialization exit
sample routine 115
description 422 routine (DFSSBUX0) 139
sample routine location 111
parameter list 422 attributes 136
use 111
registers binding 136
using callable services 111
contents on entry 422 calling 136
security
contents on exit 422 description 136
commands 541
Index 799
IBM Confidential
Sequential Buffering Initialization exit Sign-On exit routine (DFSSGNX0) Status exit routine
routine (DFSSBUX0) (continued) (continued) overview 57
IMS callable services 136 user descriptors 286 storage services 19
IMS environment 136 USERD= keyword 286 create named storage service 501,
including the routine 136 XRF considerations 154, 281 512
loading 136 Signoff exit routine 363 destroy named storage service 501,
naming convention 136 Signoff exit routine (DFSSGFX0) 277 514
parameters 136 attributes 277 free storage service 501, 508
performance considerations 136 binding 277 get storage service 501, 506
registers description 277 retrieve named storage service 501,
contents on entry 136 IMS callable services 277 513
contents on exit 136 IMS environments 277 storage services statistics area 523, 537
sample routine location 136 including the routine 277 Structure Event user-supplied exit
sample routines naming convention 277 routine 576
DFSSBU1 139 registers 277 Structure Statistics user-supplied exit
DFSSBU2 139 contents on entry 277 routine 565
DFSSBU3 139 contents on exit 277 Structured Call Interface
DFSSBU4 139 restrictions 277 user exits
DFSSBU9 139 sample routine location 277 BPE statistics 628
using callable services 136 using callable services 277 client connection 624
Shared Printer exit routine (DFSSIML0) with generic resources 277 Structured Call Interface (SCI)
attributes 276 XRF considerations 277 exit routines 624
description 276 Signon exit routine 364 input 653
example 276 Signon exit routine (DFSSGNX0) user exits
IMS callable services 276 DFSUSER descriptor use 287 initialization/termination 626
IMS environments 276 single event 699 notify client 657
including the routine 276 types 699 subroutines
naming convention 276 single save area, registers 10 EXER 682
registers single-segmentsetting up INIT 673
contents on entry 277 exit registers 463 READ 675
contents on exit 277 SLDS (system log data set) 413 register contents 672
sample routine location 276 SOAP Gateway TERM 680
using callable services 276 HWSSOAP1 exit routine 667 XMIT 679
shared queues environment 321 IMS Connect exit routine subsequent BPE exit routines,
SHUTDWN parameter HWSSOAP1 667 calling 495, 498
MSGQUEUE macro 267 sparse index, building 111 Subsystem Not Operational exit
Sign Exit 289 specifying buffer sizes 319 routine 366
Sign On/Off Security exit routine SPQBPARM parameter list 286 Subsystem Termination exit routine 370
(DFSCSGN0) 289 standard BPE user exit parameter suppress indexing 111
attributes 289 list 495 Suspend exit routine
binding 289 standard user exit interface overview 49
description 289 parameter lists SYN macro statement
IMS callable services 289 description 4 modifying command keyword
IMS environments 289 version 1 4 table 383
including the routine 289 version 5 4, 10 synchronous data capture
naming convention 289 user data areas 194 IMS DataPropagator 58
registers Startup Service exit routine 380 System Definition Preprocessor exit
contents on entry 289 static work areas 495 routine (Input Phase) (DFSPRE60)
contents on exit 289 statistic records attributes 440
sample routine location 289 CQS request 565 binding 440
using callable services 289 data object 565 description 440
Sign-On exit routine (DFSSGNX0) queue name 565 IMS callable services 440
associated printing 281 request 565 IMS environments 440
binding 281 structure checkpoint 565 including the routine 440
description 281 structure checkpoint entry 565 naming convention 440
IMS callable services 281 structure process 565 parameters 440
IMS environments 281 structure rebuild 565 registers
including the routine 281 z/OS request 565 contents on entry 440
loading 282 statistics contents on exit 440
naming 282 DBRC 555 sample routine 442
naming convention 281 Statistics exit routine sample routine location 440
registers 281 contents of registers 523 using callable services 440
contents on entry 281 parameters 523 System Definition Preprocessor exit
contents on exit 281 statistics offset table 523, 528 routine (Name Check Complete)
restrictions 154 status codes (DFSPRE70)
sample routine location 281 TCO exit routine 294 binding 442
supplying data 287 IMS callable services 442
Index 801
IBM Confidential
V
Variable Data Block (VDB)
contents 763
vector table format
DFSPRE60 440
DFSPRE70 442
virtual storage
free 501, 508
get 501, 506
IBM Confidential
Printed in USA
ZES1-3165-00
Spine information: