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
 

 

Incremet Date

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

New User


Joined: 31 Aug 2005
Posts: 3

PostPosted: Wed Aug 31, 2005 10:57 am    Post subject: Incremet Date
Reply with quote

I have to increment a date(a working storage variable PIC X(10)..)
I have tried with
EXEC SQL
SET :WS-START-DTE = (cast(:WS-START-DTE as date) +1 DAY)
END EXEC

WS-NEW-START-DTEM is a working storage variable..
That too is not working..
Could anyone help me out...
Thanks...
Back to top
View user's profile Send private message

mathiprakash

New User


Joined: 29 Apr 2005
Posts: 14
Location: Pune, India.

PostPosted: Wed Aug 31, 2005 1:57 pm    Post subject:
Reply with quote

Try this,

EXEC SQL
SET :WS-START-DTE = DATE(:WS-START-DTE) + 1 DAY
END EXEC

Regards,
Matty
Back to top
View user's profile Send private message
Ding_MF

New User


Joined: 31 Aug 2005
Posts: 3

PostPosted: Wed Aug 31, 2005 3:21 pm    Post subject:
Reply with quote

Hi Matty,

Thanks for the help..

I tried it out..But it is giving -180 sqlcode...
Now I have given the character string date format as 'MM/DD/YYYY'...
Do we need it in ISO format YYYY-MM-DD format?
Do you have any idea on this?

Thanks.......
Back to top
View user's profile Send private message
kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Wed Aug 31, 2005 7:27 pm    Post subject:
Reply with quote

Quote:
Do we need it in DB2 format YYYY-MM-DD format?

Yes
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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 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
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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