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
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
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm


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