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 (cont.)
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.)
next: app04.md.txt