| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 ** |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| >> 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? --- |
|
#4
| |||
| |||
| 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.