--- title: "cstm_main" original_file: "cstm_main" generated: "2026-08-17 11:14:17" --- ** * ** @VACATION/SICK/COMP DAYS> @Time:@XX:XX:XX> @Emp#@999-99-9999> @First Name@---------------> @Last Name@------------------------> @Hire Date@--------> @Earned Vacation@----------> @Vacation Taken@----------> @Due|-------------> @Sick Days Earned@----------> @Sick Days Taken@----------> @Due|-------------> @Comp Days Earned@----------> @Comp Days Taken@----------> @Due|-------------> @Comments (3 lines)@----------------------------------------------> @----------------------------------------------> @----------------------------------------------> @Total Days Due|-------------> 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 15=INS LAST UPD=93 06 22 2494 BYTES MAX, 1151 USED, 1343 LEFT PF24=POP-UP HELP ```** ** Figure 15 -- Modified Field Characteristics ## Modify Remaining 3 Fields' Characteristics Notice that you specified a Cobol screen field name of: SVACDUE and the SOURCE/TARGET field is VACATION-DUE. If you had (cont.) not given any screen field name then MAGEC would generate a unique name for that field using the ROW and COLumn numbers (cont.) (for example: S10-037). If you do not intend to see the Cobol compiler listing then you may not mind the "ugly" (cont.) generated name. If you expect to sometimes look at the listing then you will likely prefer to give your own symbolic (cont.) names to screen fields. In this exercise we will always give our own names to the variable fields. The screen constants (cont.) need no names since the MMP never will reference them. For consistency we will use the following names: "screen field      "source/target SVACDUE VACATION-DUE     SSICDUE SICK-DUE     SCMPDUE COMP-DUE     STOTDUE TOTAL-DUE     Notice that the Attribute position for the screen variable you just modified now appears as @. The cursor is positioned (cont.) at the next new variable to prompt you to select it and update its characteristics. | ```      DO THIS: Select and update the other three screen variables using the appropriate screen field names and source/target names. The attributes for each are the same as for the field SVACDUE. Press PF18 for the next field, update it and, repeat for remaining two variables.     ```** ** ** ** ** ** NOTE: ** In order to acquaint you with some of the details about updating the screen field characteristics we had you do this (cont.) the "hard way". Instead of just drawing: and then having to modify so many field characteristics you could have used a (cont.) Cobol-like edit pattern, such as: Z,ZZZ,ZZZ.99- and MAGEC would have interpreted it and set the Edit-type, Significant (cont.) Digits, and Decimal Places correctly for you. You would still need to specify the Source/Target and the screen field (cont.) name (optional). You could also have saved even more work by drawing and entering specifications for only the first variable field (cont.) (SVACDUE), then using the field duplicate key (PF20) to copy it 3 times, making the appropriate changes to the (cont.) specifications as you do the duplication. | ``` ** MSKDEF 600 ++ FIELD DATA CHANGED ++ Date:@ > @VACATION/SICK/COMP DAYS> @Time:@XX:XX:XX> @Emp#@999-99-9999> @First Name@---------------> @Last Name@------------------------> @Hire Date@--------> @Earned Vacation@----------> @Vacation Taken@----------> @Due@ > @Sick Days Earned@----------> @Sick Days Taken@----------> @Due|-------------> @Comp Days Earned@----------> @Comp Days Taken@----------> @Due|-------------> @Comments (3 lines)@----------------------------------------------> @----------------------------------------------> @----------------------------------------------> @Total Days Due|-------------> 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 15=INS LAST UPD=93 06 22 2494 BYTES MAX, 1151 USED, 1343 LEFT PF24=POP-UP HELP ```** Figure 16 -- First New Variable No Longer Virgin ## Regenerate & Compile You have now completed all the Customization for this project. All that remains is to regenerate Mask 600, and regenerate and compile MMP600. | ``` **     DO THIS: Press PF10 to invoke the online MSKCRE function.     ```** | ``` **     DO THIS: Press PF15 to exit MAGEC. Submit the MMPCREAT job and check that it ran without errors and that your MMP link-edited successfully.     ```** | ``` **     DO THIS: If you are using a mainframe computer, issue the appropriate New Copy command for your environment.     ```** | ``` **     DO THIS: Use the TS01 TransID to get back into MAGEC, so you can test your newly Customized application.     ```** | ``` **     DO THIS: Enter: VACSEE 01 . . . and commence testing the new program.     ```** ** ** ** ** ** NOTE: ** The changes you have made so far affected only the Inquiry/Maintenance functions (SEE, CHG, etc.). The Browse screens (cont.) (LOC, SCN, FND) should still appear and work exactly as they did before. In the next project we will alter the (cont.) Browses. The data displayed on your new screen comes from the VAC Data Class, the SIF Data Class, and from the new work fields you have defined. | ``` ** VACSEE 01 Date: 08/15/1988 VACATION/SICK/COMP DAYS Time: 01:15:03 Emp# 000-00-0001 First Name Harry Last Name Houdini Hire Date 12/31/87 Earned Vacation 14.50 Vacation Taken 2.25 Due 12.25 Sick Days Earned 124.50 Sick Days Taken 3.00 Due 121.50 Comp Days Earned 2.00 Comp Days Taken .00 Due 2.00 Comments (3 lines) Heavily into Escape literature. Likes to be submerged while handcuffed and strait-jacketed in a coffin-like vault Total Days Due 135.75 Press PF4 for browse (LOC) screen Press PF13 for Hardcopy Press PF16 to Copy field to buffer Press PF17 to Paste data from buffer Press PF2 for field-level HELP ```** Figure 17 -- Calculated Fields on Inquiry Screen ## Project 1 is Done You have just completed a non-trivial project to Customize an existing application. By now you should start feeling (cont.) much more comfortable with MAGEC. You are beginning to see how you can produce any online application, regardless of (cont.) how complex it is, using the standard development processes of MAGEC. You should also begin to realize just how quickly (cont.) you can accomplish both new development and maintenance projects. The speed and ease-of-use are very important when you are doing projects in a prototyping mode. In this first Customization project we used the TSKLST heavily to guide our every step. That is appropriate when you (cont.) are first introduced to MAGEC. As you become more proficient you will use the TSKLST more sparingly since you can go (cont.) directly to almost any screen in the system by entering the proper commands on the top line of your (cont.) screen. In the following projects you will follow a similar tutorial to do more advanced Customization projects. We will have (cont.) you, more and more, using direct commands instead of the TSKLST to get to the desired online functions. Each project (cont.) must be done in order since they are designed to build upon one another to produce a rather powerful Vacation (cont.) system. # Sample Project 2 ## Altering Browse Display For the second project, we will make a modification to the Browse screens for our Vacation system. The Browse screens can be seen by entering the VACLOC, VACSCN, or VACFND functions. At this point the Browse display is showing five Data Items: Employee # First Name Last Name Hire Date Earned Vacation These were the five Items which were chosen by the Automatic Screen Painting facility. They were the first items you selected for the Mask. Now that you have (in Sample Project 1) added a few new items to the Mask, it might be possible to improve upon the (cont.) usability of the Browses by replacing the Earned Vacation display with a display of the Total Days Due (the grand total (cont.) figure you calculated). In the original application development (see MAGEC "Application Developer" Tutorial) and in Project 1 in this manual, (cont.) you used the TSKLST extensively as a Developer's Menu to guide you through the processes. In this one, you will bypass (cont.) TSKLST and key the appropriate commands directly into the top line of your screen, to get to any desired function (cont.) immediately. This will demonstrate how MAGEC provides ease-of-use for both new users and the seasoned veterans (you are (cont.) gradually becoming the latter). ## Browse Display Before Project 2 Before you begin altering the Browse Display you should take one last look at it as it is. | ``` **     DO THIS: Next: https://magec.com/DOC/markdown/cstm02.md.txt