Menu

#594 read stdout

None
rejected
nobody
None
none
1
2015-10-19
2014-04-15
Igor
No

in vbs (visual basic script) i can do

Set DDE_EXE=WshShell.Exec(WHERE_WE & "\dde.exe " & WScript.Arguments(1))
Do While Not DDE_EXE.StdOut.AtEndOfStream
L = DDE_EXE.StdOut.ReadLine
Loop

when i run DDE.exe, i dont wait when dde.exe finish and closes STDOUT,
i begin read stdout of dde.exe immediately!
i try rexx, i can read stdout but when dde.exe finished.
dde.exe- process of reciveing stock price in real time mode.
Can i ask developers to realize this future?
Thanks.

Related

Feature Requests: #594

Discussion

  • Erich

    Erich - 2015-10-18

    Igor, sorry for not answering earlier.
    We'd need an example to reproduce the issue.
    Are you aware that in Rexx you can open files for shared reading with e.g.

    s = stream(.stdin, "C", "OPEN READ SHARED")
    
     
  • Igor

    Igor - 2015-10-19

    Thanks Erich. How i can read STDOUT of child process (for examlpe DDE.EXE or NETSH.exe or MY.EXE) and dont wait while child process finish?

    when i use RXQUEUE Filter

    /*rexx*/
    'dde.exe|RXQUEUE'
    do forever
         parse pull MYLINE
    end
    

    i can read QUEUE only when dde.exe finished & closed own STDOUT. But dde.exe run 7*24 & never stop.

    Thanks

     
    • Erich

      Erich - 2015-10-19

      'dde.exe|RXQUEUE'
      do forever ..

      Igor, with this the "do forever" loop will only start after the command has
      finished.

      You might want to run the command with 'START dde ..' and use a named
      queue. Something like:

      queueName = .RexxQueue~create          -- a unique queue name, not a
      .RexxQueue object
      queue = .RexxQueue~new(queueName)      -- create the queue we'll use to
      capture command output
      
      'start cmd /c "dir /s \ | rxqueue"' queueName
      
      do forever
        say queue~linein
      end
      

      As an alternative without rxqueue might write just the filter in ooRexx
      (which just reads stdin) and run it via 'DDE | RexxFilter.rex'

      Erich

      On Mon, Oct 19, 2015 at 3:47 PM, Igor ingvaring@users.sf.net wrote:

      Thanks Erich. How i can read STDOUT of child process (for examlpe DDE.EXE
      or NETSH.exe or MY.EXE) and dont wait while child process finish?

      when i use RXQUEUE Filter
      ~~~~
      /rexx/
      'dde.exe|RXQUEUE'
      do forever
      parse pull MYLINE
      end
      ~~~~
      i can read QUEUE only when dde.exe finished & closed own STDOUT. But
      dde.exe run 7*24 & never stop.

      Thanks


      [feature-requests:#594] read stdout

      Status: unread
      Milestone: v4.2.0
      Created: Tue Apr 15, 2014 07:05 PM UTC by Igor
      Last Updated: Sun Oct 18, 2015 05:06 PM UTC
      Owner: nobody

      in vbs (visual basic script) i can do

      Set DDE_EXE=WshShell.Exec(WHERE_WE & "\dde.exe " & WScript.Arguments(1))
      Do While Not DDE_EXE.StdOut.AtEndOfStream
      L = DDE_EXE.StdOut.ReadLine
      Loop

      when i run DDE.exe, i dont wait when dde.exe finish and closes STDOUT,
      i begin read stdout of dde.exe immediately!
      i try rexx, i can read stdout but when dde.exe finished.
      dde.exe- process of reciveing stock price in real time mode.
      Can i ask developers to realize this future?
      Thanks.


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/oorexx/feature-requests/594/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       

      Related

      Feature Requests: #594

  • Erich

    Erich - 2015-10-19
    • status: unread --> rejected
    • Milestone: v4.2.0 --> None
     
  • Igor

    Igor - 2015-10-19

    I did so. Its not convinient for me. Because console window of cmd is visible(((

     
    • Erich

      Erich - 2015-10-19

      console window of cmd is visible

      START has a /MIN parameter to hide the window, and a /B parameter to run in
      background

      As an alternative to starting a separate command window, use a standard
      pipe (DDE | RexxFilter) and just write RexxFilter.rex (reads .stdin and
      does any necessary processing). Makes it more portable, too.

      Erich

       

Anonymous
Anonymous

Add attachments
Cancel