tldm-universe/Ardent/UV/APP.PROGS/SUSP.REC.B
2024-09-09 17:51:08 -04:00

80 lines
2.2 KiB
Plaintext
Executable File

******************************************************************************
*
* System Admin Transaction Logging - Suspend 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 Added check for 2 new message states
* 10/14/94 15101 DTM Corrected message displayed
* 05/15/94 13286 DTM Initial programming
*
*******************************************************************************
id = "%W%"
*******************************************************************************
$INCLUDE UNIVERSE.INCLUDE TLOG.H
ALLOWED = 0
CALL *ISUSER.B( 0, ALLOWED )
;* Do superuser verification
IF NOT(ALLOWED) THEN
PRINT SUSP.MSG4
STOP
END
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 := "SUSPENDED procedure may take some time to complete."
END
ELSE IF State = AI$SUSP.PROG THEN
msg = "System is currently in the process of being SUSPENDED."
stop = 1
END
ELSE
msg = "System is not in a state that can be SUSPENDED at this moment."
stop = 1
END
PRINT msg
IF stop THEN
STOP
END
END
;* Suspend Logging
@SYSTEM.RETURN.CODE = 0
RECIO( AI$SUSPENDED, RECIO$STATE )
IF @SYSTEM.RETURN.CODE THEN
PRINT SUSP.MSG5
STOP
END
ELSE
LOOP
CURR.DATE = DATE()
CURR.TIME = TIME()
UNTIL CURR.DATE = DATE() DO REPEAT
CURR.TIME = OCONV( CURR.TIME, 'MTS' )
CURR.DATE = OCONV( CURR.DATE, 'D' )
PRINT SUSP.MSG6 : CURR.TIME : SUSP.MSG7 :CURR.DATE: STATE.MSG
END ;* end loop
END