@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:
Key:
VACLOC 1
. . . on the top line and press ENTER.
   
```**
Notice the five Data Items displayed and their Locate Headings (column headings). Notice that two of the Data Items (cont.)
come from the SIF Data Class (First Name and Last Name) while the rest come from the VAC Data Class. The Logical Join (cont.)
technique we have employed lets your program access any items from its set of data (its Logical Record) just as if they (cont.)
were all one large record, regardless of how many files they actually come from.
You are looking at "page 1" of the Browse. If there were more Employees on the file than would fit on one screen, you (cont.)
could press PF8 to "page forward". The message in SCOMPL (top right corner) will always tell you whether you have (cont.)
reached the END OF LIST or whether you may press PF8 to continue. If you want to restart at the beginning, you could (cont.)
press the PF5 key, no matter what page of the Browse you were on at the time. The record count line at the bottom of (cont.)
the list of Employee data shows what page you are on and how many Employees you have been shown so (cont.)
far.
In the lower left corner you see the message telling you that you are Browsing Forward (in ascending order). You could use the PF7 key to reverse that direction if you wished.
Near the lower left corner you see that the key being used to read the VAC data is "Employee # (9-digits)". That (cont.)
happens to be the only key for the VAC Data Class. If there were others you could browse using any of them and in (cont.)
either direction. You tell the Browses which key to use in your command on the top line, as:
VACLOC 1 uses VACK1 (key 1)
VACLOC 2 uses VACK2 (key 2)
etc.
MAGEC automatically supports up to nine keys per Data Class this way. If you key the command VACLOC 2 you will get an error message, since there is no key 2 defined for VAC at this time.
You may wish to refer to the MAGEC "Database Administration" chapter to learn more about defining keys, or to the MAGEC Application User's Guide* for more about using the Browses.
| ```
**
VACLOC 1 END OF LIST - PF5=Restart/PF7=Backward
Emp# First Name Last Name Hire Date Earned Vacation
000-00-0001 Harry Houdini 12/11/45 14.50
000-00-0002 Uri Geller 02/28/63 10.00
000-00-0003 Merlin the Magician 06/11/83 2.00
++++ 03 Records Scanned, 03 Displayed so far - page 1 ++++
Key 1 = Employee# (9-digits) Press PF13 for Hardcopy
You may position the CURSOR to an item and Press ENTER to "SEE" it
(Browsing Forward) or Press PF4 to "CHG" it
```**
Figure 18 -- Browse Display Before Project 2
##
Remove an Item from the Browse Display
Now you are going to alter the specifications in the Dictionary to remove the Earned Vacation from the Browse display.
| ```
**     DO THIS:
Key: MSKDEF 600 . . . on the top line, press ENTER.
   
```**
The familiar MSKDEF screen will appear showing Mask 600 as it is currently defined. You can move the cursor using the (cont.)
four arrow keys. You indicate the field you wish to act upon by placing the cursor on it and pressing a PF key to (cont.)
indicate the desired action.
| ```
**     DO THIS:
Position the cursor to the variable field where Earned Vacation is displayed
(not the prompt, the variable) and press PF18.
   
```**
The indicated field's characteristics will appear in the pop-up window.
| ```
**
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 19 -- Selecting a Variable for "Change"
##
Remove Locate Position
The last characteristic displayed, in the bottom line of the pop-up window is LOC. This is the Locate Position. The Earned Vacation is the fifth Data Item (left to right) on the Browse screen.

next: cstm06.md.txt