MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

checking literal in sql

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Mon Nov 10, 2008 9:15 am    Post subject: checking literal in sql Reply with quote

Hi,

I wil get total number of days from file. I need to compare this with number of days caliculated by days function in sql. I declared working storage variable and moved the value to it. and used that in sql to compare. But its not working. please help me out.


eg. delete from table where field > :ws-field. where i will move value to ws-field. since its not hostvariable pgm is abending

Thanks in advance
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Nov 10, 2008 9:29 am    Post subject: Reply with quote

what datatype is returned by DB2 for the DAYS Function?
Is your host variable of compatible datatype?

What is telling you that your pgm is abending?

a non zero sql code is not an abend.

what is your sql?,
what is pic clause of host variable containing the total number of days from file?
what is pic clause of field in file containing total number of days?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group