SPI Programming Manual (G06.24+, H06.03+, J06.03+)
General SPI Programming Guidelines
SPI Programming Manual—427506-006
5-25
Suggestions on Data Representation
ensures that applications written in COBOL can accommodate the full range of 
values of these integers.
•
Do not use 32-bit floating point or 64-bit floating point values unless absolutely 
necessary. These data types are not supported by COBOL or TACL.
•
Do not use collections of bit flags, short integers, or short enumerated fields 
packed into a word unless there is a good reason to do so. If at all possible, pass 
this information in as many individual fields as necessary.
•
Regarding the previous three guidelines, if the data in question is already used in 
existing external interfaces to software for NonStop servers (such as system 
procedures), and it seems likely that the application would find it advantageous to 
be able to use the data in conjunction with those interfaces, that is a good reason 
to keep the data in its original format. One example of such data is the PID.
•
Do not use scale factors unless absolutely necessary.
•
Represent all numeric values as binary values, not as strings of ASCII digits.
•
Represent Boolean values as 16-bit signed integers. Use -1 for TRUE and 0 for 
FALSE. Except for the null value and possibly a reset value, all other values should 
be invalid.
•
Represent enumerated values as 16-bit signed integers.
•
Declare fields that are to contain ASCII strings like (for the example of an 8-
character field):
def subsys-DDL-CHARFIELD.
 02 Z-C pic x(8) null " ".
 02 Z-S redefines Z-C.
 03 Z-I type binary 16 occurs 4 times.
 02 Z-B redefines Z-C pic x occurs 8 times.
end
Some system procedures need word addresses for ASCII data. This declaration 
ensures that such addresses are available. In addition, Enable ignores 
REDEFINES clauses, taking only the first description of a field; Enform and TACL 
also take the first description by default, but do permit use of REDEFINES if you 
explicitly name the field. This form of declaration can thus be used correctly by 
TAL, COBOL, TACL, Enform, and Enable.
•
If you must declare an ASCII field that does not comply with the previous guideline, 
this can cause trouble in TAL when the field is located above the 32K boundary.
•
The SPI DDL definitions contain structures for a number of character-field sizes as 
well as for all of the standard SPI data types. These definitions are suitable for use 
in defining your own tokens or structures, and you are encouraged to use them. 
For further descriptions, see Section 4, ZSPI Data Definitions
.
If you have to define a character field with a number of subfields, the SPI 
definitions might not be suitable. The SPI definitions force word alignment, so if 










