FMT vs PIC

From BR Wiki
Revision as of 02:29, 21 February 2013 by Laura (talk | contribs)
Jump to navigation Jump to search

With some exceptions, FMT is best suited to handling strings, whereas PIC is generally used with numeric data only.


The FMT spec can be used in the same places that PIC is allowed in INPUT FIELDS, RINPUT FIELDS and PRINT FIELDS statements. The FMT keyword must be followed by up to 40 character identifiers and/or insertion characters.

Character identifiers tell the system which characters are allowed in the current position, and they identify the way in which the data part should be formatted for input. (Business Rules considers any section of a FMT spec, which is separated from other sections by one or more insertion characters to be a data part.) The following character identifiers are currently available:

P or p Protected. Business Rules will not allow the cursor to rest on or change any data that is displayed in this position.


File:FmtChart2.jpg
Insertion characters are displayed exactly as they appear in the FMT specification. Business Rules treats any keyboard character that is not a character identifier (listed above) as an insertion character.

Insertion characters are inserted for the operator's benefit. They will not be in the data. Note that "P" can be used to protect characters that you want to appear in the data.