Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: script to restart process

Original Message
Name: subscribe07
Date: September 6, 2007 at 00:48:54 Pacific
Subject: script to restart process
OS: OpenVMS v6.2
CPU/Ram: 8mb
Model/Manufacturer: Digital
Comment:
can anyone please show me how to do the following:

a script needs to run every 30 minutes to:
1. monitor "sh sys" for a spesific process (i use "sh sys/proc=123")
2. if the process does not exist, the script is to start that process
3. if the process exist, then script is to terminate and wait another 30 minutes before it does another check

also appreciate if anyone can send me any scripting guide for openvms if they have any such documents (email me at: subscribe.07@gmail.com)

thanks for all your help



Report Offensive Message For Removal

Response Number 1
Name: KellyS
Date: September 6, 2007 at 10:00:38 Pacific
Subject: script to restart process
Reply: (edit)
Hello,

First, please note that version 6.2 is an very old version.

A little terminology - in OpenVMS lingo, "scripts" are called "command files", have have the file type ".COM". The command language is called DCL.

You have a lot of documentation for DCL commands on-line with the HELP command.

Websites:
The main OpenVMS website is http://www.hp.com/go/openvms.
The documentation is at http://h71000.www7.hp.com/doc/index...
DCL is documented at http://h71000.www7.hp.com/doc/83FIN...

You'll be interested in the DCL commands SUBMIT/AFTER, RUN/DETACH, SHOW SYSTEM/OUTPUT, IF, and probably OPEN, READ, CLOSE, and DELETE or PURGE.

A caution: you are looking for a process by name. OpenVMS allows multiple processes to have the same name, as long as those processes are assigned to different groups (the group is the first number of the User Identification Code, or UIC, assigned to every user and process.) You might want to double-check that there is only one process with this name.

To run a command file after a delay, use the SUBMIT command with the /AFTER qualifier. For instance, SUBMIT command.com /AFTER="+00:30:00" will run the command file in 30 minutes.

To run a command file repeatedly, put the SUBMIT command in the command file.

The SUBMIT command as I have shown it will create a log file, attempt to print it, and then delete it. You can add /KEEP/NOPRINT to keep the log file so you can check it for errors, but then you need to manage it, since every run of the command file will create an additional version.

Here's an idea of what the command file might look like. I've assumed that the file is named example.com. ** I Haven't Tested This! **

$ submit example.com/after="+00:30:00"/keep/noprint
$ show system/process="123"/out=sys$scratch:result.tmp
$ open/read result_file sys$scratch:result.tmp
$ read result_file result_line
$ if (result_line .eqs. "")
$ then
$ ... ! However you start your process
$ endif
$ close result_file
$ delete sys$scratch:result.tmp;*
$ purge example.log
$ rename example.log ;1

Good luck.


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: script to restart process

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC