azharuddin syed


{ City } bangalore
< Country > india
* Profession *
User No # 120228
Total Questions Posted # 1
Total Answers Posted # 16

Total Answers Posted for My Questions # 1
Total Views for My Questions # 3114

Users Marked my Answers as Correct # 6
Users Marked my Answers as Wrong # 0
Questions / { azharuddin syed }
Questions Answers Category Views Company eMail

How can you find out which query is taking lot of time to execute in cobol-db2 program ?

Danske,

1 DB2 3114




Answers / { azharuddin syed }

Question { 17365 }

What is SET TO TRUE all about, anyway?


Answer

'SET TO TRUE' is used to set the value of 88 level data items.

Example
-----------
05 ws-paper pic x(1).
88 ws-hindu value 'y'.
88 ws-toi value 'n'.

if set ws-hindu to true, then ws-paper contains value 'y'
This is same as move 'y' to ws-paper
if set ws-toi to true, then ws-paper contains value 'n'
This is same as move 'n' to ws-paper

Please correct me if i am wrong.

Is This Answer Correct ?    3 Yes 0 No

Question { 5909 }

What is a host variable?


Answer

Host variable is a cobol equivalent variable for a table column.

Is This Answer Correct ?    0 Yes 0 No


Question { TCS, 6405 }

i have variable record in the 5th, i want to sort from 5th filed ? how ?


Answer

The question is not clear.

What is the column# of the fifth field in the 5th variable record ?

Is This Answer Correct ?    0 Yes 0 No

Question { L&T, 3708 }

Can you use a select query in a loop to fetch multiple rows?
If so what is the advantage of using a cursor?


Answer

No. In cobol-db2 program, the result of single select should be only one row.
For multi row fetch we must use cursor, else program will abend with -811 sql code.

Is This Answer Correct ?    1 Yes 0 No

Question { IBM, 6705 }

can you use symbolic parameters in JOB?


Answer

Yes.

Never used them directly in job, but i have overridden symbolic parameters present in proc through Job and it worked well.

Is This Answer Correct ?    0 Yes 0 No

Question { 7427 }

Can a Db2 table data be retrived through JCL?


Answer

Yes,

That is how we are unloading data from table to dataset.

Is This Answer Correct ?    0 Yes 0 No

Question { 8085 }

Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?


Answer

SELECT FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(COLUMN_1) > 1

OR

SELECT FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 0 No

Question { HCL, 6555 }

what is record label is empty or standard in file description
of data division?


Answer

Label records are standard -> will be coded for disk/tape files
Label records are omitted -> will be coded for printer files.

Is This Answer Correct ?    1 Yes 0 No

Question { iGate, 7469 }

For update of a row in cursors, when do we move value into
host variable in cobol progrm? is it before open or before
fetch ?


Answer

in Open, the sql query you have coded in declare cursor will be executed.
in Fetch, the table column values will be moved to corresponding host variables.

Is This Answer Correct ?    0 Yes 0 No

Question { 8739 }

What happens to a cursor after a commit?


Answer

If the cursor is defined with "WITH HOLD" option, it will NOT closed even after the commit operation, else cursor will be closed.

Is This Answer Correct ?    0 Yes 0 No

Question { L&T, 4494 }

How can you add a particular field in copybook?


Answer

First, identify the programs using this copybook.

Second, open the copybook in edit mode and add the required field wherever necessary. Adjust filler values if necessary.

Third, recompile the programs identified at step1 and ensure there are no errors.

Is This Answer Correct ?    0 Yes 0 No

Question { 3230 }

Why we should use cursor ?


Answer

Cursor is used to fetch more than one row at a time from db2 table.

Is This Answer Correct ?    0 Yes 0 No

Question { 2236 }

How can you get the number of rows impacted by the last executed query?


Answer

from SQLERRD(3)

Is This Answer Correct ?    0 Yes 0 No

Question { TCS, 2645 }

in db2, already 10 columns arie der, and i want to insert 11th column. what parameters u wil consider for insertion and how will u insert


Answer

ALTER TABLENAME
ADD COLUMN ()

Is This Answer Correct ?    1 Yes 0 No

Question { 2531 }

Difference between file status codes 02 and 22.... since both are for duplicate key detection.


Answer

Yes, both are "DUPLICATE KEY" condition. But, the differences are

02 is Duplicate key condition during read/write/rewrite of indexed files only
where as
22 is duplicate key condition during write/rewrite of indexed files(KSDS) or relative files(RRDS)

Is This Answer Correct ?    0 Yes 0 No

 [1]   2    Next