IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Incremet Date


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top