Operating System - OpenVMS
1753857 Members
7525 Online
108809 Solutions
New Discussion

Re: macro command to check the opcoms and retained on error, that running every 5 mins

 
Masterouch
Occasional Contributor

macro command to check the opcoms and retained on error, that running every 5 mins

Hi All, 

May I ask if there's a macro command to check the opcoms and retained on error, that running every 5 mins? thanks.

7 REPLIES 7
Steven Schweda
Honored Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

> May I ask if there's a macro command to check the opcoms and retained
> on error, that running every 5 mins? [...]

   "a macro command"?  "the opcoms"?  A queued job can be "retained on
error".  Is that what you're looking for?

      HELP SHOW QUEUE /BY_JOB_STATUS

      HELP LEXICALS F$GETQUI

   "running every 5 mins" can be done by a batch job which resubmits
itself.

Masterouch
Occasional Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

how about this command to be run every 5 mins.

 

set ter/bro
sh bro
rep/st
sh que/bat/all/by=r/a
sh ti

 

 

Steven Schweda
Honored Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

> set ter/bro
> sh bro
> rep/st

   I doubt that these would work (or make sense?) in a batch job, where
SYS$COMMAND points to a disk, rather than to a controlling terminal
(which a batch job lacks).

> sh que/bat/all/by=r/a
> sh ti

   Those should work in a batch job.  Your DCL script might end with
code like the following:

$ cpr = f$environment( "PROCEDURE")
$ cpr = f$parse( cpr, , , "DEVICE")+ -
        f$parse( cpr, , , "DIRECTORY")+ -
        f$parse( cpr, , , "NAME")+ -
        f$parse( cpr, , , "TYPE")
$!
$ submit /noprinter /after = "+00:05:00" 'cpr'

   General advice: If I were writing a DCL script, I'd spell out the
keywords instead of trying to find their minimal abbreviations.  For
example, ten minutes after writing "/by=r/a", I would have forgotten
what it meant.  "/BY_JOB_STATUS = ABORTING" would retain its meaning (to
me) much longer.

Masterouch
Occasional Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

Hi Steven, thanks for your response I am just new to this environment and I want to enhance my ability in openVMS

some of the commands are addons for me to be able to have a full details/logs when i get back to check. 

set ter/bro       | set terminal/broadcast to enable opcoms messages 

sh bro              | show broadcast for identification if its enable 
rep/st               | reply/status for 
sh que/bat/all/by=r/a /full    | show queue/batch/all/by=retained/all /full this will have a visibilities to received retained on error in the nodes
sh ti                  | show time for me is to identify when I run those command 

 I am trying to figure out on how I will able to run the command by itself running in 5 mins automatically. Can it be possible?   

 

Steven Schweda
Honored Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

> [...] I am trying to figure out on how I will able to run the command
> by itself running in 5 mins automatically. Can it be possible?

   The usual way to run commands periodically is a self-resubmitting
batch job, but commands like "set terminal", which expect to deal with
some kind of terminal, won't work in a batch environment, where there is
no terminal.

   If you want to create a terminal (or dedicate some existing terminal)
to this job, then you should be able to do whatever you want in a DCL
script with a loop (GOTO) and a delay (WAIT).

   I can understand why something like "SHOW QUEUE [...]" might be
interesting, but I don't understand what useful information you expect
to get from something like "REPLY /STATUS".  Who (or what?) will be
looking at the output from these commands?  And then what happens?

   Is there some actual problem which you are trying to solve?

Masterouch
Occasional Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

my apologies to confuse you about rep/stat it is a reply and status for the following retained of errors on the batch jobs.

 

The usual way to run commands periodically is a self-resubmitting
batch job, but commands like "set terminal", which expect to deal with
some kind of terminal, won't work in a batch environment, where there is
no terminal. <<its set term by the way, not terminal>>

 

Steven Schweda
Honored Contributor

Re: macro command to check the opcoms and retained on error, that running every 5 mins

> my apologies to confuse you about rep/stat it is a reply and status
> for the following retained of errors on the batch jobs.

   It is?

      help reply /status

If I wanted information on batch jobs, then I might stick with SHOW
QUEUE.

> [...] <<its set term by the way, not terminal>>

     help set term

> Is there some actual problem which you are trying to solve?

   Still a mystery.