Monday 29 July 2013

Easytrieve Basic Report Edit Field Definition.



Easytrieve.
Easytrieve Basic Report Edit Field Definition


HEADING Parameter

You use the HEADING parameter to specify an alternative column heading for a field. (The default column heading is the field-name.)

  • Place the alternate column heading within single quotation marks. For example,
CL-NAME               5       20       A      HEADING ‘CLIENT NAME’

Produce the column heading
          
  CLIENT NAME    

MASK

An edit mask is a pattern of characters specifying how non-alphanumeric data is to be printed. Alphanumeric fields cannot be edited. An edit mask is created using combinations of the following characters:

9     Formats digits.
Z     Suppresses Leading zeroes.
*     Replaces leading zeroes with an asterisk.
-     Prints a minus sign prior to the first non-zero digit of a
      negative number
$    Prints a currency symbol prior to the first non-zero digit.

Each digit in the field must be designated in the mask. Any character which follows the last character of the edit mask is printed if the field is negative.

Example
              Mask             Field         Result
              ------------ ------------ ------------
              $$, $$9        01234       $1,234

Defining Edit Masks

You can define standard edit masks when your system is installed.

       MASK                                     USE
 ‘(999) 999-9999’                 Telephone Number
 ‘999-99-9999’                    Social Security number

 ‘Z9 / 99 / 99’                   Date
 ‘$$, $$$, $$9.99                 CREDIT’ Money (with floating $)

 ‘*, ***, ***, 999.99-‘           Protected Check Amount
 ‘--, ---, -9.99’                 Negative Number

Syntax

[     MASK   [letter]   [BWZ]    [‘literal’]       ]
  • MASK is the EASYTRIEVE PLUS keyword.
  • Letter names the edit mask to follow. Once a mask is defined, it need not be defined again; simply use the letter.
  • BWZ (blank when zero) specifies that a field should not be printed if the entire field contains zeroes. BWZ must be coded whenever needed.
  • Literal is the format of the mask using the characters indicated on the previous page.
Redefining a Field

Sometimes it is necessary to break a field into several parts in order to get the exact information for your report. A birth date, for example, may have been originally entered as one field in a record. Now you want to access this information by either the month, day, or year. With EASYTRIEVE PLUS you can redefine that field in the following manner:

DATE-OF-BIRTH             103         6            N
    MONTH                 103         2            N
    DAY                   105         2            N
    YEAR                  107         2            N


DATE-OF-BIRTH | _ | 0 | 2 | 1 | 0 | 5 | 5 | _ | _ | _ | _ |
 position 103 105 107

 Start-location of New Fields
In this exhibit, the MONTH (02) starts in position 103 and occupies position 103 and 104. The DAY starts in 105 and occupies positions 105 and 106. Finally, YEAR starts in 107 and occupies 107 and 108.lves setting aside as an area of storage as a place to keep calculations or other information that is to be created during the running of an EASYTRIEVE PLUS program.

  • Define working storage by specifying W as the start location.
  • The values stored in this field are associated with each individual record.
Example

GROSS          30         4     N   2
NET            34         4     N   2
WORK-DEDUCT    W          4     N   2  HEADING ‘DEDUCTIONS’


1 comment:

New In-feed ads