home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!uwvax!uchinews!ellis!sip1
- From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
- Newsgroups: comp.lang.rexx
- Subject: Reading inline "code" as input?
- Message-ID: <1992Sep8.163642.16833@midway.uchicago.edu>
- Date: 8 Sep 92 16:36:42 GMT
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: sip1@midway.uchicago.edu
- Organization: Dept. of Econ., Univ. of Chicago
- Lines: 35
-
- Is there any way a REXX program can take data input from itself
- (without resorting to QUEUE or PUSH)?
-
- More specifically, say I have a program as follows:
-
- /* Sample Program */
- SIGNAL process
- Ant Dog Cat Mouse
- Donkey Mule Pig Horse
- :process
- eof = 0
- do until eof
- /* Input that data here and process. */
- end
- EXIT
-
- I know I can detect how many lines are in the program -- there's a
- function to do that -- but can I actually read the lines in?
-
- Is it kosher to STREAM(...OPEN) the REXX program itself to read in
- inline data, i.e. can a REXX program STREAM(...OPEN) itself? What is
- the best way to detect the full pathname to the REXX program itself,
- while it is running, for that purpose?
-
- The reason I am asking is that I am working on enhancements to
- REXXShip, and a nice one would be to incorporate XXEncode
- compatibility, which would mean having an unmodified stretch of bytes
- in the middle of the code for purposes of encoding a binary file. The
- REXX "wrapper" would read that stretch of bytes and decode the file.
-
- --
- Timothy F. Sipples | The OS/2 FREQ. ASKED QUESTIONS LIST is avail. from
- sip1@ellis.uchicago.edu | 128.123.35.151, anonymous ftp, in /pub/os2/all/faq.
- Dept. of Econ., Univ. | Or from LISTSERV@BLEKUL11.BITNET (send "HELP").
- of Chicago, 60637 | Family Values Means a Job
-