Please send that collection to iq@GlobalGuideline.Com along with the category and sub category information
1 :: what are the bind parameters IBM DB2?
Bind parameters are:MEMBER - In bind package,
LIRARY - DBRM library name ,
ACTION(add/replace)- package or plan can be add or replace.
ISOLATION - Determines the duration of the page lock.
AQUIRE - Lock a tableon use
RELEASE - releases when the plan terminates
VALIDATE - It will be check about authorization.
EXPLAIN - loads the access path selected by the optimizer
in table
2 :: Is it Possible to declare or create a cursor for UPDATE of
table? If yes tell me how? If no Tell me why?
Updating a column: You can update columns in the rows that you retrieve. Updating a row after you use a cursor to
retrieve it is called a positioned update. If you intend to
perform any positioned updates on the identified table,
include the FOR UPDATE clause. The FOR UPDATE clause has
two forms:
• The first form is FOR UPDATE OF column-list. Use
this form when you know in advance which columns you need
to update.
• The second form is FOR UPDATE, with no column list.
Use this form when you might use the cursor to update any
of the columns of the table.
For example, you can use this cursor to update only the
SALARY column of the employee table:
EXEC SQL
DECLARE C1 CURSOR FOR
SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, SALARY
FROM DSN8810.EMP X
WHERE EXISTS
(SELECT *
FROM DSN8810.PROJ Y
WHERE X.EMPNO=Y.RESPEMP
AND Y.PROJNO=:GOODPROJ)
FOR UPDATE OF SALARY;
If you might use the cursor to update any column of the
employee table, define the cursor like this:
EXEC SQL
DECLARE C1 CURSOR FOR
SELECT EMPNO, FIRSTNME, MIDINIT, LASTNAME, SALARY
FROM DSN8810.EMP X
WHERE EXISTS
(SELECT *
FROM DSN8810.PROJ Y
WHERE X.EMPNO=Y.RESPEMP
AND Y.PROJNO=:GOODPROJ)
FOR UPDATE;
DB2 must do more processing when you use the FOR UPDATE
clause without a column list than when you use the FOR
UPDATE clause with a column list.
3 :: Cursors can be declared in both working-storage & procedure
division, Agreed.
But is there any difference? If could you please suggest
what is the difference.
TIA
There is no difference. But it is always better to declare Cursor in Working-Storage Section because you will not code
Open Cursor before Declare Cursor by mistake. It is just a
standard to declare Cursor in WSS. As best practice to
avoid oversight.
4 :: If I have 5 Queries in a DB2 Cobol program , while
precompiling how many DBRMs will get created and How many
Plans and Packages will get created while Bind Process?
when u bind , 5 queries has 5 sql statements in 1 DBRM, its regroup into 1 package, 1 plan...Plan is a collection of
packages..
correct me if i'm wrong..
5 :: could you give me an example how, where i code CHECKPOINT
and restart. I need and example
You should pass CHECKpoint frequency value from JCL to cobol program.Intern cobol program will have the table of
retart logic.
Table contents(coloumns)be: 1.No of records ,2.No of
records + 1, 3.no of records processed etc.
Once the updattion or insertion got stucked while
processing ,All the relative data will be stored the above
mentioned table.
So check the record from table .Fix the abend and restart
your job for the failed step.
This is mainly production support work .manually u have to
check the record .and get the records info from the table
and restart the job from the failed step




Webmaster Said:
Thank you.