> (Apologies in advance if I've sent this to an inappropriate list)
> Is it possible to pass an instance of an object from an externally
> called routine back to the parent routine? If so, how?
> Example:
> Assume two separate REXX routines (separate files):  MAIN.rex and
> LOGGER.rex.
> I'd like to be able to, from MAIN, call LOGGER (passing it a file
> name), and have LOGGER create an instance of a stream object, open the
> file, and then pass the stream object back to MAIN at which point MAIN
> would be able to use the stream object to write to the file (or
> perhaps pass it to other external routines that would also be able to
> use it).
> I'm already doing this with LOGGER being a routine that is part of
> MAIN (both located in the same file), but I want to be able to break
> LOGGER out into a separate file.
> Is this possible?
Sure. Break out the routines add the keyword "PUBLIC" to each routine in
LOGGER.rex. Then, before using the public routines which now reside in
LOGGER.rex you need to "CALL LOGGER", which will cause its public
routines (and public classes) to become visible. 'Thereafter you can
access all those routines as if they were defined in MAIN.rex.
> I've been writing and using REXX for many years in the mainframe
> environment so I'm quite familiar with the core language, but the
> facilities of ooREXX are still somewhat new to me.
If you are developing a logging facility for Rexx you might want to
learn about an ooRexx implementation of the log-framework that
originates from the Java world. Here's an article to that ooRexx
framework, demonstrating how to use it:
The ooRexx code of the "log4rexx" framework can be downloaded from:
<>, in
case it is of interest for you.



This email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
Oorexx-devel mailing list

Reply via email to