how can u retrieve the data from null values using
applicaion program.

Answers were Sorted based on User's Feedback



how can u retrieve the data from null values using applicaion program...

Answer / avinash

The null indicator would be assigned a value of -1 if the
fetched column has a null value.

Is This Answer Correct ?    15 Yes 0 No

how can u retrieve the data from null values using applicaion program...

Answer / prachi

whenever you are retreving the data from null coloumn,
first you need to declare the null indicator in the working
storage section. and use this variable when you are
fecthing the data from null coloumn.

Is This Answer Correct ?    9 Yes 0 No

how can u retrieve the data from null values using applicaion program...

Answer / bhavani

When we retrieve data from a nullable field, we need to
have a null indicator declared in the working storage.

WS-NULL-INDICATOR s9(04) comp

And after you have fetched the value for that column,

we need to check the value of the null indicator.

It can have the following values

-2 - Exceptional condition
-1 - Null Value is present in that field
0 - Not null

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More DB2 Interview Questions

If a table has a column "dept" (declared to have nulls) and there are 10 rows in the table of which 3 have a null value in the dept column, what will select count(*) and select count(distinct dept) return?

6 Answers  


What's the difference between DB2 active log and archive log? Thanks a lot...

2 Answers   IBM,


How will fetch last 5 rows from table in db2

6 Answers  


How do we specify index to include or not during bind process.

0 Answers   Satyam,


when we are tying to update a table having 100 rows. if the program abends when updating 51 row . how to start updating again from the 51 row .what was the logic

2 Answers   TCS,






How to find the maximum value in a column in the db2 database?

0 Answers  


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

0 Answers   IBM,


Mention data types used in db2 ?

0 Answers  


In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

0 Answers  


What will the FREE command do to a plan?

2 Answers  


how to resolve -811 sqlcode .give clear explaination

3 Answers   IBM,


how to check the table is empty or not?

3 Answers   IBM,


Categories