Guardian Procedure Calls Reference Manual (G06.25+)
Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual—522629-013
F-10
The A Edit Descriptor
It is not mandatory that the data element be of type character. For example, an
INTEGER(16) element containing the octal value %015536 corresponds to the ASCII
characters “ESC” and “^”, which can be output to an ADM-2 terminal using an A2
descriptor to control a blinking field on the screen. For example:
In the last example, the data value was stored in a 2-byte INTEGER.
The “|” character is used to denote the boundaries of the output field.
On input, the operation of the A
w edit descriptor is as follows:
1. The number of characters specified by
w, or the number of characters contained in
the data element specified by
n, whichever is less, is moved from the external field
to the data element. The transfer begins at the left character of both the data
element and the external field.
2. If
w is less n, the data element is filled with (n-w) blanks on the right.
3. If
w is greater than n, the leftmost n characters of the field are stored in the data
element.
The following examples illustrate these considerations:
The “|” character is used to denote the boundaries of the input field.
Format Data Value External Field
A 'WORD' |WORD|
A4 'WORD' |WORD|
A3 'WORD' |WOR| (overflow set)
[RJ]A3 'WORD' |ORD| (overflow set)
A5 'WORD' |WORD |
[RJ]A5 'WORD' | WORD|
A %044111 |HI|
External Field Format Data Item Length Data Element Value
|HELLO| A5 5 characters 'HELLO'
|HELLO| A3 3 characters 'HEL'
|HELLO| A6 6 characters 'HELLO '
|HELLO| A5 6 characters 'HELLO '
|HELLO| A5 3 characters 'HEL'