07 SEARN09S. 09 FILLER PIC X(0001). 09 SEARN09-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SEARN09A PIC X(0001). 07 SEARN09. 09 SEARN09-ED PIC ZZ,ZZZ.99-. 05 SEARNEDG. 07 SEARNEDS. 09 FILLER PIC X(0001). 09 SEARNED-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SEARNEDA PIC X(0001). 7 SEARNED. 09 SEARNED-ED PIC ZZ,ZZZ.99-. 05 SEMPNUMG. 07 SEMPNUMS. 09 FILLER PIC X(0001). 09 SEMPNUM-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SEMPNUMA PIC X(0001). 07 SEMPNUM PIC X(0011). 05 SFIRSTG. 07 SFIRSTS. 09 FILLER PIC X(0001). 09 SFIRST-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SFIRSTA PIC X(0001). 07 SFIRST PIC X(0015). 05 SLAST-NG. 07 SLAST-NS. 09 FILLER PIC X(0001). 09 SLAST-N-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SLAST-NA PIC X(0001). 07 SLAST-N PIC X(0025). 05 STAKE08G. 07 STAKE08S. 09 FILLER PIC X(0001). 09 STAKE08-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 STAKE08A PIC X(0001). 07 STAKE08. 09 STAKE08-ED PIC ZZ,ZZZ.99-. 05 STAKE10G. 07 STAKE10S. 09 FILLER PIC X(0001). 09 STAKE10-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 STAKE10A PIC X(0001). 07 STAKE10 09 STAKE10-ED PIC ZZ,ZZZ.99-. 05 STAKENG. 07 STAKENS. 09 FILLER PIC X(0001). 09 STAKEN-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 STAKENA PIC X(0001). 07 STAKEN. 09 STAKEN-ED PIC ZZ,ZZZ.99-. 05 SYSDATEG. 07 SYSDATES. 09 FILLER PIC X(0001). 09 SYSDATE-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SYSDATEA PIC X(0001). 07 SYSDATE. 09 SYSDATE-MM PIC X(0002). 09 SYSDATE-SLASH-1 PIC X(0001). 09 SYSDATE-DD PIC X(0002). 09 SYSDATE-SLASH-2 PIC X(0001). 09 SYSDATE-CC PIC X(0002). 09 SYSDATE-YY PIC X(0002). 05 SYSTIMEG. 07 SYSTIMES. 09 FILLER PIC X(0001). 09 SYSTIME-POSN PIC S9999 COMP. 09 FILLER PIC X(0001). 07 SYSTIMEA PIC X(0001). 07 SYSTIME PIC X(0008). 05 SCREEN-CONSTANTS PIC X(0318). ``` The preceeding was the first half of the Copybook of the Mask that the Developer painted using the automatic Screen (cont.) Painter and MSKDEF. Notice the Cobol edit patterns and Date-field definitions generated. Notice the fields generated (cont.) with the screen field data name plus a suffix of -POSN, these contain the screen position of the field. If you wanted (cont.) the Cursor to be placed on the field named SEARNED you would code: MOVE SEARNED-POSN TO TWA-MSK-CUR-AD-OT Notice the fields generated with the suffix A. These are the 3270 Attribute bytes. If you wanted to change the Attribute of SEARNED to be Protected (etc.) you would code: MOVE ATPADRNF TO SEARNEDA To move data into the screen field SEARNED you might code: MOVE 123.3 TO SEARNED-ED or, MOVE ALL '*' TO SEARNED The following code is the second half of the Mask Copybook. It redefines TWA-MSK-EDIT-WORDS. ``` 02 MSK600-PARMS REDEFINES TWA-STRT. 03 FILLER PIC X(2686). 03 FILLER PIC XX. 03 FILLER. 05 SPARM001. 07 FILLER PIC X(0005). 07 SERRMSGE PIC X(0001). 07 FILLER PIC X(0003). 07 FILLER PIC X(0006). 05 SPARM002. 07 FILLER PIC X(0005). 07 SFUNCTE PIC X(0001). 07 FILLER PIC X(0004). 07 MSK-VERSION-NO PIC S9(9) COMP. 88 MSK-IS-CURRENT-VERSION VALUE +090622001. 07 FILLER PIC X(0001). 05 SPARM003. 07 FILLER PIC X(0005). 07 SKEYE PIC X(0001). 07 FILLER PIC X(0003). 07 FILLER PIC X(0006). 05 SPARM004. 07 FILLER PIC X(0005). 07 SCOMPLE PIC X(0001). 07 FILLER PIC X(0003). 07 FILLER PIC X(0006). 05 SPARM005 OCCURS 3 TIMES INDEXED BY SCOMMENE-INDEX. 07 FILLER PIC X(0005). 07 SCOMMENE PIC X(0001). 05 SPARM008. 07 FILLER PIC X(0005). 07 SDATE-HE PIC X(0001). 07 FILLER PIC X(0003). 07 SDATE-H-DAY-OF-WEEK PIC S9 COMP-3. 07 SDATE-H-JULIAN-DATE PIC S9(9) COMP-3. 05 SPARM009. 07 FILLER PIC X(0005). 07 SEARN07E PIC X(0001). 07 FILLER PIC X(0003). 07 SEARN07-N PIC S9(9)V9(2) COMP-3. 05 SPARM010. 07 FILLER PIC X(0005). 07 SEARN09E PIC X(0001). 07 FILLER PIC X(0003). 07 SEARN09-N PIC S9(9)V9(2) COMP-3. 05 SPARM011. 07 FILLER PIC X(0005). 07 SEARNEDE PIC X(0001). 07 FILLER PIC X(0003). 07 SEARNED-N PIC S9(9)V9(2) COMP-3. 05 SPARM012. 07 FILLER PIC X(0005). 07 SEMPNUME PIC X(0001). 07 FILLER PIC X(0003). 07 SEMPNUM-N PIC S9(11) COMP-3. 05 SPARM013. 07 FILLER PIC X(0005). 07 SFIRSTE PIC X(0001). 05 SPARM014. 07 FILLER PIC X(0005). 07 SLAST-NE PIC X(0001). 05 SPARM015. 07 FILLER PIC X(0005). 07 STAKE08E PIC X(0001). 07 FILLER PIC X(0003). 07 STAKE08-N PIC S9(9)V9(2) COMP-3. 05 SPARM016. 07 FILLER PIC X(0005). 07 STAKE10E PIC X(0001). 07 FILLER PIC X(0003). 07 STAKE10-N PIC S9(9)V9(2) COMP-3. 05 SPARM017. 07 FILLER PIC X(0005). 07 STAKENE PIC X(0001). 07 FILLER PIC X(0003). 07 STAKEN-N PIC S9(9)V9(2) COMP-3. 05 SPARM018. 07 FILLER PIC X(0005). 07 SYSDATEE PIC X(0001). 07 FILLER PIC X(0003). 07 SYSDATE-DAY-OF-WEEK PIC S9 COMP-3. 07 SYSDATE-JULIAN-DATE PIC S9(9) COMP-3. 05 SPARM019. 07 FILLER PIC X(0005). 07 SYSTIMEE PIC X(0001). ``` This (preceding) part of the MSK600 Copy Book redefines the TWA-MSK-EDIT-WORDS area of the TWA. Notice that the fields (cont.) having data names like those of the screen fields but with a suffix of E added are the Error Indicators for the (cont.) respective screen fields. When the Automatic Editing detects an error in a screen field it sets the Error Indicator for (cont.) that field to "E". You should do the same in your Customization Editing. MAGEC will automatically Highlight the (cont.) Attributes for the fields having an E in their Error Indicators and will position the Cursor to the first Error field (cont.) on the screen. Notice also the fields named with a -N suffix. These will have the numeric value of the data entered on the screen (if (cont.) it was a numeric Edit Type field) set by the Automatic Editing. It is what we use to update the database fields with (cont.) since you could not very well move the display format data to the record. Notice also the special JULIAN-DATE and (cont.) DAY-OF-WEEK fields generated for all dates. These also are set by Automatic Editing before the MMP is entered. The (cont.) DAY-OF-WEEK codes are 1 = Sunday, 2 = Monday, etc., 7 = Saturday. ``` * * * DEFAULT ALGORITHM %USRAREA STARTS HERE *01 user-work-area PIC X(4096). * * * DEFAULT ALGORITHM %USRAREA ENDS HERE Next: https://magec.com/DOC/markdown/genmmp10.md.txt