Question sansa stark · Oct 7, 2016 execute .exe #Beginner #Ensemble Is there any alternate way to run .exe in Ensemble without using $zf command?
Bernd Mueller · Oct 10, 2016 on Unix and Windows you can use PIPES: s prog="whoami",oldIO=$IO open prog:"QR" use prog read result c prog use oldIO w !,result
Alok Saldanha Nov 10, 2016 to Bernd Mueller I am having trouble understanding this example in terms of the documentation for open:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...What does the "QR" mean here? According to the docbook, the second argument to open should be in parenthesis, why that not necessary here?Answer:Both the "QR" and "|PIPES|" string are documented here:http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Paul Hula · Oct 10, 2016 Open "|CPIPE|":("dir":"R"):5 Use "|CPIPE|" Read sLine:5 Close "|CPIPE|" Replace "dir" with your command, If you care about all the responses you'll need to do multiple read's and check $ZEOF or a timeout.
Related discussion.
Can you tell us why you need an alternative?
on Unix and Windows you can use PIPES:
I am having trouble understanding this example in terms of the documentation for open:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
What does the "QR" mean here? According to the docbook, the second argument to open should be in parenthesis, why that not necessary here?
Answer:
Both the "QR" and "|PIPES|" string are documented here:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Replace "dir" with your command, If you care about all the responses you'll need to do multiple read's and check $ZEOF or a timeout.