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
 
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 Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
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

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