ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by brando » Thu, 13 Nov 2003 06:35:25


When a batch process (or any process for that matter) is created the loginout
(I assume) executes SYLOGIN.COM and (typically) LOGIN.COM prior to the submited
command procedure is executed.

Working on a couple of projects I came to the conclusion that it would be cool
to have an ENDOFJOB.COM executed at the end of the batch job - as is
SYLOGIN.COM executed at the beginning of the batch job.

A number of ways to acomplish this come to mind - however this requires
changes to many a command procedure.

Just kind of dreaming, any thought's on this? Or have I come to the final
command procedure IAMNUTS.COM ?



J*o*h*n B*r*a*n*d*o*n
VMS Systems Administrator
XXXX@XXXXX.COM
 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by Wayne Sewe » Thu, 13 Nov 2003 07:07:14

>From: XXXX@XXXXX.COM (John Brandon)

Better not *depend* on the procedure, unless you disable delete/entry,
stop/id, and the delete-process and force-exit system services.

Even exit handlers, which work only with images, don't execute if the process
is deleted with stop/id or the system service.

AFAIK, the *only* exit mechanism that survives all forms of image and process
rundown is that associated with a change-mode-to-kernel/exec dispatcher. Kinda
hard to do *that* from dcl.

Wayne
===============================================================================
Wayne Sewell, Tachyon Software Consulting (281)812-0738 XXXX@XXXXX.COM
http://www.yqcomputer.com/
===============================================================================
Randolph Duke (in Trading Places): "Mother always said you were greedy."
Mortimer Duke: "She meant it as a compliment!"

 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by John Lair » Thu, 13 Nov 2003 07:21:08

On Tue, 11 Nov 2003 15:35:25 -0600, XXXX@XXXXX.COM (John Brandon)



From the System Manglers Manual:

"The system does not provide for automatic execution of a command procedure
at logout time."

You can redefine LOGOUT, but as the manual goes on to say there is a myriad
of ways of not getting that far (and most folks I suspect simply don't put
$LOGOUT in their batch files anyway, for fairly obvious reasons).

--
I couldn't repair your brakes, so I made your horn louder.

Mail john rather than nospam...
 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by brando » Thu, 13 Nov 2003 07:33:11

I found a mehtod in hp OpenVMS systems ask the wizard

http://www.yqcomputer.com/


And according to this "There is no central logout script mechanism available
within OpenVMS."

However it does offer three methods to overcome this... will look at them.


J*o*h*n B*r*a*n*d*o*n
VMS Systems Administrator
XXXX@XXXXX.COM
 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by brando » Thu, 13 Nov 2003 09:04:59

Here is what I have done and why I ask.

Step # 1 (completed)

In SYLOGIN an application is executed to log pertinent information of a batch
job (PID, entry #, log-spec, file-spec, start date/time, etc.). This
information is kept in an ISAM file - keyed off the start date/time.

This currently is in DCL but planning to write in FORTRAN (or C).


Step # 2 (working on)

In OpenVMS Utility Routines Manual Chapter 14 LOGINOUT (LGI) Routines you can
define the logical LGI$LOGINOUT_CALLOUTS (/SYS/EXE) to call a single or list of
end-of-job images. (also need to set a SYSGEN parameter)

Refer to :
http://www.yqcomputer.com/ #4493_lginout_chap

By using this method I can update the record created in Step # 1 with the
completion time and (hopefully) the completion status.



The plan is NOT to depend on this, however it will allow me to track my batch
jobs. Granted STOP/ID and DELETE/ENTRY will defeat this purpose however how
many times does one delete your batch jobs? Then there is the ocassional CRASH
and "oops I should not have pushed that button" - that was at least 330 days
ago. I would believe that this is the exception and not the rule.

Even if this does happen I still have an outstanding data record (from Step # 1)
that can be periodically detected and addressed.



More than I care to address.



Norm, NOPE! - I thought I was but I am on a roll here, will refrain from that
one till a later date...


There will always be "unforseen" events in my future - what is new?!?

Thanks for the input...!


J*o*h*n B*r*a*n*d*o*n
VMS Systems Administrator
XXXX@XXXXX.COM
 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by Mike Recht » Thu, 13 Nov 2003 16:49:42


$ ACCOUNT/PROCESS=BATCH ??

--
---------------------------------------------------------------------
Usual disclaimer: All opinions are mine alone, perhaps not even that.
Mike Rechtman * XXXX@XXXXX.COM *
Kibbutz Tzor'a. Voice (home): 972-2-9908337
"20% of a job takes 80% of the time, the rest takes another 80%"
---------------------------------------------------------------------
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS d(-)pu s:+>:- a++ C++ U-- L-- W++ N++ K? w--- V+++$
PS+ PE-- t 5? X- tv-- b+ DI+ D-- G e++ h--- r+++ y+++@
------END GEEK CODE BLOCK------
 
 
 

ENDOFJOB.COM similiar to SYLOGIN.COM and LOGIN.COM

Post by brando » Thu, 13 Nov 2003 17:25:22

Mike Rechtman writes:

I would like the update information to be as real-time as possible and
therefore ACCOUNT would not be the best solution.

Start of the job - open a record.
Job completion - update the record.




J*o*h*n B*r*a*n*d*o*n
VMS Systems Administrator
XXXX@XXXXX.COM