https://wiki.vmssoftware.com/index.php?title=Command_procedure&feed=atom&action=historyCommand procedure - Revision history2024-03-29T14:10:01ZRevision history for this page on the wikiMediaWiki 1.31.0https://wiki.vmssoftware.com/index.php?title=Command_procedure&diff=2482&oldid=prevMartin: Merge info from Command Procedure, tidy enumeration2022-03-23T12:59:13Z<p>Merge info from <a href="/Command_Procedure" class="mw-redirect" title="Command Procedure">Command Procedure</a>, tidy enumeration</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:59, 23 March 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A '''command procedure''' is a file that holds a sequence of DCL commands to be executed by the system in sequence interactively or as a batch job - essentially a [[DCL]] script. Command procedure files have the [[File extension|extension]] of .COM.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A '''command procedure''' is a file that holds a sequence of DCL commands to be executed by the system in sequence interactively or as a batch job - essentially a [[DCL]] script. Command procedure files <ins class="diffchange diffchange-inline">by convention </ins>have the [[File extension|extension]] of .COM.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Rules and conventions=</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Rules and conventions=</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l15" >Line 15:</td>
<td colspan="2" class="diff-lineno">Line 15:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are also certain conventions that it is recommended to follow to improve clarity and maintainability of the code:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>There are also certain conventions that it is recommended to follow to improve clarity and maintainability of the code:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">1. </del>Give your command procedure a name that indicates its purpose and use .COM as the file type.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"># </ins>Give your command procedure a name that indicates its purpose and use .COM as the file type.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"># </ins>Use complete names for commands and qualifiers. This will help to ensure that your command procedure is upwardly compatible to future releases of OpenVMS.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">2. </del>Use complete names for commands and qualifiers. This will help to ensure that your command procedure is upwardly compatible to future releases of OpenVMS.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"># </ins>Start each command procedure with one or more [[Comment|comment]] lines, at least stating the purpose of the command procedure.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"># </ins>End the command procedure with an EXIT or STOP statement.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">3. </del>Start each command procedure with one or more [[Comment|comment]] lines, at least stating the purpose of the command procedure.</div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">4. </del>End the command procedure with an EXIT or STOP statement.</div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Example=</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=Example=</div></td></tr>
</table>Martinhttps://wiki.vmssoftware.com/index.php?title=Command_procedure&diff=131&oldid=prevDarya.zelenina: Created page with "A '''command procedure''' is a file that holds a sequence of DCL commands to be executed by the system in sequence interactively or as a batch job - essentially a DCL scri..."2018-12-19T06:16:59Z<p>Created page with "A '''command procedure''' is a file that holds a sequence of DCL commands to be executed by the system in sequence interactively or as a batch job - essentially a <a href="/DCL" title="DCL">DCL</a> scri..."</p>
<p><b>New page</b></p><div>A '''command procedure''' is a file that holds a sequence of DCL commands to be executed by the system in sequence interactively or as a batch job - essentially a [[DCL]] script. Command procedure files have the [[File extension|extension]] of .COM.<br />
<br />
=Rules and conventions=<br />
Command procedures in OpenVMS follow a set of rules; if they are broken, an error message is displayed and the command procedure may fail.<br />
<br />
1. Every line in a command procedure that is not a data line has to begin with the dollar sign ($):<br />
<nowiki><br />
$ if f$mode() .nes. "INTERACTIVE" then exit<br />
</nowiki><br />
2. [[Comment|Comments]] begin with an exclamation point (!). Comment lines begin with a dollar sign AND an exclamation point ($!):<br />
<nowiki><br />
$ if count .eq. 5 !Last element<br />
$! Return to the previous level<br />
</nowiki><br />
There are also certain conventions that it is recommended to follow to improve clarity and maintainability of the code:<br />
<br />
1. Give your command procedure a name that indicates its purpose and use .COM as the file type.<br />
<br />
2. Use complete names for commands and qualifiers. This will help to ensure that your command procedure is upwardly compatible to future releases of OpenVMS.<br />
<br />
3. Start each command procedure with one or more [[Comment|comment]] lines, at least stating the purpose of the command procedure.<br />
<br />
4. End the command procedure with an EXIT or STOP statement.<br />
<br />
=Example=<br />
<nowiki><br />
$! This command procedure displays a message based on the current day of the week.<br />
$ say := write sys$output<br />
$ day = f$cvtime(,,"WEEKDAY")<br />
$! show sym day<br />
$ say "Hooray, it's ''day'!"<br />
</nowiki><br />
<br />
=Command procedures used by OpenVMS=<br />
* [[AUTOGEN]]<br />
* [[LOGIN.COM]]<br />
* [[SYSTARTUP_VMS.COM]]<br />
* [[SYLOGICALS.COM]]</div>Darya.zelenina