469,954 Members | 1,755 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

DB2 COBOL problem

Can anyone help me with a problem coding SQL in a COBOL program to handle nulls? I have coded SELECT COALESCE(MGRNO,'NONE ') [INTO WS_MGRNO] FROM DEPT This works in SPUFI but gives a -206 SQLCODE in the bind when embedded in a COBOL program. I cannot see what is wrong! The INTO is only coded in the program not in SPUFI - Thanks
Nov 24 '06 #1
1 2230
How have you defined your INTO varable?

it might be easier to create a varable for the null indicator...

in your fetch....

then if WS-MGRNO-NULL is less than zero you know its null....
Nov 24 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Batista, Facundo | last post: by
242 posts views Thread by James Cameron | last post: by
30 posts views Thread by Stuart Turner | last post: by
4 posts views Thread by Kalpesh Parikh | last post: by
5 posts views Thread by hpy_awad | last post: by
7 posts views Thread by Mythran | last post: by
15 posts views Thread by dm1608 | last post: by
reply views Thread by pompeyoc | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.