tldm-universe/Ardent/UV/APP.PROGS/TL.SHUT.B

120 lines
3.8 KiB
Plaintext
Raw Normal View History

2024-09-09 21:51:08 +00:00
$INCLUDE UNIVERSE.INCLUDE MTF.INCL.H
$INCLUDE UNIVERSE.INCLUDE FILENAMES.H
$INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
$INCLUDE UNIVERSE.INCLUDE TLOG.H
******************************************************************************
*
* System Admin Transaction Logging - Shutdown Logging
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description........................................
* 10/14/98 23801 SAP Change copyrights.
* 10/21/94 15120 DTM Changes for new states (shut/susp in progress)
* 05/15/94 13286 DTM Initial programming
*
*******************************************************************************
id = "%W%"
*******************************************************************************
*******************************************************************************
* Call initialization routines
*******************************************************************************
TPRINT @(-1)
temp = NULL
CALL *ISUSER.B(0, temp)
IF temp = 0 THEN
TPRINT UVREADMSG(071000,"")
SLEEP 3
STOP
END
*******************************************************************************
* Begin processing
*******************************************************************************
CALL *DRAW.SCRN.B( SHUT.MSG0, 1)
GOSUB init.menu
CALL *MNU.BAR.PR.B(Menu.Bar,1)
State = ""
RECIO( State, FINFO$AI.STATE, RECIO$FINFO )
stop = 0
IF State NE AI$LOGGING AND State NE AI$FULL AND State NE AI$SUSPENDED THEN
IF State = AI$WARM.START OR State = AI$INITIAL THEN
msg = "System is just now coming up, please be patient as the "
msg := "SHUTDOWN procedure may take some time to complete."
END
ELSE IF State = AI$SHUT.PROG THEN
msg = "System is currently in the process of being SHUTDOWN."
stop = 1
END
ELSE
msg = "System is not in a state that can be SHUTDOWN at this moment."
stop = 1
END
CALL *HELP.BOX.B( 3, 10, 45, msg )
IF stop THEN
STOP @(-1)
END
END
retry = 1
CALL *HELP.PRINT.B( SHUT.MSG1, 3 )
CALL *YES.NO.BOX.B( 6, SHUT.MSG2, retry )
IF retry THEN
EXECUTE "SHUTDOWN.RECOVERY" CAPTURING Error.Val
Error.Val = TRIM ( Error.Val )
CALL *HELP.BOX.B( 3, 10, 60, Error.Val )
END
GOTO EXIT
RETURN
***************************************************************************
* init.menu - initializes menu bar
***************************************************************************
init.menu:
scratch=UVREADMSG(073087,"")
Menu.Bar = NULL
Menu.Bar<1,1> = 3 ;* Number of Items in Menu.Bar
Menu.Bar<1,2> = 1 ;* Line # on which to print the Menu Bar
* First Item
Menu.Bar<2,1,1>=scratch<1> ;* SubMenu Title
Menu.Bar<2,1,2>=1 ;* # of items in SubMenu
* SubMenu #1
Menu.Bar<2,2,1>=scratch<6> ;* SubMenu Item
Menu.Bar<2,2,2>=1 ;* Action Code (Returned to calling process)
Menu.Bar<2,2,3>=scratch<7>
* Second Item
Menu.Bar<3,1,1>=scratch<8> ;* SubMenu Title
Menu.Bar<3,1,2>=1 ;* # of items in SubMenu
* SubMenu #1
Menu.Bar<3,2,1>=scratch<6> ;* SubMenu Item
Menu.Bar<3,2,2>=2 ;* Action Code
Menu.Bar<3,2,3>=scratch<7>
scratch=UVREADMSG(073089,"")
Menu.Bar<4,1,1>=scratch<1>
Menu.Bar<4,1,2>=3
Menu.Bar<4,2,1>=scratch<2>
Menu.Bar<4,2,2>=3
Menu.Bar<4,2,3>=scratch<3>
Menu.Bar<4,3,1>=scratch<4>
Menu.Bar<4,3,2>=4
Menu.Bar<4,3,3>=scratch<5>
Menu.Bar<4,4,1>=scratch<6>
Menu.Bar<4,4,2>=5
Menu.Bar<4,4,3>=scratch<7>
RETURN
EXIT:
STOP @(-1)
END