tldm-universe/Ardent/UV/APP.PROGS/307A

51 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2024-09-09 21:51:08 +00:00
subroutine U307A( ANS, STATUS, DATA, TYPE )
*******************************************************************************
*
* 307A - SLEEP UNTIL SUBROUTINE
*
* 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.
* 07/25/88 - - Maintenence log purged at 5.2.1, see release 5.1.10.
*
*******************************************************************************
*
* This "user-exit", called from a BASIC program, sleeps until
* the time specified (in external form).
*
* Usage:
* X = oconv( hh:mm:ss, "U01AD" )
*
*
******************************************************************************
$OPTIONS DEFAULT
ANS = ''
if DATA = "" then
STATUS = 1
return
end
seconds = iconv( DATA, "MTHS" )
if status() then
STATUS = status()
return
end
seconds -= int( TIME())
if seconds < 0 then
seconds += 86400
end
execute 'SLEEP ': seconds
STATUS = @SYSTEM.RETURN.CODE
return