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

108 lines
2.9 KiB
Plaintext
Executable File

********************************************************************************
*
* Support of PR1ME INFORMATION Subroutine '!TIMDAT'
*
* 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.
* 04/18/91 8241 MAA Port to wyse.
* 03/11/90 6917 JWT SCO unix port
* 07/11/89 - DTW New file
*
*******************************************************************************
$OPTIONS DEFAULT
subroutine PR1ME(var.name)
$INCLUDE UNIVERSE.INCLUDE MACHINE.NAME
*************************************************************************
* *
* Support of PR1ME INFORMATION subroutine !TIMDAT *
*
* Returns a dynamic array containing time, data, and user information.
* Information about system usage is not supported.
* Field 1 ... month (2 digits)
* Field 2 ... day of month (2 digits)
* Field 3 ... year (2 digits)
* Field 4 ... minutes since midnight
* Field 5 ... seconds since midnight
* Field 6 ... ticks in last second (zero on system V machines)
* Field 7 ... CPU seconds since login
* Field 8 ... not supported, contains zero
* Field 9 ... not supported, contains zero
* Field 10 ... not supported, contains zero
* Field 11 ... number of ticks per second (unit used to measure
* real time
* Field 12 ... user number
* Field 13 ... login ID
* *
*************************************************************************
EQU AM TO CHAR(254)
no.days = date()
*
* number of month
*
var.name = oconv(oconv(no.days, "DM"), "MR%2") : AM
*
* number of day
*
var.name = var.name : oconv(oconv(no.days, "DD"), "MR%2") : AM
*
* number of year
*
var.name = var.name : oconv(no.days, "D2Y") : AM
no.minutes = time()
*
* number of minutes since midnight
*
var.name = var.name : int(no.minutes/60) : AM
*
* number of seconds since midnight
*
var.name = var.name : int(no.minutes) : AM
*
* number of ticks of last second
*
var.name = var.name : mod(no.minutes, 1) : AM
*
* CPU seconds used
*
var.name = var.name : SYSTEM(9) : AM
*
* 3 not supported values
*
var.name = var.name : 0 : AM : 0 : AM : 0 : AM
*
* number of ticks per second
*
if CT386 or MAGNUM or ATT3B2 or ATT3B15 or SCO386 or WYSE
then var.name = var.name : 100 : AM
else var.name = var.name : 60 : AM
*
* user number
*
var.name = var.name : @USERNO : AM
*
* login id
*
var.name = var.name : @LOGNAME
return