--- title: "app_main" original_file: "app_main" generated: "2026-08-17 11:14:16" --- ** 15 more ELEMENTS may be Selected  15 More Elements may be Selected  14 more ELEMENTS may be Selected   @VACATION/SICK/COMP DAYS> @Time:@XX:XX:XX>   @Emp#@999-99-9999>   @First Name@_______________>   @Last Name@_________________________>   @Hire Date@________>   @Earned Vacation@_________>   @Vacation Taken@_________>  @Sick Days Earned@_________>   @Sick Days Taken@_________>  @Comp Days Earned@_________>   @Comp Days Taken@_________> @Comment (3 lines)@__________________________________________________>   @__________________________________________________>   @__________________________________________________> MAGEC SCREEN PAINTER  (PFKEYS) --FIELD: 18=CHG 19=DEL 20=DUP 21=MOVE LAST GEN=93 08 05 --LINE: 4=DUP 5=ERASE 6=MOVE 13=DEL 14=INS LAST UPD=93 06 22 2494 BYTES MAX, nnnn USED, nnnn LEFT  PF24=POP-UP HELP ```** Figure 12 -- Your New Mask Displayed ## MSKDEF - Modifying an Attribute The pop-up window shows the screen field characteristics for the employee number variable field you have selected. The Cobol name for this field (in the mask copy book) is SEMPNUM. The symbolic 3270 attribute is UADRNF (unprotected, (cont.) alphanumeric, display, regular intensity, non-selector pen, MDT off). You can refer to Appendix B of this chapter for (cont.) more information about attributes, if you like. You can also see that the edit type (refer to Appendix C) is "#" (numeric with a "pattern edit") and that it has 9 (cont.) significant digits (left of decimal point), 0 decimal places and that it is an optional entry field (O) [as opposed to (cont.) required (R)]. The contents of the field in the screen image reveals the pattern used to format this data to the screen (cont.) (999-99-9999). The database field which is the source for this screen field (on displays) and the target for it (on updates) is (cont.) VAC01-EMPNUM. The position of this screen field is row 004, column 020 and it is 11 characters long on the screen. This (cont.) field will appear on the browse screens (VACLOC, VACSCN, and VACFND) as the first data item (left to right) because of (cont.) the LOC:1 we see in the bottom right corner of the pop-up window. Now that we have reviewed the characteristics, let's proceed to make a simple modification. | ``` **     DO THIS: Move the cursor to the attribute specification (UADRNF) and change it to SADRNF (skip-protect, alphanumeric, display, non- selector pen, MDT off). Press ENTER.     ```** | ``` **     DO THIS: PF24 invokes a pop-up help screen which will list the 3270 color codes, attributes, and other useful information, the PF8 key pages forward through the pop-up help; to make the pop-up window disappear, press PF24 again. Try it, press PF24, then press PF24 again when you are done reading the help.     ```** Your change will be recorded. If you press any key other than the ENTER key your change will be aborted and the dictionary definition will remain unchanged. From the MSKDEF screen, PF10 invokes the MSKCREAT function, which produces both a Mask initialization record and a copybook defining the screen format for your MMP. | ``` **     DO THIS: Press PF10 to invoke MSKCREAT.     ```** | ``` **     DO THIS: PF12 is a universal return key from the MAGEC application developer functions, it returns to the TSKLST. Now, let's return to the TSKLST to see our status. Press PF12.     ```** The MAGEC application development screens all recognize PF12 as meaning that you want to return to the TSKLST screen. | ``` **  MSKDEF 600  --Press ENTER to Update Field-- @Date:@__________>  @VACATION/SICK/COMP DAYS> @Time:XX:XX:XX>   @Emp#@999-99-9999>   @First Name@_______________>   @Last Name@_________________________>   @Hire Date@________>   @Earned Vacation@_________>   @Vacation Taken@_________>  @Sick Days Earned@_________>   @Sick Days Taken@_________>  @Comp Days Earned@_________>   @Comp Days Taken@_________> @Comment (3 lines)@__________________________________________________>   @__________________________________________________>   @__________________________________________________> @ Press PF13 for Hardcopy Press PF16 to Copy Field to Buffer Press PF17 to Paste data from buffer Press PF2 for Field-Level Help Press PF3 to Escape to MSKDEF ```** *** Figure 13 -- Screen Field Selected for Change NOTE: ** If you are using MAGEC in a GUI environment, MAGEC will automatically generate a GUI panel for you the first time that (cont.) you display a new Mask. When you press PF10 to invoke the MSKCRE function (which creates a new Mask), it automatically (cont.) transfers to the MSKSEE function which displays the newly-generated Mask. In a GUI environment that will trigger MAGEC (cont.) to begin creating a GUI panel for that Mask. MAGEC cannot create a GUI panel unless it is running in a GUI environment. If you do your development in a text environment, rather than a GUI environment, MAGEC will not generate the GUI panel (cont.) for your Mask until the first time it is used in a GUI environment. That means that, unless you first execute your (cont.) application (or, at least, do MSKSEE for its Mask) in a GUI environment, your end user may be the one to trigger the (cont.) creation of the GUI panel. In that case, that end user will be asked various questions regarding the appearance of the (cont.) new panel. For that reason, if your application is intended to be executed in GUI mode, you should probably make it a (cont.) point to be the first GUI user of that screen so that you can make more informed choices regarding GUI (cont.) options. Your end users will still have the option of setting individual color preferences to control the way GUI panels appear to them.; but you will have controlled which icons are included on the toolbar, the background panel color, et cetera. [Read about the LAMP Stack version!](https://magec.com/images/MAGEC_RAD_PHP.pdf) # STEP 3 -- Customization ## Optional Customization MAGEC allows the Cobol-oriented developer to use his skills to the fullest. There is virtually no limit to how much (cont.) customization you may do, nor to what you may do in your customization. However, customization is not required. The (cont.) un-customized standard MMP which is generated is quite complete and ready to go. For this exercise we will bypass Step 3 (Customization) and go on to Step 4 (Generate & Compile). There is a series of tutorials involving various types of customization. If you proceed through this Tutorials* manual (cont.) to subsequent projects you will learn a great deal about customizing generated applications. ** NOTE: ** The process we have you follow in these tutorials is intended to show you the process you should follow when developing (cont.) you own applications. You should first enter specifications, just as you have done here, then generate the application (cont.) without customization. After doing preliminary testing on the un-customized application you should begin adding (cont.) customization, frequently re-generating and re-testing. This process is known as Self-Actualizing Prototyping since you (cont.) have rapidly produced a prototype application and then iteratively improve it until it becomes the final, (cont.) production-quality product. # STEP 4 --  Generate & Compile ## TSKLST After Auto-Paint The TSKLST screen now shows that you have accomplished quite a lot in so short a time. There are 29 screen fields defined, which includes the headings and literals (prompts) and the screen variable fields. (cont.) There were 11 variables corresponding to the 11 data items you selected in PAINT2, one of them OCCURS 3 (cont.) TIMES. The browse display will include 5 fields, the first five that you selected and in the order selected. The auto-paint (cont.) feature includes the selected fields in the browse (locate) display, until it runs out of room on the 80-column display (cont.) line used in the browses. You can override the selections made by auto-paint by simply updating the LOC: (cont.) characteristics for screen fields (using MSKDEF, as previously shown). All five of the fields to be included in the browse (locate) display have column headings specified for them. The (cont.) auto-paint feature used the PROMPT (from the data item definitions) as the locate headings. If a given data item had (cont.) not had a PROMPT specified it would have defaulted to the Cobol data name. All of ours had a PROMPT specified for this (cont.) sample project. You can also see that auto-paint has recorded some customization coding for your new application. This is the result of (cont.) the automatic logical join. There is a data definition (%DATADEF) and, on a following page of the TSKLST, a logical (cont.) join (%JOIN) recorded. The purpose for these particular pieces of customization code is to include a Cobol data (cont.) definition for the SIF01 element into the MMP and to include the logical join coding to read the SIF01 (cont.) element. You are now ready to move on to the next step in the development process, generate and compile. If you are using a mainframe computer: | ``` **     DO THIS: Press PF15 to exit MAGEC. Enter your online job submission system (ICCF, ISPF, VOLLIE, etc.). Submit the MMPCREAT job stream for Mask 600 (specified in the MMPCRE control card). Check that there were no errors from the MMPCRE step or from the Cobol compile and link edit steps.     ```** If you are using a PC: | ``` **     DO THIS: Press Shift-F5 to exit MAGEC. At the DOS prompt type in the command: MMPCREAT 600. Allow it to execute. Check your results.     ```** | ``` ** TSKLST 600 PF8 = Next Page --PF5 = Page 1   M A G E C  TASK LIST FOR MSK600 ...............T A S K......................... PAGE 1  .....STATUS...... I. DEFINE APPLICATION TO DICTIONARY 1.  DEFINE SCREEN HEADER DONE 2.  DEFINE MMP DONE II. VERIFY THAT FILES/DATABASE ARE DEFINED 1. DEFINE MASTER KEY & NORMALIZATION RULES DONE   2.  DEFINE SUBORDINATE KEY(S) NOT DONE III. DEFINE SCREENS 1.  PAINT SCREEN / DEFINE MASK DETAIL 29 DONE 2. SELECT FIELDS FOR LOCATE SCREEN 5 DONE 3. SPECIFY LOCATE HEADINGS 5 DONE 4. GENERATE MASK (EXECUTE MSKCREAT) DONE IV. CODE CUSTOMIZATION ALGORITHMS   A. DATA DIVISION   1. DATA DEFINITIONS %DATADEF 1 DONE 2. ADD/MODIFY FUNCTION CODES %FUNCT DEFAULT LOGIC USED 3. MODIFY (MODMAINT) FUNCTION CODES %FUNCTM DEFAULT LOGIC USED  Position the Cursor on an Item and Press ENTER to Select it, Press PF2 for   Item Description  -OR-  PF1 FOR HELP KEY = MASK NUMBER ```** Next: https://magec.com/DOC/markdown/app02.md.txt