%RW_INIT
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
|
status = %RW_INIT([user_routine_elb], [user_init], [def_file], [main_file], [text_file], & [name_link_file], [lib_file], [rend_file][, header])
Return value
status
Either 0 (no error occurred) or a handle to error data as defined in reports.def.
Arguments
user_routine_elb
(optional) A logical pointing to an ELB (or shared image on OpenVMS) for user-overloaded routines. (a)
user_init
(optional) The name of the routine used to initialize user-overloaded routine names. (a or n)
def_file
(optional) The name of a report definition file. (a)
main_file
(optional) The name of a repository main file. (a)
text_file
(optional) The name of a repository text file. (a)
name_link_file
(optional) The name of a repository cross-reference file. (a)
lib_file
(optional) The name of a ReportWriter window library. (a)
rend_file
(optional) The name of a UI Toolkit renditions file. (a)
header
(optional) The header for ReportWriter to display instead of “ReportWriter.” (a)
Discussion
%RW_INIT initializes ReportWriter for a series of calls to the RW_ routines. %RW_INIT must be called before any of the other RW_ routines are called. It opens the specified files following the file-open logic specific to that file; see table below.
File |
For file-open logic see… |
---|---|
Report definition file (def_file) |
|
Repository main and text files (main_file and text_file) |
|
Repository cross-reference file (name_link_file) |
|
ReportWriter window library (lib_file) |
|
UI Toolkit renditions file (rend_file) |
If user_routine_elb is passed, the default library for all user-overloaded routines is assumed to be user_routine_elb. Otherwise, if the logical RWUSRLIB is set, the default library is the file pointed to by RWUSRLIB. In either case, if the library cannot be opened, an error status is returned. If user_routine_elb is not passed and the logical RWUSRLIB is not set, no overloading of ReportWriter routines is done.
If user_init is passed and alphanumeric, the routine with the name user_init will be called to initialize ReportWriter. If user_init is passed and numeric, it is assumed to be an address returned from a call to the XADDR subroutine, and the routine at that address will be called. Otherwise, the RW_INIT_METHOD routine will be called. If ReportWriter cannot access user_init or the RW_INIT_METHOD routine as defined above, an error status will be returned.
Any routines that are not specifically overloaded will directly call default routines that have the default behaviors specified in the documentation.
If another %RW_INIT has been done, ReportWriter will call RW_CLOSE before opening files.