Initialize ReportWriter

WTSupported in traditional Synergy 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])


Either 0 (no error occurred) or a handle to error data as defined in reports.def.


(optional) A logical pointing to an ELB (or shared image on OpenVMS) for user-overloaded routines. (a)


(optional) The name of the routine used to initialize user-overloaded routine names. (a or n)


(optional) The name of a report definition file. (a)


(optional) The name of a repository main file. (a)


(optional) The name of a repository text file. (a)


(optional) The name of a repository cross-reference file. (a)


(optional) The name of a ReportWriter window library. (a)


(optional) The name of a UI Toolkit renditions file. (a)


(optional) The header for ReportWriter to display instead of “ReportWriter.” (a)

%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.


For file-open logic see…

Report definition file (def_file)

Creating Report Definition Files

Repository main and text files (main_file and text_file)

Determining the repository files used

Repository cross-reference file (name_link_file)

Generate Cross-Reference utility (rpsxref)

ReportWriter window library (lib_file)

Working with the ReportWriter Window Library

UI Toolkit renditions file (rend_file)

Renditions and rendition schemes

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.