Performs formatting of output data values for use with PRINT and CRT commands.
Variable MaskExpression
Also see: FMT
MaskExpression Numeric Mask Codes: [j][n][m][Z][,][c][$][Fill Character][Length]
Mask Code | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
j | Justification
|
||||||||||
n | Decimal Precision: A number from 0 to 9 that defines the decimal precision. It specifies the number of digits to be output following the decimal point. The processor inserts trailing zeros if necessary. If n is omitted or is 0, a decimal point will not be output. | ||||||||||
m | Scaling Factor: A number that defines the scaling factor. The source value is descaled (divided) by that power of 10. For example, if m=1, the value is divided by 10; if m=2, the value is divided by 100, and so on. If m is omitted, it is assumed to be equal to n (the decimal precision). | ||||||||||
Z | Suppress leading zeros. NOTE: that fractional values which have no integer will have a zero before the decimal point. If the value is zero, a null will be output. | ||||||||||
, | The thousands separator symbol. It specifies insertion of thousands separators every three digits to the left of the decimal point. You can change the display separator symbol by invoking the SET-THOU command. Use the SET-DEC command to specify the decimal separator. | ||||||||||
c | Credit Indicator. NOTE: If a value is negative and you have not specified one of these indicators, the value
will be displayed with a leading minus sign. If you specify a credit indicator, the data
will be output with either the credit characters or an equivalent number of spaces,
depending on its value.
|
||||||||||
$ | Appends a Dollar sign to value. | ||||||||||
Fill Character and Length |
|
Mask Expression |
Source Value |
Returned Value (columns) 123456789012345678901234567890123456789012345678901234567890 |
---|---|---|
R2#10 | 1234.56 | 1234.56 |
L2%10 | 1234.56 | 1234.56000 |
R2%10 | 1234.56 | 0001234.56 |
L2*10 | 1234.56 | 12.34***** |
R2*10 | 1234.56 | *****12.34 |
R2,$#15 | 123456.78 | $123,456.78 |
R2,&$#15 | 123456.78 | $$$$$123,456.78 |
R2,& $#15 | 123456.78 | $ 123,456.78 |
R2,C&*$#15 | -123456.78 | $***123,456.78CR |
R((###) ###-###) | 1234567890 | (123) 456-7890 |
R((#3) #2-#4) | 1234567890 | (123) 456-7890 |
L& Text #2-#3 | 12345 | Text 12-345 |
L& ((Text#2) #3) | 12345 | (Text12) 345 |
T#20 | This is a test of the American Broadcasting System | This is a test of the American Broadcasting System |
D4/ | 12260 | 07/25/2001 |
JBC