home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / rexx / 720 < prev    next >
Encoding:
Text File  |  1992-08-14  |  1.6 KB  |  40 lines

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