Re: [U2] Capturing output from a Command line program?
Change the to , currently you are directing the output of your command back to your command. On Fri, Oct 23, 2009 at 1:56 AM, Richard Blackman richard.black...@itvision.com.au wrote: Hi All, I am trying to capture the output from an EXECUTE statement on a command line program but nothing is being captured, even though I know there is some output. Here is the command CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:'' EXECUTE DOS /c:CMD CAPTURING TRASH Cheers, Richard Blackman -- View this message in context: http://www.nabble.com/Capturing-output-from-a-Command-line-program--tp26021253p26021253.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Capturing output from a Command line program?
the should be correct. That's pulling the input from TEMP.FILE what happens if you do: EXECUTE DOS /c dir CAPTURING TRASH ? or you could try (I'm not sure if windows stdin is -) CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:' -' another option might be to see if sendmail has an option to take it's input from a file, therefor eliminating the altogether George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Norman Bauer Sent: Friday, October 23, 2009 8:02 AM To: U2 Users List Subject: Re: [U2] Capturing output from a Command line program? Change the to , currently you are directing the output of your command back to your command. On Fri, Oct 23, 2009 at 1:56 AM, Richard Blackman richard.black...@itvision.com.au wrote: Hi All, I am trying to capture the output from an EXECUTE statement on a command line program but nothing is being captured, even though I know there is some output. Here is the command CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:'' EXECUTE DOS /c:CMD CAPTURING TRASH Cheers, Richard Blackman -- View this message in context: http://www.nabble.com/Capturing-output- from-a-Command-line-program--tp26021253p26021253.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Capturing output from a Command line program?
duhhh, my bad George. Thanks for the correction. On Fri, Oct 23, 2009 at 9:35 AM, George Gallen ggal...@wyanokegroup.com wrote: the should be correct. That's pulling the input from TEMP.FILE what happens if you do: EXECUTE DOS /c dir CAPTURING TRASH ? or you could try (I'm not sure if windows stdin is -) CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:' -' another option might be to see if sendmail has an option to take it's input from a file, therefor eliminating the altogether George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Norman Bauer Sent: Friday, October 23, 2009 8:02 AM To: U2 Users List Subject: Re: [U2] Capturing output from a Command line program? Change the to , currently you are directing the output of your command back to your command. On Fri, Oct 23, 2009 at 1:56 AM, Richard Blackman richard.black...@itvision.com.au wrote: Hi All, I am trying to capture the output from an EXECUTE statement on a command line program but nothing is being captured, even though I know there is some output. Here is the command CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:'' EXECUTE DOS /c:CMD CAPTURING TRASH Cheers, Richard Blackman -- View this message in context: http://www.nabble.com/Capturing-output- from-a-Command-line-program--tp26021253p26021253.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Capturing output from a Command line program?
In *nix I've used cat. Not sure what the syntax would be in Windows. Here's an attempt: CMD = 'cat ':EMAIL.TEMPFILE:' | C:\usr\lib\sendmail -t' CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:' -' another option might be to see if sendmail has an option to take it's input from a file, therefor eliminating the altogether U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Capturing output from a Command line program?
Richard, When Universe shells down via the DOS command, it (Universe) doesn't reliably handle standard output and/or error. The result is that DOS output isn't always captured when EXECUTE'd (it seems to depend on the command). A more reliable strategy is to redirect the command output into a type 1 or 19 file, then READ it in. rex Richard Blackman wrote: Hi All, I am trying to capture the output from an EXECUTE statement on a command line program but nothing is being captured, even though I know there is some output. Here is the command CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:'' EXECUTE DOS /c:CMD CAPTURING TRASH Cheers, Richard Blackman ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Capturing output from a Command line program?
I thought I'd try this on UniData v7.2 (Windows 2K3). Here's what I get: 4 Dev (0)- BPTEST EXECUTE \!dir\ CAPTURING OUTPUT ; CRT OUTPUT Compiling Unibasic: SAVEDLISTS\BpTest_383842951 in mode 'p'. compilation finished Volume in drive E is ShareDbms Volume Serial Number is C45E-045F Directory o f E:\DataTrust\Dev 10/22/2009 03:10 PMDIR . 10/22/2009 03:10 PM DIR .. 10/23/2009 08:29 AM72,704 AE_COMS 10/13/2009 05:13 PMDIR AE_SCRATCH 02/23/2007 09:28 PM 13,776 . . X_MASTER 03/27/2007 06:49 PM32,768 X_MTGFILE 10/14/2009 03:19 PM 557,056 X_NAMES 06/29/2005 12:26 PM 2,048 _DEBUG_ 06/29/2005 12:26 PM 4,096 _EDAMAP_ 10/13/2009 05:13 PMDIR _EDAXMAP_ 10/23/2009 09:21 AMDIR _PH_ 10/13/2009 05:13 PMDIR _XML_ 02 /23/2007 09:22 PM12,288 __V__VIEW 114 File(s) 89,52 7,565 bytes 24 Dir(s) 66,143,858,688 bytes free 4 Dev (0)- It seems to work fine, as long as I'm only looking for output. Bill bradley.sch...@usbank.com said the following on 10/23/2009 8:09 AM: In *nix I've used cat. Not sure what the syntax would be in Windows. Here's an attempt: CMD = 'cat ':EMAIL.TEMPFILE:' | C:\usr\lib\sendmail -t' CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:' -' another option might be to see if sendmail has an option to take it's input from a file, therefor eliminating the altogether U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Capturing output from a Command line program?
Hi All, I am trying to capture the output from an EXECUTE statement on a command line program but nothing is being captured, even though I know there is some output. Here is the command CMD = 'C:\usr\lib\sendmail -t ':EMAIL.TEMPFILE:'' EXECUTE DOS /c:CMD CAPTURING TRASH Cheers, Richard Blackman -- View this message in context: http://www.nabble.com/Capturing-output-from-a-Command-line-program--tp26021253p26021253.html Sent from the U2 - Users mailing list archive at Nabble.com. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users