[Info-vax] how to write openvms commands in .sh file through openvms
Bob Koehler
koehler at eisner.nospam.encompasserve.org
Thu Feb 28 09:11:04 EST 2013
In article <d30535c9-4967-4f98-871f-d31841cfda00 at googlegroups.com>, kevinparker124 at gmail.com writes:
> Hi friends,
>
> I have couple of openvms commands which i have to run through openvms by using .sh file...means all the commands i have to put it into that .sh file.
OK, I'm going to guess that you're used to putting UNIX shell
commands in a script file with the extension .sh, and running them
via "source" or "." or by the name of the file.
On VMS we normally use the extension .com, but VMS doesn't actually
care. Since the command language is called DCL these are DCL script
files, just as your .sh are bash, ksh, bourne shell, or csh scripts.
To run a DCL script named a.sh at your terminal, use the "@" command:
$ @a.sh
(I've assumed your prompt is "$").
You can also run it in the background through the batch facility,
using the submit command, be aware that the command file will run
in a context just like you just logged in:
$ submit a.sh
And you can run it as an asynchronous subprocess while you're logged
in by using spawn:
$ spawn/nowait @a.sh
OBTW, if you use the standard extension .com, you don't have to type
it for the @ command or the submit command, @ and submit will assume
.com .
But really, you should at least read the HELP for @ and submit before
you use them.
More information about the Info-vax
mailing list