home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!paladin.american.edu!auvm!bcsc02!pruiter
- References: <REXXLIST%92081208542115@OHSTVMA.IRCC.OHIO-STATE.EDU>
- Message-ID: <92227.213340PRUITER@BCSC02.BITNET>
- Date: Fri, 14 Aug 1992 21:33:40 PDT
- Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET>
- Comments: Warning -- original Sender: tag was NETNEWS@BCSC02
- From: Perry Ruiter <PRUITER@BCSC02.BITNET>
- Subject: Re: Stem vars as arguments?
- Lines: 27
-
- > I have to declare over
- >100 stem variables in this Rexx program I am working on. I would really
- >like to have all those declare statements in another CMS file and Call
- >that file from within the Main Rexx program.
-
- What I've done in the past when faced with having to do something like
- this is - place the values in an external file (as valid rexx statements)
- and then read the file in a line at a time and interpret the line.
- Eg:
- /**/
-
- spec = 'CMREXX COPY S'
- do lines(spec)
- interpret linein(spec) /* read in and assign the values */
- end
- call lineout spec /* close the file */
- exit
-
- The EXECIO solution is left as an exercise. This has the advantage of
- not needing things like PIPES (this code will work back to VM/SP 3).
- Since it's just raw rexx it's also relatively portable.
- This also seems to be the way IBM suggests to do it as well. That's
- why there's a CMREXX COPY and SRREXX COPY on your S disk. The only trick
- is each line must be a valid rexx statement (you can't for instance
- have multiline comments). ... Perry
- * * *
- Perry Ruiter W131 1 Plum (604)389-3130
-