Trying to write REXX external function in COBOL 
Author Message
 Trying to write REXX external function in COBOL

I'm trying to write a REXX external function in COBOL, and I'm having
addressability problems (big surprise!). Has anyone done this, and if so, can
you send me an example?
TIA
--
***********************************************

*    Manager, Operations and Tech Support     *
*             United Retail, Inc.             *
*---------------------------------------------*
*         visit my meager web site at:        *
*    < http://www.*-*-*.com/ ;   *
***********************************************



Fri, 14 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL


Quote:
>I'm trying to write a REXX external function in COBOL,

Why would anyone who knows REXX stoop to 'writing C*B*L'  (I can't
even write the _word_) ?   I can see using Assembler for those
functions which can't be done in any other language, but....  what can
you do in C*B*L that you can't do easier (and after it's compiled,
FASTER) in REXX ?

Jim, you're disgusting.  I've dropped your entry from my address book,
and you're _not_ getting a Christmas card this year.

Frank Clarke
Tampa Area REXX Programmers' Alliance
Member of the REXX Language Association
Join us at http://www.rexxla.org
(Remove the currency symbol before replying.)



Sat, 15 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Quote:


> >I'm trying to write a REXX external function in COBOL,

> Why would anyone who knows REXX stoop to 'writing C*B*L'  (I can't
> even write the _word_) ?   I can see using Assembler for those
> functions which can't be done in any other language, but....  what can
> you do in C*B*L that you can't do easier (and after it's compiled,
> FASTER) in REXX ?

Frank,
Go easy on me old man! The REXX/370 compiler is *not* currently installed on our
system, and although I concur with the the statement that Assembler would be
better suited for such an application, it would take me *forever* to write
anything in Assembler (pity me). Next best thing for me would be COBOL (for
better or worse). You must agree that if nothing else it's a pretty interesting
exercise, somewhat along the lines of putting a round peg in a square hole. Or
look at it this way: what if I already had a nice little utility program written
in COBOL that I'd like to invoke as a REXX function? Sure, I could use address
LINKxxx or ATTCHxxx, but a function call would be nice.
Anyway, enough defending my position...has anybody done it?!?!?!
--
***********************************************

*    Manager, Operations and Tech Support     *
*             United Retail, Inc.             *
*---------------------------------------------*
*         visit my meager web site at:        *
*    <http://mypage.ihost.com/jimswebsite/>   *
***********************************************


Sat, 15 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Quote:


> >I'm trying to write a REXX external function in COBOL,
> Why would anyone who knows REXX stoop to 'writing C*B*L'

Reading 'stoop to' as need /want to', I'm very much interested
in your reason, Jim.  And since I don't do Xmas cards anyway,
don't worry about not receiving any from me...  ;-)

Regards,



Sat, 15 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Quote:

>Go easy on me old man! The REXX/370 compiler is *not* currently installed
on our
>system, and although I concur with the the statement that Assembler would
be
>better suited for such an application, it would take me *forever* to write
>anything in Assembler (pity me). Next best thing for me would be COBOL (for
>better or worse). You must agree that if nothing else it's a pretty
interesting
>exercise, somewhat along the lines of putting a round peg in a square hole.
Or
>look at it this way: what if I already had a nice little utility program
written
>in COBOL that I'd like to invoke as a REXX function? Sure, I could use
address
>LINKxxx or ATTCHxxx, but a function call would be nice.
>Anyway, enough defending my position...has anybody done it?!?!?!
>***********************************************

Yes, I have done this. In my case it was to run a Cobol/DB2 program by
invoking as a Rexx function. I got this working in a batch job and also
within an ISPF dialog. This coming weekend I'll dig out the code and post it
to the group.

Stefan Finka.



Mon, 17 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Quote:



> > >I'm trying to write a REXX external function in COBOL,
> > Why would anyone who knows REXX stoop to 'writing C*B*L'

> Reading 'stoop to' as need /want to', I'm very much interested
> in your reason, Jim.  And since I don't do Xmas cards anyway,
> don't worry about not receiving any from me...  ;-)

While 'stoop to' is a little strong, my reasons are very simple:

(1) Interpreted REXX isn't remarkebly fast, but unfortunately...
(2) We don't have the REXX/370 compiler installed on our LPAR...
(3) And while I'm not exactly proficient in Assembler...
(4) I *do* consider myself proficient in COBOL, having been coding it for over
10 years.

So, that's the scoop. In the meantime, I have received via email a working
example of a REXX subroutine written in COBOL from Dave Boll of FoMoCo (thanks
again, Dave!) and have put the methodology to work. And it *does* work at that
:-)

I wonder if that guy in the other thread figured out how to print labels yet...I
could use that program for my X-mas card list....as long as it's written in
Rexx. Or COBOL.
But not RPG-II.
--
***********************************************

*    Manager, Operations and Tech Support     *
*             United Retail, Inc.             *
*---------------------------------------------*
*         visit my meager web site at:        *
*    <http://mypage.ihost.com/jimswebsite/>   *
***********************************************



Tue, 18 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL


