The storage for the answer area is provided by your program. For
most requests, the answer area is optional. If provided, the answer
area always contains a header record. Sometimes the header record
is the only information stored in the answer area. If additional
information is stored, the answer area header indicates where an array
of data locator records can be found within the answer area. Depending
on the request and the size of the answer area, zero or more data
locator records are provided. Each entry in the data locator array
identifies the location of an array of data records. These data records
contain the functional output of the request. Both the data locators
and the data records themselves are stored in the answer area. If
the request is rejected, diagnostic data might be stored in the answer
area header to provide detailed information about the failure. An
answer area is optional for most requests, but desirable given the
potential need for this detailed diagnostic data.
If the answer area provided by your program is not large enough
to hold all of the relevant output data, the result will depend on
the size of the answer area and the type of request.
- If an answer area is not provided for a request that requires
one, the request is rejected.
- If the answer area is not large enough to hold the 64 byte
header record, the request is rejected. No information is stored
in the answer area. As appropriate, reissue the request with an answer
area at least as long as the header record. Depending on the request,
additional storage might be needed. Some requests require an answer
area that is longer than the header record.
- If the answer area is smaller than the minimum size required for
the request, the request is rejected. In this case, the minimum amount
of answer area storage needed to process the request is stored in
the answer area header. As appropriate, reissue the request with
an answer area at least as long as the indicated minimum amount.
Depending on the request, more storage might be desirable. For some
requests, an answer area larger than the required minimum allows more
information to be returned on each call, thus reducing the total number
of calls that must be made to get all the data.
- If the answer area is smaller than the size needed to hold all
of the available information, the request could complete with a return
and reason code indicating that some of the data was stored in the
answer area and that more information is available. In this case,
the amount of answer area storage needed to get all of the available
information is stored in the answer area header. As appropriate,
reissue the request with an answer area at least as long as the indicated
amount. For some requests, the amount of information can vary with
the dynamics of the system. In such cases, an answer area larger
than the indicated amount might be desirable so as to allow room for
potential growth in the amount of information to be returned.
- If the answer area is smaller than the size needed to hold all
of the available information, the request could complete with a return
and reason code indicating that the request should be reissued to
get the remaining data. In these cases, the request is intentionally
designed for iterative execution. Each time the request is issued,
XCF stores as much information as will fit in the provided answer
area.