View previous topic :: View next topic |
Author |
Message |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Mon Nov 10, 2008 9:15 am Post subject: checking literal in sql |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Nov 10, 2008 9:29 am Post subject: |
|
|
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 |
|
 |
|
|