The Output Definition function allows you to change many other physical attributes of the field output, including the field length and header of the column, as well as the Edit mask. To invoke the Output Definition function, type OD in the Def column next to the field name and press ENTER.
SNCLASS - Worksheet - SN3011
Ref DB Field Name Seq S/C Func Def Info Del
AA 1S RTKEY-TERM-SID ................. ___ ___ __ __ __ __
AB 1S* CLASS-ROSTER ................... ___ ___ __ __ __ __
AC 1S TERM-COLLEGE ................... ___ ___ __ __ __ __
AD 1S TERM-DEGREE .................... ___ ___ __ __ __ __
AE 1S TERM-MAJOR ..................... ___ ___ __ __ __ __
AF 1S TERM-ACAD-ACT .................. ___ ___ __ __ __ __
AH 1 2 RT005-TERM-CODE ................ 2__ ___ __ __ __ __
AI 1 2 RT010-SID ...................... 1__ ___ __ OD __ __
AQ 1 2 RT105-PRI-COLLEGE .............. 3__ ___ __ __ __ __
AS 1 2 RT120-PRI-MAJOR1 ............... 4__ ___ __ __ __ __
DE ________________________________ ___ ___ __ __ __ __
DF ________________________________ ___ ___ __ __ __ __
DG ________________________________ ___ ___ __ __ __ __
DH ________________________________ ___ ___ __ __ __ __
Upon pressing Enter, the following window appears:
****************** Define Field Output *********************** * Field: RT010-SID * * * * Format/Length ....... A9 * * Numeric sign ........ _ (Y/N) * * Output length ....... 9__ * * dec. places .. _ * * Heading ............. ______________________________ * * ______________________________ * * ______________________________ * * Edit mask * * ______________________________________________________ * * Suppress identical values .. _ (Y/N) * * Print zero values .......... _ (Y/N) * * Occurrences (1) ___ : ___ (2) ___ : ___ * **************************************************************The cursor will be positioned on the length field. Press Tab until you are on the Edit mask line. Do not press Enter until you have made all changes to this window. Use TAB or the arrow keys to navigate within this window.
To specify an edit mask, think about what you want the field output to look like. For alphanumeric fields, use an X to represent each character of the field.
For example, the conventional format for a Social Security Number is three characters, dash, two characters, dash, four characters. An Edit mask using X's to represent the digits of an SSN would look like this: XXX-XX-XXXX.
When the report is run, the SID field appears with the edit mask.
RT010-SID RT005-TERM-CODE RT105-PRI-COLLEGE RT120-PRI-MAJOR1
----------- --------------- ----------------- ----------------
110-00-0001 96F AS ARH
001-43-1020 96F AS MATH
052-34-7597 96F AS MATH
052-34-7598 96F AS ENG
001-43-1021 96F AS MATH
001-43-1011 96F AS MATH
001-43-1004 96F AS MATH
001-43-1012 96F AS MATH
An Edit mask for date fields that are alphanumeric is XXXX/XX/XX, where the first four characters are the 4 digit year, followed by slash, two character month, slash, two character day. Dates are stored in the file as YYYYMMDD. To display a date in the conventional MM/DD/YY format requires a user exit function (a future topic).
For numeric fields, the characters in the field are represented by the number 9 or the letter Z. When 9 is used the character displays even if it is zero. When Z is used the character does not display if it is zero. The Edit mask characters can be comma, period, or dash.
The following example uses the Accounts Receivable Billing Summary file to list refund amounts. The edit mask is applied to the BS-TOTAL-AMOUNT field.
BILLSUM - Worksheet - SN3011
Ref DB Field Name Seq S/C Func Def Info Del
AB 1S BS-TERM-SUBCODE ................ ___ ___ __ __ __ __
AG 1 2 BS-TERM ........................ 1__ ___ __ __ __ __
AH 1 2 BS-SUBCODE ..................... ___ ___ __ __ __ __
AI 1 2 BS-SUBCODE-DESC ................ 2__ ___ __ __ __ __
AR 1 2 BS-TOTAL-AMOUNT ................ 3__ ___ __ od __ __
BA ________________________________ ___ ___ __ __ __ __
BB ________________________________ ___ ___ __ __ __ __
BC ________________________________ ___ ___ __ __ __ __
The Edit mask used, Z,ZZZ,ZZ9.99, includes a "Z" or "9" for all 7 digits plus 2 decimal places of the total amount field. "Z" is used so leading zeroes will not appear on the report. Super Natural does not permit the use of the "Z" character to the right of the decimal point.
****************** Define Field Output *********************** * Field: BS-TOTAL-AMOUNT * * * * Format/Length ....... P7.2 * * Numeric sign ........ _ (Y/N) * * Output length ....... 7__ * * dec. places .. 2 * * Heading ............. Tuition_______________________ * * Amount________________________ * * ______________________________ * * Edit mask * * Z,ZZZ,ZZ9.99___________________________________ * * Suppress identical values .. _ (Y/N) * * Print zero values .......... _ (Y/N) * * Occurrences (1) ___ : ___ (2) ___ : ___ * **************************************************************
The results of the edit mask:
BS-TERM DESC TUITION
AMOUNT
------- ------------------------------ ------------
96F Refund 4,607.72
96F Refund 276.00
96F Refund 4,080.00
96F Refund 616.78
96F Refund 615.50
96F Refund 2,725.28
96F Refund 200.00
96F Refund 2,045.00
96F Refund 427.00
96F Refund 5,065.00
Back to: Super Natural Home Page