MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Its very vast and interesting topic , can't be summarized in a note there will be lots of documents in GOOGLE OR DB2 MATERIAL IN OUR IBMMAINFRAMEGURU SITE you can go thru those for more detailed understanding.
Find below some info @ high level to just give the basic understanding.....
what basis DB2 decides which lock to use?
BASED ON THE ISOLATION LEVEL PROVIDED IN COMPILATION ROCESS.
ISOLATION LEVEL IS ONE OF THE PARAMETER WE PROVIDE DURING THE
Locking mechanism in DB2 is enforced thru ISOLATION LEVELS.
There are 4 isolation levels, based on each level DB2 performs
V.I.M.P NOTE : Isolation Levels act differently for read-only and updatable cursors.
below info just gives generic understanding ....you can refer other manuals
or doc for complete understanding.
If we use CS the row currently under fetch will be locked , particular
row that is current cursor position.When the next row is selected from
the result set the lock on the previous row will be released.
During the duration of the lock held by the CS,no other applications
can do any DB operations apart from JUST SELECT.
The lock is held until changes are DB COMMITTED if any.
This isolation level locks only those rows which satisfies the
QUERY under execution.
We can assume on set of rows which qualifies the query condition ,
i.e. the entire result set.
Accordingly no DB operations are possible apart from read...
But under few scenarios some DB operations are possible
if the LOCKS are shared ...not if its EXCLUSIVE...
Here no rows are locked , its just a read ..DB operations
are possible by other Applications/pgms.
IF some updates are done by other pgms then the UR read rows also
reflects that even before the DB is COMMITTED.
We can assume this Isolation level to be LOCK @ TABLE'S accessed in QUERY.
if we execute the same QUERY N times during the lock we will get the same
results for each execution.
Similarly at this Isolation level no DB operations except for read are possible
by other Application /pgms.
Unlike UR level in RR level uncommitted data will not be fetch.
Better way to study is to look into comparison aspects of each level
and prepare a MATRIX with diff attributes , this info can be found in
any doc in various sites .
I understand the locking mechanism with isolation levels. I know there are various other ways of achieving locks through Tablespace or through overrides (LOCK statement) but what is not clear to me is among these locking mechanisms (isolation level, tablespace, override,...) which one takes precedence?
Also you mentioned Cursor Stability as default but I thought Repeatable Read was default. Which one is correct??
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum