How to define the data items to receive the fetch items for
the SQL?

Answers were Sorted based on User's Feedback



How to define the data items to receive the fetch items for the SQL?..

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

How to define the data items to receive the fetch items for the SQL?..

Answer / sadiq afroze

Using the DSECT, followed by lines of - 'data items DS
datatype'.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More DB2 Interview Questions

What is the STOSPACE Utility used for?

1 Answers  


if one db2 pgm calls another db2 pgm. how many plans do we need. what r the steps involved..

4 Answers   IBM,


How will you delete duplicate records from a table?

7 Answers   Google,


1. what if null values retrived from database and no null indicator mentioned in query. What is sql code.

1 Answers   Cap Gemini,


Can you use max on a char column?

0 Answers  






In SPUFI suppose you want to select maximum of 1000 rows, but the select returns only 200 rows. What are the 2 SQLCODEs that are returned?

1 Answers  


What is a view? Why use it?

2 Answers  


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

0 Answers  


What is REORG? When is it used?

4 Answers  


Write a query to extract first 5 characters of a name in the column Stud_Name?

1 Answers   RBS,


What is the reason behind not using select * in embedded sql programs?

0 Answers  


What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

4 Answers  


Categories