Re: [Oorexx-devel] Unexpected behaviour with serial reuse of address ... with output replace stream 'streamName'

2023-06-13 Thread Ruurd Idenburg

Hi Leslie,

From what I read in the reference guide you re using he strem option 
correctly.


If you insert an osCommand~open or an osCommand~close between the first 
and second command it seems to work properly, but if you insert an 
osCommand~open('REPLACE') between the 2 it shows the same result that 
you got.


Ruurd Idenburg

On 6/13/23 05:45, J Leslie Turriff wrote:

Hello,
I'm trying out the address ... with output replace stream 'streamName' 
instruction, but it doesn't behave the way I
would expect, and there are no examples in either of the ooRexx manuals for 
other than stem and array.

What I'm trying to do is issue several OS commands and capture each 
command's output using the stream option.
The first address instruction works as expected, but successive address 
instructions return no lines.

Attached are two test programs that show the problem I'm having.

Perhaps I'm using stream incorrectly or inappropriately? but I can't 
tell by what is in the manuals.

Leslie
--Platform: Linux
Distribution: openSUSE Leap 15.4 (x86_64)
Open Object Rexx Version 5.0.0 r12583
Build date: Dec 23 2022
Addressing mode: 64


___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel



___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Unexpected behaviour with serial reuse of address ... with output replace stream 'streamName'

2023-06-13 Thread Rick McGuire
You are using the same stream object to process the file after each
command. After you read the first file, the stream object thinks it's at
the end-of-file and won't return anything else. You should close the stream
after each read and start with a fresh state.

Rick

On Mon, Jun 12, 2023 at 11:45 PM J Leslie Turriff 
wrote:

> Hello,
> I'm trying out the address ... with output replace stream
> 'streamName' instruction, but it doesn't behave the way I
> would expect, and there are no examples in either of the ooRexx manuals
> for other than stem and array.
>
> What I'm trying to do is issue several OS commands and capture
> each command's output using the stream option.
> The first address instruction works as expected, but successive address
> instructions return no lines.
>
> Attached are two test programs that show the problem I'm having.
>
> Perhaps I'm using stream incorrectly or inappropriately? but I
> can't tell by what is in the manuals.
>
> Leslie
> --Platform: Linux
> Distribution: openSUSE Leap 15.4 (x86_64)
> Open Object Rexx Version 5.0.0 r12583
> Build date: Dec 23 2022
> Addressing mode: 64
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Unexpected behaviour with serial reuse of address ... with output replace stream 'streamName'

2023-06-13 Thread Erich Steinböck
Hi Leslie,
you'll want to close the Stream after reading it.
lines() will implicitly open the Stream for r/w and the ADDRESS will raise
NOTREADY:13 on Windows but isn't detected on Linux.
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel