<?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: Use a symbol in a DCL command procedure in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407081#M65199</link>
    <description>I learn something every day here :-)&lt;BR /&gt;&lt;BR /&gt;Now what is needed is for Chaim to come back and explain what he is trying to do.</description>
    <pubDate>Tue, 26 Oct 2004 03:28:46 GMT</pubDate>
    <dc:creator>Ian Miller.</dc:creator>
    <dc:date>2004-10-26T03:28:46Z</dc:date>
    <item>
      <title>Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407072#M65190</link>
      <description>Is it possible to use a DCL symbol with the sys$command of a DCL command procedure?&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;$date=f$time()&lt;BR /&gt;$monitor&lt;BR /&gt;monitor io/sum='date'.sum&lt;BR /&gt;&lt;BR /&gt;This does NOT work as the symbol in this case is not being interpreted by DCL before being passed to the monitor command.&lt;BR /&gt;&lt;BR /&gt;Is there a way, nevertheless, to accomplish this?&lt;BR /&gt;&lt;BR /&gt;Chaim&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Oct 2004 08:51:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407072#M65190</guid>
      <dc:creator>Chaim Budnick</dc:creator>
      <dc:date>2004-10-25T08:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407073#M65191</link>
      <description>In your specific example you can do the command&lt;BR /&gt;on line line.&lt;BR /&gt;$ MONITOR IO/SUM='date'.SUM&lt;BR /&gt;&lt;BR /&gt;Generally no as what is imput in response to the program promp (MONITOR&amp;gt; in this case) is not seen by DCL so can't have symbol subtitution. The classic workaround is to write a temp DCL procedure with the right commands in then execute it and delete it after.</description>
      <pubDate>Mon, 25 Oct 2004 09:18:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407073#M65191</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2004-10-25T09:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407074#M65192</link>
      <description>Chaim, Ian,&lt;BR /&gt;&lt;BR /&gt;Nowadays a very nice option is the PIPE command, using input redirection!&lt;BR /&gt;&lt;BR /&gt;Your example&lt;BR /&gt;(including a conversion from date-time to date)&lt;BR /&gt;&lt;BR /&gt;$ PIPE MONITOR &amp;lt; MONITOR IO/SUMM='f$cvtim("","comparison","date")'.sum&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Mon, 25 Oct 2004 09:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407074#M65192</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-10-25T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407075#M65193</link>
      <description>Jan,&lt;BR /&gt;  nice solution for single line input (worthly of a virtual Duvel Triple :-) but that would not work for multiple line input. I guess (as usual) it depends on what Chaim is really trying to do.</description>
      <pubDate>Mon, 25 Oct 2004 09:36:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407075#M65193</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2004-10-25T09:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407076#M65194</link>
      <description>Right, datalines are NOT interpreted. No substitutions.&lt;BR /&gt;&lt;BR /&gt;To classic solution for this is to create a temp file, write the datalines to it, close, give to the program as sys$input, delete.&lt;BR /&gt;Most variations are in the file name and place (sys$login vs current vs sys$scratch / temp.tmp vs process-name-input.tmp vs PID.tmp&lt;BR /&gt;&lt;BR /&gt;Nowadays you should consider a pipe, as answerred before.&lt;BR /&gt;&lt;BR /&gt;There are also some MAILBOX solutions around.&lt;BR /&gt;Use tool to create a mailbox, open, write...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Oct 2004 10:14:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407076#M65194</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-10-25T10:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407077#M65195</link>
      <description>Jan,&lt;BR /&gt;&lt;BR /&gt;I'm sorry but I'm not convinced that yours example works properly. By the PIPE definition &amp;lt; is the SYS$INPUT redefinition from an input file. I dont know why yours example works. It seems that the &amp;lt; MONITOR part is not executed so you at end have the same command as Ian. You can try by typing:&lt;BR /&gt;&lt;BR /&gt;$ PIPE MONITOR &amp;lt; EATEN IO/SUMM='f$cvtim("","comparison","date")'.sum&lt;BR /&gt;&lt;BR /&gt;You can substutute EATEN with any other word and the results are the same.&lt;BR /&gt;&lt;BR /&gt;You can use pipe with a temporary file, where you write your data as suggested by Ian and use as:&lt;BR /&gt;&lt;BR /&gt;$ PIPE MONITOR &amp;lt; yours_file&lt;BR /&gt;&lt;BR /&gt;The second way is to write a procedure which will write the the data to SYS$OUTPUT and use as this:&lt;BR /&gt;&lt;BR /&gt;$ PIPE @yours_procedure | MONITOR&lt;BR /&gt;&lt;BR /&gt;The contents of yours_procedure are something like this:&lt;BR /&gt;$ WRITE SYS$OUTPUT "MONITOR IO/SUMM=''f$cvtim("","comparison","date")'.sum"&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Mon, 25 Oct 2004 10:49:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407077#M65195</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-10-25T10:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407078#M65196</link>
      <description>You can do this with pipe, and you can do multiple input lines. You just have to turn it around the other way.&lt;BR /&gt;&lt;BR /&gt;For clarity, I've defined:&lt;BR /&gt;&lt;BR /&gt;$ in = "write sys$output"&lt;BR /&gt;&lt;BR /&gt;So, the monitor case becomes:&lt;BR /&gt;&lt;BR /&gt;$ date=f$time()-" " ! remove space&lt;BR /&gt;$ pipe in "monitor io/sub=''date'.sum" | monitor&lt;BR /&gt;&lt;BR /&gt;For multiple lines of input, use ";" to separate commands (make sure you have a space on either side), and group lines with parentheses (). For example, assuming the symbol "pid" is set to the PID of a process of interest:&lt;BR /&gt;&lt;BR /&gt;$ pipe (in "set process/index=''pid'" ; -&lt;BR /&gt;        in "show process/channel" ; -&lt;BR /&gt;        in "show process/lock") | -&lt;BR /&gt;       analyze/system&lt;BR /&gt;&lt;BR /&gt;The only limit is command line length.&lt;BR /&gt;&lt;BR /&gt;If you do use temporary files, remember you now (V7.3-2 and higher) have F$UNIQUE() to generate names:&lt;BR /&gt;&lt;BR /&gt;$ tmp="SYS$SCRATCH:"+F$UNIQUE()+".tmp;"&lt;BR /&gt;$ OPEN/WRITE tmp 'tmp'&lt;BR /&gt;$ WRITE tmp "monitor io/sum=''date'.sum"&lt;BR /&gt;$ CLOSE tmp&lt;BR /&gt;$ DEFINE/USER SYS$INPUT 'tmp'&lt;BR /&gt;$ MONITOR&lt;BR /&gt;$ DELETE 'tmp'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Oct 2004 16:38:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407078#M65196</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2004-10-25T16:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407079#M65197</link>
      <description>Thanks, John.&lt;BR /&gt;&lt;BR /&gt;That IS what I meant, only, I am only just beginning with using it, and not yet totally familiar :-(&lt;BR /&gt;Bojan:&lt;BR /&gt;I simply tried what I thought looked like it,&lt;BR /&gt;it worked, so I posted, without really investigating more telltale variaties.&lt;BR /&gt;&lt;BR /&gt;I m so sorry, won t happen again (until next time).&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Tue, 26 Oct 2004 00:52:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407079#M65197</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-10-26T00:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407080#M65198</link>
      <description>Hello guys,&lt;BR /&gt;follow example works for me :-)&lt;BR /&gt;$ SAY="$WRITE SYS$OUTPUT" !Alias to echo&lt;BR /&gt;$ PIPE SAY "monit io /sum=''f$extr(0,10,f$cvtime())'.sum" | MONIT&lt;BR /&gt; &lt;BR /&gt;Antonio Vigliotti&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Oct 2004 02:44:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407080#M65198</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2004-10-26T02:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407081#M65199</link>
      <description>I learn something every day here :-)&lt;BR /&gt;&lt;BR /&gt;Now what is needed is for Chaim to come back and explain what he is trying to do.</description>
      <pubDate>Tue, 26 Oct 2004 03:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407081#M65199</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2004-10-26T03:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407082#M65200</link>
      <description>After some experimentation, I discovered that the following will work using a logical name and not a symbol:&lt;BR /&gt;&lt;BR /&gt;$date=F$EXTRACT(0,9,F$TIME())&lt;BR /&gt;$define/user sum_file 'date'.sum&lt;BR /&gt;$monitor&lt;BR /&gt;monitor io/sum=sum_file/ending=18:00/int=30&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;I understand that this particular example doesn't really require invoking monitor and then issuing a monitor command and that I could issue the entire command as a DCL line command. However, I am looking for a way to be able to dynamically use a symbol or as I have discovered a logical for  dynamic usage.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the replies!!&lt;BR /&gt;&lt;BR /&gt;Chaim &lt;BR /&gt;</description>
      <pubDate>Tue, 26 Oct 2004 07:22:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407082#M65200</guid>
      <dc:creator>Chaim Budnick</dc:creator>
      <dc:date>2004-10-26T07:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use a symbol in a DCL command procedure</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407083#M65201</link>
      <description>Chaim,&lt;BR /&gt;&lt;BR /&gt;"... However, I am looking for a way to be able to dynamically use a symbol ..."&lt;BR /&gt;&lt;BR /&gt;As I understand this, your question is about a generic way to use to contents of a symbol to be used in the input for an image.&lt;BR /&gt;&lt;BR /&gt;Then, yes, in the case where you want to use your symbol value in a (any) filename, then you can do a define logical name for that file. &lt;BR /&gt;The logical name definition is done in a "normal" DCL command line, ie, with normal symbol substitution.&lt;BR /&gt;Then, in your image data line, you use a fixed file name (that is to say, as far as DCL is concerned). So, no substitution needed. At a certain moment when your image needs the file, then RMS parses the filename to get to the file ID. And RMS knows how to handle Logical Names (without THAT, most of VMS flexibility &amp;amp; reliability would not exist!!).&lt;BR /&gt;So, as long as it is about building 'variable' filenames, DEFINE works. &lt;BR /&gt;For all other kinds of variable data input, you are still down to either of the above methods: the classicle "write file / execute it / delete it", or the recently available PIPE manipulations.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Oct 2004 07:53:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/use-a-symbol-in-a-dcl-command-procedure/m-p/3407083#M65201</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-10-26T07:53:56Z</dc:date>
    </item>
  </channel>
</rss>

