System date and time



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

System date and time

Postby needhelp » Thu Jun 02, 2011 1:33 am

Are there keywords to getting the system date and time? If so, what are the keywords and what format is each returned in?
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: System date and time

Postby Robert Sample » Thu Jun 02, 2011 2:29 am

Would it not be better for YOU to read the manual for this instead of us reading the manual and regurgitating it to you? You might actually learn something by doing your own research.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: System date and time

Postby needhelp » Thu Jun 02, 2011 2:41 am

I have looked in the manual and it did not give the format for sysdate and there was nothing at all about system time. I've been doing google searches and can't find anything. That is why I am coming here. I didn't expect such a very unhelpful response.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: System date and time

Postby dick scherrer » Thu Jun 02, 2011 3:20 am

Hello,

I'm not aware of where this might be documented (if it is). I don't see anythng in the current manuals.

In "the old days" everywhere i went, there was a callable cobol or assembler routine that would return the system date and time in multiple formats. Ask around if such a module exists that you couild call from Easytrieve.

These days many people retrieve the date/time from db2 (assuming the process uses db2).

I'd be interested to hear how others are getting the system date/time these days. I'll try to do a bit of digging this evening. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: System date and time

Postby needhelp » Thu Jun 02, 2011 3:54 am

Thanks Dick, it pretty much confirms what I have not been finding. The program is not using DB2. I find it odd that it is not something readily available for easytrieve.
needhelp
 
Posts: 21
Joined: Thu Dec 30, 2010 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: System date and time

Postby dick scherrer » Thu Jun 02, 2011 6:51 am

Hello,

For the current date, try SYSDATE.

SYSDATE is a read only eight-byte alphanumeric field which contains the system date at the start of EASYTRIEVE PLUS execution. SYSDATE will have MM/DD/YY format.

and
I don't know if it still does, but Easytrieve Plus used to zero suppress the MM for Jan through Sep. That bit me one time when I used the MM portion of SYSDATE in a calculation (S0C7).


Depending on which release you are using, this may work. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: System date and time

Postby BillyBoyo » Thu Jun 02, 2011 3:09 pm

Further, as well as SYSDATE you should find SYSTIME available. Assuming you are on an up-to-date version, you'll also have access to "year 2000" dates, like SYSDATE-LONG.

Whilst the RUN date is useful information at times, if you are only printing one date, for me it should be the business date available somewhere in your system. Business date, run date and run time all together are best for problem resolution.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post