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 

REXX TIME()

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


Joined: 11 Dec 2003
Posts: 8
Topics: 6

PostPosted: Wed Sep 15, 2004 2:08 pm    Post subject: REXX TIME() Reply with quote

All,

What is the best way to compare on system time?

For example:

IF TIME() <= 18:00 THEN
SAY 'BEFORE 6PM'
ELSE
SAY 'AFTER 6PM'

What is the best way to get 18:00 into a numeric compare instead of a character compare?

Then actually, just to throw a wrench in the work I would really like to do a compare between certain times.

IF TIME() betwen 18:00 and 06:00 THEN.......


Any help would be appreciated. Rolling Eyes

Thanks ,

Offshore
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Sep 15, 2004 2:35 pm    Post subject: Reply with quote

Offshore,

Try one of these methods.

Code:

/* REXX */             
TIMENOW=TIME(H)       
IF TIMENOW < 18 THEN   
   SAY 'BEFORE 6PM'   
ELSE                   
   SAY 'AFTER 6PM'     



or

Code:

/* REXX */                     
TIMENOW=SUBSTR(TIME('L'),1,5) 
IF TIMENOW < '18.00' THEN     
   SAY 'BEFORE 6PM'           
ELSE                           
   SAY 'AFTER 6PM'             


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
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