# Attributes

## 3270 Attributes

The symbolic names are six characters long, each character position having a unique meaning and set of possible values:

Character Position | Letter Value | Meaning of Letter Value
--- | --- | ---
Entry Protection
1 | P | Protected
| S | Skip-Protected
| U | UnProtected
Keyboard Shift
2 | A | Alpha-Numeric
| N | Numeric Shift (keyboard)
Display
3 | D | Displayable
| N | Non-Displayable
Highlighting
4 | R | Regular Intensity
| H | High Intensity
Selector Pen
5 | N | Non Selector Pen Detectable
Modify Data Tag
6 | M | Modify Data Tag ON
| F | Modify Data Tag Off

## Table of Attributes

Symbolic Name (in MSKDEF) | Cobol Name (in MAGEC003) | Actual Code Value
--- | --- | ---
UANRNF | ATUANRNF | <
UADRNF | ATUADRNF | b (blank)
UADHNF | ATUADHNF | H
UANRNM | ATUANRNM | (
UADHNF | ATUADHNF | H
UADRNM | ATUADRNM | A
UADHNM | ATUADHNM | I
UNDRNF | ATUNDRNF | &
UNDHNF | ATUNDHNF | Q
UNDRNM | ATUNDRNM | J
UNDHNM | ATUNDHNM | R
PANRNF | ATPANRNF | %
PADRNF | ATPADRNF | - (dash)
PADHNF | ATPADHNF | Y
PANRNM | ATPANRNM | _ (underscore)
PADRNM | ATPADRNM | /
PADHNM | ATPADHNM | Z
SANRNF | ATSANRNF | +
SADRNF | ATSADRNF | 0 (zero)
SADHNF | ATSADHNF | 8
SANRNM | ATSANRNM | ' (apostrophe)
SADRNM | ATSADRNM | 1 (one)
SADHNM | ATSADHNM | 9

# Automatic Editing

## Table of Edit Types

Alpha-Numeric Edit Types:
X | Miscellaneous alpha-numeric. Any characters will be accepted. Example: Company Name, or Comments, etc.
b (blank) | Default. Same as X
A | Alphabetic. Only (A - Z and b [blank]) Example: Person's Name, City Name, etc.
U | Uppercase. Any characters accepted. MAGEC converts any lowercase alpha to uppercase
T | Table Lookup. Same as U plus MAGEC looks up in a Table
W | Where to display Table description used in conjunction with a T. MAGEC moves the description of the found entry in the Table to a W field (if so specified).
Numeric Edit Types:
N | Numeric, MAGEC will pad leading zeros.
S | Numeric, MAGEC will suppress leading zeros
= | Same as S, plus trailing minus sign
Z | Numeric, leading zeros plus comma insertion
- | Same as Z, plus trailing minus sign
$ | Same as -, plus floating dollar sign
Date Edit Types:
M | MM/DD/YY (2-digit year) or MM/DD/CCYY (4-digit year)
D | DD/MM/YY (2-digit year) or DD/MM/CCYY (4-digit year)
Y | YY/MM/DD (2-digit year) or CCYY/MM/DD (4-digit year)

NOTE: MAGEC accepts any valid operator entry (depending on field Edit Type) and adjusts it to the "edited" format for the field. For instance: in a type-`$` field the operator can enter:
`12345.5` - or
`1,234.50` - or
`$1,234.50` et cetera, all of which are equivalent.

# Developer Functions

## Online Developer Functions

ALGLST mmm | List directory of Customization Algorithms for Mask mmm
ALGxxx mmm/pppppppp/etc. | Inquiry and Maintenance for Customization Algorithms
DBDITO | Hex/Character display and update of file data
DBUTIL | Hex/Character display only
DOCxxx topic name | Inquire/maintain documentation
ERRxxx eee | Inquire/maintain error messages
LBRxxx member name/modifier | Inquire/maintain library member
LBRLST 1 | List index of Library members
MMPxxx nnn | Inquire/maintain MMP definition
MSKDEF mmm | Manual screen painting
MSKDEL mmm | Delete all screen fields
MSKDUP mmm | Duplicate screen definition
MSKSEE mmm | Display generated screen
PAINT1 mmm (thru Paint7 mmm) | Automatic screen painting
SCDLST mmm | List Locate-Headings for fields
SCDCHG mmm/row/col | Change Locate-Heading for field
TBLLST ttt | List entries in a Lookup Table
TBLxxx ttt/cccc | Inquire/maintain table entries
TOCxxx ttt | Inquire/maintain Table-of-Contents for Lookup Tables
TSKLST mmm | Developer Menu + Status screen

LEGEND:
mmm | Mask number
xxx | standard nine suffixes (ADD, CHG, etc.)

ttt | Table number
nnn | MMP number
pppppppp | Insertion Point name
cccc | 1- thru 16-character code

# PF Keys in Developer Functions

## Developer Functions PF Keys

PF Keys (general)
PF15 | exit MAGEC or exit Split-Screen
PF12 | return to TSKLST for this Mask #
PF9 | Swap Windows
PF2 | HELP (field-level)
PF1 | HELP (function-level)
PF Keys (in MSKDEF)
PF18 | change field
PF19 | delete field
PF20 | duplicate field
PF4 | duplicate line
PF5 | delete line
PF6 | move line
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

These functions are universal throughout MAGEC and are used by the Developers as well as by the Application Users. They are in Logical Application 00 and appear on the Menu screens of all the other (01 - 50) Logical 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

## 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 PERFORM. The TWA will be passed from the calling MMP to the sub-program and back. It can be used as the medium of 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 to the "fetched" MMP intact. You can also move a value into the Screen Key field (SKEY) to be passed to the fetched MMP. It is also permissable for the Function Code specified to be one of the functions handled by this same MMP; for instance VACLOC could legally fetch to VACSEE. Indeed, when you use the Cursor-selection feature of VACLOC that is 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

## 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 discussions on reentrancy and multi-thread applications in CICS.

## 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

## 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 Insertion Point this code will cause the MMP to bypass updating the file(s) and just return to MAGECCP to have the 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

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 the TWA and will be initialized to LOW-VALUES immediately upon entry of each transaction. data in this area (or %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 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).
%REDNX | code to override the logic for reading the Primary Data-Class "sequentially". inserted into BOTH the browse and maintenance mainline routines.
%REDKY | code to override the logic for reading the Primary Data Class randomly (by key)
%RDUKY | code to override the logic for reading the Primary Data Class randomly (by key) with intent to update or delete the data.
%ADDIT | code to override the logic to add a record to the Primary Data Class
%DELET | code to override the logic for deleting a record from the Primary Data Class
%UPDAT | code to override the logic for updating a record of the Primary Data Class
%RELES | code to override the logic for dropping the "exclusive control" obtained via logic in the %RDUKY insertion point.
%UPDERR | code to override the logic used when a bad return code is sensed for %UPDAT, %DELET, or %ADDIT logic.
%GOODADD | code to override logic used when a good return code is sensed from %ADDIT logic. perhaps to update other Data Class(es).
%GOODCHG | code to override logic used when a good return code is sensed from %UPDAT logic. perhaps to update other Data Class(es).
%GOODDEL | code to override logic used when a good return code is sensed from %DELET logic. perhaps to update other Data Class(es).
%LOCINIT | code to be inserted into the initialization routine for the browse functions, to initialize packed fields in VARIABLE-STORAGE, to override default values.
%INIT | code to be inserted into the initialization routine for maintenance functions, to initialize VARIABLE-STORAGE fields, etc.
%INITATB | code to be inserted after the standard code used to initialize the screen fields' attributes for the maintenance functions. perhaps to Protect or Darken some fields based on which function or operator.
%NORMKEY | code to be inserted after the standard logic of the maintenance functions' NORMALIZE KEY routine. perhaps to add some more key editing.
%NKLOC | code to REPLACE the entire browse functions NORMALIZE KEY routine.
%BLNKSCR | code to be inserted after the standard logic for initializing the maintenance screen's variable fields to underscores. perhaps to set default values into them. used for ADD function and on NOT-FOUND condition for other functions.
%COMP | code to be inserted after the logic to move data to the maintenance screen for display, perhaps to compute some additional values to be dispalyed.
%DELEDIT | code to verify that it is OK to allow the deletion of the Primary Data Class' data. often to call MAGECIO to read subordinate Data Class to see that there are no subordinate records on file.
%EDIT | code to do custom editing of screen data to validate it before allowing ADD, CHG, or DUP functions to update the Primary Data Class' record.
%ADDINIT | code to initialize the Primary Data Class' element(s) before the standard moves to build a new record for an ADD function.
%CALC | code to be inserted after the standard moves to build/rebuild the record data for ADD, CHG, and DUP functions.
%SELECT | code to determine whether each record read is to be shown on the browse displays or bypassed or if END-OF-DATA is to be simulated. often to bypass records on the file that are a different format (headers, details, and trailers, for instance)
%LOCMOV | code to be inserted after the moves to build the display line for the browses.to move additional data to the display or to alter what was moved (translate codes, expand abbreviations, etc.)
%SKEYBLD | code to REPLACE entirely the routine that builds the expanded key value to be moved to SKEY when the Operator Cursor-Selects an item on a browse screen.
%JOIN | code to read secondary Data Classes after each read of the Primary Data Class. also calculations to build non-file ("derived") data to be dispalyed. also to inspect and to possibly modify the data just read.
%SUBRTNM | code for miscellaneous subroutines that may be PERFORM'd from any other Insertion Point's coding.
%SNDSCRN | code to be inserted just before the logical end of processing for all functions. it will be executed just before the MMP returns to MAGECCP to have the screen sent.

# Error Codes

## Abend Codes

NOTE: The following 2 Abend Codes indicate likely system error or incorrect specifications to CICS
DBGM | A Getmain command has failed (MAGECCP)
DBVS | A fatal CICS/VSAM return code was received (possible incorrect FCT options)
NOTE: The following Abend Codes consist of the prefix "DB" plus a two-digit number. These two-digit numbers are consistent with the error return codes issued by MAGECIO.
DB01 | Invalid I/O request attempted
DB02 | No such file defined
DB03 | No such key name defined (path)
DB04 | Invalid Record ID
DB05 | File is Closed (or Open Failure)
DB06 | File Opened Read-Only, Update attempted
DB07 | File is Full, cannot add records
DB08 | Index is Full
DB09 | Prerequisite for this command not met
DB10 | Attempt to add Duplicate record
DB11 | Attempt to alter Primary Key Value in record
DB12 | Internal record problem
DB13 | Internal record problem
DB14 | No Record Found, or End of List
DB16 | Exclusive Control Interlock
DB17 | Hardware Failure
DB22 | Element not defined
DB23 | Security violation
DB35 | Open/Close failure
DB36 | Database not Open
DB93 | Key name and Element name not for same file
DB95 | Invalid Element List (not terminated by Spaces)
DB96 | Too many Exclusive Control requests
DB97 | Attempt to Update an Audit-Stamp
DB98 | No Exclusive Control Data (MAGECIO)
DB99 | Miscellaneous database error

The contents of the MAGEC™ online Documentation web pages was originally published in printed form, including a pocket-sized quick reference booklet. and later reformatted for online access. Updates and corrections have been made (to the online version only) based on user input. We no longer maintain the printed version as the online site has replaced it entirely.

© Al Lee & Associates, Inc., 2001-
, all rights reserved
Licensed users have the explicit right to copy, print, or duplicate any portion of this online documentation for the purpose of assisting them to use the product or to train staff members or other users.
To report problems or suggest improvements please contact us using the "eMail MAGEC" tab above.