Open topic with navigation
WTSupported in traditional Synergy on Windows
USupported on UNIX
VSupported on OpenVMS
xcall RW_RPTLIST(channel, array, [start], [end], names_req, [#names], [filename][, sts])
Returned with the channel number of the open report definition file. (d2)
Returned with the array of report names. (a40)
(optional) Contains the name at which to start. (a40)
(optional) Contains the name at which to end. (a40)
The number of report names requested. (d4)
(optional) Returned with the number of report names. (d4)
(optional) The name of the report definition file to open. (a64)
(optional) The error status: (d1)
0 = Success
1 = Failure
RW_RPTLIST returns a list of report names from the specified report definition file. If no report definition file is specified, RPTDAT:reports.rpt, is used. RW_RPTLIST returns as many report names as are found or as are requested, whichever occurs first. The actual number of names in the array can be returned in #names.
Channel must be 0 on the first call to this routine, so the report definition file is opened. The report definition file is closed when either the end of file or an error condition occurs, or when names_req is 0.
You can specify a wildcard character (*) in your start value to return only the reports that start with a specific string (for example, only the reports that start with “ACCT”).
Array must be an arrayed variable.
Let’s assume the following data division.
record names ,20a40 ;Array for report names ct ,d2 ;Return count sts ,d1 ;Error status returned
This call would get the first 10 report names.
xcall rw_rptlist(chn, names,,, 10, ct,, sts)
This call would get the next 10 report names.
xcall rw_rptlist(chn, names, names,, 11, ct,, sts)
This call would get all reports (maximum of five) that start with “ACCT” from the report definition file myrpt.rpt.
xcall rw_rptlist(chn, names, "ACCT*",, 5, ct, "myrpt.rpt", sts)