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 

System date in Easytrieve

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
saraswathi
Beginner


Joined: 08 Dec 2006
Posts: 14
Topics: 8

PostPosted: Tue Mar 13, 2007 12:52 am    Post subject: System date in Easytrieve Reply with quote

hi,

how to get a system date in easttrieve?
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Mar 13, 2007 3:47 am    Post subject: Reply with quote

Form the manual (link above)
Code:

DEFINE GETDATE-DATE W 8 A
DEFINE GETDATE-FIRST6 GETDATE-DATE 6 N
DEFINE GETDATE-LAST5 GETDATE-DATE +3 5 A
DEFINE GETDATE-LAST6 GETDATE-DATE +2 6 A
DEFINE GETDATE-LAST3 GETDATE-DATE +5 3 A
DEFINE GETDATE-LAST2 GETDATE-DATE +6 2 A
GETDATE-DATE = SYSDATE . * MOVE ALL 8
GETDATE-LAST3 = GETDATE-LAST2 . * SHIFT LEFT OVER NEXT /
GETDATE-LAST6 = GETDATE-LAST5 . * SHIFT LEFT OVER FIRST /
&USER-DATE = GETDATE-FIRST6 . * MOVE TO USER FIELD

looks like SYSDATE is the key thing here. there was a whole lot more - I just took the first example
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Mar 13, 2007 6:27 am    Post subject: Reply with quote

saraswati,

Look up sysdate and sysdate-long in the manual.


Code:

CURRENT-DATE                  W  10  A
CURRENT-MM  CURRENT-DATE         02  A
CURRENT-DD  CURRENT-DATE      +3 02  A
CURRENT-YY  CURRENT-DATE      +6 04  A
                                     
                                     
CURRENT-TIME                  W  08  A
CURRENT-HH  CURRENT-TIME         02  A
CURRENT-MI  CURRENT-TIME      +3 02  A
CURRENT-SS  CURRENT-TIME      +6 02  A


JOB INPUT NULL                 
                                 
   CURRENT-DATE = SYSDATE-LONG   
   CURRENT-TIME = SYSTIME
   DISPLAY CURRENT-DATE ' ' CURRENT TIME
   STOP

_________________
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 -> Application Programming 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