MMP#: 600 Function Code Prefix: Use Model: MODELMMP Verify Opt: no ______ 'VERIFY' or 'NO' Extd. Color system fields: n Y OR N Color protected fields: _ (no color) Color unprotected fields: _ (no color) P R I M A R Y D A T A DCL: vac ELTs: ..1.. ..2.. ..3.. ..4.. ..5.. ..6.. ..7.. ..8.. ..9.. vac01 ____ ____ ____ ____ ____ ____ ____ ____ Press PF6 to select a Data Class and Elements Programmer: YOUR NAME Last Generated: Last Updated: AFTER SHDADD - MMPADD SCREEN WILL BE NEXT ** ``` * **Note:** If you did not know the Data Class or Element names you could press PF6 for a pop-up pick list to choose from. Figure 01 — Screen Header Definition ## MMPADD Here you will define the new MMP you are going to create. You specify which mask it is to use, your name as the responsible programmer, and a description to be stored in the MAGEC Dictionary. **Note:** This screen will be presented with all the necessary screen fields already filled in using default values (cont.) taken from the Screen Header definition you have just completed. If these values are fine to you, all you need to do is (cont.) press ENTER. Otherwise, if you wished to, you could overkey any of the specifications on the screen to modify (cont.) them. **Do this:** Press ENTER. (the default values are fine) If you made an error in either of these screens which the MAGEC software could not detect, such as misspelling your (cont.) name, then you could return at any time to see or update these definitions just as you can for any other specifications (cont.) in MAGEC. You would use: | SHDCHG 600 | for the Screen Header | MMPCHG 600 | for the MMP Header When you have correctly completed this screen you will have defined your new MMP to the MAGEC Dictionary. If you made any errors you will have to correct them in order to continue. **MMP#** will be filled in by MAGEC. **MMP Description** is a 30-character description for identification in dictionary lists, etc. **Mask Number** is the number of the mask which this program will use. You are not actually limited to one mask per program, if you access more than one then this would be the main one (first one). **Programmer** is the name of the person responsible. **Date Generated **and **Time Generated **on both the MMP and the SHD definition screens are posted to by MAGEC (cont.) automatically when you generate and compile your application. You can always refer to these screens to determine when (cont.) the application was last generated/compiled. You can compare that to the date it was last modified from a dictionary (cont.) index report. These dates are also used in the automatic version verification online function built into (cont.) MAGEC. **Abend Handler**** (CICS ONLY) ** is the 8-character name (7-character for VSE) of a program which you wish to handle (cont.) program abends. If you leave this blank then CICS will issue the ordinary ASRA, or other, abend code and will abort (cont.) your task when a data exception or other program error occurs. If you specify a name (non-blanks) here, then CICS will (cont.) pass control to the program having that name (which must be on the library and specified in the PPT), it is your (cont.) responsibility to ensure that the abend handler program properly terminates your task, etc. **PF6 ** will pop up a small window which allows you to select which of the standard nine functions you wish to have (cont.) included in this MMP when it is generated. For this project we will accept the default (all nine functions). In other (cont.) applications you may wish to suppress some functions to optimize program sizes, or for security (cont.) reasons. After you correctly fill in this screen and press ENTER, you will see the TSKLST screen showing your current status. ``` MMPADD 600 Press ENTER to add information as shown ** M A G E C Repository MMP Definition Screen MMP# 600 MMP Description: VACATION/SICK/COMP DAYS______ The MMP can be generated to Mask Number: 600 include some, or all, of the nine standard functions. Abend Handler: ________ (CICS ONLY) Press PF6 to review or modify Programmer: YOUR.NAME______ the list of functions to be in- cluded in this MMP. Date Generated: Time Generated: The information above was copied from the SHD Record just added ``` Figure 02 — MMP Header Definition Screen # STEP 2 -- Paint Screen ## TSKLST The TSKLST screen shows what tasks can be done and which of them have been done at any given time. If your development (cont.) is interrupted (by lunchtime perhaps) you can always see just where you left off and resume development from that (cont.) point. The statuses are determined by the TSKLST by interrogating the actual dictionary data to see what has been (cont.) recorded. The TSKLST is never out of date and needs no maintenance to remain current. Notice the first two tasks are DONE. These were what you just completed on the prior two screens. The second group of tasks (verifying the database definitions) is there for you to review the definitions which the (cont.) database administrator recorded to define your primary data class (VAC). Notice that the first task (master key) is (cont.) DONE. This means that the master (primary) key for that file has been defined. Notice that the second task (subordinate (cont.) keys) is NOT DONE. That is because there are no other keys (alternate indexes) for this file. MAGEC fully supports up (cont.) to nine keys per file automatically (and more with minor customization). Since you have completed defining your new application to the MAGEC Dictionary it is time to proceed with the second step in the development process, Paint the Screen. Do this:** Use the arrow keys (up, down, left, right) to position the cursor down to the paint screen task (III. 1.), anywhere on the line will do, and press the ENTER key. The TSKLST will transfer you to the "mask definition" screen (MSKDEF). **Note:** If the tutorial project has been previously done by someone else, you may see a status of DONE shown for item (cont.) III.4 (GENERATE MASK) on your TSKLST screen. This simply indicates that there is still a Mask initialization record on (cont.) the dictionary for Mask 600. Do not be concerned. You will be overlaying that Mask record with your new one shortly. (cont.) This situation is not an "error" even though it causes the TSKLST screen to appear slightly different from the one (cont.) shown in this tutorial. ``` TSKLST 600 PF8 = Next Page-- PF5 Key = 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 NOT DONE 2. SELECT FIELDS FOR LOCATE SCREEN NOT DONE 3. SPECIFY LOCATE HEADINGS NOT DONE 4. GENERATE MASK (EXECUTE MSKCREAT) NOT DONE IV. CODE CUSTOMIZATION ALGORITHMS A. DATA DIVISION 1. DATA DEFINITIONS %DATADEF DEFAULT LOGOC USED 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 ``` Figure 03 — Task List Screen ## MSKDEF The MSKDEF screen can be used to "manually" paint your mask (the PF3 option) by drawing right onto the screen, or you (cont.) can use the MAGEC Automated development features (the PF7 or PF8 options) to let MAGEC do the work for (cont.) you. If you manually paint your mask, you have total flexibility as to the appearance and format. If you use the automated (cont.) development features then you must select from one of the format options which MAGEC can automatically generate. (cont.) However, you can "have your cake and eat it too." If you use the automated development features, MAGEC generates exactly the same dictionary definitions for the (cont.) generated screen fields as you would if you manually painted the same screen. You can then use the MSKDEF manual screen (cont.) painter to modify or add to what the automated feature created. You can also delete all of it in one command and tell (cont.) the auto-paint feature to regenerate in a different format. Regardless of which way you choose, you still have complete control over field attributes, extended color and highlighting attributes, database-to-screen field mapping, and data formatting. There are two levels of automated development. The semi-automated* process (PF7 option) is interactive with the dictionary and generates all specifications with the (cont.) exception of the logic to join (read) secondary files. The logic to read, update, browse, add to, and delete from the (cont.) primary file (Vacation) will be automatically generated; only the logic to read additional files needs to be provided (cont.) by you. Even in the semi-automated process, MAGEC generates most of that logic, leaving only a few lines of code for (cont.) you to provide. In the *fully-automated* process (PF8 option) MAGEC is able to generate all the code to join up-to fifteen (15) (cont.) secondary files to your primary file. This process is driven by "Domain" definitions in the dictionary. You will learn (cont.) more about Domains in the "Data Definition" tutorial. Using this process you are presented a list of candidate Data (cont.) Classes (files) to which you can join; you select them by pointing with the cursor and pressing (cont.) ENTER. Do this:** Press PF8 to select the fully automated processes. ``` MSKDEF 600 ** M A G E C Development Process Selection Press PF7 - for the semi-automated development process which allows you to provide Cobol code to construct the key(s) to use to join additional Data Classes to the primary Data Class. Press PF8 - for the fully-automated development process which generates the join logic completely based upon your selections and using the Domain definitions for Data Items. Press PF3 - to return to the manual screen painter which provides complete flexibility to manually draw a screen, define attributes, and code join logic. Choose the level of automated development you desire. The fully-automated process is preferred. The semi-automated process is necessary only if your data has not been defined using MAGEC's Domain facility. ``` Figure 04 — Process Selection Screen The first screen in the *fully-automated* development process is the "side-by-side" Element Selection Screen. On the (cont.) left half of the screen you will be displayed the list of Elements specified on the Screen Header as Elements from the (cont.) primary Data Class to be accessed by this application. The right side of the screen will list joined Elements. To start (cont.) with, there are not any joined Elements. If you wish to join Elements, you can press PF5. Do this:** Press PF5 to select Elements to be joined to the primary data. ``` JOIN01 600 **Date: 04/06/1990 M A G E C Time: 13:09:10 Automatic Join Facility - Elements Selection List Application: 600 - VACATION SICK/COMP DAYS Elements for Primary Data Class : Additional Elements Selected: VAC - MAGEC Vacation Demo File 1 1 VAC01 MAGEC Vacation Demo Record 2 2 3 3 4 4 5 5 6 7 8 9 10 11 12 13 14 15 Press PF5 for JOIN Candidates ==> 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 Next: https://magec.com/DOC/markdown/app03.md.txt