View previous topic :: View next topic
|
Author |
Message |
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi Friends,
I got following question while brushing up my DB2 knowledge
1)Null Indicator
0 – for successful execution
-1 – Null deducted
what is -2 means??
2)Do we have anything like Rowid concept in DB2 which is in oracle??
3)The only place of VSAM KSDS used in DB2?
4)How many buffer pools are available in db2? Size? And usage of buffer pools?
5)Move -1 to IND-HIREDATE
EXEC SQL UPDATE EMPLOYEE SET HIREDATE=:HV-HIREDATE:IND-HIREDATE
WHERE EMPNO=:HV-EMPNO
END-EXEC.
Will indicator variable assign null value to the table even if Host Varible got some value? |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
1. Null Indicator
If the null indicator value is negative, the fetched value is null and the host variable should not be used.
By the way, if it is -2
If the database configuration parameter dft_sqlmathwarn is set to 'YES', the null-indicator variable value may be -2. This value indicates a null that was either caused by evaluating an expression with an arithmetic error, or by an overflow while attempting to convert the numeric result value to the host variable. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
5. Question
When processing INSERT or UPDATE statements, the database manager checks the null-indicator variable, if one exists. If the indicator variable is negative, the database manager sets the target column value to null, if nulls are allowed.
If the null-indicator variable is zero or positive, the database manager uses the value of the associated host variable |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
3)The only place of VSAM KSDS used in DB2?
This may be one reason. But What about the great functionalities of RDBMS and its advantages(includes XML support, Unicode, multi-platform support & programmimg lanuages, etc)? |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi Gnanas,
Good Day.
Thank you for your reply.
But am still not clear in 3rd answer.
Usually DB2 tables are stored as LDS(VSAM).
Can you tell me in which place of DB2 uses KSDS(VSAM)?? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if I remember correctly the BSDS is a vsam/ksds
but that info can be checked by running an idcams listcat |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
In DB2, a table space can consist of a number of VSAM data sets. Data sets are VSAM linear data sets (LDSs).
DB2 writes each log record to a disk data set called the active log. Each active log data set is a VSAM LDS. Also, DB2 supports striped active log data sets.
Yes, Enrico, you are correct.
The bootstrap data set (BSDS) is a VSAM key-sequenced data set (KSDS) that contains information critical to DB2. |
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Thanks Guys.... |
|
Back to top |
|
|
|