--- title: "genmmp_main" original_file: "genmmp_main" generated: "2026-08-17 11:14:28" --- ** '. 88 TWA-MSK-PA3-HIT VALUE ','. 88 TWA-MSK-CLR-HIT VALUE '_'. 88 TWA-MSK-SEL-PEN VALUE '='. 88 TWA-MSK-TST-REQ VALUE '0'. 88 TWA-MSK-VZN-REQ VALUE 'V'. 88 TWA-MSK-ATT-REQ VALUE HIGH-VALUE. 88 TWA-MSK-DET-REQ VALUE LOW-VALUE. 88 TWA-MSK-HLP-RET VALUE 'R'. ```** The first 10 bytes of TWA-MSK-AREA are the Mask Header. It contains the Mask ID for the MAGEC 3270 Screen Management (cont.) Mask you are now using (an MMP may use multiple Masks) and data fields to communicate to and from MAGEC Screen (cont.) Management. TWA-MSK-ID and TWA-MSK-TEST-PROD are the Mask identity, never alter them. TWA-MSK-CUR-AD-IN contains the relative Cursor position when the Operator pressed the transmit key. It is a numeric (cont.) value starting at 0000 (Row 1, Column 1) and incrementing to 1919 (Row 24, Column 80). If the Cursor was at Row 2, (cont.) Column 1 then it would contain 0080. You may interrogate this field. TWA-MSK-CUR-AD-OT is a similar field which is used by the MMP to tell MAGEC where it wants the Cursor to be placed when (cont.) the message is sent back to the terminal. To set the Cursor to Row 1, Column 10 you would move 0009 to this field. To (cont.) set the Cursor onto a given screen field (named SFIELD) you would: MOVE SFIELD-POSN TO TWA-MSK-CUR-AD-OT TWA-MSK-WRT-CMD may be used to tell MAGEC to either Erase the screen and then send the message, or to just send the (cont.) message. It is automatically set to Erase-Write (E) whenever the MMP requests a new Mask # since the screen format will (cont.) change. It is automatically set to (F) after the first time that Mask was sent since the screen is already formatted (cont.) correctly. MAGEC will suppress transmitting the screen headings and literals (protected, unreferenced fields) when this (cont.) is not E in order to reduce transmission overhead. Regardless what the value of this field MAGEC will compress repeated (cont.) characters in the message. It is not likely that you will ever have to alter this code in your Customization but you (cont.) may. TWA-MSK-AID tells you which key the Operator hit. You will find much use for this, it enables you to use any PF key (cont.) available on your terminals; remember though, MAGEC intercepts the CLEAR, PF15, PF9, PA1, and PA2 keys and you will (cont.) never see them in your MMP's. | ``` ** 05 TWA-MSK-DETAIL PIC X(3460). *--------------------ADDED FOR PASSING MSG TO CLEAR SCREEN 05 TWA-MSK-DETAIL-R1 REDEFINES TWA-MSK-DETAIL. 07 TWA-MSK-DETAIL-MSG PIC X(40). 07 FILLER PIC X(2454). 05 TWA-MSK-DETAIL-R2 REDEFINES TWA-MSK-DETAIL-R1. 07 TWA-MSK-DETAIL-BYTE OCCURS 2494 TIMES PIC X. 05 TWA-MSK-DETAIL-R3 REDEFINES TWA-MSK-DETAIL-R2. 07 TWA-SERRMSG-AREA. 09 TWA-SERRMSG-SBA PIC X. 09 TWA-SERRMSG-POSN PIC S9(4) COMP. 09 TWA-SERRMSG-SF PIC X. 09 TWA-SERRMSG-ATTRIBUTE PIC X. 07 TWA-SERRMSG. 09 TWA-SERRMSG-MSG OCCURS 6 TIMES. 11 TWA-SERRMSG-NO PIC X(4). 11 TWA-SERRMSG-SHORT PIC X(36). 07 TWA-SFUNCT-AREA. 09 TWA-SFUNCT-SBA PIC X. 09 TWA-SFUNCT-POSN PIC 9(4) COMP. 09 TWA-SFUNCT-SF PIC X. 09 TWA-SFUNCT-ATTRIBUTE PIC X. 07 TWA-SFUNCT-DATA PIC X(6). 07 TWA-SKEY-AREA. 09 TWA-SKEY-SBA PIC X. 09 TWA-SKEY-POSN PIC S9(4) COMP. 09 TWA-SKEY-SF PIC X. 09 TWA-SKEY-ATTRIBUTE PIC X. 07 TWA-SKEY-DATA PIC X(31). 07 TWA-SCOMPL-AREA. 09 TWA-SCOMPL-SBA PIC X. 09 TWA-SCOMPL-POSN PIC S9(4) COMP. 09 TWA-SCOMPL-SF PIC X. 09 TWA-SCOMPL-ATTRIBUTE PIC X. 07 TWA-SCOMPL-DATA PIC X(40). 07 FILLER REDEFINES TWA-SCOMPL-DATA. 09 TWA-SCOMPL-ATTDET PIC X(03). 09 TWA-SCOMPL-FUNCT PIC X(06). 09 TWA-SCOMPL-KEY PIC X(31). 07 TWA-R3-FILLER PIC X(2143). 03 TWA-MSK-EDIT-WORDS PIC X(2400). ```** TWA-MSK-DETAIL contains the actual screen format Mask. It includes all the screen fields, Attribute codes, positions, (cont.) and 3270 Order codes. This area is redefined by the Mask Copybooks which are included into the MMP (cont.) below. TWA-MSK-EDIT-WORDS is the area in which the Automatic Editing codes are kept for the Mask currently being pocessed. It (cont.) also is redefined in the Mask Copybooks. It includes the numeric values for data entered by the Operator, if the fields (cont.) are either Numeric or Date Edit Types. It has an Error Flag for every field which is edited by the Automatic (cont.) Edit. | ``` ** 03 FILLER REDEFINES TWA-MSK-EDIT-WORDS. 05 FILLER PIC X(10). 05 TWA-MSK-REL-NO PIC X(7). 05 FILLER PIC X(8). *-* EDIT-SWS USE LOW ORDER PART OF SFUNCT EDIT WORD *-* SET IN ALAEDIT TESTED IN MAGECCP 05 TWA-TBL-EDIT-SW PIC X. 05 TWA-W-FIELD-EDIT PIC X. 05 TWA-MSK-VER PIC S9(9) COMP. *-* ABOVE VERSION FIELD SET BY MSKCREAT AND TESTED IN MMP 05 FILLER PIC X(1369). 03 FILLER REDEFINES TWA-MSK-EDIT-WORDS. 05 TWA-MSK-EW-BYTE OCCURS 1400 TIMES PIC X. 03 TWA-LINE-TYPE PIC X. 88 TWA-REMOTE-LINE VALUE 'R'. 88 TWA-LOCAL-LINE VALUE 'L'. 88 TWA-DIALUP-LINE VALUE 'D'. 03 TWA-BIG-INDICATOR PIC X. 88 TWA-IS-BIG VALUE '3'. 03 TWA-REG-SAVE-AREA PIC X(72). 03 TWA-IOMOD-WORK-AREA PIC X(280). ** DEFINITION OF TWA-IOMOD-WORK-AREA IS DEPENDENT ON TP MONITOR ** 03 TWA-PARM-LIST. 05 FILLER PIC X(8). 05 TWA-DB-AREA-A PIC X(4). 05 FILLER PIC X(4). 03 TWA-TP-REQUEST. 05 TWA-TP-OP PIC XXX. 05 TWA-TP-TRM PIC XXX. 05 TWA-MSK-T-OR-P PIC X. 03 TWA-PROGRAM PIC X(8). 03 TWA-SUB-MMP. 05 TWA-SUB-LIT PIC X(3). 05 TWA-SUB-MMP-NUM. 07 FILLER PIC X(3). 07 TWA-SUB-FIL PIC XX. 03 TWA-NONTP-REQUEST REDEFINES TWA-SUB-MMP. 05 TWA-NONTP-OP PIC X(3). 05 TWA-NONTP-MMP PIC X(5). ```** TWA-LINE-TYPE indicates the type of connection this terminal uses. You may interrogate this. You might want some extra (cont.) Custom security on Dial-Up terminals, etc. TWA-BIG-INDICATOR indicates whether this MMP uses a "small" or "large" (cont.) amount of the TWA space. Small means 8K or less, Large means more than 8K. MAGEC will save and restore either 8K or 12K (cont.) of the TWA depending on how much is needed. This field is set by the MMP in the standard exit logic which is generated (cont.) into it. You may interrogate it (if you can think of a reason to). TWA-REG-SAVE-AREA and TWA-IOMOD-WORK-AREA are used by MAGEC and should be left alone by you. Same is true for (cont.) TWA-PARM-LIST except that the field TWA-DB-AREA-A is used by you to tell MAGECIO where to Read into or Write from. You (cont.) use the MAGECSET subroutine to do that. Refer to the MAGEC "Database Administration" chapter. TWA-TP-REQUEST is used by the MMP to call for a Mask to be initialized by MAGECIO. MAGECIO reads the Mask (cont.) Initialization record from the MSK file when the "MSK" command is set here. The Mask record is read into the (cont.) TWA-MSK-AREA above. TWA-PROGRAM is used to indicate the program name currently being executed, (cont.) "MMPnnn". TWA-SUB-MMP is used to indicate the program name for "subroutine" calls to the Monitor (CICS, WESTI, etc.). The most (cont.) common such subroutine call is for the I/O module, done in AA840-CALL-MAGEC-IO thru AA899-EXIT. TWA-NONTP-REQUEST redefines TWA-SUB-MMP, it is used for passing a command to the MAGEC Control Program, such as the (cont.) FTH-FUNCT command to tell MAGEC to "fetch" another Function when this MMP exits instead of just sending the message to (cont.) the terminal and terminating the task. In a WESTI environment the "RELEASE" command may be set here to tell MAGEC to (cont.) release all resources upon terminating this task, MAGEC will do a "SignOff Leave" after sending the message. The (cont.) "TRANSFER" command allows you to transfer to a non-MAGEC Program or TranID. | ``` ** 03 TWA-LAST-FUNCT. 05 TWA-LAST-FUNCT-PREFIX PIC X(3). 05 TWA-LAST-FUNCT-OPERATION PIC X(3). 88 FUNCT-WAS-SEE VALUE 'SEE'. 88 FUNCT-WAS-LOC VALUE 'LOC'. 88 FUNCT-WAS-CHG VALUE 'CHG'. 88 FUNCT-WAS-DEL VALUE 'DEL'. 88 FUNCT-WAS-NXT VALUE 'NXT'. 88 FUNCT-WAS-DUP VALUE 'DUP'. 03 TWA-LAST-KEY PIC X(31). 03 TWA-DB-REQ-SAV PIC X(76). 03 TWA-ELT00. 05 TWA-ELT00-PREFIX PIC X(3). 05 TWA-ELT00-SUFFIX PIC XX. 05 TWA-ELT00-SECURITY PIC X. ```** The TWA-LAST-FUNCT area is where the MMP saves the Function Code that it is sending to the terminal just before it (cont.) exits to send the message. On entry it compares this to the Function Code sent back from the terminal to see if the (cont.) Operator has changed it. In TWA-LAST-KEY it saves the SKEY (key value) field before exiting. It also compares this to (cont.) the key value returned from the Operator to see if it was changed. TWA-DB-REQ-SAV is an area where the MMP saves the MAGECIO Request Area. TWA-ELT00 is where MAGECIO places the Element (cont.) Name (xxx00) of the Audit Stamp Element if your request was for access to a Data Class with Audit Stamping (cont.) specified. | ``` ** 03 TWA-ELT-LIST. 05 TWA-ELT OCCURS 16 TIMES. 07 TWA-ELT-NAME PIC X(5). 07 TWA-ELT-SECURITY PIC X. 03 TWA-ERR-CODES. 05 TWA-ERR OCCURS 7 TIMES PIC X(3). 05 ERROR-FLAGS. 07 FATAL-ERR PIC X. 88 ERROR-FOUND VALUE 'F'. 03 TWA-KEY-VALUE PIC X(256). 03 FILLER REDEFINES TWA-KEY-VALUE. 05 TWA-REL-RECNO PIC S9(8) COMP. 05 FILLER PIC X(252). 03 TWA-DB-REQUEST. 05 TWA-DB-CMD. 07 TWA-DB-CMD-PREFIX PIC X(3). 88 RDU-CMD VALUE 'RDU'. 88 RED-CMD VALUE 'RED'. 07 TWA-DB-CMD-SUFFIX PIC X(2). 05 TWA-DB-FILE-NAME PIC X(3). 05 TWA-DB-KEY-NAME PIC X(5). 05 TWA-DB-RETURN-CODE PIC X(2). 88 REC-FOUND VALUE ' '. Next: https://magec.com/DOC/markdown/genmmp02.md.txt