Using IFI in a data sharing group
You can use IFI READA and READS calls in an application that runs on one member of a data sharing group to gather trace data from other members of the data sharing group.
You can also use an IFI COMMAND
call to execute a command at another member of a data sharing group.
In addition to the IFCA fields that you use for an IFI request for
a single subsystem, you need to set or read the following fields for
an IFI request for a data sharing group:
- IFCAGLBL
- Set this flag on to indicate that the READS or READA request should be sent to all members of the data sharing group.
- IFCADMBR
- If you want an IFI READS, READA, or COMMAND request to be executed
at a single member of the data sharing group, assign the name of the
group member to this field. If you specify a name in this field, Db2 ignores
IFCAGLBL. If the name that you specify is not active when Db2 executes
the IFI request, Db2 returns
an error.
Recommendation: To issue a Db2 command that does not support SCOPE(GROUP) at another member of a data sharing group, set the IFCADMBR field and issue an IFI COMMAND.
- IFCARMBR
- The name of the data sharing member that generated the data that follows the IFCA. Db2 sets this value in the copy of the IFCA that it places in the requesting program's return area.
- IFCAGRSN
- A reason code that Db2 sets when not all data is returned from other data sharing group members.
- IFCAGBM
- The number of bytes of data that other members of the data sharing group return and that the requesting program's return area can contain.
- IFCAGBNM
- The number of bytes of data that members of the data sharing group return but that the requesting program's return area cannot contain.
As with READA or READS requests for single Db2 subsystems, you need to issue a START TRACE command before you issue the READA or READS request. You can issue START TRACE with the parameter SCOPE(GROUP) to start the trace at all members of the data sharing group. For READA requests, specify DEST(OPX) in the START TRACE command. Db2 collects data from all data sharing members and returns it to the OPX buffer for the member from which you issue the READA request.
If a new member joins a data sharing group while a trace with SCOPE(GROUP) is active, the trace starts at the new member.
After you issue a READS or READA call for all members of a data sharing group, Db2 returns data from all members in the requesting program's return area. Data from the local member is first, followed by the IFCA and data for all other members.
Example
If the local Db2 is called DB2A, and the other two members in the group are DB2B and DB2C, the return area looks like this:
Data for DB2A
IFCA for DB2B (Db2 sets IFCARMBR to DB2B)
Data for DB2B
IFCA for DB2C (Db2 sets IFCARMBR to DB2C)
Data for DB2CIf an IFI application requests data from a single other member of a data sharing group (IFCADMBR contains a member name), the requesting program's return area contains the data for that member but no IFCA for the member. All information about the request is in the requesting program's IFCA.
Because a READA or READS request
for a data sharing group can generate much more data than a READA
or READS request for a single Db2, you
need to increase the size of your return area to accommodate the additional
data.