MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting current date using REXX or TSO functions

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Wed Jan 28, 2004 8:24 am    Post subject: Getting current date using REXX or TSO functions Reply with quote

How can I get the current system date using either REXX or a TSO function.... ?

I am on a MVS mainframe running OS390
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 702
Topics: 64
Location: USA

PostPosted: Wed Jan 28, 2004 8:46 am    Post subject: Reply with quote

What do you want to do, what is the required format. I use "TSO TIME" if I forgot the date.
Back to top
View user's profile Send private message Send e-mail
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Jan 28, 2004 8:52 am    Post subject: Reply with quote

I'm not sure if I understand the question correctly, but you can get the current system date in REXX by using the DATE() function. A few examples are:

Say Date() = 28 Jan 2004
Say Date(U) = 01/28/04
Say Date(S) = 20040128
Say Date(J) = 04028
Say Date(D) = 28

The current system date is stored in a few ISPF global variables, which you can view in ISPF Option 7.3:

zdate = 04/01/28
zdatestd = 2004/01/28
zjdate = 04.028
zj4date = 2004.028

The TSO command TIME returns the following information:

TIME-08:51:34 AM. CPU-00:00:00 SERVICE-751 SESSION-00:00:00 JANUARY 28,2004
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12399
Topics: 75
Location: San Jose

PostPosted: Wed Jan 28, 2004 8:57 am    Post subject: Reply with quote

John,

You can use the function DATE for getting the current date. check this link for a detailed explanation of the function DATE . By default, the function returns the local date in the format: dd mon yyyy.

Check this link for a detailed explanation of DATE

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A330/4.3.16?DT=20020521161835

Check this link for a detailed explanation on the function TIME

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A330/4.3.62?DT=20020521161835

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Wed Jan 28, 2004 10:39 am    Post subject: Reply with quote

Thanks much for the help... The REXX date function fits the bill.

thanks again
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group