1748268 Members
3599 Online
108760 Solutions
New Discussion юеВ

Re: Scheduler

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor

Re: Scheduler

 
Dennis Handly
Acclaimed Contributor

Re: Scheduler

>but then it has the problem of tracking the job - "did it run?" and "where the &^%&^% did my log file go?"

 

Oh?  Look at the cron logfile.  :-)

It's either mailed to you or it the place where your scripts or crontab entry left it.

MPIvan
Occasional Advisor

Re: Scheduler

Its realy difficult to understand this system :D ... any way im now trying to make a simple script that will run every day and make a dat file that say Hello World :) ... every day in 3:00 PM and send me the log file to mail. After that i will continut for my real procedure that i need ... try to integrate. I will contact you for every progres that i will made here :) ...

 

i realy dont know from where to start :D becouse this writing also start to look very hard :D 

Mike Kier
Valued Contributor

Re: Scheduler

It is not difficult at all, if you avail yourself of even a fraction of the helpful information available.

 

First, all of the VMS documentation is available on-line at http://h71000.www7.hp.com/doc/index.html.  You can download PDF versions of most any document you'd want for nearly any release in the past decade.  And VMS documentation is high quality by most folks standards.

 

Next, there are many good example and useful utility procedures available, many of which address the issue you appear to be trying to solve.  Looking at someone else's approach is a great way to learn.  And stealing code is the highest form of flattery.

 

I'd start with the OpenVMS Freeware page at http://h71000.www7.hp.com/openvms/freeware/, and there are a lot of useful procedures at http://dcl.openvms.org/ and also look in http://www.eight-cubed.com/articles/dcl_standards.html, and http://process.com/openvms/index.html

 

There is also the VMS FAQ and the Ask the Wizard archives http://hoffmanlabs.org/vmsfaq/ and http://h71000.www7.hp.com/wizard/

 

Don't forget the rich HELP environment, various books (e.g., "Writing Real Programs in DCL") that may be available on Amazon, et al., and what you can probably find with a simple google or bing search.

 

There used to be some fairly reasonable self-paced training around, but I haven't looked for it in a long time.

 

And as Hein would probably point out, if you don't want to do it in DCL, you might want to tackle it in perl or Python or GNV/bash if you have them on your system.

Practice Random Acts of VMS Marketing
Mike Kier
Valued Contributor

Re: Scheduler

I forgot one other very rich source - the DECUS Library Compendium - http://decuslib.com/

Practice Random Acts of VMS Marketing
Hoff
Honored Contributor

Re: Scheduler

In no particular order...

 

The OpenVMS operating system is ~35 years old, and most problems and questions have already been discussed and solved, bugs and oddities already posted, example code posted, docs are online, and all of these resources are readily available via Google or Bing searches, and (not in the main Google search engine) via the Usenet comp.os.vms newsgroup archives (c.o.v. is still active) available via the Google Groups search engine:

https://groups.google.com/forum/?fromgroups&nomobile=true#!forum/comp.os.vms

 

For comp.os.vms, free usenet accounts are available via Eternal September, or you can try to use the (somewhat problematic) Google Groups posting web-based mechanisms:

http://www.eternal-september.org

 

Do not assume OpenVMS is anything like Unix.  It's not.  The quicker you forget how Unix or Linux does stuff and learn how OpenVMS implements the particular task, the better off you will be.   The other path leads to confusion and frustration.  In the interim, here is a bash DCL command comparison:

http://labs.hoffmanlabs.com/node/741

 

As for DCL programming and periodic DCL resubmission -- home-grown scheduling, as OpenVMS lacks an integrated cron or other scheduler -- you'll be able to use any of the various DCL template procedures around.  Here are two examples:

http://labs.hoffmanlabs.com/node/97

http://labs.hoffmanlabs.com/node/501

 

In your case, the SUBMIT command will involve /AFTER=TOMORROW+15:00 for the resubmission, if that's when you want the next batch job to run.

 

Sending MAIL from DCL is feasible, and here are four example commands:

 

MAIL filename username/SUBJECT="Hello"

MAIL NLA0:  username/SUBJECT="Hello"

MAIL filename "user@example.com" /SUBJECT="Hello"

MAIL NLA0: "user@example.com" /SUBJECT="Hello"

 

NLA0: is the null device (akin to /dev/null on Unix; can be written or read on OpenVMS), so you'll not need to specify a filename for those particular commands.  Otherwise, you'll need a file as the contents of the mail message.   You'll need to quote user specifications containing an @ sign or other special characters, due to the rules of DCL.  

 

To read or write a file from within DCL:

http://labs.hoffmanlabs.com/node/383

 

Mike has already posted a link to http://decuslib.com, and that is a massive archive of OpenVMS applications and tools and documentation.  Use the Google or Bing site:decuslib.com keyword to target your search there.  There's a similar but somewhat smaller archive at the http://www.digiater.nl site.

 

To learn OpenVMS and writing DCL procedures, start by reading the User's Manual, and then skimming the Programming Concepts or the System Manager's manuals for more information and also depending on your particular goals:

http://www.hp.com/go/openvms/doc

 

Also see the OpenVMS Beginner's FAQ and the OpenVMS FAQ (mentioned earlier):

http://saf.bio.caltech.edu/vms_beginners_faq.html

http://www.hoffmanlabs.com/vmsfaq

 

Also read the current OpenVMS roadmap, as HP has plans to continue OpenVMS support for some years, but with no new releases or particular new features planned, no new platform support, and with application and platform migrations expected.  Here's the OpenVMS roadmap and the roadmap FAQ:

 http://www.hp.com/go/openvms/roadmap

 http://h20195.www2.hp.com/V2/GetDocument.aspx?docname=4AA5-0454ENW&cc=us&lc=en

 

Edit: Watch that second URL, as Lithium is being as dumb as a bag of hammers about that HP URL.

 

Random grumping: I'd forgotten how awful the iconography is in this Lithium tool.  Crayon-caliber.  Oh, and I'd forgotten the "Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied." messages.   Not sure what got eaten there.  Oh, well. 

 

Steven Schweda
Honored Contributor

Re: Scheduler

 
MPIvan
Occasional Advisor

Re: Scheduler

I don't know what to say ... THANKS A LOOT !!!

I really don't expect this kind of answers ... excelent support !

 

I just want to say that I am in progress of making this stuff work ..When I finished definitively will shear the good job ( if it be a good :P ) ...

 

Again thank a loot for this help and effort you all make to explain to me !!!

 

MPIvan
Occasional Advisor

Re: Scheduler

Hi all,

 

I just want to informed you that all stuff you all told me it works fantastic ! As "abrsvc" and "John Gillings" say i did that and work great ... 

 

I add this lines at the end of the procedure that im executing and after it end or at the end of the job, the same job resubmit itself..

 

this is the code iv add:

...

...

...

$ mail/sub="mailjob" ivan.log "ivan@mydomain.com"
$ submit -
/restart -
/after="TOM+22:00:00" -
disk9:[ivandir]thejob
$ exit

 

and that is all ... im now trying to figure out to be activate just working days mon-friday

Steven Schweda
Honored Contributor

Re: Scheduler