Version 4.3.2
 —  Report Option Parameters  —

Report Exits

Adabas Review provides two report user exits: one for detail reports and one for summary reports.

When creating a report, the user exit name (1-8 characters) is specified on the Report Options screen or in the batch REPORT statement. The actual report user exit must be provided in an executable library accessible to Adabas Review.

This document covers the following topics:


Detail Report User Exit

Adabas Review provides a detailed report user exit that is driven when a command log record is selected for the report. Only records that pass the processing rules are provided to the user exit.

This exit may be used to create SMF records, accounting records, or for any other purpose.

Start of instruction setTo invoke the user exit

  1. Specify the name of the user exit when creating the report.

    For an online report, enter the exit name in the Detail Exit field of the Report Options screen.

    When defining batch parameters, specify TYPE=DETAIL and the REPORT-EXIT= keyword of the REPORT statement. See the section REPORT Statement in Using Batch Facilities for more information.

  2. Provide the detail report user exit in an executable library accessible to Adabas Review.

The detail report user exit receives control using standard linkage:

R1 Address of the parameter list
R13 18 fullword savearea address
R14 Return address
R15 Entry-point address of the user exit

The parameter list contains two entries:

A(0) Reserved for future use
A(LOGREC) Address of the command log record

Top of page

Summary Report User Exit

Adabas Review provides a summary report user exit that is driven when

A report is summarized when it is

You may control the conditions that trigger the exit.

A report calling a summary exit is limited to one account (Order) field. If a summary report exit is specified and the report has multiple account fields, syntax error message REV00408 is issued.

Invoking the Summary Exit

Start of instruction setTo invoke the user exit

  1. Specify the name of the user exit when creating the report.

    For an online report, enter the exit name in the Summary Exit field of the Report Options screen.

    To control the conditions that drive the exit, the Report Options screen allows you to enter an Adabas command (Cmd field) and specify whether to call the exit at summarization time (Sum field). If the Adabas command field is left blank, the exit is only called when the report is summarized. If SUM is set to "N" and the Adabas command field is blank, the exit is never called.

    When defining batch parameters, specify TYPE=SUMMARY and the SUMMARY-EXIT= keyword of the REPORT statement. See the section REPORT Statement in Using Batch Facilities for more information.

  2. Provide the summary report user exit in an executable library accessible to Adabas Review.

    The summary report user exit receives control using standard linkage:

    R1 Address of the parameter list
    R13 18 fullword savearea address
    R14 Return address
    R15 Entry-point address of the user exit / Return code upon return

    The parameter list contains the following entries:

    Offset Address of . . .
    0 the reason for being called. This is a one-byte binary bit map.
    X'80' The exit was called because the specified command was selected.
    X'40' The exit was called during summary processing.
    X'01' If this bit is on in addition to one of the above, it indicates that this is the last account entry for the report.
    4 the Adabas command. This is a two-byte character field. If the exit was called with X'80', the field indicates the Adabas command that is used as a trigger.
    8 the report name. This is a 32-byte character field.
    12 the summary record.

Summary Record

The summary record is a variable length record that contains the field names and values for the report. It has a fixed portion and a variable portion. The record layout is as follows (see also Summary Record Layout:

************************************************************ 
*   FIXED PORTION OF SUMMARY RECORD                        * 
************************************************************ 
RECLEN   DS   H              TOTAL RECORD LENTH (INCLUSIVE)  
         DS   H              UNUSED                          
SUMCOUNT DS   H              NUMBER OF SUMMARY ENTRIES       
SOFFSET  DS   H              OFFSET OF SUMMARY PORTION       
ACCLEN   DS   H              LENGTH OF ACCOUNT DATA          
ACCTNAME DS   CL8            NAME OF ACCOUNT FIELD           
*                                                            
************************************************************ 
*   VARIABLE PORTION OF SUMMARY RECORD                     * 
************************************************************ 
ACCTDATA DS   0CL1           START OF ACCOUNT DATA           
ACCTPAD  DS   0CL1           PADS OUT TO DOUBLEWORD          
SUMFLD   DS   0CL8           NAME OF SUMMARY FIELD           
SUMVAL   DS   0XL8           VALUE OF SUMMARY FIELD


The exit is called for each account entry (Order Field) in the report.

The last two fields above repeat for each summary field in the report.

All fields names are 8-byte character fields.

All summary data values are 8-byte binary fields.

The ACCTDATA field above always starts at the same offset, but its length is variable.

Return Code

Upon returning from the exit, the user is responsible for setting a return code in R15:

R15 = 0 A zero return code indicates a normal return.
R15 # 0 A nonzero return codes indicates that the user requested the system to zero all summary data for this account entry.

Top of page