Creating and Initializing the Local Data Area [ HP RPG/XL Utilities-Part 4 RPGINIT ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 4 RPGINIT
Creating and Initializing the Local Data Area
The Local Data Area is a temporary file named LDAFILE and is used to pass
information between RPG programs and other programs or job control
procedures (such as PROCMON/3000). RPGINIT creates and initializes
LDAFILE to blanks. The file can be created as 1 through 32 multiples of
256 bytes (such as 256, 512, 768, 1024,..., 8192 bytes). To access the
Local Data Area from an RPG program, add an Input specification with a
"U" in column 18 and a "DS" in columns 19 through 20. This defines a
data structure named "LDA"; specification of the data structure name is
optional.
The LDA record layout is defined in the Input specifications following
the "UDS" specification. The runtime library defines the entire Local
Data Area as an array "LDA". The array is made up of 1-byte elements
totalling the size of the entire LDAFILE (that is, 256, 512, 768,
1024,..., 8192 bytes). The LDA array is defined by RPG; do not define
the array on an Extension specification.
When the RPG program begins, the Local Data Area is automatically read
into the LDA data structure. The data is available for first cycle (1P)
output. When the program terminates, the LDA data structure is
automatically written to LDAFILE.
NOTE If a file named LDAFILE already exists when RPGINIT is run, that
file is reinitialized to blanks and any prior data is lost.
MPE/iX 5.0 Documentation