sharing external functions between cms rexx programs and xedit rexx programs 
Author Message
 sharing external functions between cms rexx programs and xedit rexx programs


Quote:
>I'm writing a system using REXX and XEDIT.  I have several useful
>external functions written in REXX that are specific to my application,
>and I want to be able to use them from the REXX EXECs and the REXX
>XEDIT macros.  Yet I find that I need two versions of each of these
>functions, one named FUNCTION EXEC and another named FUNCTION XEDIT.

>Does anyone know a way around this redundancy?

>Or would this question be more appropriate to some different list??

I tried to email this but it bounced, so I'll post, even though
I can't recall all the details. Maybe any resulting flames will
shed some additional light on the subject. :-)

You may think this is drastic, but when working as a systems
programmer in a big CMS shop a couple of years ago I found it
quite easy to modify the Rexx interpreter by assembly language
updates. For example, I added builtin functions. More relevant
to your problem, you can modify the search rules. The first place
to look for the hooks to do this is the SYSFUNCT macro. I changed
it to make it recognize a file type REXXFUNC which could be called
only as a function or subroutine, not as a command (like EXEC or
XEDIT might be). I don't have access to a CMS system currently,
so I can't easily look up the specifics. But this suggests to me
that a simple mod to SYSFUNCT could do what you need, too. Of
course it will require genning your own CMS. Unless you work in
the systems group or somebody there owes you a favor this may
not be practical. I hope it helps, though.

Bill Mayne
Florida State Univ.

P.S. Come to think of it, my REXXFUNC patch might do what you
need without any further changes. You would just rename the common
functions = REXXFUNC. If you are interested, your shop permits mods
to CMS, and it isn't obvious to you how to code it yourself send me
email and I'll try to find a copy. Since I don't work with CMS any
more I can't advise you on how to apply a patch like this, but
any VM systems programmer worth his or her salt should have no
trouble with it.

By the way, most of the source code for the Rexx interpreter is
excellent and well commented. Any assembly language programmer
could learn a lot about style and technique by studying it.
My hat is off to Mike Cowlishaw!



Wed, 10 Mar 1993 05:06:02 GMT  
 sharing external functions between cms rexx programs and xedit rexx programs
I'm writing a system using REXX and XEDIT.  I have several useful
external functions written in REXX that are specific to my application,
and I want to be able to use them from the REXX EXECs and the REXX
XEDIT macros.  Yet I find that I need two versions of each of these
functions, one named FUNCTION EXEC and another named FUNCTION XEDIT.

Does anyone know a way around this redundancy?

Or would this question be more appropriate to some different list??



Tue, 09 Mar 1993 23:45:58 GMT  
 sharing external functions between cms rexx programs and xedit rexx programs

Spire) says:

Quote:

>I'm writing a system using REXX and XEDIT.  I have several useful
>external functions written in REXX that are specific to my application,
>and I want to be able to use them from the REXX EXECs and the REXX
>XEDIT macros.  Yet I find that I need two versions of each of these
>functions, one named FUNCTION EXEC and another named FUNCTION XEDIT.
>Does anyone know a way around this redundancy?

In your PROFILE XEDIT, include the command 'COMMAND IMPCMSCP ON'.  This way,
when you type something on the XEDIT command line, if XEDIT doesn't know what
to do with it, it is passed to CMS for processing (and then to CP if CMS
doesn't know what to do with the command.)  So, you can have just one file
called FUNCTION EXEC, and when you type FUNCTION on the command line, or from
CMS, your program executes.

You can determine whether your EXEC is being called from CMS or from XEDIT
by including these lines in the EXEC:

'SUBCOM XEDIT'
if (rc=0) & ^CMSflag('SUBSET') then /* XEDIT stuff */
                               else /* CMS stuff   */

Quote:
>Or would this question be more appropriate to some different list??

Is there another place to duscuss such things like comp.sys.vmcms or such?
This is the only place I know of...


   714 S.Locust #13 (513) 523-7424 ||
  ------------------------------------------------------------------
   "Modesty is the art of drawing attention to whatever it is
    you're being humble about." - Alfred E. Neuman



Sat, 13 Mar 1993 23:28:21 GMT  
 sharing external functions between cms rexx programs and xedit rexx programs
Author: [Erk]

Lines: 47

Another suggestion:

Use one REXX exec that handles ANY console I/O.

Example follows:
------------------------------------------------------------------------
/*
SAMPLE EXEC A
*/
do i = 1 to 20
        call output('Printing #'i)
end
exit
------------------------------------------------------------------------
/*
OUTPUT EXEC A
*/
parse arg output_string
address command 'SUBCOM XEDIT'  ; in_xedit =(rc=0)
address command 'SUBCOM ISPEXEC'; in_ispf  =(rc=0)
                                  in_subset=(CMSflag('SUBSET'))
select
   when in_xedit & ^in_subset then do
           address XEDIT 'MSG' output_string
   end
   when in_ispf then do
           LMSG=output_string
           address ISPEXEC 'VPUT LMSG'
   end
   otherwise do
           say output_string
   end
end

exit
------------------------------------------------------------------------

There are obviously limitless numbers of formatting options that could
be added. In the version that I use, I send carriage control and interpret
each of the carriage control characters. (A '1' clears the screen, '0' skips
a line, '-' skips 2 lines... you get the idea)

+----------------------------------------+------------------------------+

!              uunet!tronsbox!akcs.erk   ! Ramis   Focus  Rexx    ISPF  !
! Be alert!  The world needs more lerts. ! PL/I    Cobol  C       BASIC !
+----------------------------------------+--------/\YUK/\---------------+



Wed, 17 Mar 1993 10:01:37 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Looking for CMS/XEDIT + REXX combo for AIX/Unix

2. Stopping A REXX Program With Another REXX Program

3. Passing REXX stems to external REXX functions -Reply

4. Passing REXX stems to external REXX functions

5. external rexx function calls (OS/2 REXX)

6. MVS-REXX: Howto write REXX external functions in C

7. REXX on NT invoking external programs

8. Calling external program from MVS REXX

9. Rexx Symposium Preliminary Program (Please Share)

10. PRO-REXX vs REXX/370 (VM/CMS)

11. PRO-REXX vs REXX/370 (VM/CMS)

12. Rexx or Obj-Rexx for web programming?

 

 
Powered by phpBB® Forum Software