How to handle null values in db2

Answers were Sorted based on User's Feedback



How to handle null values in db2..

Answer / lu

you need to declare binary indicator variable....
10 Ind-variable pic s(904) comp.

Is This Answer Correct ?    10 Yes 3 No

How to handle null values in db2..

Answer / biswamoy majumder

To insert a NULL, move -1 to the null indicator, To insert
a valid value, move 0 to the null indicator.
declare separately Null indictor variable in Working-
Storage section.
10 variable-NI pic s9(04) Usage comp.

Is This Answer Correct ?    5 Yes 0 No

How to handle null values in db2..

Answer / yuvaevergreen

IN DCLGEN,
>>"INDICATOR VARS .. ===> NO" indicates the presence of
null variables for the fields in the tables.
>>indicator variable should be declared of type s9(4) comp.
77 DAY-IND PIC S9(4) BINARY.
Move -1 to the indicator variable and use in sql.
exec sql
insert into employee(name)
values(:ws-name:ws-name-ind)
end-exec;
ws-name-ind is the indicator variable which inserts null in
the field ws-name.

Is This Answer Correct ?    3 Yes 0 No

How to handle null values in db2..

Answer / ankitha

you can use value function or null indicators if you want to
handle nulls in program.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More DB2 Interview Questions

What is reorg in DB2

3 Answers   Virtusa,


What does CURRENTDATA option in bind indicate

1 Answers   IBM,


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

0 Answers  


Parm value passed is PARM=(10,20). how do code linkage section and how would you add these two passes values and show result in cobol program.

3 Answers   IBM,


How many databases can be created inside an instance in db2 ?

0 Answers   MCN Solutions,






Give a brief description of db2 isolation levels?

0 Answers  


What can the SET option of the Repair Utility accomplish?

1 Answers  


How does DB2 determine what lock-size to use?

2 Answers  


What is the syntax required for the creation of a cursor?

1 Answers  


What is runstats utility in db2?

0 Answers  


what is the process of precompiler?

2 Answers  


What do you mean by between and in? Is between inclusive of specified range values?

0 Answers  


Categories