%VARSTOR Definitions of work fields to be used by the MMP. These will be inserted into the VARIABLE-STORAGE area of the TWA and (cont.) will be initialized to LOW-VALUES immediately upon entry of each transaction. Data in this area cannot be passed to (cont.) another MMP or transaction, it is not saved. %USRAREA Used for user defined LINKAGE-SECTION areas. Possibly used for IMS PCB's or CICS TCTUA. Each of these items should begin with an "01" level entry. Procedural and data access %PREINIT Code at the top of the Procedure Division before the Mask Initialization record has been read and before any data manipulation by the MMP. %PFKEYL Code to be inserted at the very start of the mainline logic for browse functions. May be used to test for PF keys or to (cont.) alter the key value which the Operator entered, possibly to prefix a Client#, etc. %LOCKY Code to override the logic used to start a browse (generically), possibly to force a certain starting key value, or to code the I/O access bypassing the MAGEC I/O module (Primary Data-Class). %REDLE Code to override the logic for reading the first record after starting a browse via the %LOCKY coding (Primary Data-Class). %REDNX Code to override the logic for reading the Primary Data-Class "sequentially". Inserted into BOTH the browse and maintenance mainline routines. %PFKEYM Code to be inserted near the beginning of the mainline logic for maintenance functions. May be used to test for PF keys (cont.) or to alter the key value which the Operator entered, possibly to prefix a Client#, etc. Procedural and data access (cont.) %REDKY Code to override the logic for reading the Primary Data Class randomly (by key). %RDUKY Code to override the logic for reading the Primary Data Class randomly (by key) with intent to update or delete the data. %ADDIT Code to override the logic to add a record to the Primary Data Class. %UPDAT Code to override the logic for updating a record of the Primary Data Class. %DELET Code to override the logic for deleting a record from the Primary Data Class. %RELES Code to override the logic for dropping the "exclusive control" obtained via logic in the %RDUKY insertion point. %UPDERR Code to override the logic used when a bad return code is sensed for %UPDAT, %DELET, or %ADDIT logic. %GOODADD Code to override logic used when a good return code is sensed from %ADDIT logic, perhaps to update other Data Class(es). %GOODCHG Code to override logic used when a good return code is sensed from %UPDAT logic, perhaps to update other Data Class(es). %GOODDEL Code to override logic used when a good return code is sensed from %DELET logic, perhaps to update other Data Class(es). %SNDSCRN Code to be inserted just before the logical end of processing for all functions. It will be executed just before the MMP returns to MAGECCP to have the screen sent. %LOCINIT Code to be inserted into the initialization routine for the browse functions, to initialize packed fields in VARIABLE-STORAGE, to override default values. %INIT Code to be inserted into the initialization routine for maintenance functions, to initialize VARIABLE-STORAGE fields, etc. %INITATB Code to be inserted after the standard code used to initialize the screen fields' attributes for the maintenance (cont.) functions, perhaps to protect or darken some fields based on which function or operator. %NKLOC Code to REPLACE the entire browse functions NORMALIZE KEY routine. %NORMKEY Code to be inserted after the standard logic of the maintenance functions' NORMALIZE KEY routine, perhaps to add some more key editing. %BLNKSCR Code to be inserted after the standard logic for initializing the maintenance screen's variable fields to underscores, (cont.) perhaps to set default values into them. Used for ADD function and on NOT-FOUND condition for other (cont.) functions. %COMP Code to be inserted after the logic to move data to the maintenance screen for display, perhaps to compute some additional values to be dispalyed. %DELEDIT Code to verify that it is OK to allow the deletion of the Primary Data Class' data. Often used to call MAGECIO to read subordinate Data Class to see that there are no subordinate records on file. %EDIT Code to do custom editing of screen data to validate it before allowing ADD, CHG, or DUP functions to update the Primary Data Class' record. Procedural and data access (cont.) %EDIT2 Code for additional edits which will only be executed if ALL edits in %EDIT and ALL automatic MAGEC edits have been (cont.) passed already. Used to optimize efficiency of editing, by saving less efficient edits till all others have been (cont.) satisfied. %ADDINIT Code to initialize the Primary Data Class' element(s) before the standard moves to build a new record for an ADD function. %CALC Code to be inserted after the standard moves to build/rebuild the record data for ADD, CHG, and DUP functions. %SELECT Code to determine whether each record read is to be shown on the browse displays or bypassed or if END-OF-DATA is to be (cont.) simulated. Often used to bypass records on the file which are a different format (headers, details, and trailers, for (cont.) instance). %LOCMOV Code to be inserted after the moves to build the display line for the browses. Used to move additional data to the display or to alter what was moved (translate codes, expand abbreviations, etc.) %SKEYBLD Code to REPLACE entirely the routine which builds the expanded key value to be moved to SKEY when the operator cursor selects an item on a browse screen. %JOIN Code to read secondary Data Classes after each read of the Primary Data Class. Also used for calculations to build (cont.) non-file data to be dispalyed, or to inspect and to possibly modify the data just read. %SUBRTNL Obsolete (release 1.0 thru 1.3), same as %SUBRTNM. %SUBRTNM Code for miscellaneous subroutines which may be PERFORM'd from any other Insertion Point's coding. ## Alphabetical List of Insertion Points %ADDINIT Code to initialize the Primary Data Class' element(s) before the standard moves to build a new record for an ADD function. %ADDIT Code to override the logic to add a record to the Primary Data Class. %BLNKSCR Code to be inserted after the standard logic for initializing the maintenance screen's variable fields to underscores, (cont.) perhaps to set default values into them. Used for ADD function and on NOT-FOUND condition for other (cont.) functions. %CALC Code to be inserted after the standard moves to build/rebuild the record data for ADD, CHG, and DUP functions. %COMP Code to be inserted after the logic to move data to the maintenance screen for display, perhaps to compute some additional values to be dispalyed. %DATADEF MAGECINC's for secondary Data-Class's elements. Work areas to be saved or passed to another (FTH'd) function (MMP) or to the next transaction at this terminal. %DELEDIT Code to verify that it is OK to allow the deletion of the Primary Data Class' data. Often used to call MAGECIO to read subordinate Data Class to see that there are no subordinate records on file. Alphabetical List (cont.) %DELET Code to override the logic for deleting a record from the Primary Data Class. %EDIT Code to do custom editing of screen data to validate it before allowing ADD, CHG, or DUP functions to update the Primary Data Class' record. %EDIT2 Code for additional edits which will only be executed if ALL edits in %EDIT and ALL automatic MAGEC edits have been (cont.) passed already. Used to optimize efficiency of editing, by saving less efficient edits till all others have been (cont.) satisfied. %FUNCT Code to override the standard list of Function codes for this MMP. %GOODADD Code to override logic used when a good return code is sensed from %ADDIT logic, perhaps to update other Data Class(es). %GOODCHG Code to override logic used when a good return code is sensed from %UPDAT logic, perhaps to update other Data Class(es). %GOODDEL Code to override logic used when a good return code is sensed from %DELET logic, perhaps to update other Data Class(es). %INIT Code to be inserted into the initialization routine for maintenance functions, to initialize VARIABLE-STORAGE fields, etc. %INITATB Code to be inserted after the standard code used to initialize the screen fields' attributes for the maintenance (cont.) functions, perhaps to protect or darken some fields based on which function or operator. %JOIN Code to read secondary Data Classes after each read of the Primary Data Class. Also used for calculations to build (cont.) non-file data to be dispalyed, or to inspect and to possibly modify the data just read. %LITERAL WORKING-STORAGE constants with VALUE clause. %LOCINIT Code to be inserted into the initialization routine for the browse functions, to initialize packed fields in VARIABLE-STORAGE, to override default values. %LOCKY Code to override the logic used to start a browse (generically), possibly to force a certain starting key value, or to code the I/O access bypassing the MAGEC I/O module (Primary Data-Class). %LOCLITS Obsolete (release 1.0 thru 1.3), same as %Literal. %LOCMOV Code to be inserted after the moves to build the display line for the browses. Used to move additional data to the display or to alter what was moved (translate codes, expand abbreviations, etc.) %LOCVARS Obsolete (release 1.0 thru 1.3), same as %VARSTOR. %NKLOC Code to REPLACE the entire browse functions NORMALIZE KEY routine. %NORMKEY Code to be inserted after the standard logic of the maintenance functions' NORMALIZE KEY routine, perhaps to add some more key editing. %PFKEYL Code to be inserted at the very start of the mainline logic for browse functions. May be used to test for PF keys or to (cont.) alter the key value which the Operator entered, possibly to prefix a Client#, etc. %PFKEYM Code to be inserted near the beginning of the mainline logic for maintenance functions. May be used to test for PF keys (cont.) or to alter the key value which the Operator entered, possibly to prefix a Client#, etc. Alphabetical List (cont.) %PREINIT Code at the top of the Procedure Division before the Mask Initialization record has been read and before any data manipulation by the MMP. %RDUKY Code to override the logic for reading the Primary Data Class randomly (by key) with intent to update or delete the data. %REDKY Code to override the logic for reading the Primary Data Class randomly (by key). %REDLE Code to override the logic for reading the first record after starting a browse via the %LOCKY coding (Primary Data-Class). %REDNX Code to override the logic for reading the Primary Data-Class "sequentially". Inserted into BOTH the browse and maintenance mainline routines. %RELES Code to override the logic for dropping the "exclusive control" obtained via logic in the %RDUKY insertion point. %REMARKS Comments to be inserted into the REMARKS section of the Cobol MMP. %SELECT Code to determine whether each record read is to be shown on the browse displays or bypassed or if END-OF-DATA is to be (cont.) simulated. Often used to bypass records on the file which are a different format (headers, details, and trailers, for (cont.) instance). %SKEYBLD Code to REPLACE entirely the routine which builds the expanded key value to be moved to SKEY when the operator cursor selects an item on a browse screen. %SNDSCRN Code to be inserted just before the logical end of processing for all functions. It will be executed just before the MMP returns to MAGECCP to have the screen sent. %SUBRTNL Obsolete (release 1.0 thru 1.3), same as %SUBRTNM. %SUBRTNM Code for miscellaneous subroutines which may be PERFORM'd from any other Insertion Point's coding. %UPDAT Code to override the logic for updating a record of the Primary Data Class. %UPDERR Code to override the logic used when a bad return code is sensed for %UPDAT, %DELET, or %ADDIT logic. %USRAREA Used for user defined LINKAGE-SECTION areas. Possibly used for IMS PCB's or CICS TCTUA. Each of these items should begin with an "01" level entry. %VARSTOR Definitions of work fields to be used by the MMP. These will be inserted into the VARIABLE-STORAGE area of the TWA and (cont.) will be initialized to LOW-VALUES immediately upon entry of each transaction. Data in this area cannot be passed to (cont.) another MMP or transaction, it is not saved. # Appendix I -- Using SERRMSG & SCOMPL ## Using Top and Bottom Rows of the Screen The top row of every screen in MAGEC is defined in a standard way and contains the SFUNCT, SKEY, and SCOMPL screen (cont.) fields. The bottom three rows are always defined as one 240-byte field named SERRMSG. Although these areas of the (cont.) screen are used by MAGEC for specific purposes there are occasions when you may wish to display data or messages in (cont.) SCOMPL or SERRMSG. You may do so with the understanding that MAGEC will, under certain conditions, overlay what you (cont.) have placed there with error messages or other system messages. If you wish to display data in the last three rows of the screen you could define a work area in VARIABLE-STORAGE, move (cont.) the desired literals and data fields into the work area to build your display, and then move the entire work area to (cont.) the last three lines as: Next: https://magec.com/DOC/markdown/cstm13.md.txt