<?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 run a file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383006#M31380</link>
    <description>Hello&lt;BR /&gt;&lt;BR /&gt;How can I make a file that automatically runs the command mmi after that Choices predefined. &lt;BR /&gt;Choices needs to press return to be excecuted.&lt;BR /&gt;See below:&lt;BR /&gt;{MMI&lt;BR /&gt;1 &lt;RETURN&gt;&lt;BR /&gt;1 &lt;RETURN&gt;&lt;BR /&gt;35569222 &lt;RETURN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CTRL c=""&gt;&lt;BR /&gt;&lt;BR /&gt;etc.. }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BEP1-&amp;gt;mmi   ! Is a command&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;         1: DECnet connections&lt;BR /&gt;         2: X25 connections&lt;BR /&gt;         3: TCP/IP connections&lt;BR /&gt;        99: Return&lt;BR /&gt;        Choice: 1 &lt;RETURN&gt;  ! Choice 1 mus be selected and then Return&lt;BR /&gt;Calling smsc_r_api_init() at 21-SEP-2004 10:16:34.53&lt;BR /&gt;smsc_r_api_init() returned status of 1 and error code of 0 at 21-SEP-2004 10:16:34.54&lt;BR /&gt;&lt;BR /&gt;  1: Send submit SM&lt;BR /&gt;  2: Send replace SM&lt;BR /&gt;  3: Send delete SM&lt;BR /&gt;  4: Send delete all SMs&lt;BR /&gt;  5: Send cancel status report request&lt;BR /&gt;  6: Send alert SME request&lt;BR /&gt;  7: Send retrieve request&lt;BR /&gt; 19: Send update SM&lt;BR /&gt; 20: Send ext submit SM&lt;BR /&gt; 99: Return&lt;BR /&gt;Choice: 1 &lt;RETURN&gt;    ! Choice 1 mus be selected and then Return&lt;BR /&gt;Input MSISDN: 35569 &lt;RETURN&gt;    ! Input MSISDN must be 35569222 and then pres return&lt;BR /&gt;&lt;BR /&gt;etc..&lt;BR /&gt;&lt;BR /&gt;&lt;CTRL c=""&gt;&lt;/CTRL&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/CTRL&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;</description>
    <pubDate>Tue, 21 Sep 2004 03:35:20 GMT</pubDate>
    <dc:creator>Taulant Shamo</dc:creator>
    <dc:date>2004-09-21T03:35:20Z</dc:date>
    <item>
      <title>run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383006#M31380</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;How can I make a file that automatically runs the command mmi after that Choices predefined. &lt;BR /&gt;Choices needs to press return to be excecuted.&lt;BR /&gt;See below:&lt;BR /&gt;{MMI&lt;BR /&gt;1 &lt;RETURN&gt;&lt;BR /&gt;1 &lt;RETURN&gt;&lt;BR /&gt;35569222 &lt;RETURN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CTRL c=""&gt;&lt;BR /&gt;&lt;BR /&gt;etc.. }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BEP1-&amp;gt;mmi   ! Is a command&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;         1: DECnet connections&lt;BR /&gt;         2: X25 connections&lt;BR /&gt;         3: TCP/IP connections&lt;BR /&gt;        99: Return&lt;BR /&gt;        Choice: 1 &lt;RETURN&gt;  ! Choice 1 mus be selected and then Return&lt;BR /&gt;Calling smsc_r_api_init() at 21-SEP-2004 10:16:34.53&lt;BR /&gt;smsc_r_api_init() returned status of 1 and error code of 0 at 21-SEP-2004 10:16:34.54&lt;BR /&gt;&lt;BR /&gt;  1: Send submit SM&lt;BR /&gt;  2: Send replace SM&lt;BR /&gt;  3: Send delete SM&lt;BR /&gt;  4: Send delete all SMs&lt;BR /&gt;  5: Send cancel status report request&lt;BR /&gt;  6: Send alert SME request&lt;BR /&gt;  7: Send retrieve request&lt;BR /&gt; 19: Send update SM&lt;BR /&gt; 20: Send ext submit SM&lt;BR /&gt; 99: Return&lt;BR /&gt;Choice: 1 &lt;RETURN&gt;    ! Choice 1 mus be selected and then Return&lt;BR /&gt;Input MSISDN: 35569 &lt;RETURN&gt;    ! Input MSISDN must be 35569222 and then pres return&lt;BR /&gt;&lt;BR /&gt;etc..&lt;BR /&gt;&lt;BR /&gt;&lt;CTRL c=""&gt;&lt;/CTRL&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/CTRL&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;&lt;/RETURN&gt;</description>
      <pubDate>Tue, 21 Sep 2004 03:35:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383006#M31380</guid>
      <dc:creator>Taulant Shamo</dc:creator>
      <dc:date>2004-09-21T03:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383007#M31381</link>
      <description>If you are trying to run a DCL command from a program then look at the RTL routines LIB$DO_COMMAND (to exit your program and run a command) or LIB$SPAWN (to create a sub-process to run a command).&lt;BR /&gt;&lt;BR /&gt;Otherwise I'm confused about whatyou are trying to do.</description>
      <pubDate>Tue, 21 Sep 2004 04:01:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383007#M31381</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2004-09-21T04:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383008#M31382</link>
      <description>Hi,&lt;BR /&gt;if MMI read from standard input you can:&lt;BR /&gt;$ TYPE SYS$INPUT /OUT=MMI.COM&lt;BR /&gt;$ MMI="$&lt;FOLDER&gt;MMI.EXE"&lt;BR /&gt;$ MMI&lt;BR /&gt;1&lt;BR /&gt;1&lt;BR /&gt;35569222&lt;BR /&gt;&lt;CTRL&gt;Z&lt;BR /&gt;$ @MMI.COM&lt;BR /&gt; &lt;BR /&gt;1.st line give you write a file from standard input (keyboard) until you press &lt;CTRL&gt;Z&lt;BR /&gt;2.nd line define a command that runs your executable&lt;BR /&gt;3.th line run your executable with standard input redirect from command file; all lines until $ (dollar) are the standard input for your file.&lt;BR /&gt; &lt;BR /&gt;H.T.H.&lt;BR /&gt;Antonio Vigliotti&lt;BR /&gt;&lt;BR /&gt;&lt;/CTRL&gt;&lt;/CTRL&gt;&lt;/FOLDER&gt;</description>
      <pubDate>Tue, 21 Sep 2004 04:15:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383008#M31382</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2004-09-21T04:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383009#M31383</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;attached I have send a file that explain what i intend to do. Just that entered choices to excecute automatically when file.com is excecuted. See attached file:</description>
      <pubDate>Tue, 21 Sep 2004 05:34:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383009#M31383</guid>
      <dc:creator>Taulant Shamo</dc:creator>
      <dc:date>2004-09-21T05:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383010#M31384</link>
      <description>Hi,&lt;BR /&gt;this could be work!&lt;BR /&gt;$ TYPE SYS$INPUT /OUT=MMI.COM&lt;BR /&gt;$ MMI="$&lt;FOLDER&gt;MMI.EXE"&lt;BR /&gt;$ MMI&lt;BR /&gt;1&lt;BR /&gt;1&lt;BR /&gt;35569222&lt;BR /&gt;n&lt;BR /&gt;0&lt;BR /&gt;n&lt;BR /&gt;94222&lt;BR /&gt;n&lt;BR /&gt;4&lt;BR /&gt;0&lt;BR /&gt;0&lt;BR /&gt;&lt;CTRL&gt;Z&lt;BR /&gt;$ @MMI.COM&lt;BR /&gt;&lt;BR /&gt;H.T.H.&lt;BR /&gt;Antonio Vigliotti &lt;BR /&gt;&lt;/CTRL&gt;&lt;/FOLDER&gt;</description>
      <pubDate>Tue, 21 Sep 2004 05:50:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383010#M31384</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2004-09-21T05:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383011#M31385</link>
      <description>Taulant,&lt;BR /&gt;&lt;BR /&gt;Antonio's answer will work just fine, if you activate it interactively.&lt;BR /&gt;&lt;BR /&gt;But, What is the real gain over just running interactively?&lt;BR /&gt;&lt;BR /&gt;If you want to run it unattended, just&lt;BR /&gt;vreat the file MMI.com:&lt;BR /&gt;&lt;BR /&gt;$! MMI.COM; Run MMI with fixed input:&lt;BR /&gt;$ MMI="$&lt;FOLDER&gt;MMI.EXE"&lt;BR /&gt;$ MMI&lt;BR /&gt;1&lt;BR /&gt;1&lt;BR /&gt;35569222&lt;BR /&gt;n&lt;BR /&gt;0&lt;BR /&gt;n&lt;BR /&gt;94222&lt;BR /&gt;n&lt;BR /&gt;4&lt;BR /&gt;0&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;And any time you need it @&lt;FOLDER&gt;MMI&lt;BR /&gt;&lt;BR /&gt;(btw, Antonio: I stick to your example, but I HATE Billywhere terminology! Please next time call a directory &lt;DIRECTORY&gt; or something like that!)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If my guess about the problem you are trying to solve, part of your input is somehow coming from another application, and you want to feed THAT into MMI??&lt;BR /&gt;&lt;BR /&gt;In that case, you probably have that value in some symbol, say "eightdigits" = "35569222"&lt;BR /&gt;&lt;BR /&gt;Now, you can write a temporary file. Starting from VMS 7.3-2, you can use F$UNIQUE, but getting your own processes' PID or the current date-time are also usual.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;$ open/write mmifi &lt;SYS&gt;:mmi.'unique'&lt;BR /&gt;$ write mmifi "$ MMI:=$&lt;FOLDER&gt;MMI.EXE"&lt;BR /&gt;$ write mmifi "$ MMI"&lt;BR /&gt;$ write mmifi "1"&lt;BR /&gt;$ write mmifi "1"&lt;BR /&gt;              vvvvvvvvvvv&lt;BR /&gt;$ write mmifi eightdigits&lt;BR /&gt;              ^^^^^^^^^^^&lt;BR /&gt;$ write mmifi "n"&lt;BR /&gt;.&lt;BR /&gt;etc&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;$ close mmifi&lt;BR /&gt;$ @&lt;SYS&gt;:mmifi.'unique'&lt;BR /&gt;$ delete sys$scratch:mmifi.'unique';*&lt;BR /&gt;&lt;BR /&gt;Please note that the one line between vvv &amp;amp; ^^^  does NOT have the quotes, it writes the VALUE of eightdigits into the file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jan&lt;BR /&gt;&lt;/SYS&gt;&lt;/FOLDER&gt;&lt;/SYS&gt;&lt;/DIRECTORY&gt;&lt;/FOLDER&gt;&lt;/FOLDER&gt;</description>
      <pubDate>Tue, 21 Sep 2004 07:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383011#M31385</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-09-21T07:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383012#M31386</link>
      <description>Taulant,&lt;BR /&gt;  you need to use parameters! When you run a DCL command file, VMS automatically passes the first 8 parameters into variables P1 to P8.&lt;BR /&gt;&lt;BR /&gt;Your code would look something like this :-&lt;BR /&gt;&lt;BR /&gt;ACTION = P1&lt;BR /&gt;OPTION = P2&lt;BR /&gt;VALUE = P3&lt;BR /&gt;&lt;BR /&gt;IF ACTION .EQS. "1" THEN GOTO DECNET&lt;BR /&gt;......&lt;BR /&gt;DECNET:&lt;BR /&gt;IF OPTION .EQS. "1" .AND. VALUE .EQS. "35569222" THEN do_something&lt;BR /&gt;&lt;BR /&gt;You can then think about replacing numbers with proper names to make it more user friendly, i.e. &lt;BR /&gt;&lt;BR /&gt;$ MMI DECNET SUBMIT_SM 35569222&lt;BR /&gt;&lt;BR /&gt;Rob.</description>
      <pubDate>Wed, 22 Sep 2004 03:07:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383012#M31386</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2004-09-22T03:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383013#M31387</link>
      <description>Robert&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;IF OPTION .EQS. "1" .AND. VALUE .EQS. "35569222" THEN do_something&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;you are assuming that VALUE can have only a very limited number of values. That might be the case, and than you can do with that number of "do_somethings"'s.&lt;BR /&gt;In the case where VALUE might have much more different values, or perhaps is determined only at run time, then your "do_something" would have to be something very much in the line of my procedure above.&lt;BR /&gt;&lt;BR /&gt;Remember, parameter substitution is only done in command lines (lines beginning with "$" ), so if you want to feed parameters into data lines, you will HAVE to go the way around, and fill in the value of the parameter in a command line that is used in building a temporary procedure in which it is hardcoded; to be executed and discarded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Wed, 22 Sep 2004 05:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383013#M31387</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-09-22T05:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383014#M31388</link>
      <description>Jan - It's pointless getting picky about this, even if you do, I don't have the time.&lt;BR /&gt;&lt;BR /&gt;I was simply trying to show Taulant how to pass parameters to a DCL command file, which appears to me what his problem is.&lt;BR /&gt;&lt;BR /&gt;If I've misunderstood his problem, then I apologise.&lt;BR /&gt;&lt;BR /&gt;Robert.</description>
      <pubDate>Wed, 22 Sep 2004 05:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383014#M31388</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2004-09-22T05:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: run a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383015#M31389</link>
      <description>Robert, no hard feelings, we all have the same goal!&lt;BR /&gt;&lt;BR /&gt;Jan</description>
      <pubDate>Wed, 22 Sep 2004 05:55:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/run-a-file/m-p/3383015#M31389</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2004-09-22T05:55:40Z</dc:date>
    </item>
  </channel>
</rss>

