Cobol 'COPY' equivalent in REXX

This is a discussion on Cobol 'COPY' equivalent in REXX within the REXX forums in Programming Languages category; Hello, Probably elementary but when I write Cobol programs I frequently use 'COPY ABC' stmts etc for common bits of code, in particular that ABC might contain several procedural code paragraphs. Can I do the same in REXX? e.g. the following REXX is saved as COMMON1.REX and contains: /*REXX*/ load1: do things return print3: do other things return How might any REXX I subsequently write incorporate this COMMON1.REX file. Is there a 'standard' method of doing this? Would it matter that the COMMON1 suffix was .REX? Thanks. Graham ** Posted from http://www.teranews.com **...

Go Back   Application Development Forum > Programming Languages > REXX

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 05-26-2008, 11:06 AM
Graham Hobbs
Guest
 
Default Cobol 'COPY' equivalent in REXX

Hello,
Probably elementary but when I write Cobol programs I frequently use
'COPY ABC' stmts etc for common bits of code, in particular that ABC
might contain several procedural code paragraphs.

Can I do the same in REXX?

e.g. the following REXX is saved as COMMON1.REX and contains:

/*REXX*/
load1:
do things
return

print3:
do other things
return

How might any REXX I subsequently write incorporate this COMMON1.REX
file. Is there a 'standard' method of doing this? Would it matter that
the COMMON1 suffix was .REX?

Thanks.
Graham

** Posted from http://www.teranews.com **
Reply With Quote
  #2  
Old 05-30-2008, 05:24 PM
Shmuel (Seymour J.) Metz
Guest
 
Default Re: Cobol 'COPY' equivalent in REXX

In <qsjl34dib3k5m6fksi83rbmohtum8g33i1@4ax.com>, on 05/26/2008
at 11:06 AM, Graham Hobbs <ghobbs@cdpwise.net> said:

>Probably elementary


Alas, no. REXX lets you use external functions and procedures, but it
doesn't allow you to share name space with them or to imbed snippets of
code. The closest that you can come to that is to use enviroment objects
and packages in Open Object REXX.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org

Reply With Quote
  #3  
Old 05-30-2008, 07:48 PM
Steve Swift
Guest
 
Default Re: Cobol 'COPY' equivalent in REXX

Shmuel (Seymour J.) Metz wrote:
> Alas, no. REXX lets you use external functions and procedures, but it
> doesn't allow you to share name space with them or to imbed snippets of
> code. The closest that you can come to that is to use enviroment objects
> and packages in Open Object REXX.


Do you not consider .local variables to be a shared name space? Or were
you including those with environment objects?

I'm not entirely sure what .local variables/objects are, nor precisely
what I can and cannot do with them, but for my purposes they are
variables shared across all code running under the same instance of rexx.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Reply With Quote
  #4  
Old 05-31-2008, 07:57 PM
Shmuel (Seymour J.) Metz
Guest
 
Default Re: Cobol 'COPY' equivalent in REXX

In <4841df06$1@news.greennet.net>, on 05/31/2008
at 12:48 AM, Steve Swift <Steve.J.Swift@gmail.com> said:

>Do you not consider .local variables to be a shared name space? Or were
>you including those with environment objects?


I was including them with environment objects.

I don't know whether the OP uses OREXX or OOREXX. If he uses some flavor
of classical REXX then those options aren't available to him.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@library.lspace.org

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:33 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.