How to define the data items to receive the fetch items for
the SQL?
Answers were Sorted based on User's Feedback
Answer / mehdee
Example:
EXEC SQL
FETCH AA_CURS
INTO :Host-name1, Host-name2, ...
EXEC-END
Note: Host-names listed are one to one related to the
Columns at DECLARE AA_CURS, and are INCLUDEed from it's
DB2 DECLGEN name in the program.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sadiq afroze
Using the DSECT, followed by lines of - 'data items DS
datatype'.
| Is This Answer Correct ? | 0 Yes | 2 No |
What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?
How can you classify the locks in db2?
1) I have 3 programs : PGMA, PGMB, PGMC. PGMA calls PGMB and PGMB calls PGMC. I have to do inserts, updates in all the 3 pgms. 2) Say PGMC has done its work successfully and returned to PGMB 3) PGMB had an SQL error while doing some update 4) PGMA has already done some updates before calling PGMB all are running under the same CICS region. What will happen if I issue SYNCPOINT ROLLBACK in PGMB when it abends ? Does all the changes in PGMA,B,C rollback ? (because all the pgms belong to same task).
What is reorg?
Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.
What is rebind in db2?
What is query_cache_limit?
How to select the duplicate rows from a table?
Under what circumstances will DB2 allow an SQL statement to update more than one primary key value at a time?
What are some characteristics of columns that benefit from indexes?
What is a recovery log?
Can i insert bulk records into a db2 table using qmf of spufi only............!!!