<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PIPE Cmd Issue in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273994#M41090</link>
    <description>DCL is not compatible with sh or ksh or bash. Commands between () have special meaning on these Unix shells.&lt;BR /&gt;&lt;BR /&gt;By the way, pipe has more progress to do. In one line the command:&lt;BR /&gt;$ PIPE SHOW TIME &amp;gt;&amp;gt; X.LOG&lt;BR /&gt;does not work on OpenVMS V8.3-1H1 with HP I64VMS VMS831H1I_UPDATE V6.0. I do not know what with OpenVMS V8.4 !</description>
    <pubDate>Wed, 16 Feb 2011 00:34:01 GMT</pubDate>
    <dc:creator>Ph Vouters</dc:creator>
    <dc:date>2011-02-16T00:34:01Z</dc:date>
    <item>
      <title>PIPE Cmd Issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273993#M41089</link>
      <description>Un*x versions of the PIPE cmd usually allow output to be appended to a file.  The DCL PIPE cmd only seems to allow output redirection to a new file.&lt;BR /&gt;&lt;BR /&gt;Question 1) Any way to get PIPE to append to a file?&lt;BR /&gt;&lt;BR /&gt;Question 2) In trying to create an equivalent append function, I ran into something I don't understand.&lt;BR /&gt;&lt;BR /&gt;This script works:&lt;BR /&gt;&lt;BR /&gt;$       OPEN/APPEND     OUT     X.LOG&lt;BR /&gt;$       PIPE    SHOW TIME &amp;gt; OUT&lt;BR /&gt;$       CLOSE   OUT&lt;BR /&gt;&lt;BR /&gt;But this script fails - why?  (Only differnce is the pair of parenthesis)&lt;BR /&gt;&lt;BR /&gt;$       OPEN/APPEND     OUT     X.LOG&lt;BR /&gt;$       PIPE    ( SHOW TIME ) &amp;gt; OUT&lt;BR /&gt;%DCL-W-WRGSUBSHSYN, empty subshell or subshell is not separated from other command sequences by proper separators&lt;BR /&gt;$       CLOSE   OUT&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Feb 2011 22:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273993#M41089</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2011-02-15T22:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: PIPE Cmd Issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273994#M41090</link>
      <description>DCL is not compatible with sh or ksh or bash. Commands between () have special meaning on these Unix shells.&lt;BR /&gt;&lt;BR /&gt;By the way, pipe has more progress to do. In one line the command:&lt;BR /&gt;$ PIPE SHOW TIME &amp;gt;&amp;gt; X.LOG&lt;BR /&gt;does not work on OpenVMS V8.3-1H1 with HP I64VMS VMS831H1I_UPDATE V6.0. I do not know what with OpenVMS V8.4 !</description>
      <pubDate>Wed, 16 Feb 2011 00:34:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273994#M41090</guid>
      <dc:creator>Ph Vouters</dc:creator>
      <dc:date>2011-02-16T00:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: PIPE Cmd Issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273995#M41091</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  Question 1) Any way to get PIPE to append to a file?&lt;BR /&gt;&lt;BR /&gt;  Sure, easy:&lt;BR /&gt;&lt;BR /&gt;$ PIPE somecommand | APPEND SYS$PIPE somefile&lt;BR /&gt;&lt;BR /&gt;  Yes, it would have been nice if DCL had implemented this with "&amp;gt;&amp;gt;" like Unix, but they didn't.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But this script fails - why? (Only &lt;BR /&gt;&amp;gt; differnce is the pair of parenthesis)&lt;BR /&gt;&lt;BR /&gt;It's syntactically incorrect. The brackets delimit a subshell. Redirection "belongs" to a subshell, so it would need to be included inside the brackets to be syntactically correct.&lt;BR /&gt;&lt;BR /&gt;Where DCL gets a bit ugly is in working out how to redirect output for a "whole" subshell. Consider:&lt;BR /&gt;&lt;BR /&gt;$ PIPE (SHOW TIME ; SHOW PROCESS)&lt;BR /&gt;&lt;BR /&gt;How to send the output for the whole subshell? &lt;BR /&gt;&lt;BR /&gt;As you've shown, the obvious syntax is incorrect:&lt;BR /&gt;&lt;BR /&gt;$ PIPE (SHOW TIME ; SHOW PROCESS) &amp;gt; myfile&lt;BR /&gt;&lt;BR /&gt;I'd agree that this SHOULD work, but the way the syntax is designed it doesn't.&lt;BR /&gt;&lt;BR /&gt;Changing to:&lt;BR /&gt;&lt;BR /&gt;$ PIPE (SHOW TIME ; SHOW PROCESS &amp;gt; myfile)&lt;BR /&gt;&lt;BR /&gt;but this only catches the output for the immediately preceeding command.&lt;BR /&gt;&lt;BR /&gt;You can use COPY, like this:&lt;BR /&gt;&lt;BR /&gt;$ PIPE (SHOW TIME ; SHOW PROCESS) | COPY SYS$PIPE myfile&lt;BR /&gt;&lt;BR /&gt;The DCL PIPE command is only a bit like the Unix one. It has some very strange quirks and limitations.&lt;BR /&gt;&lt;BR /&gt;For example, one of the primary motivations for pipe in Unix is to avoid temporary files and disk I/O, thereby making the script run faster. Although the DCL command avoids disk I/O, it's typically orders of magnitude SLOWER than the same sequence of commands using temporary files. It seems to have something to do with the way the PIPE processes are synchronised (the writer often ends up in RWMBX waiting for the next pipe stage. Resource waits are VERY expensive).&lt;BR /&gt;&lt;BR /&gt;That's not to say PIPE isn't useful, just that it isn't a direct mapping from the Unix function. You should always test your assumptions and reasons for using it.</description>
      <pubDate>Wed, 16 Feb 2011 01:08:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273995#M41091</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2011-02-16T01:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: PIPE Cmd Issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273996#M41092</link>
      <description>Thanks John</description>
      <pubDate>Wed, 16 Feb 2011 17:53:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273996#M41092</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2011-02-16T17:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: PIPE Cmd Issue</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273997#M41093</link>
      <description>Per John</description>
      <pubDate>Wed, 16 Feb 2011 17:54:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/pipe-cmd-issue/m-p/5273997#M41093</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2011-02-16T17:54:25Z</dc:date>
    </item>
  </channel>
</rss>

