<?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: What is this DCL command doing? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126273#M44460</link>
    <description>Jim,&lt;BR /&gt;&lt;BR /&gt;  This is an ancient and rather peculiar feature of DCL. The @ sign executes a procedure even WITHIN a command line, returning the contents of the first line (only) of the procedure as part of the command line. Simple example:&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;Now&lt;BR /&gt;$ TYPE @PROC&lt;BR /&gt;&lt;BR /&gt;will display LOGIN.COM. You can even pass parameters:&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM 'p1' 'p2' 'p3'&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;$ TYPE @PROC ,MYFILE.LIS /PAGE&lt;BR /&gt;&lt;BR /&gt;Things get really weird when you add more lines to the procedure, as they get executed after the invoking command&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM 'p1' 'p2' 'p3'&lt;BR /&gt;$ SHOW TIME&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To some extent this is a solution in search of a problem, and causes much more trouble than it's worth. Consider the MAIL command with internet addresses containing "@" signs. I've found occasional uses for it over the years, but nothing that couldn't be done some other way.&lt;BR /&gt;&lt;BR /&gt;Now, in your case, the procedure you're executing is a mailbox, so you're attempting to read commands from the mailbox.&lt;BR /&gt;&lt;BR /&gt;Enter a second ancient and rather peculiar feature of DCL - mailbox reads from DCL cannot be interrupted by ^Y! I've no idea why, that's just the way they are, and have been since V1.0. &lt;BR /&gt;&lt;BR /&gt;If the mailbox isn't being used at the moment, you should be able to complete the read by opening and closing the mailbox from another process. This should send an EOF. Of course, if there are other processes reading the mailbox that might not be a good thing. Also, if there are other processes writing the mailbox, your mistyped command will be eating the messages (and generating errors?)&lt;BR /&gt;&lt;BR /&gt;Example (V8.3):&lt;BR /&gt;&lt;BR /&gt;SESS1$ create/mailbox mymbx&lt;BR /&gt;SESS1$ show log mymbx&lt;BR /&gt;   "MYMBX" = "MBA5858:" (LNM$JOB_8942DC00)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS2$  @mba5858:&lt;BR /&gt; Interrupt&lt;BR /&gt;&lt;BR /&gt; Interrupt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS1$ open/read/write mbx MBA5858:&lt;BR /&gt;SESS1$ close mbx&lt;BR /&gt;&lt;BR /&gt;SESS2$ ! (returns to prompt)&lt;BR /&gt;SESS2$ set default @mba5858:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS1$ open/read/write mbx MBA5858:&lt;BR /&gt;SESS1$ write mbx "sys$login"&lt;BR /&gt;SESS1$ close mbx&lt;BR /&gt;&lt;BR /&gt;SESS2$ ! (returns to prompt)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 25 Aug 2008 21:52:40 GMT</pubDate>
    <dc:creator>John Gillings</dc:creator>
    <dc:date>2008-08-25T21:52:40Z</dc:date>
    <item>
      <title>What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126272#M44459</link>
      <description>The command (on OpenVms 7.2-1)&lt;BR /&gt;$ SET DEF RUN@REPROC&lt;BR /&gt;&lt;BR /&gt;The Story :&lt;BR /&gt;We have a logical named RUN$REPROC where we keep program files that generate reports.&lt;BR /&gt;"RUN$REPROC" = "RBASE:[F$REPORT]"&lt;BR /&gt;(LNM$GROUP_000042)&lt;BR /&gt;&lt;BR /&gt;A user mistyped a SET DEFAULT command and used an @ instead of a $.  I expected this to return an %RMS-F-DIR, error in directory name but instead the decterm hung in an LEF state.&lt;BR /&gt;&lt;BR /&gt;The user tried a CNTRL-Y, and CNTRL-C and CNTRL-Z, but could not get back to the DCL prompt.  The user eventually just did a File -&amp;gt; Exit on his Xwindow-Decterm, but even that did not kill off the process.&lt;BR /&gt;&lt;BR /&gt;Using $ANA/SYS I saw it had an open channel to MBA256: which confused me greatly until I discovered that there is also a group logical called REPROC which is set to:&lt;BR /&gt;   "REPROC" = "MBA256:" (LNM$GROUP_000042)&lt;BR /&gt;&lt;BR /&gt;A $ Stop/ID did kill off the process but not before causing all kinds of serious havoc. :(&lt;BR /&gt;&lt;BR /&gt;This is repeatable, but I don't get it?!?  Can anyone tell me what the heck this command is trying to do?&lt;BR /&gt;&lt;BR /&gt;LOL!&lt;BR /&gt;Thanks!</description>
      <pubDate>Mon, 25 Aug 2008 19:56:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126272#M44459</guid>
      <dc:creator>Jim D Frederick</dc:creator>
      <dc:date>2008-08-25T19:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126273#M44460</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;  This is an ancient and rather peculiar feature of DCL. The @ sign executes a procedure even WITHIN a command line, returning the contents of the first line (only) of the procedure as part of the command line. Simple example:&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;Now&lt;BR /&gt;$ TYPE @PROC&lt;BR /&gt;&lt;BR /&gt;will display LOGIN.COM. You can even pass parameters:&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM 'p1' 'p2' 'p3'&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;$ TYPE @PROC ,MYFILE.LIS /PAGE&lt;BR /&gt;&lt;BR /&gt;Things get really weird when you add more lines to the procedure, as they get executed after the invoking command&lt;BR /&gt;&lt;BR /&gt;$ CREATE PROC.COM&lt;BR /&gt;LOGIN.COM 'p1' 'p2' 'p3'&lt;BR /&gt;$ SHOW TIME&lt;BR /&gt;^Z&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To some extent this is a solution in search of a problem, and causes much more trouble than it's worth. Consider the MAIL command with internet addresses containing "@" signs. I've found occasional uses for it over the years, but nothing that couldn't be done some other way.&lt;BR /&gt;&lt;BR /&gt;Now, in your case, the procedure you're executing is a mailbox, so you're attempting to read commands from the mailbox.&lt;BR /&gt;&lt;BR /&gt;Enter a second ancient and rather peculiar feature of DCL - mailbox reads from DCL cannot be interrupted by ^Y! I've no idea why, that's just the way they are, and have been since V1.0. &lt;BR /&gt;&lt;BR /&gt;If the mailbox isn't being used at the moment, you should be able to complete the read by opening and closing the mailbox from another process. This should send an EOF. Of course, if there are other processes reading the mailbox that might not be a good thing. Also, if there are other processes writing the mailbox, your mistyped command will be eating the messages (and generating errors?)&lt;BR /&gt;&lt;BR /&gt;Example (V8.3):&lt;BR /&gt;&lt;BR /&gt;SESS1$ create/mailbox mymbx&lt;BR /&gt;SESS1$ show log mymbx&lt;BR /&gt;   "MYMBX" = "MBA5858:" (LNM$JOB_8942DC00)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS2$  @mba5858:&lt;BR /&gt; Interrupt&lt;BR /&gt;&lt;BR /&gt; Interrupt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS1$ open/read/write mbx MBA5858:&lt;BR /&gt;SESS1$ close mbx&lt;BR /&gt;&lt;BR /&gt;SESS2$ ! (returns to prompt)&lt;BR /&gt;SESS2$ set default @mba5858:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SESS1$ open/read/write mbx MBA5858:&lt;BR /&gt;SESS1$ write mbx "sys$login"&lt;BR /&gt;SESS1$ close mbx&lt;BR /&gt;&lt;BR /&gt;SESS2$ ! (returns to prompt)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2008 21:52:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126273#M44460</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-08-25T21:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126274#M44461</link>
      <description>This case is most commonly seen with MAIL sent from the command line where the user@example.com (sans the required quotes) goes wonky with a file not found for the example.com file error message&lt;BR /&gt;&lt;BR /&gt;$ mail nla0: user@example.com&lt;BR /&gt;%DCL-E-OPENIN, error opening ddcu:[dir]EXAMPLE.COM; as input&lt;BR /&gt;-RMS-E-FNF, file not found&lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;But then, there's also a trip through the OpenVMS DCL HELP library for the @ invocation, which will find the following...&lt;BR /&gt;&lt;BR /&gt;-- begin HELP quote --&lt;BR /&gt;&lt;BR /&gt;       3.$ CREATE FILES.COM&lt;BR /&gt;         *.FOR, *.OBJ&lt;BR /&gt;    &lt;CTRL&gt;&lt;BR /&gt;&lt;BR /&gt;         $ DIRECTORY @FILES&lt;BR /&gt;&lt;BR /&gt;         This example shows a command procedure, FILES.COM, that&lt;BR /&gt;         contains parameters for a DCL command line. The entire file is&lt;BR /&gt;         treated by DCL as command input. You can execute this procedure&lt;BR /&gt;         after the DIRECTORY command to get a listing of all FORTRAN&lt;BR /&gt;         source and object files in your current default directory.&lt;BR /&gt;&lt;BR /&gt;       4.$ CREATE QUALIFIERS.COM&lt;BR /&gt;         /DEBUG/SYMBOL_TABLE/MAP/FULL/CROSS_REFERENCE&lt;BR /&gt;    &lt;CTRL&gt;&lt;BR /&gt;&lt;BR /&gt;         $ LINK SYNAPSE@QUALIFIERS&lt;BR /&gt;&lt;BR /&gt;         This example shows a command procedure, QUALIFIERS.COM, that&lt;BR /&gt;         contains qualifiers for the LINK command. When you enter the&lt;BR /&gt;         LINK command, specify the command procedure immediately after&lt;BR /&gt;         the file specification of the file you are linking. Do not type&lt;BR /&gt;         a space between the file specification and the @ command.&lt;BR /&gt;&lt;BR /&gt;       5.$ CREATE SUBPROCES.COM&lt;BR /&gt;         $ RUN 'P1' -&lt;BR /&gt;           /BUFFER_LIMIT=1024 -&lt;BR /&gt;           /FILE_LIMIT=4 -&lt;BR /&gt;           /PAGE_FILES=256 -&lt;BR /&gt;           /QUEUE_LIMIT=2 -&lt;BR /&gt;           /SUBPROCESS_LIMIT=2 -&lt;BR /&gt;           'P2'  'P3'  'P4'  'P5'  'P6'  'P7'  'P8'&lt;BR /&gt;    &lt;CTRL&gt;&lt;BR /&gt;&lt;BR /&gt;-- end HELP quote --&lt;BR /&gt;&lt;BR /&gt;I cover this case in the DCL book as well, IIRC.  It's occasionally useful for some commands, such as grabbing a specific and set list of files for BACKUP or such.&lt;/CTRL&gt;&lt;/CTRL&gt;&lt;/CTRL&gt;</description>
      <pubDate>Mon, 25 Aug 2008 22:42:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126274#M44461</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-08-25T22:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126275#M44462</link>
      <description>Also consider improving protection on mailboxes (and other devices). Should your process have read access to them ?&lt;BR /&gt;&lt;BR /&gt;Over here, I must confess, mailboxes are wide open and available for abuse. And not only here.&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 26 Aug 2008 05:25:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126275#M44462</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-08-26T05:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126276#M44463</link>
      <description>Thank you all for great explainations and examples.&lt;BR /&gt;&lt;BR /&gt;I've been using DCL for 18+ years and hadn't run across this. :)&lt;BR /&gt;&lt;BR /&gt;Setting the security on the mailbox is a suggestion worth looking into.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 26 Aug 2008 12:38:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126276#M44463</guid>
      <dc:creator>Jim D Frederick</dc:creator>
      <dc:date>2008-08-26T12:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is this DCL command doing?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126277#M44464</link>
      <description>Closed.</description>
      <pubDate>Tue, 26 Aug 2008 12:45:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/what-is-this-dcl-command-doing/m-p/5126277#M44464</guid>
      <dc:creator>Jim D Frederick</dc:creator>
      <dc:date>2008-08-26T12:45:15Z</dc:date>
    </item>
  </channel>
</rss>

