Beware: if you'd issue "FORCE myShutSVM" it will think you want to shutdown
everyone....
I too was thinking to add code to one of our servers to promote the stop to
DB2 etc.  This problem is one (not the only one) of the reasons why this
hasn't been done yet.

I already asked (here?) for a way by which an SVM could know: "am I being
forced, or is this a shutdown"

2007/11/8, Bruce Hayden <[EMAIL PROTECTED]>:
>
> The solution to stopping all of the various SVMs before VM shutdown is
> to use yet another SVM.  Create a user named SHUTTRAP that is
> autologged by AUTOLOG1 or 2 that has a profile exec that does:
> /* Profile exec */
> Address Command
> 'EXEC SHUTTRAP EXEC BYEBYE'
> Exit
>
> Now you write a BYEBYE EXEC that does everything you want it to do.
> Once it has verified that everything is down, it logs off which allows
> CP to shut down.  For example:
> /* BYEBYE EXEC */
> Address Command
> 'CP SEND CP TCPIP EXT'
> 'CP SMSG RSCS RSCS SHUTDOWN'
> 'EXEC DIRMAINT SHUTDOWN'
> (you get the idea.)
> 'CONWAIT'
> 'CP LOGOFF'
>
> And here is my SHUTTRAP EXEC:
>
> /* SHUTTRAP EXEC */
> Parse upper source . howcalled execn exect execm synonym .
> Address Command
> 'NUCEXT' execn                    /* Loaded already?                */
> Signal on error
> If RC<>0 then do                  /* No, load it first              */
>    'CMDCALL STATE' execn 'MODULE *'
>    'NUCXLOAD' execn '(SYSTEM'
> end
> else do                           /* Loaded, check attributes       */
>    signal off error
>    'MAKEBUF'
>    signal on error
>    buff=RC
>    'NUCXMAP' execn '(STACK LIFO'
>    Pull . . . . . . attributes
>    'DROPBUF' buff
>    If wordpos('SYSTEM',attributes)=0 then do /* Must be SYSTEM      */
>       'NUCXDROP' execn
>       'CMDCALL STATE' execn 'MODULE *'
>       'NUCXLOAD' execn '(SYSTEM'
>    end
> end
>
> ''execn arg(1)                    /* Call the nucleus extension     */
>
> Error:
> Exit RC
>
> --
> Bruce Hayden
> Linux on System z Advanced Technical Support
> Endicott, NY
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to