Ok, will do. Thanks.

Mike

-----Original Message-----
From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of dave
Sent: September 23, 2009 9:11 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Date/Time functions for REXX program?

Michael, take a look at the dateget and datesubtract CSL
functions (usable from Rexx as well). You should be able to
do what you want with the functions they provide. They're
documented in the CMS Application Multitasking document.

HTH

DJ 
----- Original Message -----
From: "Horlick, Michael" <michael.horl...@cgi.com>
To: IBMVM@LISTSERV.UARK.EDU
Subject: Date/Time functions for REXX program?
Date: Thu, 24 Sep 2009 11:10:27 -0400

> Greetings,
> 
>  
> 
> Would like a few suggestions for a small REXX program I'm
> writing. I would like to determine the date and time since
> a user is logged on.
> 
>  
> 
> I can do a 'CP IND USER userid EXP' and get the CTIME as
> the number of days, hours, minutes and seconds that user
> is logged on, which is good, but I would like to determine
> the actual day, hour, minute and second. 
> 
>  
> 
> For example, right now my EXEC displays the following:
> 
>  
> 
> xxxxxxx has been logged on for 1 day(s) 7 hour(s) 1
> minute(s) 1 second(s). 
> 
>  
> 
> If it is, say 11:30:00 AM right now, I would like it to
> say additionally 'since Wednesday, September 22 at
> 4:28:59AM'. Gets a bit complicated, I guess, for year
> changes, leap years, etc... 
> 
>  
> 
> Also, I would like to determine the amount of time between
> the current time and a date in the future (our next
> scheduled VSE IPL, for example)
> 
>  
> 
> I plan to do the same for the VM IPL time derived from the
> 'CP Q CPLEVEL' command.
> 
>  
> 
> Any suggestions would be appreciated.
> 
>  
> 
> Thanks,
> 
> Mike
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 

Reply via email to