Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need information about Current Timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Ritesh Chopra

New User


Joined: 15 Oct 2007
Posts: 13
Location: India

PostPosted: Fri Nov 02, 2007 8:55 pm    Post subject: Need information about Current Timestamp
Reply with quote

EXEC SQL
SET :WS-CRT-TS = CURRENT TIMESTAMP - :WS-CRT-DT DAYS
END-EXEC

Can you please help me understand the code.
I have following queries :-
How does this work ? Want to know in a bit detail.
What is the use of DAYS here.
My WS-CRT-DT is PIC S9(3) COMP-4. So what will the subtraction finally give ?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Nov 02, 2007 9:08 pm    Post subject:
Reply with quote

Hello,

I believe the subtraction will give the number of days between the current date and the specified date.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Nov 02, 2007 9:14 pm    Post subject: Re: Timestamp
Reply with quote

Ritesh Chopra wrote:
EXEC SQL
SET :WS-CRT-TS = CURRENT TIMESTAMP - :WS-CRT-DT DAYS
END-EXEC

Can you please help me understand the code.
I have following queries :-
How does this work ? Want to know in a bit detail.
What is the use of DAYS here.
My WS-CRT-DT is PIC S9(3) COMP-4. So what will the subtraction finally give ?


WS-CRT-DT is the number of days to be subtracted from the current timestamp and the results are placed in WS-CRT-TS which should be pic x(26). DAYS identifies what is to be subtracted from the timestamp it could be YEARS, MONTHS, DAYS, HOURS, MINUTES, SECONDS, or MICROSECONDS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us