How to Cobol COPY in REXX

This is a discussion on How to Cobol COPY in REXX within the REXX forums in Programming Languages category; Hello, Small problem. This is what is in my file common01 testab: s = 1 etc return print3: call lineou t. . etc return I would like to have this common01 included in several other REXX's. In Cobol I would code . . COPY COMMON01. and that would be fine. How does one accomplish this in REXX? Please, 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-28-2008, 09:33 PM
Graham Hobbs
Guest
 
Default How to Cobol COPY in REXX


Hello,

Small problem. This is what is in my file common01

testab:
s = 1
etc
return

print3:
call lineou t. .
etc
return

I would like to have this common01 included in several other REXX's.

In Cobol I would code . .

COPY COMMON01. and that would be fine.

How does one accomplish this in REXX?

Please, thanks.
Graham
** Posted from http://www.teranews.com **
Reply With Quote
  #2  
Old 05-30-2008, 01:24 AM
Steve Swift
Guest
 
Default Re: How to Cobol COPY in REXX

Graham Hobbs wrote:
> In Cobol I would code . .
>
> COPY COMMON01. and that would be fine.
>
> How does one accomplish this in REXX?


Create file (I call mine "subroutines.rex"):

::routine testab public
s = 1
etc
return

::routine print3 public
call lineou t. .
etc
return

Then at the bottom of your "main" routine include:

::Requires 'subroutines.rex'

Notes:

1. The quotes around "subroutines.rex" in the ::Requires statement are
only required on systems with case-sensitive filesystems
2. You cannot share simple variables (that "s=1" statement) between the
caller and called programs; see .local for shareable variables.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Reply With Quote
  #3  
Old 05-30-2008, 03:37 PM
Mie
Guest
 
Default Re: How to Cobol COPY in REXX


>> How does one accomplish this in REXX?


> ::routine testab public


> ::routine print3 public


> ::Requires 'subroutines.rex'


> .local


> Notes:


> 1.
> 2.


3. The code above ain't "REXX", isn't it?



---
Reply With Quote
  #4  
Old 05-30-2008, 05:26 PM
Shmuel (Seymour J.) Metz
Guest
 
Default Re: How to Cobol COPY in REXX

In <jdFQIlQNA5HE090yn@hotmai1.com>, on 05/30/2008
at 09:37 PM, spamgate@hotmai1.com (Mie) said:

>3. The code above ain't "REXX", isn't it?


It's not ANSI REXX, but it is valid ObjectREXX.

--
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:44 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.