Data gatherer

The data gatherer runs in problem state, with a key of 8, and in 31-bit addressing mode. The data gatherer must be reenterable. It receives control by a BALR instruction and must save the registers when it receives control and restore the registers when it returns control. Register 13 contains the address of the register save area; register 14 contains the return address; and register 15 contains the entry address.

Upon entry to the data gatherer, register 1 points to a contiguous list of seven addresses that point to seven input parameters. The first address points to the first parameter, the second address points to the second parameter, and so forth. The input parameters are:

First Parameter: A fullword entry code that must always be X‘2’.

Second Parameter: The operands, if any, specified by the report user when he requested the report, in the form:

Operand 1 Operand 2
LL text
LL
A two-byte length field indicating the length of the following text (does not include the two bytes of LL)
text
A character string of up to 32 characters containing the input operands

When the report has no operands or the report request did not include operands, LL is set to zeros.

RMF™ determines the operands to be placed in text by scanning the report request. The first non-blank character after the report name is assumed to be the first character of the operand field. The next blank character is assumed to mark the end of the operand field.

Third Parameter: The default operands from ERBFMENU or ERBBMENU, in the form:

Operand 1 Operand 2
LL text
LL
A two-byte length field indicating the length of the following text (does not include the two bytes of LL)
text
A character string of up to 32 characters containing the default operands

When the report has no operands or no default operands, LL is set to zeros.

Fourth Parameter: The pointer to the SMF record buffer where your routine is to place the data it gathers.

Fifth Parameter: The first of the two words reserved for the use of your routines.

Sixth Parameter: The second of the two words reserved for the use of your routines.

Seventh Parameter: A byte containing the number of the subpool to use when you issue a GETMAIN to obtain the storage your routine requires.

The processing your data gathering routine performs is determined largely by the nature of the report for which you are gathering data. This processing should include a validation of the entry code in the first parameter to verify that it is X‘2’. If it is not, set a return code of 8 in register 15 and return control.

If the report has operands that can be specified when the report is requested, check the second input parameter to determine if the request specified operands. If it did, validate the syntax of the operands; if the syntax is invalid, set a return code of 4 in register 15 and return control. If the request did not specify operands, verify the syntax of the default menu operands passed as the third input parameter; if the syntax is invalid, set a return code of 24 in register 15 and return control.

Your routine should complete the required fields in the SMF record common section (the  B  fields in Figure 1), using the RMF mapping macro ERBSMF79 to access the fields in the common section. The address of the storage buffer obtained for your record is passed in the fourth input parameter. Your routine would gather the data required and format the data section of the record as agreed upon by convention between the data gatherer and the data reporter. Should your routine locate no data that is applicable to the report requested, set a return code of 16 in register 15 and return control.

When your routine has finished processing, set a return code in register 15 and return to the caller by branching on the contents of register 14. Table 1 shows the possible return codes, their meaning, and the action RMF takes in response. These return codes apply to both the data gatherer and the data reporter.

Note: If your report will be run only during a display session, you can perform both the data gathering function and the data reporting function in the data reporter module. In this case, your data gatherer's only function would be to set a return code of zero in register 15. However, if you choose to perform both functions in the data reporter module, your report cannot run during a Monitor II background session and, during a display session, you will not be able to use the recall command to re-display your report.
Table 1. Return Codes from the Data Gatherer and Data Reporter
Code Meaning

RMF Response
(Display Session)

RMF Response
(Background Session)

0 Successful completion. The session continues. The session continues.
4 Invalid operand syntax. The command is displayed as entered. Message ERB409I is issued. The current measurement continues if the error was detected by the data reporter and RECORD is in effect; otherwise, the measurement is discontinued. The session continues. The operator can modify the session options.
8 Invalid entry code. Abend - the user code is 1402. Abend - the user code is 1402.
12 I/O error. Messages ERB403I and ERB404I are displayed, including the SYNAD text. The current measurement continues when RECORD is in effect, but no subsequent reports are printed; otherwise, the measurement is discontinued. The session continues.
16 No data found. Message ERB405I is displayed. Message ERB405I is issued. No report or SMF record is produced for this interval. All measurements continue.
20 ESTAE macro failed. Message ERB406I is displayed. Message ERB406I is issued. The current measurement continues if the error was detected by the data reporter and RECORD is in effect; otherwise, the measurement is discontinued. The session continues.
24 Menu default operand syntax error. Message ERB407I is displayed, including the menu defaults and advice to retry the report, specifying all operands. Message ERB407I is issued. The current measurement continues if the error was detected by the data reporter and RECORD is in effect; otherwise, the measurement is discontinued. The session continues.
28 The amount of data to be gathered exceeds the number of available relocate blocks. Message ERB411I is displayed. Message ERB411I is issued. The report or SMF record produced for the interval includes only the data gathered before the condition was detected. All measurements continue.
32 Monitor I report not active. Message ERB412I is displayed. Message ERB412I is issued. No report or SMF record is produced for the interval. All measurements continue.
36 Monitor I interval is less than Monitor II interval. Message ERB413I is displayed. Message ERB413I is issued. No report or SMF record is produced or the interval. All measurements continue.
40 The SRM's store channel path status facility is not active. Used by channel path activity (CHANNEL) report. Message ERB264I is displayed. Message ERB264I is issued. No report or SMF record for channel path activity is produced; the current measurement is discontinued. All other measurements continue.
44 Report option no longer applicable. Message ERB434I is displayed. Message ERB434I is issued. No SMF record is produced for this report. All other measurements continue.
48 No transaction data available. Message ERB435I is displayed. Message ERB435I is issued. No SMF record is produced for this report. All other measurements continue.
52 SRM mode changed - interval skipped. Message ERB436I is displayed. Message ERB436I is issued. No SMF record is produced for this report. All other measurements continue.
>56 Unexpected. Message ERB408I is displayed. Message ERB408I is issued. The current measurement continues if the error was detected by the data reporter and RECORD is in effect; otherwise, the measurement is discontinued. The session continues.