The share variables facility of NCL is used to pass data to the service procedure and to let it pass data back to the generator. The service procedure is executed with &CONTROL NOSHRVARS=(#RW) specified. All variables not starting with the characters #RW can be accessed and set by the service procedure. The variables set by the generator are as follows:
This variable is set to indicate the processing that is to be performed by the service procedure. This variable is set to one of the following values:
Initialization processing is to be performed
Termination processing is to be performed
Get the next record to be processed by the generator
Get the value of the sort fields for the next record to be processed by the generator. The values must be returned in the variables &$RWSFVALn and the data fields for the previous record must not be modified. The service procedure is called to do GETSF processing before each GET call only if control break headers or trailers are defined in the report definition.
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.
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 that is being generated.
This variable is set to the brief description of the report being generated.
This variable is set to the system name that is defined in the table entry for the report application to which the report belongs. 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 &$RWCRITTOTAL is greater than zero. The variable n is a number in the range 1 to the value of &$RWCRITTOTAL. These variables are to be used by the service procedure in determining the data 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 report exit procedure. The variable c is between 0 and 5 alphanumeric and/or national characters. These variables are used to pass user data through the generator to the service procedure and can also be modified by the service procedure. They can also be modified by the report exit procedure. These variables are never set or cleared by the system and must be completely managed by your installation defined NCL procedures.
This variable is set to the name of the data field defined as a sort field in the report. The variable n is a number in the range 1 to 10, corresponding to the sort field number assigned to the sort field.
This variable is set to the order defined in the report for the corresponding sort field. The variable n is a number in the range 1 to 10. This variable may be as follows:
Ascending order
Descending order
This variable is set to the start offset defined in the report for the corresponding sort field, if the records are not to be sorted using the full value of the field. The range is 1 to 255. The variable n is a number in the range 1 to 10.
This variable is set to the end offset defined in the report for the corresponding sort field, if the records are not to be sorted using the full value of the field. The range is the start offset to 255. The variable n is a number in the range 1 to 10.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |