W
A field whose only purpose is to display the description from a MAGEC lookup table. Example: state name.
P
Alpha-numeric pattern-edited field. Example: product code.
##
Numeric
N
Numeric with leading zeros, MAGEC will pad leading zeros if not entered by operator. Example: employee number.
S
Numeric without leading zeros, MAGEC will suppress them if entered by operator. Example: Page number.
=
Same as "S", but with a trailing minus sign (if negative). Example: remaining vacation days.
Z
Same as "S", with commas inserted every third digit.
-
Same as "S", with commas inserted plus trailing minus sign.
$
Numeric with floating dollar sign, leading zero suppression, comma insertion. Example: salary amount.
#
Numeric pattern edited field. Example: social security number, phone number.
NOTE:
**
There is a limit on the number of digits which a numeric field can have. The total number of digits must not exceed (cont.)
thirteen, including both the digits left of the decimal point and right of the decimal point. In addition, the number (cont.)
of decimal places must not exceed nine.
##
Date
M
Date to be displayed as MM/DD/YY (2-digit year) or MM/DD/CCYY (4-digit year).
D
Date to be displayed as DD/MM/YY (2-digit year) or DD/MM/CCYY (4-digit year).
Y
Date to be displayed as YY/MM/DD (2-digit year) or CCYY/MM/DD (4-digit year).
**
NOTE:
**
Type-T fields (Table Lookup) produce several very user-friendly features into any online application generated to (cont.)
access or update them. Not only does MAGEC automatically validate the operator's entry into these fields by referencing (cont.)
the associated Lookup Table; but you can have MAGEC automatically display the code description onto the screen (i.e. (cont.)
for the state code "TX", display "Texas"). Also, the operator can point the cursor to any Type-T field and press PF2 (cont.)
(low-level Help key). The standard field-help display is presented, but with the added feature that the operator can (cont.)
then press PF8 to scroll through the list of valid coces (from the Lookup Table) for this field. Pointing the cursor to (cont.)
any of the listed codes and pressing ENTER returns to the application screen with the selected code filled into the (cont.)
screen field.
In a GUI environment, pointing to the Type-T field and clicking the mouse will pop up a window of the valid codes from (cont.)
which the operator can mouse-select a code to be automatically transferred into the screen field.
#
Examples
In the following examples we have abbreviated certain terms as follows:
                &nbs (cont.)
p;              Edit (cont.)
Type     TYP:
Significant digits left of decimal point     SIG:
           Digits right of decimal point     DEC:
                &nbs (cont.)
p;                (cont.)
Pattern     PAT:
                &nbs (cont.)
p;           Table (cont.)
Number     TBL:
 
These examples depict the data your program (online MMP) will receive for the various Edit Type fields, based upon what the operator has entered. They assume a screen field name of "Sfield".
These examples do not show every possible Edit Type, or every possible combination of specifications. They are intended (cont.)
to convey the philosophy of editing and validating data using MAGEC's Automatic Editing feature. You can do unlimited (cont.)
additional editing via Cobol customization coding, if necessary.
Specific information on each edit type and options is covered in the preceding sections of this chapter.
**
Note:
**
The blank symbol ( b ) is used to represent a blank character.
##
Example 1
TYP:     T
SIG:     
DEC:     
PAT:     
TBL:     003
Operator Entry     Sfield     SfieldE     SWFLD
         TX        TX  (cont.)
         b (cont.)
        TEXAS
         TZ       &n (cont.)
bsp;TZ           E    &nb (cont.)
sp;    b
This example assumes that Table 003 is a State Abbreviation Table, defined to MAGEC, and that the 2-character post (cont.)
office state abbreviations are being used. It also assumes that SWFLD is the name of a screen field which is specified (cont.)
as an Edit Type "W" field and that Sfield's specifications point to SWFLD as its "W" field.
##
Example 2
TYP:     X (or b )
SIG:     
DEC:     
PAT:     
TBL:     
Operator Entry     Sfield     SfieldE
         ABC#3     ABC#3         b
         abc&5     abc&5         b
##
Example 3
TYP:     U
SIG:     
DEC:     
PAT:     
TBL:     
Operator Entry     Sfield     SfieldE
        ABC#3      ABC#3       b
        abc&5      ABC&5       b
##
Example 4
TYP:     A
SIG:     
DEC:     
PAT:     
TBL:     
Operator Entry     Sfield     SfieldE
         ABC D     ABC D       b
         ABC#3     ABC#3       E
         ABC 5     ABC 5       E
         abc       abc         E
##
Example 5
TYP:     P
SIG:     
DEC:     
PAT:     XX9-99A
TBL:     
Operator Entry     Sfield     SfieldE     Moved to database record field
       AB2-12B     AB2-12B     b           AB212B
       A32-12B     A32-12B     b           A3212B
       A3A-12B     A3A-12B     E
       AB3 12B     AB3-12B     b           AB312B
The Pattern insertion character (
- ) is stripped from the data when moved to the database and it is inserted into the data when it is displayed on a screen or report.
The operator may enter a space in lieu of the insertion character when keying into the screen. MAGEC will accept the space and replace it with the proper character.
The Edit mask characters "X", "A", and "9" indicate what type of character may be entered into each position, as follows:
     X     any character
     A     alphabetic characters only
     9     numeric characters only.
##
Example 6
TYP:     N
SIG:     03
DEC:     02
PAT:     
TBL:     
Operator Entry     Sfield     SfieldE    Sfield-N*
         2       &nb (cont.)
sp; 002.00        b (cont.)
      +2.00
         2.7       002.70        b       +2.70
         27        027.00        b       +27.00
        -27        -27.00        E       +0
        2.777      2.777         E       +0
        2.770      002.77        b       +2.77
        00027      027.00        b       +27.00
* Moved to database record field.
##
Example 7
TYP:     #
SIG:     09
DEC:     00
PAT:     999-99-9999
TBL:     
Operator Entry     Sfield      SfieldE      Sfield-N*
   123-45-6789     123-45-6789     b       +123456789
   123 45 6789     123-45-6789     b       +123456789
   123-W5-6789     123-W5-6789     E       +0
Also, see comments for Example 5, Edit Type "P".
* Moved to database record field.
##
Example 8
TYP:     $
SIG:     05
DEC:     02
PAT:     
TBL:     
Operator Entry   Sfield     SfieldE       Sfield-N*
2                $2. (cont.)
00        b           (cont.)
; +2.00
2.7              $2.70 &n (cont.)
bsp;      b           +2. (cont.)
70
1234.55          $1,234.55    b           +1234.55
1234.555         1234.555     E           +0
1234.550         $1,234.55    b           +1234.55
1,234            $1,234.00    b           +1234.00
1234             $1,234.00    b           +1234.00
-23              -23 &nbs (cont.)
p;        E        & (cont.)
nbsp;  +0
123456           123456       E           +0
* Moved to database record field.
##
Example 9
TYP:     
SIG:     05
DEC:     02
PAT:     
TBL:     

next: edit03.md.txt