05 hold-name pic x(20). 02
05 subscript-1 pic s9(4) comp sync. 03
04
05
06
07
08
09
10
11
12
13
14
15
Move CURSOR to a line, use ERASE EOF to Delete it -or- PF20 to Insert After it
Semicolon (;) is the TAB Character Asterisk (*) in col. 1 = suppress upcase
Press PF2 for Instructions Press PF4 for menu of Named Proformas
```**
Figure 03 -- Customization Algorithm Entry Screen
** with Proforma Code Displayed
##
Enter Your Work Field Definitions
| ```
DO THIS:
Overkey the proforma with the code shown on screen sample, press ENTER.
```**
Your code will be recorded (added) to the Library and displayed back to you. The Function Code (on top line of screen) (cont.)
will be changed from ALGADD to ALGSEE. If you made an error you can just move the cursor down to the body of the screen (cont.)
and overkey with the correct code and press ENTER.
Your code may be entered in lowercase characters, MAGEC will automatically translate all lowercase characters to (cont.)
uppercase. You can override the uppercase translation feature by entering an asterisk (*) in column (cont.)
1.
You may press the HELP key (PF1) for full instructions on how to use the Librarian online functions (
ALG...
, etc.). If you press PF2 you will be displayed brief instructions on coding for the %VARSTOR insertion point.
| ```
** DO THIS:
Now, press PF12 (Shift-F2, on a PC) to return to the TSKLST.
```**
**
**
**
**
**
NOTE:
**
It is not necessary for you to use the Shift key to enter uppercase alphabetic characters on this screen. MAGEC will (cont.)
automatically change any lowercase alphabetic characters to uppercase for you. All the Librarian entry and update (cont.)
screens automatically translate to uppercase to simplify your work since Cobol, Assembler, and even JCL are all coded (cont.)
in uppercase only (Cobol II accepts lowercase coding as equivalent to uppercase coding).
If you *do* wish to enter text in lowercase and *not have it converted* to uppercase, you must type an asterisk (*) in column 1 of each line which you do not want converted to uppercase.
| ```
**
ALGADD 600/VARSTOR
SEARCH ARG: ..................................................................
Password: M A G E C VARSTOR page
New Password: CUSTOM ALGORITHM DEFINITION FOR MMP 600
add items to VARIABLE STORAGE TAB Option (PF14=ON/OFF): ON
....+..;10.;..+;..20....+...30....+...40....+...50....+...60....+...70..
05 VACATION-DUE PIC S9(7)V99 COMP-3. 01
05 SICK-DUE PIC S9(7)V99 COMP-3. 02
05 COMP-DUE PIC S9(7)V99 COMP-3. 03
05 TOTAL-DUE PIC S9(7)V99 COMP-3. 04
05
06
07
08
09
10
11
12
13
14
15
Move CURSOR to a line, use ERASE EOF to Delete it -or- PF20 to Insert After it
Semicolon (;) is the TAB Character Asterisk (*) in col. 1 = suppress upcase
Press PF2 for Instructions Press PF4 for menu of Named Proformas
```**
Figure 04 -- Your Custom Coding in %VARSTOR
##
Entering Procedure Division Code
The TSKLST (page 1) will appear.
| ```
** DO THIS:
Press PF8 to page forward to page 2.
```**
The screen will look like the one shown here. Notice that the status of the %VARSTOR task now indicates "1 DONE". That means that you have added one "page" (record) of coding for %VARSTOR.
Next you must enter the PROCEDURE DIVISION coding to calculate the figures into the four work fields you have defined. For our purposes we will insert that coding into the "Logical Join" routine.
The routine named JA100-LOGICAL-JOIN is performed by the MMP after every READ of the Primary Data Class. When you did (cont.)
the Automatic Logical Join sequence in the basic development process (see MAGEC "Application Developer" Tutorial) MAGEC (cont.)
automatically generated a piece of Customization coding to be inserted into JA100-LOGICAL-JOIN. The name of the (cont.)
insertion point is %JOIN.
| ```
** DO THIS:
Press PF8 to page forward to page 3.
```**
| ```
**
TSKLST 600 PF8 = Next Page -- PF5 = PAGE 1
M A G E C TASK LIST FOR MSK600
...............T A S K......................... PAGE 2 .....STATUS......
IV. CODE CUSTOMIZATION ALGORITHMS (CONTINUED)
4. DATA CONSTANTS %LITERAL DEFAULT LOGIC USED
5. Special SECTION-NAME for IDMS %SCHEMA DEFAULT LOGIC USED
6. DEFINE user work area %USRAREA DEFAULT LOGIC USED
7. add items to VARIABLE STORAGE %VARSTOR 1 DONE
B. INITIALIZATION
1. MAINT. FUNCTION INITIALIZATION %INIT DEFAULT LOGIC USED
2. ATTRIBUTE INITIALIZATION %INITATB DEFAULT LOGIC USED
3. BROWSE FUNCTION INITIALIZATION %LOCINIT DEFAULT LOGIC USED
4. PRE INITIALIZATION ROUTINE %PREINIT DEFAULT LOGIC USED
C. SCREEN HANDLING
1. INITIALIZE SCREEN (BLANK SCREEN) %BLNKSCR DEFAULT LOGIC USED
2. COMPUTATIONS FOR SCREEN DISPLAY %COMP DEFAULT LOGIC USED
3. SCREEN FIELD EDIT(S) %EDIT DEFAULT LOGIC USED
4. PHASE 2 EDITS %EDIT2 DEFAULT LOGIC USED
5. ADDITIONAL DATA TO BROWSE SCREEN %LOCMOV 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 05 -- Status Showing Customization Done
##
Select Logical Join Task
Notice that the TSKLST shows that there is one "page" of code on file for %JOIN already. That is what the Automatic Logical Join feature generated.
| ```
** DO THIS:
Position the cursor down to the %JOIN task, press ENTER.
```**
You will be transferred to the screen showing the existing code which is on file.
| ```
**
TSKLST 600 PF8 = next page -- PF5 = Page 1
M A G E C TASK LIST FOR MSK600
...............T A S K......................... PAGE 3 .....STATUS......
IV. CODE CUSTOMIZATION ALGORITHMS (CONTINUED)
6. ADD'L EDIT ROUTINE MMP MAINT KEY %NORMKEY DEFAULT LOGIC USED
D. DATA BASE COMMANDS
1. INITIALIZE RECORD FOR ADD %ADDINIT DEFAULT LOGIC USED
2. LOGIC TO ADD TO DATABASE %ADDIT DEFAULT LOGIC USED
3. LOGIC TO DELETE FROM DATABASE %DELET DEFAULT LOGIC USED
4. Logic to JOIN secondary files %JOIN 1 DONE
5. LOGIC TO 'SETL' ON DATABASE %LOCKY DEFAULT LOGIC USED
6. READ FOR UPDATE ROUTINE (CHANGE) %RDUKY DEFAULT LOGIC USED
7. READ FOR DISPLAY ROUTINE %REDKY DEFAULT LOGIC USED
8. LOGIC TO READ FIRST RECORD %REDLE DEFAULT LOGIC USED
9. LOGIC TO READ-NEXT RECORD %REDNX DEFAULT LOGIC USED
10. LOGIC TO DROP EXCLUSIVE CONTROL %RELES DEFAULT LOGIC USED
11. LOGIC TO UPDATE THE DATABASE %UPDAT DEFAULT LOGIC USED
E. SCREEN NAVIGATION
1. MMP EXIT LOGIC %GOBACK DEFAULT 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
```**
* ** NOTE: The status of the %JOIN customization task shows "1 DONE", meaning that there is one "page" of customization (cont.)
coding in the repository for the insertion point, for this application. Since you have not done any customization for (cont.)
%JOIN yet, you might wonder how that could be correct. When you did the initial development of MMP600 in the first (cont.)
project, you used the Fully-Automated method. MAGEC automatically generated the necessary Cobol coding to read the (cont.)
SIF01 data using the Employee number from the Vacation data as a "foreigh key". This generated Cobol code was added to (cont.)
the repository as custom code for the %JOIN insertion point so that you could easily access it to make any alterations (cont.)
you might desire.
Figure 06 -- Task List Screen, page 3
##
Modifying Customization Code
The screen will be displayed to you as shown on the facing page. You are going to insert some additional Cobol coding (cont.)
near the top of this routine, after the first line of the coding which is displayed.
This means that you will be inserting using the PF20 key. Refer to the MAGEC "Librarian" chapter for full instructions or press PF1 for HELP.
| ```
DO THIS:
Place the cursor on the first line of code, press PF20 (Shift F10 on PC).
```**
This will "open up" the screen by temporarily "shoving down" all the lines of code below where you placed the cursor to allow you to key new code into the screen.
**
NOTE:
**
The "IF (NOT-FOUND)" coding on the first line of the screen tests whether the Primary data (VAC) was successfully read. (cont.)
If it was not, then we do not want to try to do computations using fields from it, nor would we want to try to read the (cont.)
SIF data.
If the VAC record was not found, then this routine will simply bypass its processing and effectively "do nothing". The (cont.)
mainline logic of the generated MMP will not attempt to use any of the data from the records because it too tests for (cont.)
the NOT-FOUND condition.
| ```
**
ALGNXT 600/JOIN/01-SIF/000
SEARCH ARG:............................................................
......
Password: M A G E C JOIN page
CUSTOM ALGORITHM DEFINITION FOR MSK 600 01-SIF (000)
Logical Join - secondary files TAB Option (PF14=ON/OFF): ON
....+..;10.;..+;..20....+...30....+...40....;+...50....+...60....+...70..
IF (NOT-FOUND) GO TO JA900-RETURN. 01
MOVE REDKY TO TWA-DB-CMD. 02
MOVE 'SIFK1' TO TWA-DB-KEY-NAME. 03
next: cstm03.md.txt