This function generates a report. Optionally, the function presents the Generate a Report panel on which the report details can be entered, or the Report List.
This function has the following formats:
&CONTROL SHRVARS=($RW)
-EXEC $RWCALL OPT=GENERATE
[ MODE= { DEFGEN | GENERATE | PRTGEN } ]
[ APPL= repapplid ]
[ TYPE= { PUBLIC | PRIVATE } ]
[ USERID=userid ]
[ NAME=name ]
[ PRINTER=printer ]
[ OWNER=userid ]
[ HOLD= { NO | YES } ]
[ KEEP= { NO | YES } ]
[ COPIES=n ]
[ WAIT= { NO | YES } ]
[ SYSTEM=system ]
[ RECCAT=record category ]
-EXEC $RWCALL OPT=GENERATE MODE=LIST APPL=repapplid [ GROUP=group ]
Generates a report.
Specifies the mode of operation.
Displays the Generate a Report panel.
Generates the report.
Generates the report and displays the PSM Confirm Printer panel for the specification of printer details.
Displays a Report List in the form of an action list. The list contains all public and private reports for the current user which belong to the report application set in the APPL operand. Only those reports with a status of ACTIVE are listed.
Specifies the ID of the report application to which the report belongs.
Specifies the type of report.
Specifies that the report is a public report.
Specifies that the report is a private report.
Specifies the user ID of the user who owns the report if it is a private report.
Default: Value of &USERID if TYPE is set to PRIVATE
Note: If MODE is GENERATE or PRTGEN, and TYPE and USERID are not specified, the system looks for a PRIVATE report owned by the invoking user ID (that is, the value of &USERID) with the name specified. If not found, the system looks for a PUBLIC report with the name specified.
Specifies the name of the report.
Specifies the name of the printer. The printer must have previously been defined to PSM.
Default: Printer assigned to the owner of the report as their default printer
Specifies 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. The default is the value of &USERID.
Specifies whether PSM assigns the report a status of HELD when added to the Print Spool File.
Specifies whether PSM leaves the report on the Print Spool File after being printed.
Specifies the number of copies of the report to print.
Default: 1
Limits: 1 through 255
Specifies whether control is returned to the requester immediately after the report is started or on completion of the report.
Specifies the system name to use instead of the name defined in the table entry for the specified report application.
Specifies the record category to use instead of the category defined in the table entry for the specified report application.
Specifies the name of the group to which reports belong, to be included in the Report List when the MODE operand is set to LIST.
These variables can be set to the data criteria that is to be used by the service procedure and/or report exit procedure in determining the data to be included in the report when the MODE operand is not set to LIST. The valid value for n is in the range 1 to 99999. The first blank variable indicates the end of the data criteria.
These user data variables can be set to user data that is to be used by the service procedure and/or the report exit procedure when the MODE operand is not set to LIST. The variable c is between 0 and 5 alphanumeric and/or national characters. These variables are not set or cleared by the system, therefore must be completely managed by your installation-defined NCL procedures.
$RWCALL completed successfully. $RWFDBK is set as follows:
RETURN command entered or function key pressed
$RWCALL completed successfully. Request denied. &SYSMSG is set to an error message and &$RWFDBK is set to one of the following values:
User not authorized for the request
Report not defined
No report defined within the specified range
An error occurred. &SYSMSG is set to an error message.
&CONTROL SHRVARS=($RW) -EXEC $RWCALL OPT=GENERATE MODE=DEFGEN
&CONTROL SHRVARS=($RW) -EXEC $RWCALL OPT=GENERATE MODE=DEFGEN APPL=$SAIMPB TYPE=PUBLIC
&CONTROL SHRVARS=($RW) &$RWCRIT1 = &STR $PBSEVERITY=1 &$RWCRIT2 = &STR AND &$RWCRIT3 = &STR $PBFIXED=NO -EXEC $RWCALL OPT=GENERATE MODE=GENERATE APPL=$SAIMPB + TYPE=PUBLIC NAME=OPENPROBLEMS
&CONTROL SHRVARS=($RW) -EXEC $RWCALL OPT=GENERATE MODE=GENERATE APPL=$SAIMPB + TYPE=PRIVATE USER=USER01 NAME=TEST1
&CONTROL NOSHRVARS -EXEC $RWCALL OPT=GENERATE MODE=LIST APPL=ZPRPROB
When MODE is set to DEFGEN, the APPL, TYPE, USERID, NAME, PRINTER, OWNER, HOLD, KEEP and COPIES operands are used to initialize fields on the Generate a Report panel.
When MODE is set to LIST, the variables &$RWCRITn and &$RWUSRDn are ignored.
When MODE is set to PRTGEN, the PRINTER, HOLD, KEEP and COPIES operands are ignored. Instead, the values entered on the Confirm Printer panel are used to generate the report.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |