The share variables facility of NCL is used to pass data to the report exit procedure and to let it pass data back to the generator. The report exit procedure is executed with &CONTROL NOSHRVARS=(#RW) specified. All variables not starting with the characters #RW can be accessed and set by the report exit procedure and variables containing data (data fields) can be modified. The variables set by the generator indicating the status of the current environment are as follows:
This variable is set to indicate the processing that is to be performed by the report exit. This variable can be set to one of the following variables:
Initialization processing is to be performed
Termination processing is to be performed
Item processing is to be performed
This variable is set to the ID of the report application to which the report being generated belongs.
This variable is set to the type of report being generated. Type can be one of the following:
The report is a public report
The report is a private report
This variable is set to the user ID of the user who owns the report if it is a private report.
This variable is set to the name of the report being generated.
This variable is set to the brief description of the report being generated.
This variable is set to indicate the item that is being processed when &$RWOPT is set to ITEM. Item can be set to one of the following values:
Report header
Page header
Control break header
Data format or sequence of data formats
Control break trailer
Page trailer
Report trailer
This variable is set to the sort field number of the control break header or trailer when &$RWITEM is set to CH or CT.
This variable is set to a list of all the data format numbers separated by commas when &$RWITEM is set to DF. This variable can be modified to contain a list of data format numbers that are to be printed, in the order they are to be printed, separated by commas. To process but not print the record (that is, to perform totalling) set this variable to null.
This variable is set to the system name that is defined in the table entry for the report application to which the report belongs. The system name can be overridden on the GENERATE call to $RWCALL.
This variable is set to the record category that is defined in the table entry for the report application to which the report belongs. Record category can be overridden on the GENERATE call to $RWCALL.
This variable is set to the user ID of the user who is to own the report. This user ID is passed to PSM as the owning user ID for the report.
This variable is set to the number of pages that have been printed.
This variable is set to the number of lines that have been printed.
This variable is set to the number of records that have been processed.
This variable is set to the number of &$RWCRITn variables that contain data criteria. The value of this variable is in the range 0 to 99999.
These variables are set to data criteria if the &$RWCRITTOTAL variable is greater than zero. The variable n is a number in the range 1 to the value of &$RWCRITTOTAL. The data criteria is used by the service procedure to determine which data is to be included in the report. The format of these variables is dependent on the service procedure.
This is user data and is as set by the caller of $RWCALL or the service procedure. The variable c is between 0 and 5 alphanumeric and/or national characters. These variables can be used to pass user data through the generator to the report exit procedure. They can also be accessed by the service procedure. These variables can also be modified by the report exit procedure. The variables are never set or cleared by the system and must be completely managed by your installation-defined NCL procedures.
| Copyright © 2008 CA. All rights reserved. |
|