SPI Programming Manual (G06.24+, H06.03+, J06.03+)

Summary of DDL for SPI
SPI Programming Manual427506-006
B-4
PICTURE (PIC) Clause
In DDL source code, a DEF statement referred to in a TYPE clause must precede the
DEF statement that refers to it. In manuals, likewise, DEF statements are usually
presented so that each DEF precedes all the DEFs that refer to it. Subsystem DEFs
referred to by other subsystem DEFs usually appear in the Common Definitions
section of the appropriate subsystem management programming manual.
For instance, in example 3 in Figure B-1
, the definition ZFUP-DDL-PART-RENAME-
OPTS refers to the definitions ZSPI-DDL-INT, ZSPI-DDL-DEVICE, and ZSPI-DDL-
INT2. The definition ZFUP-DDL-PART-RENAME-OPTS is described in the
File Utility
Program (FUP) Management Programming Manual
. The three definitions to which it
refers are standard SPI definitions contained in the SPI standard definition file that you
must source in, copy in, or load (depending on your programming language). These
standard definitions are described in Section 4, ZSPI Data Definitions
.
When the DDL compiler translates a reference-form DEF statement into TAL, C,
COBOL, or TACL, the structures are combined, and the resulting programming-
language structure declaration reflects the information in all the DEFs to which the
translated DEF refers, directly or indirectly. (In TACL, an exception to this rule is when
the TACL clause appears. For more information, see TACL Clause
on page B-5.)
PICTURE (PIC) Clause
The PICTURE clause (shortened here to its legal abbreviation PIC) defines the data
type and size associated with a DEF or with a field in a group DEF. The notation that
follows the PIC keyword corresponds to the PICTURE (PIC) notation in COBOL. A
DEF or field defined by a PIC clause translates to an ASCII character string with
certain characteristics defined by the notation. The TYPE and PIC clauses are mutually
exclusive for a particular variable or field.
OCCURS Clause
The OCCURS clause specifies a subscripted array of like fields or groups. In example
4 in Figure B-1
, the level-03 field Z-I represents an array of two 16-bit signed integers.
Likewise, the level-02 field Z-B represents an array of five ASCII characters.
REDEFINES Clause
The REDEFINES clause assigns a new name and, optionally, a new structure to a
previously defined data storage area. REDEFINES clauses are used in the SPI
definitions to allow variables to be addressed in several different ways depending on
the programming language and the needs of the program. For instance, example 4 in
Figure B-1
is an array of 5 ASCII characters that can be addressed as a TAL or TACL
STRUCT, as five bytes, or as two integers. (If the array is addressed as two integers,
the fifth byte is inaccessible because it is an unnamed filler byte.)