[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1006.0. "shutdown state and DCL symbols" by TAV02::SHAPIRA () Wed Jul 08 1992 10:06

Hi there,

A customer wrote a CP that runs everynight, does few checks and than 
acctivate ALL-IN-1 to send mail to the appropriate users.
The cp is activated using the housekeeping mechanisem and it is recycled
every night.

A problem occures when another housekeeping procedure (FCVR et.)
is running and ALL-IN-1 is in shutdown state. Then the customer's cp
fails to enter ALL-IN-1 and to send mails.

Is it possible to check within DCL if ALL-IN-1 is down, and if it is to
wait for a known period and to try entering ALL-IN-1 again ?

Thanks, Yariv
T.RTitleUserPersonal
Name
DateLines
1006.1Bit of DCL to tryIOSG::SHOVEDave Shove -- REO-D/3CFri Jul 10 1992 17:2261
    Try the following piece of DCL.
    
    Note that it's extracted from a bigger DCL procedure, so you may need
    to check I haven't editted out any needed labels etc.
    
    Dave.
    
$ ! First, check whether there's an ALL-IN-1 around at all.
$ !
$ if f$trnlnm("OA$IMAGE") .eqs. "" then goto no_a1
$ !
$ ! Now see if it's shut down
$ !
$ open/read/share/error=no_a1 sst oa$data:system.pst
$ read/error=its_up/key="OA$SHUT_TIME" sst shut_time
$ shut_time = f$extract(30,999,shut_time)
$ if shut_time .eqs. "" then goto its_up
$ ! Might be down -- get current date/time in NBS for comparison
$ now = f$cvtime()		! YYYY-MM-DD HH:MM:SS.CC
$ now_nbs = f$extract(0,4,now) + f$extract(5,2,now) + f$extract(8,2,now) -
	+ f$extract(11,2,now) + f$extract(14,2,now) + f$extract(17,2,now) -
	+ f$extract(20,2,now)
$ if now_nbs .lts. shut_time then goto its_up
$ !
$ ! It's down -- say so, and exit.
$ !
$ reason = ""
$ restart = ""
$ rst_date = ""
$ read/error=no_reason/key="OA$SHUT_REASON" sst reason
$ reason = f$extract(30,999,reason)
$no_reason:
$ read/error=no_restart/key="OA$SHUT_RESTART" sst restart
$ restart = f$extract(30,999,restart)
$ if restart .eqs. "" then goto no_restart
$ if f$extract(0,8,restart) .eqs. f$extract(0,8,now_nbs) then goto today
$ ! Not today - get date
$ month = f$extract(4,2,restart) - 1 ! 0 = Jan
$ month = f$extract(month*3,3,"JanFebMarAprMayJunJulAugSepOctNovDec")
$ rst_date = " on " + f$extract(6,2,restart) + "-" + month -
	+ "-" + f$extract(0,4,restart)
$today:
$ restart = f$extract(8,2,restart) + ":" + f$extract(10,2,restart)
$ restart = " It will restart at ''restart'''rst_date'"
$no_restart:
$ write sys$output "ALL-IN-1 is down." + restart
$ if reason .nes. "" then write sys$output reason
$ write sys$output ""
$ close sst
$ exit
$ !
$ no_a1:
$ write sys$output "ALL-IN-1 is not available at the moment"
$ exit
$its_up:
$ close sst
$ !
    ... code for the case that it's up. (Procedure as written $EXITs if
    it's down - you might want to change the $exit statements to something
    else.)
    
1006.2is there another way ?SUBURB::CLEPHANEBTue May 18 1993 13:429
    
    Is there another way of checking to see if ALL-IN-1 is up/down ?
    
    .-1 is fine if the symbol exists in the PST.
    
    Regards,
    
    Bruce
    
1006.3Any ideas anyone ?SUBURB::CLEPHANEBThu May 20 1993 15:3815
    
    The reason for my previous note is that Digital's internal application
    MRE uses the method described in .-2 to check if ALL-IN-1 is up before
    attempting to send mail to a DL.
    
    If, like in this case, the PST does not contain this record (for
    whatever reason), MRE terminates abnormally.
    
    I've been asked to find another way of testing to see if ALL-IN-1 is up
    and running ?
    
    Any ideas ?
    
    Bruce
    
1006.4Check ALL-IN-1 statusSUBURB::CLEPHANEBMon May 24 1993 17:098
    
    Hi,
    
    Does anybody know of a better way to check if ALL-IN-1 is up or not apart
    from note 1006.1 
    
    Thanks,
    
1006.5ModerationAIMTEC::WICKS_AAlphatraz - Coming Summer 93Mon May 24 1993 17:167
    The previous reply was moved from note 2048 - please do not start new
    notes just for the sake of it. If someone knows an answer then they will
    reply just as easily to a new reply to an old note.
    
    Regards,
    
    Andrew.D.Wicks
1006.6Does it really matter ?SUBURB::CLEPHANEBMon May 24 1993 17:412
    
    Is that a NO then ?
1006.7Sorry - I actually dared to be away for a few daysIOSG::SHOVEDave Shove -- REO2-G/M6Thu May 27 1993 18:3318
    The DCL in .1 should cater for the symbol not existing - see the line:
    
$ read/error=its_up/key="OA$SHUT_TIME" sst shut_time
    
    If the symbol isn't there it'll jump to its_up:
    
    Is that label in your version? Does the $read line contain the /error=
    ?
    
    What error does your version produce?
    
    I have just checked that .1 does indeed work in the case that the
    symbol is missing from the file - it does. By the way, this will
    normally mean that the ALL-IN-1 system has never, ever, been shut down.
    ALL-IN-1 doesn't delete symbols from SYSTEM.PST (ever) - it merely sets
    their values to blanks.
    
    Dave.
1006.8good old MRE ...SUBURB::CLEPHANEBFri May 28 1993 13:2613
    
    Dave,
    
    I've just speken to the MRE people and it appears that their code does
    not cater for the record not being there. I've advised them to use the
    example in .1.
    
    Many thanks,
    
    Bruce