1.2.12 Edit Mask
Edit Mask allows you to specify the format in which you want your data returned for the application.
Edit Code
Specify the letter or number representing the format for output-capable numeric fields. This indicates the formatting to be done before a field is displayed or printed. The following editing can be done, depending on which edit code is specified:
- Leading zeros can be suppressed.
- The field can be punctuated with commas and decimal points to show decimal position and to group digits by threes.
- Negative values can be displayed with a minus sign or CR to the right. Zero values can be displayed as zero or blanks.
Refer to Standard Field Edit Codes for edit codes that are supported in this version of LANSA.
Edit Word
If you cannot accomplish the desired editing by using a predefined edit code, you may specify an edit word instead. An edit word specifies the form in which the field values are to print and clarifies the data by inserting characters, such as decimal points, commas, floating- and fixed-currency symbols, and credit balance indicators. Also use it to suppress leading zeros and to provide asterisk fill protection.
Warnings
- Use of edit words should only be attempted by experienced users as the validity checking done by LANSA is unsophisticated. Invalid edit words may pass undetected into the system and cause subsequent failures when attempting to create database files or compile programs. Refer to IBM manual Data Description Specifications for more details about EDTCDE (Edit Code) and EDTWRD (Edit Word) Keywords.
Rules
- Edit codes cannot be used with all numeric field types. Refer to 1.1 Field Types.
- Edit Codes cannot be entered if a 1.2.7 Reference Field has been specified as the code is inherited from the referenced field.
Tips & Techniques
- Use of edit masks for packed and signed fields is strongly recommended.
- Note: Edit word processing involving floating currency symbols is handled differently by the operating system for screens and reports. If such a problem occurs, it is best overcome by the use of a virtual field for report production and only using the real field for screen display.
Also See
1.1.1 Field Type Considerations