Falls into a DO loop to process all of the available list entries.2ð/
Within this loop, LSTSPL retrieves each list entry.21/, extracts the number of fields
returned.22/, and enters an inner DO loop to process all of the available list entry
fields.23/.
Within this inner loop, the program extracts the field information.24/ and processes
the field data based on the key field.25/.
When all fields for a given list entry have been processed, LSTSPL generates a
print line.26/ and proceeds to the next list entry.27/.
When all the list entries have been processed, LSTSPL ends.28/.
Processing Lists That Contain Data Structures
Some APIs support a list where each entry in the list is itself a data structure. A
good example is the Retrieve System Status (QWCRSSTS) API. It supports mul-
tiple formats for different types of information. The SSTS0300 format contains a list
where each entry in the list has the information about a particular storage pool. In
addition to the two critical fields (the offset to where the list begins field and the
number of entries in the list field), the format also supports a field that describes the
length of each entry. In the initial library list, each entry was 11-bytes long. But in
a storage pool, a field (length of pool information entry) describes the length and
should be used instead of a fixed-length increment. This allows for growth, such as
more information being available in another release for each list entry.
For example, if another field is added to describe some additional information about
a storage pool, it is probably added after the paging option field. The length of pool
information entry allows your code to be upwardly compatible while it retains the
locations (relative to the start of a list entry) of the current fields.
Retrieve Job Description Information API—Example
The following API has been included as reference information. This API is used in
many examples throughout this chapter and should not be used to code your pro-
grams. Refer to the
System API Reference
, SC41-5801, for the most recent
version of this API.
Parameters
Required Parameter Group:
The Retrieve Job Description Information (QWDRJOBD) API retrieves information
from a job description object and places it into a single variable in the calling
program. The amount of information returned depends on the size of the variable.
1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Qualified job description name Input Char(20)
5 Error code I/O Char(*)
Chapter 3. Common Information across APIs—Basic (OPM) Example 3-29