Suppose the outcome of executing a query results in a row
having null. Based on the answer how you use it? Its
declaration and inclusion?
Answers were Sorted based on User's Feedback
Answer / mani
While declaring the cursor include the null indicator for
the variables which you are retrieiving from the table.
Example.
Select empno,deptname from emp into
:ws-empno:ws-empno-ind,:ws-deptname:ws-deptname-ind
where empname='....'
Based on the values in ws-empno-ind,ws-deptname-ind we can
know whether the vaules being retrived are null are not.
If null indicator variable has a value -1 then the retrieved
value is null.
If you do no specify null indicator variable and the value
retreived is null then you would get -305 as the sqlcode.
The null indicator is declared as
05 ws-empno-ind s9(4) comp
Is This Answer Correct ? | 22 Yes | 0 No |
How can you find out which query is taking lot of time to execute in cobol-db2 program ?
Outputs of explain are with matchcols = 0. What does this signify?
What does a deadlock mean in DB2?
What is db2 isolation?
How does cobol compile db2 program?
What are the uses of db2 optimizer?
is it possible to get -811 error when you use cursors. why?
select distinct(empid),distinct(dept),name from EMP will the above query work?
On which levels locks can be applied?
How do you do the EXPLAIN of a dynamic SQL statement?
Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?
What is table space in db2?