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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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