Quote:
>While 'stoop to' is a little strong, my reasons are very simple:
>(1) Interpreted REXX isn't remarkebly fast, but unfortunately...
>(2) We don't have the REXX/370 compiler installed on our LPAR...

Tsk!  If the compiler won't come to the REXX code, bring the REXX code
to the compiler, then ship the load module back.    But...   you say
interpreted REXX is _slower_ than C*B*L???    I didn't think
_anything_ was slower than C*B*L...   ;-)

Quote:
>I wonder if that guy in the other thread figured out how to print labels yet...I
>could use that program for my X-mas card list....as long as it's written in
>Rexx. Or COBOL.
>But not RPG-II.

Or PL/1 ?     Y'know, Jim, if you ken REXX, you're about a weekend
away from knowing PL/1....

Frank Clarke
Tampa Area REXX Programmers' Alliance
Member of the REXX Language Association
Join us at http://www.rexxla.org
(Remove the currency symbol before replying.)



Wed, 19 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Here is the COBOL as promised. Apologies for all the missing, duplicated and
redundant bits. I have chopped down a  large program to leave some relevant
examples. The COBOL code relating to the setting of the values of the SQLCA.
variables should be correct and complete.
The useful code in this program started out in life as something called
RXDB2V23 written by Dave Boll. (I don't have his address, but he was on
COMPUSERVE when I saw the original program). His program's main purpose was
to allow a Rexx program to make DB2 requests and, as such, it was required
to read, update and assign values to rexx variables. I  have reproduced
parts of his original code here merely to illustrate the technique of
addressing rexx variables from COBOL.

begin 666 rexxcobl.zip
<encoded_portion_removed>
end



Thu, 20 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

Quote:


> >While 'stoop to' is a little strong, my reasons are very simple:

> >(1) Interpreted REXX isn't remarkebly fast, but unfortunately...
> >(2) We don't have the REXX/370 compiler installed on our LPAR...

> Tsk!  If the compiler won't come to the REXX code, bring the REXX code
> to the compiler, then ship the load module back.    But...   you say
> interpreted REXX is _slower_ than C*B*L???    I didn't think
> _anything_ was slower than C*B*L...   ;-)

Frank, I *never* said that 'interpreted REXX is _slower_ than C*B*L'. The whole
purpose of this exercise (if you've really been paying attention) is to see how
a compiled COBOL function performs compared to (interpreted) REXX in general. As
far as the REXX/370 compiler is concerned, I have somewhat limited control over
what's installed in our environment, since the install would have to be done by
our service provider and I don't really *need* it, but I am working on getting
it installed anyway. Why am I defending my position *again*?! ;-(
Quote:

> >I wonder if that guy in the other thread figured out how to print labels yet...I
> >could use that program for my X-mas card list....as long as it's written in
> >Rexx. Or COBOL.
> >But not RPG-II.

> Or PL/1 ?     Y'know, Jim, if you ken REXX, you're about a weekend
> away from knowing PL/1....

I've never used it (never even *seen* it), but hey, I'm game...how do you rate
it?

--
***********************************************

*    Manager, Operations and Tech Support     *
*             United Retail, Inc.             *
*---------------------------------------------*
*         visit my meager web site at:        *
*    <http://mypage.ihost.com/jimswebsite/>   *
***********************************************



Fri, 21 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL


Quote:
>> Or PL/1 ?     Y'know, Jim, if you ken REXX, you're about a weekend
>> away from knowing PL/1....

>I've never used it (never even *seen* it), but hey, I'm game...
> how do you rate it?

Do you remember the last time Manhattan College played Syracuse ?   It
may be too far back for you (...1904... ;-) ; the score was 104-0.
(That was the year Manhattan decided they probably should steer clear
of football.)

PL/1 vs. C*B*L is strictly 'no contest'.  Liverpool bookies would
_not_ give you odds unless you wanted to bet on C*B*L.

Frank Clarke
Tampa Area REXX Programmers' Alliance
Member of the REXX Language Association
Join us at http://www.rexxla.org
(Remove the currency symbol before replying.)



Fri, 21 Apr 2000 03:00:00 GMT  
 Trying to write REXX external function in COBOL

I asked the same question on IBMLINK a few years ago, and got no answer.
When I finally worked it out for myself, I posted the solution to the TSO
(I think) forum.

If you can not find the post, drop me an email, and I will post you some
samples and a copybook entry for your linkage section.

Regards Gerard

--------------------
Gerard Nicol
Systems Programmer
StorageTek, Australia



Sat, 22 Apr 2000 03:00:00 GMT  
 
 [ 11 post ] 

 Relevant Pages 

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

2. Rexx functions written in COBOL (MVS TSO)?

3. Passing REXX stems to external REXX functions -Reply

4. Passing REXX stems to external REXX functions

5. sharing external functions between cms rexx programs and xedit rexx programs

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

7. AS/400 Cobol trying to call an ILE Cobol function in a service progam - Please help

8. Problem writing external function

9. help trying to write a function

10. Debugging a Rexx External Function under TSO

11. Rexx external functions in OS/2

12. Regina / Linux / external rexx functions

 

 
Powered by phpBB® Forum Software