virtual database fields to it.
The result is a "Logical Record" made up of data from the VAC and SIF Data Classes (two files) and some work fields. (cont.)
The MMP will use the Logical Record as if it were one large record read from one file. You could easily have joined (cont.)
many more Elements of data from other Data Classes which might even use other access methods. Your MMP's are very (cont.)
highly isolated from the physical attributes of your database.
| ```
**
MSKDEF 600 Press PF10 to MSKCREAT
Date:@ > @VACATION/SICK/COMP DAYS> @Time:@XX:XX:XX>
@Emp#@999-99-9999>
@First Name@--------------->
@Last Name@------------------------>
@Hire Date@-------->
@Earned Vacation@---------->
@Vacation Taken@----------> < Due< 9999999999999>
@Sick Days Earned@---------->
@Sick Days Taken@----------> < Due< 9999999999999>
@Comp Days Earned@---------->
@Comp Days Taken@----------> < Due< 9999999999999>
@Comments (3 lines)@---------------------------------------------->
@---------------------------------------------->
@---------------------------------------------->
< Total Days Due< 9999999999999>
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, 1016 USED, 1478 LEFT PF24=POP-UP HELP
```**
Figure 12 -- Drawing New Screen Fields
**
NOTE:
**
If your browser is displaying a space after each less-than symbol above, ignore it--there is no space!
##
MSKDEF Recognizes Your New Fields
Notice that MSKDEF recognized the newly drawn fields and added the definitions for them to the Dictionary. It also re-drew the Mask to show you how it now looks.
The "Attribute positions" for the new fields have been altered from the < symbol which you keyed to either the
d was a constant then the iel
le then the | symbol appears. The | symbol indicates that this is a "virgin variable", one which has been added but whose field characteristics have not yet been updated.
The default field characteristics which MAGEC sets for screen constants are almost always 100% correct and need no modification. You can, of course, modify them if you like.
The default characteristics MAGEC sets for new screen variables often need to be reviewed and modified or added to by (cont.)
you. That is why the virgin variables are brought to your attention by the | symbol and the cursor "homes" to them. (cont.)
Notice the cursor position.
The "homing" cursor makes it easy for you to select the new variables to change their characteristics.
| ```
** DO THIS:
With cursor on first new variable, press PF18.
```**
You have selected the first variable for change.
| ```
**
MSKDEF 600 Press PF10 to MSKCREAT
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 13 -- Virgin Variables Displayed
##
Updating Field Characteristics
The pop-up windoiw now shows the field characteristics for the selected field. You can overkey any of them to change them. You can even change the ROW and COLumn to move the screen field.
| ```
** DO THIS:
Notice the pop-up window -- turn to next page in this book.
```**
| ```
**
MSKDEF 600 -- HIT ENTER TO CHANGE --
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 14 -- Selected Field's Default Characteristics
You will now change the specifications for the first variable to:
1) Give it a Cobol name: SVACDUE
2) Alter its Attribute to Skip-protected: SADRNF
3) Alter its Edit-Type to: "
" (minus-sign)
4) Define its dimensions: PIC S9(7)V9(2)
5) Define it as an "optional" field.
6) Specify its Source/Target: VACATION-DUE
| ```
** DO THIS:
Key the specifications as shown, press ENTER.
```**
**
NOTE:
**
If you are using MAGEC in a GUI (Graphical User Interface) environment, the pop-up windows can be dragged (using the (cont.)
mouse) to anywhere on the screen. In a character (text) environment, the pop-up window appears in a fixed position and (cont.)
cannot be moved using a mouse.
| ```
**
MSKDEF 600 -- HIT ENTER TO CHANGE --
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 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@------------------------>
next: cstm05.md.txt