Retrieving records from a result set

Once you have created a result set (using the GET command), you can transfer some or all of the records it contains to local storage for processing.

You can use the FETCH command to retrieve a single resource table record, multiple selected records, or the entire result set at one time.

Each resource table record that you retrieve contains current data about the managed resource that it represents. Each record also contains certain status information that is maintained by CICSPlex SM.

This status information is presented as a resource table called OBJSTAT. The contents of the OBJSTAT resource table are described below:

In effect, each record in a result set contains a pair of resource tables: an instance of the OBJSTAT resource table followed by an instance of the resource table that was requested. The managed resource data and the OBJSTAT status information can be retrieved either as a pair or separately, depending on the option you specify with the FETCH command:
DATA
Retrieves only the specified resource table data.
STATUS
Retrieves only the OBJSTAT status information.
BOTH
Retrieves both the resource table data and the OBJSTAT status information.
Figure 1 illustrates the information available in result set records and the FETCH commands you can use to retrieve that information.
Figure 1. Using FETCH to retrieve result set records
This figure illustrates the use of the FETCH STATUS, FETCH DATA and FETCH BOTH commands to retrieve LOCKTRAN (MAS, Tranid, Program, Status, UseCount, and so on) and OBJSTAT (Num, Context, MAS, Object, CntRecords, and so on) data from the result set referenced by TOKENA.
The result set referenced by TOKENA was created by issuing a GET command for LOCTRAN records. Each record in the result set consists of LOCTRAN data and OBJSTAT data.
You can use the FETCH commands shown in Figure 1 to selectively retrieve some or all of the data. For example, Figure 2 shows the output of a FETCH DATA command.
Figure 2. Sample FETCH DATA output
This figure illustrates sample data from the command FETCH DATA ALL RESULT(TOKENA) INTO (AREA1)...


eyup1a3.html | Timestamp icon Last updated: Sunday, 4 June 2017