|
PF10 | go to Auto-Paint sequence
| **
PF Keys (in PAINT2)
**
|
ENTER | select item
|
PF4 | unselect item
|
PF10 | unselect all items
|
PF3 | return to PAINT1 (Element selection)
|
PF6 | Auto-Paint using selected items
| **
PF Keys (in DBDITO, DBUTIL)
**
|
PF22 | display next 280 bytes of data
|
PF23 | display preceding 280 bytes of data
|
PF8 | read next record and display
|
PF7 | read previous record and display
| **
PF Keys (in LBRxxx and ALGxxx)
**
|
PF7 | page backwards thru member
|
PF8 | page forward thru member
|
PF20 | insert after line on which cursor is
|
ERASE EOF | delete from cursor position to EOL
(blank lines are deleted automatically)
|
PF5 | bypass warning-level error
| **
PF Keys (in PAINT1)
**
|
PF14 | bypass warning-level error, continue to PAINT2
#
Universal Functions
##
Logical Application 00's Functions
[](#MAGREF004000)
[](#MAGREF006000)
These functions are universal throughout MAGEC and are used by the Developers as well as by the Application Users. They (cont.)
are in Logical Application 00 and appear on the Menu screens of all the other (01 - 50) Logical (cont.)
Applications.
|
**DUAL | Split the Screen
|
**MENU | High-Level Menu screen
|
$$MENU | Detail Menu screen for a LAP
|
**ERR1 | Display HELP (same as pressing PA2)
|
**SWAP | Swap Windows (same as pressing PF11)
|
**EXIT | Exit Split-screen mode or Exit MAGEC
|
**HELP | Menu'd access to documentation online (same as pressing PF9)
|
MSGSEE | Display Broadcast Message
|
CLEARS | "Clear screen" by displaying logo
|
SYSLOG ON | Log onto MAGEC
|
SYSLOG OFF | Log off of MAGEC
|
OPTION | set/alter session option for CLEAR key and PA1 key meanings
#
Program to Program Linkages
[](#MAGREF005000)
[](#MAGREF007000)
##
To CALL a Sub-Task MMP
MOVE 'nnn' TO TWA-NONTP-MMP.
PERFORM AA850-SUB-CALL THRU AA899-EXIT.
where 'nnn' is the MMP number of the sub program. Control will return to the next-sequential-instruction after the (cont.)
PERFORM. The TWA will be passed from the calling MMP to the sub-program and back. It can be used as the medium of (cont.)
communication between them.
##
To Chain Functions (Screens)
MOVE FTH-FUNCT TO TWA-NONTP-REQUEST.
MOVE 'xxxxxx' TO SFUNCT.
GO TO AA900-GOBACK.
where 'xxxxxx' is the six-character Function Code you wish to transfer to. The entire TWA and all Mask data is passed (cont.)
to the "fetched" MMP intact. You can also move a value into the Screen Key field (SKEY) to be passed to the fetched (cont.)
MMP. It is also permissable for the Function Code specified to be one of the functions handled by this same MMP; for (cont.)
instance VACLOC could legally fetch to VACSEE. Indeed, when you use the Cursor-selection feature of VACLOC that is (cont.)
exactly what happens.
##
To Fetch a Specific MMP
MOVE FTH-CMD TO TWA-NONTP-REQUEST.
MOVE 'mmm' TO TWA-NONTP-MMP.
GO TO AA900-GOBACK.
where 'mmm' is the MMP number of the program to be fetched.
#
Miscellaneous Customization
[](#MAGREF006000)
[](#MAGREF008000)
##
To Initialize TWA-MSK-AREA
MOVE MSK-CMD TO TWA-TP-REQUEST.
MOVE 'nnn' TO TWA-TP-TRM.
PERFORM AA800-CALL-MONITOR THRU AA899-EXIT.
IF (GET-MSK-ERR)
    PERFORM BB800-MSK-ERR-MSG THRU BB899-EXIT
    GO TO AA800-SEND-SCREEN.
where nnn = the desired Mask number.
##
To Fetch the Clear (Logo) Screen
MOVE FTH-FUNCT TO TWA-NONTP-REQUEST.
MOVE CLEAR-FUNCT TO SFUNCT.
GO TO AA900-GOBACK.
You must not GO TO AA900-GOBACK from within a PERFORM'ed routine. For a thorough explanation refer to [IBM's (cont.)
discussions on reentrancy and multi-thread applications in (cont.)
CICS](https://www.ibm.com/docs/en/cics-ts).
##
To Fetch Clear Screen with Message
MOVE MSG-LIT TO TWA-TP-OP.
MOVE message TO TWA-MSK-AREA.
MOVE FTH-FUNCT TO TWA-NONTP-REQUEST.
MOVE CLEAR-FUNCT TO SFUNCT.
GO TO AA900-GOBACK.
where 'message' is any 40-character literal.
#
Editing & PF Keys
[](#MAGREF007000)
[](#MAGREF009000)
##
To Code a Field Edit/Validation
IF Sfield -----error condition---------
    MOVE E TO SfieldE
    MOVE 'nnn' TO ERROR-NUMBER
    PERFORM CA100-LOAD-ERR-CODE-TBL THRU CA199-EXIT.
where Sfield = the name of a screen field, 'nnn' = an Error Number that is defined on the MAGECERR file. In the %EDIT (cont.)
Insertion Point this code will cause the MMP to bypass updating the file(s) and just return to MAGECCP to have the (cont.)
Error Messages issued.
If you wish to flag a non-fatal (warning level) error, code:
IF Sfield -----error condition---------
    MOVE E TO SfieldE
    MOVE 'nnn' TO ERROR-NUMBER
    PERFORM CA400-LOAD-WARNING-TO-TBL THRU CA499-EXIT.
The above code will allow the MMP's updating to occur but will tell MAGECCP to also* place the specified Warning Message into the screen.
##
To Add an Error Message
| ```
     DO THIS:
Enter the command: ERRADD nnn - press ENTER.
   
```**
The ERRADD screen will be presented. You must enter two things.
1) 33-character Error Message
2) 4-line (320-character) Narrative "HELP" text
##
To Test Which Key Was Hit
IF (TWA-MSK-PF5-HIT) .....
IF (TWA-MSK-ENTER-HIT) .....
IF (TWA-MSK-PF10-HIT) .....
- et cetera
You can do this at any time in the processing logic. There is an 88-level value under TWA-MSK-AID for every possible key.
#
Insertion Points
##
Where to do Customization
[](#MAGREF008000)
[](#MAGREF009002)
Below is a list of the Customization Insertion Points where you can enter Custom coding. Beside each is a brief list of some of the most common types of coding done there.
|
%REMARKS | comments to be inserted into the REMARKS section of the Cobol MMP
|
%LITERAL
or
%LOCLITS | WORKING-STORAGE constants with VALUE clause
|
%DATADEF | MAGECINC's for secondary Data-Class's elements. work areas to be saved or passed to another (FTH'd) function (MMP) or to the next transaction at this terminal.
|
%FUNCT | code to override the standard list of Function codes for this MMP.
|
%VARSTOR | definitions of work fields to be used by the MMP. these will be inserted into the VARIABLE-STORAGE area of (cont.)
the TWA and will be initialized to LOW-VALUES immediately upon entry of each transaction. data in this area (or (cont.)
%LOCVARS) this area cannot be passed to another MMP or transaction, it is not saved.
|
%PFKEYL | code to be inserted at the very start of
the mainline logic for browse functions. possibly to test for PF keys or to alter the key value that the Operator entered; maybe to prefix a Client#, etc..
|
%LOCKY | code to override the logic used to start a browse (generically), possibly to force a certain starting key (cont.)
value, possibly to code the I/O access bypassing the MAGEC I/O module (Primary Data-Class).
|
%REDLE | code to override the logic for reading the first record after starting a browse via the %LOCKY coding (Primary Data-Class).
|

next: magref03.md.txt