dfmbuf_retain: Retain a logical record in a z/TPFDF multiple LREC buffer
Use this general function to retain the current LREC in an existing z/TPFDF multiple LREC buffer. You can read the LREC later in your application program by using a dfmbuf_read_stack function.
Last updated
Added for PUT11.
Format
#include <cdf.h>
void dfmbuf_retain(dft_buf *buf_ptr, dft_srn stacknbr); - buf_ptr
- is a pointer to a z/TPFDF multiple LREC buffer or
the pointer to a local copy of a z/TPFDF multiple LREC buffer header.Note: If you specify a local copy of the header, this ECB can traverse the buffer by using its own keys while the ECB maintains its own buffer position. The multiple LREC buffer must be in read-only mode while it is being accessed by more than one ECB.
- stacknbr
- is a stack value in the range 1 - 6 to assign to the LREC to be retained.
Entry requirements
- The z/TPFDF multiple LREC buffer that the buf_ptr parameter references must be allocated and previously initialized by using the dfmbuf_init_v2 function.
- A current LREC must be established, for example, by using a dfmbuf_read function.
Return conditions
None.
Error return
For more information about how to check the error indicators, Identifying return indicators and errors.
Programming considerations
None.
Examples
The following example reads an
LREC in the z/TPFDF multiple LREC buffer and
then retains the LREC by using stack value 5.
lrec_ptr = dfmbuf_read(buffer_ptr, DFMBUF_BEGIN);
if (DFMBUF_OK(buffer_ptr)) {
dfmbuf_retain(buffer_ptr, 5);
}