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
 
CURRENT DATE functionality dynamically(CURRENT DATE - : var)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Bijeshch

New User


Joined: 23 Apr 2010
Posts: 3
Location: USA

PostPosted: Wed Apr 11, 2012 5:24 am    Post subject: CURRENT DATE functionality dynamically(CURRENT DATE - : var)
Reply with quote

Hi,

I am trying to use the CURRENT DATE functionality dynamically as,

"CURRENT DATE - : variable DAYS " in my query. I am getting compatibility issues.

I tried by giving
a) variable declaration as 9 (03) comp-3 but is getting compilation error.
b) variable declaration as X (10) since current date is returning a 8 byte field but is getting bind error.

Again I tried the query as "CURRENT DATE - DAYS (:variable) " as argument to the scalar function, but was not able to get through the bind errors.

The query works when "CURRENT DATE - 99 DAYS " is given. So I think its an issue with the host variable.

The SQl return code is -171 THE DATA TYPE, LENGTH, OR VALUE OF ARGUMENT nn OF function-name IS INVALID.

Please help me with this.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Apr 11, 2012 6:38 am    Post subject:
Reply with quote

you are invited to see for yourself,
what kind of host variables are used in
Datetime arithmetic
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 -> DB2 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 8 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 5 Fri Sep 22, 2017 6:00 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 Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

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