Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Question in Null Indicator/Rowid/VSAM In DB2/Buffer Pools

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Tue Mar 11, 2008 5:17 pm    Post subject: Question in Null Indicator/Rowid/VSAM In DB2/Buffer Pools
Reply with quote

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
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 11, 2008 5:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 11, 2008 6:01 pm    Post subject: Reply to: Doubt in Null Indicator/Rowid/VSAM In DB2/Buffer P
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 11, 2008 6:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 11, 2008 6:09 pm    Post subject:
Reply with quote

2)Do we have anything like Rowid concept in DB2 which is in oracle??

Yes, it is if I understand your question correctly.

Please visit this link for more information.
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.sqlref/xf7c63.htm
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Tue Mar 11, 2008 6:24 pm    Post subject:
Reply with quote

4)How many buffer pools are available in db2? Size? And usage of buffer pools?

I got these info from IBM library.

Buffer pools are areas of virtual storage that temporarily store pages of table spaces or indexes. When an application program accesses a row of a table, DB2 places the page that contains that row in a buffer.

Depends on how many Buffer pools you would like to define to the system. DB2 allows you to use up to 50 buffer pools that contain 4-KB buffers and up to 10 buffer pools each for 8-KB, 16-KB, and 32-KB buffers.

The minimum buffer pool storage that DB2 allocates
4KB 2000 pages
8KB 1000 pages
16KB 500 pages
32KB 250 pages

Types :

At any moment, a database buffer pool can have in-use, updated, and available pages.

Please visit these links for clear information.
http://www.ibm.com/developerworks/db2/library/techarticle/0212wieser/0212wieser.html
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.perf/db2z_tunedbbufferpools.htm
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.perf/db2z_bufferpoolpagetypes.htm
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Wed Mar 12, 2008 11:06 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Wed Mar 12, 2008 12:13 pm    Post subject: Reply to: Question in Null Indicator/Rowid/VSAM In DB2/Buffe
Reply with quote

if I remember correctly the BSDS is a vsam/ksds
but that info can be checked by running an idcams listcat
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Wed Mar 12, 2008 2:47 pm    Post subject:
Reply with quote

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. icon_biggrin.gif
The bootstrap data set (BSDS) is a VSAM key-sequenced data set (KSDS) that contains information critical to DB2.
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Thu Mar 13, 2008 11:52 am    Post subject:
Reply with quote

Thanks Guys....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us