said:
> >
> >>-----BEGIN PGP SIGNED MESSAGE-----
> >
> >>Is there an elegant way to invoke a command from within REXX and have it
> >>redirect the output to the standard input? Right now I am using pipes as
> >>in the example:
> >
> >I suspect you want to invoke bar and pipe it's output to RXQUEUE:
> >
> > 'bar | rxqueue'
> >
> >Then use
> >
> > parse pull
>
> So I have to replace all of my calls to IO functions such as linein()
> and charin() with a 'parse pull somevariable' instruction? Then use
> 'somevariable' in the expression in place of linein().
no no no no no no no no no no no no no no no no no no
If possible, look in "Teach Yourself ReXX In 21 Days' by William
and Esther Schindler, pages 401-403.
You direct LineIn() and LineOut() to file 'QUEUE:',
and replace any test for end of queue with Queued().
Example:
/* ReXX */
'find "REM" \config.sys | rxqueue '
/* This uses the default queue, SESSION */
DO WHILE ( Queued() >< 0 )
inline1 = LineIn( 'QUEUE:' )
SAY 'Test.....'
SAY inline1
END
I just cranked this out a few minutes ago as an example.
Rxqueue.exe, etc. really serves the same purpose for ReXX
in OS/2 as input from a pipe for PERL.
Queue() (function, not filter), can be used to set up
multiple queue's if needed.
'QUEUE:' is an under-documented feature. ;-)
no no no no no no no no no no no no no no no no no no
>
> It seems a lot easier to just replace the calls to linein() with
> calls to linein('\\temp\\tempjunk') and just use tempoarary files.
> Besides, I would have to re-do the logic of my program since I was
> already using a stack. I would have to check after each 'parse pull'
> to see if I had the re-directed STDIN or if I had stack data.
>
>
> ===============================================================
> Gregory W. Smith (WD9GAY) gsmith@well.com
> finger gsmith@well.com for PGP public key
Regards,
Dallas E. Legan II
(562) 862 - 4854 ext. '*'
L
E
G
A
N
@
A
C
M
.
O
R
G
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
>> Next Message >>
Return to [ 03 |
November |
1998 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.