Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Getting information (RECFM/LRECL/BLKS... Tim Van Holder COBOL Programming 3 Wed Mar 14, 2018 2:10 pm
No new posts Get the list of data sets on DASD and... rakaitn JCL & VSAM 3 Thu Mar 08, 2018 12:38 pm
This topic is locked: you cannot edit posts or make replies. how to get Job information from IOF u... rsshanmugam CLIST & REXX 13 Mon Feb 05, 2018 4:22 pm
This topic is locked: you cannot edit posts or make replies. UTC Timestamp Log Thangavel COBOL Programming 5 Mon Jan 22, 2018 9:04 pm
No new posts Need to obtain VTOC information via R... djeffbland CLIST & REXX 10 Thu Jan 11, 2018 4:13 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us