Triggers and Stored Procedures
Total Page:16
File Type:pdf, Size:1020Kb
Adabas Triggers and Stored Procedures Version 8.2.5 March 2013 This document applies to Adabas Version 8.2.5. Specifications contained herein are subject to change and these changes will be reported in subsequent release notes or new editions. Copyright © 1971-2013 Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their licensors. Detailed information on trademarks and patents owned by Software AG and/or its subsidiaries is located at http://documentation.softwareag.com/legal/. Use of this software is subject to adherence to Software AG's licensing conditions and terms. These terms are part of the product doc- umentation, located at http://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s). This software may include portions of third-party products. For third-party copyright notices and license terms, please refer to "License Texts, Copyright Notices and Disclaimers of Third-Party Products". This document is part of the product documentation, located at http://documentation.softwareag.com/legal/ and/or in the root installation directory of the licensed product(s). Document ID: ADAMF-TRIGGERS-825-20130314 Table of Contents Triggers and Stored Procedures ......................................................................................... v 1 Conventions ..................................................................................................................... 1 I Introduction ..................................................................................................................... 3 2 Introduction ............................................................................................................. 5 Procedures .......................................................................................................... 6 Components ....................................................................................................... 9 Processing Summary ........................................................................................ 14 II Installation and Configuration ..................................................................................... 19 3 Installation and Configuration .............................................................................. 21 Software Requirements .................................................................................. 103 Overview .......................................................................................................... 22 Install Trigger Maintenance ............................................................................. 22 Install the Adabas Trigger Driver .................................................................... 24 Install the Natural Trigger Driver .................................................................... 27 NATPARM Considerations .............................................................................. 34 Printer Considerations ..................................................................................... 37 Work File Considerations ................................................................................. 39 Natural Security Considerations ...................................................................... 40 III Processing and Performance ....................................................................................... 43 4 Processing and Performance ................................................................................. 45 Initialization ..................................................................................................... 46 Checking for Procedures .................................................................................. 49 Processing the Procedures ............................................................................... 50 Processing the Results ...................................................................................... 51 Shutdown ......................................................................................................... 53 Abnormal Termination ..................................................................................... 54 Command Logging .......................................................................................... 56 IV Programming and Performance .................................................................................. 57 5 Programming and Performance ............................................................................ 59 Writing Procedures .......................................................................................... 60 Natural Syntax Limitations .............................................................................. 63 Using the Format and Record Buffers .............................................................. 66 V Calling Stored Procedures ............................................................................................ 73 6 Calling Stored Procedures ..................................................................................... 75 Stored Procedure Link Routine (STPLNKnn) .................................................. 76 Setting Up the PC Command ........................................................................... 76 Examples .......................................................................................................... 83 VI Trigger Maintenance .................................................................................................... 97 7 Trigger Maintenance .............................................................................................. 99 Overview ........................................................................................................ 101 File-Field Tables .............................................................................................. 104 Trigger Definitions ......................................................................................... 115 Procedure Reports .......................................................................................... 125 iii Triggers and Stored Procedures Administrator Functions ................................................................................ 128 VII TRGMAIN: An API To Maintain Triggers ............................................................... 141 8 TRGMAIN: An API To Maintain Triggers ........................................................... 143 Functions (Format A5) .................................................................................... 144 Calling Parameters (Format A209) ................................................................. 145 Sample User Program .................................................................................... 146 Response Codes .............................................................................................. 151 VIII TRGUNLD and TRGLOAD Utilities ...................................................................... 153 9 TRGUNLD and TRGLOAD Utilities ................................................................... 155 Starting a Utility ............................................................................................. 156 Utility Parameters ........................................................................................... 158 End of Processing Reports .............................................................................. 161 Utility Response Codes .................................................................................. 165 A Examples ..................................................................................................................... 167 SAMPINT1 ............................................................................................................. 169 SAMPPRC1 ............................................................................................................. 172 SAMPP001 .............................................................................................................. 173 STPLCB ................................................................................................................... 177 STPLCBE ................................................................................................................ 178 STPLRBE ................................................................................................................. 180 STPUTPRM ............................................................................................................. 181 STPUTRAK ............................................................................................................. 182 STPAPARM ............................................................................................................ 185 STPAPRM1 ............................................................................................................. 186 STPXPARM ............................................................................................................. 186 SAMP0001 .............................................................................................................. 187 SAMP0002 .............................................................................................................. 192 SAMP0003 .............................................................................................................. 195 SAMP0004 .............................................................................................................