<?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: DCL Pipe Question in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116010#M39093</link>
    <description>&amp;gt;&amp;gt; Consider doing a $ help lexical. It gives you a list of Lexical Functions available in DCL.&lt;BR /&gt;&lt;BR /&gt;A fine suggestion.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;  One of them is F$CONTEXT. &lt;BR /&gt;&lt;BR /&gt;Correct.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; With this, you can do various things like search for files in a directory.&lt;BR /&gt;&lt;BR /&gt;NOT. You can use F$SEARCH for this though, with or without the help of its CONTEXT argument, and with or without the help of F$PARSE.&lt;BR /&gt;&lt;BR /&gt;Patrick&amp;gt; DCL Pipe Question  &lt;BR /&gt;&amp;gt;Question In a naive attempt to replicate &lt;BR /&gt;&amp;gt;ls -1 | xargs r&lt;BR /&gt;&amp;gt;I tried to do &lt;BR /&gt;&lt;BR /&gt;Why? Just to try? What problem are you really trying to solve?&lt;BR /&gt;&lt;BR /&gt;fwiw, I would use PERL to do something along the lines requested. For example:&lt;BR /&gt;&lt;BR /&gt;$ pipe dir /col=1 *.tmp | perl -ne "chomp; unlink  if /;/"&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 14 Dec 2007 04:15:29 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2007-12-14T04:15:29Z</dc:date>
    <item>
      <title>DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116002#M39085</link>
      <description>In a naive attempt to replicate &lt;BR /&gt;&lt;BR /&gt;ls -1 | xargs rm&lt;BR /&gt;&lt;BR /&gt;I tried to do &lt;BR /&gt;&lt;BR /&gt;pipe dir/columns=1/noheading/notrailing | delete&lt;BR /&gt;&lt;BR /&gt;This doesn't work - it gives me a missing command parameters error.&lt;BR /&gt;&lt;BR /&gt;Can someone tell me why?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Patrick.</description>
      <pubDate>Thu, 13 Dec 2007 08:06:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116002#M39085</guid>
      <dc:creator>Patrick Aspinall</dc:creator>
      <dc:date>2007-12-13T08:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116003#M39086</link>
      <description>Perhaps because DELETE doesn't take its&lt;BR /&gt;arguments from stdin/SYS$INPUT any more than&lt;BR /&gt;"rm" does.  You've omitted the "xargs" from&lt;BR /&gt;the VMS version.&lt;BR /&gt;&lt;BR /&gt;DELETE already has the usual raft of file&lt;BR /&gt;selection options: wildcard lists, /BEFORE,&lt;BR /&gt;/SINCE, and so on.  Do you really need to use&lt;BR /&gt;DIRECTORY for anything here?  DCL does not&lt;BR /&gt;work exactly the way a UNIX shell works, so&lt;BR /&gt;the best way to solve a problem in one&lt;BR /&gt;environment is seldom the best way in the&lt;BR /&gt;other.&lt;BR /&gt;&lt;BR /&gt;Or is there some real problem which you are&lt;BR /&gt;trying to solve?</description>
      <pubDate>Thu, 13 Dec 2007 08:29:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116003#M39086</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-12-13T08:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116004#M39087</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;Most DCL commands do not work in the same way as U**x commands do. The DCL command DELETE expects one parameter, a file specification. It also accepts an indirect specification in the form of @&lt;FILE&gt;, where &lt;FILE&gt; is supposed to contain a list of files. I could not find documentation about this, though.&lt;BR /&gt;&lt;BR /&gt;So you might be able to do the following:&lt;BR /&gt;&lt;BR /&gt;pipe dir/columns=1/noheading/notrailing | delete @sys$pipe&lt;BR /&gt;&lt;BR /&gt;However, when I tried it, it deleted only the first file from the pipe and then issued the message&lt;BR /&gt;%DCL-W-NOCOMD, no command on line - reenter with alphabetic first character&lt;BR /&gt;&lt;BR /&gt;I will try to find out why.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Bart&lt;BR /&gt;&lt;/FILE&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 13 Dec 2007 08:36:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116004#M39087</guid>
      <dc:creator>Bart Zorn_1</dc:creator>
      <dc:date>2007-12-13T08:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116005#M39088</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] DELETE expects one parameter, a file&lt;BR /&gt;&amp;gt; specification. [...]&lt;BR /&gt;&lt;BR /&gt;Not necessarily one.  As the HELP says:&lt;BR /&gt;&lt;BR /&gt;DELETE&lt;BR /&gt;&lt;BR /&gt;  file&lt;BR /&gt;&lt;BR /&gt;    Parameter&lt;BR /&gt;&lt;BR /&gt;      filespec[,...]&lt;BR /&gt;&lt;BR /&gt;         Specifies the names of one or more files to be deleted [...]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I could not find documentation about this,&lt;BR /&gt;&amp;gt; though.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/83FINAL/9996/9996pro_18.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/83FINAL/9996/9996pro_18.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It's in the fine print:&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;      To execute a command procedure that contains qualifiers or parameters, or both, for a specific command line,&lt;BR /&gt;      place the @ command where the qualifiers or parameters normally would be in the command line. Then specify&lt;BR /&gt;      the name of the command procedure file containing the qualifiers or parameters.&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I will try to find out why.&lt;BR /&gt;&lt;BR /&gt;DIRECTORY doesn't put out a comma-separated&lt;BR /&gt;list of file specs, which is what you'd need&lt;BR /&gt;here.</description>
      <pubDate>Thu, 13 Dec 2007 08:52:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116005#M39088</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-12-13T08:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116006#M39089</link>
      <description>The format for the command DELETE is&lt;BR /&gt;&lt;BR /&gt;DELETE filespec[,...]&lt;BR /&gt;&lt;BR /&gt;The pipecommand doesn't create a parameterlist, just a list of files.&lt;BR /&gt;&lt;BR /&gt;The first attempt with just DELETE,&lt;BR /&gt;says "missing command parameters" and as it says....no parameters is supplied.&lt;BR /&gt;&lt;BR /&gt;The second attempt with "DELETE @SYS$PIPE".&lt;BR /&gt;SYS$PIPE is still a list of files, not a parameterlist. The first file (line) is executed, but the next line in the file will be executed as it is.....without any command.&lt;BR /&gt;&lt;BR /&gt;Take a look on "@" in "DCL Dictionary"&lt;BR /&gt;&lt;BR /&gt;=======&lt;BR /&gt;&lt;BR /&gt;To execute a command procedure that contains qualifiers or parameters, or both, for a specific command line, place the @ command where the qualifiers or parameters normally would be in the command line. Then specify the name of the command procedure file containing the qualifiers or parameters. &lt;BR /&gt;&lt;BR /&gt;If the command procedure file begins with parameters for the command, the @ command must be preceded by a space. For example: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ CREATE TEST.COM&lt;BR /&gt;TIME&lt;BR /&gt;[Ctrl/Z]&lt;BR /&gt;$ SHOW @TEST&lt;BR /&gt;  14-SEP-2001 17:20:26&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If the file begins with qualifiers for the command, do not precede the @ command with a space. For example: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ CREATE TEST_2.COM&lt;BR /&gt;/SIZE&lt;BR /&gt;[Ctrl/Z]&lt;BR /&gt;$ DIR@TEST_2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Directory WORK$:[SCHEDULE]&lt;BR /&gt;&lt;BR /&gt;JANUARY.TXT;8         14-DEC-2001 15:47:45.57&lt;BR /&gt;FEBRUARY.TXT;7        14-DEC-2001 15:43:16.20&lt;BR /&gt;MARCH.TXT;6           14-DEC-2001 11:11:45.74&lt;BR /&gt;   .&lt;BR /&gt;   .&lt;BR /&gt;   .&lt;BR /&gt;Total of 11 files.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If the file contains parameters or qualifiers, or both, do not begin the lines in the file with dollar signs. Any additional data on the command line following @filespec is treated as parameters for the procedure. &lt;BR /&gt;&lt;BR /&gt;======</description>
      <pubDate>Thu, 13 Dec 2007 09:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116006#M39089</guid>
      <dc:creator>Hakan Zanderau ( Anders</dc:creator>
      <dc:date>2007-12-13T09:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116007#M39090</link>
      <description>Patrick,&lt;BR /&gt;&lt;BR /&gt;What aboout a simple command procedure (XARGS.COM):&lt;BR /&gt;&lt;BR /&gt;$ open/read pipe sys$pipe&lt;BR /&gt;$loop:&lt;BR /&gt;$ read pipe args/end=end&lt;BR /&gt;$ 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' 'args'&lt;BR /&gt;$ goto loop&lt;BR /&gt;$end:&lt;BR /&gt;$ close pipe&lt;BR /&gt;&lt;BR /&gt;so you can do:&lt;BR /&gt;&lt;BR /&gt;$ pipe dir/columns=1/noheading/notrailing | @xargs delete&lt;BR /&gt;&lt;BR /&gt;or perhaps&lt;BR /&gt;&lt;BR /&gt;$ pipe dir/columns=1/noheading/notrailing | @xargs delete /confirm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Its a one minute command procedure so its on you to test it and improve&lt;BR /&gt;&lt;BR /&gt;Bojan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:03:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116007#M39090</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2007-12-13T13:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116008#M39091</link>
      <description>Picking up an application design for one platform and directly dropping it on another is the root problem here; that's usually a whole lot more work, and the results are often a whole lot less supportable, than using a native design.&lt;BR /&gt;&lt;BR /&gt;OpenVMS pipes are not what you remember from Unix; you'll probably get frustrated pretty quickly here.  Many of the OpenVMS DCL verbs aren't set up for nor particularly suited for piping, either.  The usual solution is lexical functions, something which OpenVMS has a reasonable set of.&lt;BR /&gt;&lt;BR /&gt;Why not load gnv and do what you want, and the way you want to?   gnv provides bash and related, and gives you a reasonable emulation of and the tools of the Bourne shell.  And gnv is free, and is provided by HP.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:58:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116008#M39091</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-12-13T13:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116009#M39092</link>
      <description>Hello,&lt;BR /&gt;     Consider doing a $ help lexical.  It gives you a list of Lexical Functions available in DCL.  One of them is F$CONTEXT.  With this, you can do various things like search for files in a directory.  You can use a delete command in a loop.  I know that isn't as slick as using a pipe command, but it works.  The lexicals are pretty cool, so check 'em out.</description>
      <pubDate>Fri, 14 Dec 2007 01:59:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116009#M39092</guid>
      <dc:creator>DECxchange</dc:creator>
      <dc:date>2007-12-14T01:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116010#M39093</link>
      <description>&amp;gt;&amp;gt; Consider doing a $ help lexical. It gives you a list of Lexical Functions available in DCL.&lt;BR /&gt;&lt;BR /&gt;A fine suggestion.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;  One of them is F$CONTEXT. &lt;BR /&gt;&lt;BR /&gt;Correct.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; With this, you can do various things like search for files in a directory.&lt;BR /&gt;&lt;BR /&gt;NOT. You can use F$SEARCH for this though, with or without the help of its CONTEXT argument, and with or without the help of F$PARSE.&lt;BR /&gt;&lt;BR /&gt;Patrick&amp;gt; DCL Pipe Question  &lt;BR /&gt;&amp;gt;Question In a naive attempt to replicate &lt;BR /&gt;&amp;gt;ls -1 | xargs r&lt;BR /&gt;&amp;gt;I tried to do &lt;BR /&gt;&lt;BR /&gt;Why? Just to try? What problem are you really trying to solve?&lt;BR /&gt;&lt;BR /&gt;fwiw, I would use PERL to do something along the lines requested. For example:&lt;BR /&gt;&lt;BR /&gt;$ pipe dir /col=1 *.tmp | perl -ne "chomp; unlink  if /;/"&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Dec 2007 04:15:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116010#M39093</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-12-14T04:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116011#M39094</link>
      <description>&amp;gt; In a naive attempt to replicate&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ls -1 | xargs rm&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I tried to do&lt;BR /&gt;&lt;BR /&gt;&amp;gt; pipe dir/columns=1/noheading/notrailing | delete&lt;BR /&gt;&lt;BR /&gt;&amp;gt; This doesn't work - it gives me a missing &amp;gt; command parameters error.&lt;BR /&gt;&lt;BR /&gt;:-D&lt;BR /&gt;On my VMS V7.3-2 system with GNV V1-6.2, the following worked just fine:&lt;BR /&gt;&lt;BR /&gt;$ bash&lt;BR /&gt;bash$ ls -1 | xargs rm&lt;BR /&gt;bash$ &lt;CTRL&gt;&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;But I guess that using GNV to answer this question is cheating!&lt;BR /&gt;&lt;BR /&gt;I also found that the following worked:&lt;BR /&gt;$ DELETE *.*;*&lt;BR /&gt;&lt;BR /&gt;:-D&lt;BR /&gt;&lt;BR /&gt;(Please note the smilies!)&lt;/CTRL&gt;</description>
      <pubDate>Thu, 10 Jan 2008 18:38:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116011#M39094</guid>
      <dc:creator>Galen Tackett</dc:creator>
      <dc:date>2008-01-10T18:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Pipe Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116012#M39095</link>
      <description>Using this command procedure, eachline.com, from dcl.openvms.org:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://tinyurl.com/2ux77l" target="_blank"&gt;http://tinyurl.com/2ux77l&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can do this with a single line.  I believe the syntax would be:&lt;BR /&gt;&lt;BR /&gt; $ pipe dir/nohead/notrail [filespec] | @eachline file "delete &amp;amp;file"&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Aaron&lt;BR /&gt;P.S. Sorry for having to use TinyURL; this forum prevented me from giving a direct link due to threat of x-site scripting.  You might be able to cut-and-paste this, though: dcl.openvms.org/stories.php?story=05/01/21/1424401</description>
      <pubDate>Fri, 11 Jan 2008 16:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-pipe-question/m-p/4116012#M39095</guid>
      <dc:creator>Aaron Sakovich</dc:creator>
      <dc:date>2008-01-11T16:35:42Z</dc:date>
    </item>
  </channel>
</rss>

