- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: OpenVMS automatically
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2013 05:09 AM
тАО04-05-2013 05:09 AM
OpenVMS automatically
Hi all,
I would like to ask some stupid question. Im a new to OpenVMS and I have running a command procedure or let me say script. This script is run like this: submit /noprint script_name and it generate a log file. So I would like to add another thing or make new script that after it finish the log file will be send on mail. The procedure is long and running more then 2 hours. So afther its done to send me the log file or after 2 hours or 3 to send me the log file on mail. also i would like to make this automaticaly, for example this script to run automaticaly every day at 17h oclock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2013 05:27 AM
тАО04-05-2013 05:27 AM
Re: OpenVMS automatically
The question isn't stupid but it could have been answered with HELP SUBMIT. Unfortunately there isn't a command qualifier that would mail the logfile to you. The easiest solution, from my point of view, would be to write another simple command procedure that contains the $ SUBMIT/NOPRINT command you're issuing to run the job. For most circumstances you could use the SYNCH command to wait for the job to finish and then have a command to use MAIL to send the logfile to you.
bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2013 07:16 AM
тАО04-05-2013 07:16 AM
Re: OpenVMS automatically
1) Submit (actual job)
2) SYNC on the above job
3) $mail/subj="whatever" /to="whomever" logfile_from_above
Note: The SYNC will cause the current stream to wait until the batch job is complete. At that point, the mail will be sent.
I use a similar mechanism.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2013 10:38 AM
тАО04-09-2013 10:38 AM
Re: OpenVMS automatically
You can redirect the middle of your log to another file, close it, and then mail that file, like the following, which will send you an e-mail consisting entirely of "Do stuff here":
$ type mail_batch_log.com $ IF F$SEARCH("SYS$SCRATCH:my_batch_log.tmp") .NES. "" $ THEN $ DELETE SYS$SCRATCH:my_batch_log.tmp;* $ ENDIF $ OPEN/WRITE/SHARE=READ OUTFILE SYS$SCRATCH:my_batch_log.tmp $ DEFINE/NOLOG SYS$OUTPUT OUTFILE $ DEFINE/NOLOG SYS$ERROR OUTFILE $!*** $ WRITE SYS$OUTPUT "Do stuff here" $!*** $ ALL_DONE: $ CLOSE/NOLOG OUTFILE $ MAIL/SUBJECT= "Results from MY_BATCH_LOG" - SYS$SCRATCH:MY_BATCH_LOG.TMP 'F$GETJPI("","USERNAME")' $ EXIT
There are a bunch of holes in this simple example, such as the lack of error handling, and the failure to dodge race conditions by giving the scratch file a unique name, but it should get you started.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2013 10:43 PM
тАО04-16-2013 10:43 PM
Re: OpenVMS automatically
Hi all and tnx for the reply ... i would like to tell that im a total noob in this :) im trying to learn how it works. Any way sorry for long time no reply and i guess it left to me to try ... Also i have to tell that if the tape where it is saving the backup may be out of memory and then the log stops and i have to know that too so i can react ... but i guess can be left off and wait for mail :) and if it not coming then to chekit :) ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2013 05:58 AM
тАО04-17-2013 05:58 AM
Re: OpenVMS automatically
You mention that you would like the procedure to start every day at the same time. To accomplish this, submit the same procedure to the batch queue using the /AFTER qualifier and specify "tomorrow+X" where X is the time you would like the procedure to start. For example: /AFTER="tomorrow+05:00" would start the job at 5AM the next day.
In your last reply, you imply that you are doing backups and that the tape may run out of space requiring another tape. Enabling your terminal for operator messages will allow the operator messages to appear on your terminal. Messages requesting another tape will appear there.
Hope this helps,
Dan