In format-directed formatting, editing is controlled by edit descriptors in a format specification. A format specification is specified in a FORMAT statement or as the value of a character array or character expression in a data transfer statement.
Forms | Use | Page |
---|---|---|
A Aw | Edits character values | "A (Character) Editing" |
Bw Bw.m | Edits binary values | "B (Binary) Editing" |
Ew.d Ew.dEe Ew.dDe * Ew.dQe * Dw.d ENw.d ENw.dEe ESw.d ESw.dEe Qw.d * | Edits real and complex numbers with exponents | "E, D, and Q (Extended Precision) Editing" |
Fw.d | Edits real and complex numbers without exponents | "F (Real without Exponent) Editing" |
Gw.d Gw.dEe Gw.dDe * Gw.dQe * | Edits data fields of any intrinsic type, with the output format adapting to the type of the data and, if the data is of type real, the magnitude of the data | "G (General) Editing" |
Iw Iw.m | Edits integer numbers | "I (Integer) Editing" |
Lw | Edits logical values | "L (Logical) Editing" |
Ow Ow.m | Edits octal values | "O (Octal) Editing" |
Q * | Returns the count of characters remaining in an input record * | "Q (Character Count) Editing" |
Zw Zw.m | Edits hexadecimal values | "Z (Hexadecimal) Editing" |
where:
w, m, d, and e can be:
+-------------------------------IBM Extension--------------------------------+
+----------------------------End of IBM Extension----------------------------+
You cannot specify kind parameters for w, m, d, or e.
+-------------------------------IBM Extension--------------------------------+
There are two types of Q data edit descriptor (Qw.d and Q):
+----------------------------End of IBM Extension----------------------------+
Forms | Use | Page |
---|---|---|
/ r / | Specifies the end of data transfer on the current record | "/ (Slash) Editing" |
: | Specifies the end of format control if there are no more items in the input/output list | ": (Colon) Editing" |
$ * | Suppresses end-of-record in output * | "$ (Dollar) Editing" * |
BN | Ignores nonleading blanks in numeric input fields | "BN (Blank Null) and BZ (Blank Zero) Editing" |
BZ | Interprets nonleading blanks in numeric input fields as zeros | "BN (Blank Null) and BZ (Blank Zero) Editing" |
kP | Specifies a scale factor for real and complex items | "P (Scale Factor) Editing" |
S SS | Specifies that plus signs are not to be written | "S, SP, and SS (Sign Control) Editing" |
SP | Specifies that plus signs are to be written | "S, SP, and SS (Sign Control) Editing" |
Tc | Specifies the absolute position in a record from which, or to which, the next character is transferred | "T, TL, TR, and X (Positional) Editing" |
TLc | Specifies the relative position (backward from the current position in a record) from which, or to which, the next character is transferred | "T, TL, TR, and X (Positional) Editing" |
TRc | Specifies the relative position (forward from the current position in a record) from which, or to which, the next character is transferred | "T, TL, TR, and X (Positional) Editing" |
oX | Specifies the relative position (forward from the current position in a record) from which, or to which, the next character is transferred | "T, TL, TR, and X (Positional) Editing" |
where:
+-------------------------------IBM Extension--------------------------------+
r, k, c, and o can also be expressed as an arithmetic expression enclosed by angle brackets (< and >) that evaluates into an integer value.
+----------------------------End of IBM Extension----------------------------+
Kind type parameters cannot be specified for r, k, c, or o.
Forms | Use | Page |
---|---|---|
nHstr | Outputs a character string (str) | "H Editing" |
'str' "str" | Outputs a character string (str) | "Apostrophe/Double Quotation Mark Editing (Character-String Edit Descriptor)" |