CONTENTS Title Page Copyright Page Preface 1 Introduction to Generated Code 1.1 Code Modification 1.2 Overview of Module Reference 1.2.1 Module Structure 1.2.2 Module Components 1.2.3 Interfaces Between and Within Modules 1.2.4 Logical Program Flow 1.3 DECADMIRE System Routines and Tasks Part I Modifying Code 2 Code Templates 2.1 Template Symbols 2.2 TPU Editing Procedures 2.3 Code Templates for Module Partitions 2.4 Code Templates of Application Workspaces 2.5 Template for Declaration of DB Handlers 3 Code Markers 3.1 Common Elements of Marker Syntax 3.2 Processing-Control Markers 3.3 Modification Markers 3.3.1 Modification-Marker Syntax 3.4 Dynamic-Code Markers 3.4.1 Syntax of Dynamic-Code Markers 3.4.1.1 Syntax of Single-Line Dynamic-Code Markers 3.4.1.2 Syntaxes of Dynamic-Code Marker Pairs 3.5 Top Markers and Subroutine Markers 3.6 IFDL Input-Field Markers 4 Rules for Modifying Code 4.1 Rule: Files Regenerated From Templates 4.2 Rule: Customizing the Interface Between Modules 4.3 Rule: Customizing the Interface Between Partitions 4.4 Rule: Preparing IFDL Partitions 4.5 Rule: Customizing ESCAPE Partitions 4.5.1 Customizing Code for A Field 4.5.2 Initialization or Calculation (Activation Mode = I or C) 4.6 Rules for Working with Code Markers 4.6.1 Rule: Dynamic-Code Markers 4.6.2 Rule: Primary-Key and Related-Table Variables 4.6.3 Rule: IFDL Input-Field Markers 4.6.4 Rule: IFDL Panel Markers 4.6.5 Rule: ASUB Code Sections 4.7 Rule: Code that Reads Related-Table Data 4.8 Rule: Modifying Modules Containing Top Code 4.9 Rule: Upgrading a DECADMIRE Version 1.2 Application 4.10 Rule: Restricted Local Variables 4.11 Rule: Customizing U_TAB Modules and Calls 5 Regenerated Modules 5.1 Module Version Numbers 5.2 Enduring Characteristics of Modules 5.3 Switching the Environment of a Module 5.4 Changing a Driver from a Subroutine Module to a Top Module Part II Default Elements of Generated Code 6 Workspaces 6.1 Naming Conventions for Workspace Fields 6.2 System Workspaces 6.2.1 C_GLOB_COM Workspace 6.2.1.1 Function Codes of the C_GLOB_COM C_FUNC_KEY Field 6.2.1.2 I/O Error Codes of the C_GLOB_COM C_ERR_CODE Field 6.2.2 DFCOM_AREA Workspace 6.2.3 DF_ENV_INFO Workspace 6.2.4 DFM_PARAM Workspace 6.2.5 SND_SHADOW_REC Workspace 6.2.6 CONTROL_WS Workspace 6.2.7 MLC_DF_PUT_STAT_INFO Workspace 6.2.8 MLC_SEL_RAPP_HEAD Workspace 6.2.9 MLC_SEL_RAPP_PARM Workspace 6.2.10 MLC_RAPP_INFO Workspace 6.2.11 C_PRINT_COM Workspace 6.3 Key-Information Workspaces 6.4 Application Workspaces 6.4.1 module _ACC Workspace 6.4.2 module _COM Workspace 6.4.3 module _WKSP Workspace 6.4.4 module _PARM Workspace 6.4.5 module _VIEW Workspace 6.5 Local-Key Workspaces 6.5.1 Primary Key Fields, T_PRIM_KEY and G_KEY_ rtable 6.5.2 Receiving-Key Field, T_RECEIVING_KEY 6.5.3 Cascading-Key Field, T_CASCADE_KEY 6.6 Workspaces Used for Communication Between Partitions 6.7 Additional Sources of Information on Workspace Use 7 Code Sections 7.1 Naming Conventions for Code Sections 7.1.1 3GL Structure and Naming Conventions 7.1.2 TDL Structure and Naming Conventions 7.1.3 IFDL Structure and Naming Conventions 7.2 3GL Code Sections 7.3 IFDL Code Sections 8 Request Responses 8.1 Transceive Responses 8.2 Send Responses Part III Modules 9 Menu Modules 9.1 Source Files Generated for MENU Modules 9.2 MENU Module Description MENU Driver Partition MENU IFDL Partition 10 Screen-Module Code Summary 10.1 Source Files Generated for Screen Modules 10.1.1 Source Files Generated for Screen-Maintenance Modules 10.1.2 Source Files Generated for Screen-Selection Modules 10.2 Source Code Generated for Screen Modules 10.2.1 Application Workspaces Generated for Screen Modules 10.2.2 Receiving Parameters of Screen Modules 10.2.3 Distribution of 3GL Code Sections Among Screen Modules 10.2.4 DECforms Request Responses of Screen Modules 11 Screen-Maintenance Modules 11.1 M_CHA and M_TAB Module Description M_CHA and M_TAB Driver Partition M_CHA and M_TAB READ Partitions M_CHA and M_TAB WRITE Partitions M_CHA and M_TAB IFDL Partitions M_CHA and M_TAB ESCAPE Partitions 11.2 M_KEY Module Description M_KEY Driver Partition M_KEY READ Partition M_KEY IFDL Partition M_KEY ESCAPE Partition 11.3 M_FLD Module Description M_FLD Driver Partition M_FLD READ Partition M_FLD IFDL Partition M_FLD ESCAPE Partition 12 Screen-Selection Modules 12.1 F_TAB Module Description F_TAB Driver Partition F_TAB READ Partition F_TAB IFDL Partition 12.2 S_CHA Module Description S_CHA Driver Partition S_CHA READ Partition S_CHA IFDL Partition 12.3 S_TAB Module Description 12.3.1 Use of Selection Parameters by S_TAB Modules 12.3.2 Alternative S_TAB Read Methods S_TAB Driver Partition S_TAB READ Partition S_TAB IFDL Partition 13 Update Modules 13.1 Source Files Generated for U_TAB Modules 13.2 U_TAB Module Description U_TAB Driver Partition 14 Delete Modules 14.1 Source Files Generated for DELET Modules 14.2 DELET Module Description DELET Driver Partition 15 Report Modules 15.1 Source Files Generated for Report Modules 15.2 Source Code Generated for the Report Modules 15.2.1 Application Workspaces Generated for Report Modules 15.2.2 Receiving Parameters Generated for the Report Modules 15.2.3 3GL Code Sections in Report Modules 15.3 R_ROW and R_BLK Module Description R_ROW and R_BLK Driver Partitions 15.4 R_CHA Module Description R_CHA Driver Partition 15.5 R_HEA Module Description R_HEA Driver Partition 15.6 R_SUM Module Description R_SUM Driver Partition 15.7 R_TOT Module Description R_TOT Driver Partition 16 Built-in Features and Behaviors of Screen, Report, and Update Modules 16.1 SQL Error Handling 16.2 Null-Indicator Handling 16.3 Features And Functions Specific to Screen And MENU Modules 16.3.1 Returning Immediately to Previous Or First Menu 16.3.2 Direct Call And Goto to Any Other Module 16.3.3 Default Value Passing Mechanism 16.3.3.1 Sending Default Values From Module A to Module B 16.3.3.2 Receiving Default Values in Module B from Module A 16.3.3.3 Returning Default Values to Module A When Leaving Module B 16.3.3.4 Receiving Default Values in Module A from Module B 16.3.4 Copying Default Values from Another Record 16.3.5 Updating A Record 16.3.6 Activation of An S_CHA from An M_CHA 16.3.7 Activation of U_TAB Modules (from M_CHA Or M_TAB Modules) 16.3.7.1 Activation of U_TAB modules from WRITE Partitions 16.3.7.2 Activation of U_TAB Modules from READ Partitions 16.3.8 Activation of DELET Modules (from M_CHA Or M_TAB WRITE Partitions) 16.3.9 Activation of An Escape Routine (in An ESCAPE Partition) 16.3.10 External and Internal Calculations 16.3.11 Checking for The Existence of A Record 16.3.12 Performing A Module Call After Field Input 16.3.13 Module Call with Select Key 16.3.14 List-of-Value Selections 16.3.15 Conditions for Function Activation 16.3.16 Validation Check Before Function Activation 16.3.17 DECforms Workspace Interface 16.3.18 Message-Text Handling 16.3.19 Panel Display Handling 16.3.20 Panel Removal Handling 16.3.21 Limiting The Size of Selection Cursors 16.3.22 Using Local Fields (TLOC Fields) 16.3.23 Show Module Status 16.3.24 Activation of Support Functions 16.3.25 Activation of Print Screen 16.3.26 Authorization-Information Handling 16.3.27 Using Only Key Fields in An M_CHA Or M_TAB Module 16.3.28 Using M_CHA Modules with No-Key Fields 16.3.29 Using Workspace KEY_INFO for General Communication Between Modules 16.3.30 Scroll Workspace Handling in S_TAB, F_TAB, And S_CHA Modules 16.3.31 First Panel in S_TAB, F_TAB And S_CHA Modules 16.3.32 Returning Data in S_TAB And F_TAB Modules 16.3.33 Maintaining Several Tables Simultaneously 16.3.34 Record-Locking Mechanism 16.3.34.1 Record-Locking Mechanism of The READ Partition 16.3.34.2 Record-Locking Mechanism of The WRITE Partition 16.4 Features and Functions Specific to Report Modules 16.4.1 Passing Data from The Screen Module 16.4.2 Sort Mechanism 16.4.3 Breakpoint Detection And Handling in R_HEA 16.4.4 Breakpoint Detection And Handling in R_SUM 16.4.5 Calling An R_CHA Module from An R_ROW, R_BLK, Or R_CHA Module 16.4.6 Calling an R_TOT Module from An R_ROW Or R_BLK Module 16.4.7 SQL Error Handling 16.4.8 Authority Information Handling 16.5 Features And Functions Specific to Update Modules Part IV DECADMIRE System Routines and Tasks 17 DECADMIRE System Routines and Tasks 17.1 Abbreviations Used in Reference Pages 17.2 Summary of DECADMIRE Routines and Tasks 17.3 Reference Pages cmp_str_const MLB_DF_SET_STR MLB_FORM_CALC MLC_ASS_RAPP MLC_CHK_MENUE_ACC MLC_COMPARE_REC MLC_COMPARE_REC_PART MLC_CONV_DATA MLC_DELETE_FILE MLC_DF_CHK_STAT_11 MLC_DF_PRINTSCR_11 MLC_DF_PUT_STAT MLC_DF_PUT_STAT_TSK MLC_DF_SET_DAT mlc_c_df_today MLC_DF_TODAY MLC_END_MODULE mlc_c_form_calc MLC_FORM_CALC MLC_GET_FNAME MLC_PM_CLR_PAGE MLC_PM_PRI_HEAD MLC_PM_PRI_WD MLC_PM_PUT_DAT MLC_PM_PUT_GRAP MLC_PM_PUT_NUM MLC_PM_PUT_NUM2 MLC_PM_PUT_NUM8 MLC_PM_PUT_NUMR MLC_PM_PUT_NUMD MLC_PM_PUT_STR MLC_PM_SELECT MLC_RMS_SORT MLC_SEL_CALL MLC_SEL_CALL_TSK MLC_SEL_GOTO MLC_SEL_GOTO_TSK MLC_SEL_RAPP MLC_SEL_RAPP_TSK MLC_SQL_ERROR MLC_START_MODULE MLC_START_ROUTINE MLC_SUB_DATE MLC_UTILITY MOVE_STR move_str_const PCASE A Customizing Physical-to-Logical Function-Key Connections B Customizing IFDL Layout Attributes B.1 Display Attributes B.2 Common Panels B.3 COPY Files For Controlling Amount of Multiple Pages B.4 Quit Caution Boxes B.5 Update and Insert Caution Boxes B.6 Delete Caution Boxes B.7 Auto Skip Option B.8 Files Used for Defined Layout Attributes B.8.1 Application-Specific Layout-Attribute COPY Files B.8.2 Layout-Attribute Templates B.8.3 Command Files for Copying Layout-Attribute Templates C Location of Source Files of DECADMIRE System Routines D 3GL Language Differences D.1 Extensions of 3GL Files Generated by DECADMIRE D.2 Data Types D.3 Restrictions on Use of Floating and Varying-String Data Types D.4 Language Elements Used in the Code D.4.1 SELECT FIRST TRUE OF Structures D.4.2 Activation of Internal Code Sections D.4.3 Internal Code Sections D.4.4 Loop Structures D.4.5 Multisegmented Key-Field Definitions D.4.6 Local Workspace Field Naming D.4.7 Initializing Local Workspaces D.4.8 FORTRAN Labeling Principle D.5 Pascal Restrictions D.5.1 QUADWORD and VMS DATE Are Unsupported D.5.2 Limited Functionality of CDD Connections D.5.3 SCALE Is Unsupported D.5.4 System Workspace Considerations D.5.5 Length of Table Names D.5.6 Passing IFDL Parameters to the ESCAPE Partition D.6 FORTRAN Restrictions D.6.1 Varying String is Unsupported D.6.2 QUADWORD and VMS DATE Are Unsupported D.6.3 Limited Functionality of CDD Connections D.6.4 SCALE Is Unsupported D.6.5 System Workspace Considerations D.6.6 Length of Table Names D.6.7 Passing IFDL Parameters to the ESCAPE Partition D.7 C Restrictions D.7.1 QUADWORD and VMS DATE Are Unsupported D.7.2 Limited Functionality of CDD Connections D.7.3 SCALE Is Unsupported D.7.4 System Workspace Considerations D.7.5 Length of Table Names D.7.6 Varying String is Unsupported D.7.7 Character-String Restrictions D.7.8 Running the DEC C Compiler E Modification Markers in Template and Generated Code E.1 3GL Modification Markers E.2 ACMS Modification Markers E.3 IFDL Modification Markers