Problem:
Release: 3.1
How to change the format of columns ?
Resolution:
A data item entry in the Data Block consists of a name up to 30 bytes long, a data type code, and, for data items other than object references which have a fixed size, the number of bytes before and after the decimal point. At run time, all data items can be used or changed by the screenset or the calling program.
Data types within the data definition are represented by a code that enables the calling program to determine the data type. Each data item defined must have its type specified. Valid data type codes for a data item are any of the following:
X
Alphanumeric
9
Numeric
A
Alphabetic
S
Signed numeric
C
Computational (number of bytes must be 1.0, 2.0, 4.0, or 8.0)
C5
COMP-5 (number of bytes must be 1.0, 2.0, 4.0, or 8.0)
N
DBCS (N) (Double-byte Character Set)
G
DBCS (G)
OBJ-REF
Object reference
Numeric data items have a maximum length of 18 characters, including integer and decimal places. The number of decimal places after the point must not exceed 9. The following examples show Data Block entries using the maximum and minimum ranges you can enter:
LARGEST-VALUE 9 18.0
SMALLEST VALUE S 0.9
The following examples show Data Block entries using illegal data sizes:
TOO-MANY-DIGITS 9 22.0
TOO-MANY-DECIMAL-DIGITS 9 2.12
TOO-MANY-DIGITS-USED 9 17.4
The following example shows how to define an object reference:
MAIN-WINDOW-SBAR-OBJREF OBJ-REF
The following example shows a legal Data Block entry for a numeric data item with three places before the decimal point and two after as follows:
ARBITRARY-DATA-NAME 9 3.2
Such a data item can be used for calculation or display, but is otherwise equivalent to the COBOL description:
03 ARBITRARY-DATA-NAME PIC 9(3)v9(2).
The presentation of the data item, for example the suppression of leading zeros, is controlled by the picture string of the presenting entry field.
Note that Panels V2 treats X"00" characters as field terminators. This can so
metimes cause unexpected results, particularly with list boxes.