ets@wrkgrp.uucp (Edward T Spire) (09/21/90)
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??
mayne@vsserv.scri.fsu.edu (William (Bill) Mayne) (09/22/90)
In article <1990Sep21.154558.25058@wrkgrp.uucp> ets@wrkgrp.uucp (Edward T Spire) writes: >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. mayne@nu.cs.fsu.edu 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!