Programs). COMMAND FUNCTION REDKY read record for key value in the screen data area REDNX read the next record from the one just read REDPR read the previous record (not on Datacom DB) REDID re-read the record just read RDUKY same as REDKY but with intent to update RDUID same as REDID but with intent to update RDUNX same as REDNX but with intent to update LOCKY locate record with key = or > the screen data area LOCKX locate record with key = the screen data area LOCNX locate next record from one just read or located FSTAT test file status (open or closed, etc.) REDLE read the record just located UPDAT update the record DELET delete the record RELES release the record just read-with-intent ADDIT add a record ** NOTE: ** Datacom/DB supports all of the above commands plus a list of additional ones. If you are accessing a Datacom/DB (cont.) file/database, you can use any legal command and it will be passed through to Datacom's DBENTRY entry point and the (cont.) results displayed to you. # Appendix C --  Edit Type Codes ## Automatic Editing When you define your mask using MSKDEF, or when you modify it after having allowed the auto-paint feature to generate (cont.) it for you, you can specify to MAGEC that you desire automatic editing to be done to screen fields. You do this by (cont.) specifying, for each field, an edit type code. These same edit type codes are also specified in the dictionary definitions for data items (DIT's). When you use the (cont.) auto-paint feature (for online screens) or the automatic report program generation (as in the "Batch Developer" (cont.) Tutorial) MAGEC sets the screen or report editing formats based upon the edit type codes found in the DIT definitions. (cont.) You can override them in the MSKDEF or RPTDEF functions if you need to. There are three general categories of edit types: AlphaNumeric Numeric Dates The Cobol copy book for a mask or the detail line definition for a report will contain appropriate Cobol edit patterns (cont.) (ie. ZZZ.99-) based on the edit type. You might refer to the chapter, "Analysis of the Generated MMP" (found in (cont.) the *Programmer's Reference Guide*) for more detail. For numeric fields there is also a specification as to how many digits left of the decimal point and right of the decimal point are allowed. One of the alphanumeric types is "T", that means table lookup validation. Operator entries will be validated by looking (cont.) them up in a MAGEC lookup table. You can define lookup tables and the valid entries in those tables. Refer to the MAGEC (cont.) "Database Administration" chapter for further details about lookup tables. ## Table of Edit Types AlphaNumeric Edit Types: X Miscellaneous fields, any characters will be accepted. Example: company name, comments. b Same as X. A Alphabetic (A-Z and blank) characters only. Example: person's name, city name. U Uppercase. Any characters will be accepted as valid, lowercase alphabetics will be converted to uppercase by MAGEC. T Table lookup. Same as U plus MAGEC will validate entry against a lookup table. W Where to display a description from a lookup table. Used in conjunction with a T field. MAGEC moves the description from the found entry in the table to a W field. P Pattern edited alphanumeric field. Numeric Edit Types: N Numeric, MAGEC will pad with leading zeros. S Numeric, MAGEC will suppress leading zeros. = Same as S, plus trailing minus sign. Z Same as S, plus comma insertion. -  (hyphen) Same as Z, plus trailing minus sign. $ Same as Z, plus floating dollar sign. # Pattern edited numeric field. Date Edit Types: M MM/DD/YY or MM/DD/CCYY (2 or 4-digit years). D DD/MM/YY or DD/MM/CCYY (2 or 4-digit year). Y YY/MM/DD or CCYY/MM/DD (2 or 4-digit year). ** NOTE: ** When the operator enters data into screen fields MAGEC accepts any valid, unambiguous format depending upon the edit type. For instance, in a type-$ field the operator may enter: 12345.5 or, **1,234.50 or, $1,234.50 etc. # Appendix D --  User Abend Sometimes you might wish to abend an online task issuing an error message to the operator. This is useful when you wish (cont.) to cause Transaction Backout to be invoked, or when you just want to stop processing because your program has sensed (cont.) error conditions beyond its capacity to deal with. This can be accomplished easily via the ABEND command which is handled in MAGEC's I/O module. To use the ABEND command, code: MOVE 'ABEND' TO TWA-DB-REQUEST.   MOVE xx TO TWA-DB-RETURN-CODE.   MOVE 'mmmmm' TO SCOMPL.   PERFORM AA840-CALL-MAGEC-IO THRU AA899-EXIT.   In the above example, xx is a two-character abend code which you may set. MAGEC will abend the task issuing a CICS (cont.) abend code of MUxx (MU is for MAGEC USER ABEND). The mmmmm is any 40-character message you would like (cont.) displayed. NOTE: ** Control passes to the I/O module which aborts the task. Control does not return to your program. If an Abend Handler (cont.) program has been specified for either your MMP (refer to the definition of the "Screen Header" in the Application (cont.) Developer Tutorial) or for the User View (refer to the discussion of "Global Parameters" in the *Installation Guide*), (cont.) then the Abend Handler program will be invoked. Since you can code an Abend Handler program, it might do anything you (cont.) desired--including return control to any program you choose.