Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


DB2 Questions - answers required.

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DB2 SQL - DB2 PROGRAMMING
  View previous topic :: View next topic  
Author Message
manas_ks2003
Member


Joined: 23 Aug 2006
Posts: 3
Location: NJ

PostPosted: Tue Sep 05, 2006 9:20 am    Post subject: DB2 Questions - answers required. Reply with quote

I have a few questions for which I am looking for the correct answer.

1) Which one best describes why cursor is used?
a. Cursors are used to access set-level data one row at a time.
b. Scroll and update are done together.
c. Multiple rows are updated at one time.

2) Which one is true for COMMIT?
a. COMMIT always closes cursor.
b. Close cursor does an implicit COMMIT.
c. COMMIT Doesn?t close the cursor defined as WITH HOLD.
d. Both B and C are correct.

3) What must be used to retrieve parts of the rows of a table?
a. Column
b. View
c. Cursor
d. *

4) Which is the most efficient way for specifying the table?s owner name in a cobol program?
a. Use a variable to store the owner name and use it in the SQL
b. Define it in the Plan and not in the program.
c. Hardcode the name in the SQL.

5) Which is the most efficient way to handle large no. of rows in CICS through cursor?
a. Use the cursor and store in indexed seq. file
b. Use TSQ.
c. Make query once and use the result in conversational program.
d. Use the array inside the program.

6) Which term is used to mean hardcoding of SQL in Cobol?
a. Dynamic SQL
b. Embedded SQL
c. Structured Programming.
d. None of the above.

7) Which is the correct SQL?
a. Select Sales-id, salary+commission as ?Compensation?order by Compensation
b. Select Sales-id, salary+commission as Compensation order by Compensation
c. Select Sales-id, salary+commission as ?Compensation?order by 2
d. Select Sales-id, salary+commission as Compensation order by 2
e. All of the above.

Cool What does the DB2 precompiler do?
a. Accesses the DB2.
b. Invoked through DB2I.
c. Expands the SQL.
d. Creates load modules.
9) Home phone is a varchar and contains Null. What will happen when home phone is selected?
a. Home-phone contains zeros and null-ind <0
b. Home phone contains garbage and null-ind <0.
c. Home-phone value is unchanged and null-ind <0.
d. None of the above.

10) Home phone is a varchar and contains Null. What will happen when home phone is selected?
a. Home-phone contains zeros and null-ind <0
b. Home phone contains garbage and null-ind <0.
c. Home-phone value is unchanged and null-ind <0.
d. None of the above.

11) What is true for group by,order by clause?
a. Selected columns must be in the group by.
b. Columns in group by must be selected.
c. Selected columns must be column functions.
d. Selected columns must be column functions or in the group by clause.
12) What is the way of using a Variable table name in the program?
a. Use dynamic SQL.
b. Put the variable name in EXEC SQL include statement.
c. Define the variable as a host variable as type varchar.
d. Replace the table name with ???
e. Use SPUFI
13) Best way to enforce referential integrity?
a. Programmatically.
b. Referential constraints on the create table declaration.
c. No null clauses on the insert or update.
d. Views in stead of the table.
e. Using the distinct clause on all the select statements.
14)
_________________
Knowledge is power.
Back to top
View user's profile Send private message Yahoo Messenger

Kalicharan
Moderator


Joined: 08 Feb 2006
Posts: 31

PostPosted: Tue Sep 05, 2006 8:22 pm    Post subject: Reply with quote

1) Which one best describes why cursor is used?
a. Cursors are used to access set-level data one row at a time.
b. Scroll and update are done together.
c. Multiple rows are updated at one time.

Quote:
Ans:a



2) Which one is true for COMMIT?
a. COMMIT always closes cursor.
b. Close cursor does an implicit COMMIT.
c. COMMIT Doesn?t close the cursor defined as WITH HOLD.
d. Both B and C are correct.

Quote:
Ans:d



3) What must be used to retrieve parts of the rows of a table?
a. Column
b. View
c. Cursor
d. *

Quote:
Ans: (a - columns), we can achieve thru views also



4) Which is the most efficient way for specifying the table?s owner name in a cobol program?
a. Use a variable to store the owner name and use it in the SQL
b. Define it in the Plan and not in the program.
c. Hardcode the name in the SQL.

Quote:
Ans : b



5) Which is the most efficient way to handle large no. of rows in CICS through cursor?
a. Use the cursor and store in indexed seq. file
b. Use TSQ.
c. Make query once and use the result in conversational program.
d. Use the array inside the program.

Quote:
Ans: If number of rows are too large, b and c may not be the right option.



6) Which term is used to mean hardcoding of SQL in Cobol?
a. Dynamic SQL
b. Embedded SQL
c. Structured Programming.
d. None of the above.

Quote:
Ans:b


7) Which is the correct SQL?
a. Select Sales-id, salary+commission as ?Compensation?order by Compensation
b. Select Sales-id, salary+commission as Compensation order by Compensation
c. Select Sales-id, salary+commission as ?Compensation?order by 2
d. Select Sales-id, salary+commission as Compensation order by 2
e. All of the above.

Quote:
Ans: d


What does the DB2 precompiler do?
a. Accesses the DB2.
b. Invoked through DB2I.
c. Expands the SQL.
d. Creates load modules.

Quote:
Ans:c


9) Home phone is a varchar and contains Null. What will happen when home phone is selected?
a. Home-phone contains zeros and null-ind <0
b. Home phone contains garbage and null-ind <0.
c. Home-phone value is unchanged and null-ind <0.
d. None of the above.

Quote:
Ans: b


11) What is true for group by,order by clause?
a. Selected columns must be in the group by.
b. Columns in group by must be selected.
c. Selected columns must be column functions.
d. Selected columns must be column functions or in the group by clause.

Quote:
Ans:d


12) What is the way of using a Variable table name in the program?
a. Use dynamic SQL.
b. Put the variable name in EXEC SQL include statement.
c. Define the variable as a host variable as type varchar.
d. Replace the table name with ???
e. Use SPUFI

Quote:
Ans: a



13) Best way to enforce referential integrity?
a. Programmatically.
b. Referential constraints on the create table declaration.
c. No null clauses on the insert or update.
d. Views in stead of the table.
e. Using the distinct clause on all the select statements.

Quote:
Ans: b
Back to top
View user's profile Send private message Send e-mail
Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 929

PostPosted: Wed May 27, 2009 2:31 pm    Post subject: Reply with quote

For more interview questions and answers visit.

http://www.mainframegurukul.com/interview-questions/DB2
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 406

PostPosted: Thu May 28, 2009 3:20 pm    Post subject: Reply with quote

i did not bother to go thru all of them, I stopped at the second because this:
Quote:
2) Which one is true for COMMIT?
a. COMMIT always closes cursor.
b. Close cursor does an implicit COMMIT.
c. COMMIT Doesn?t close the cursor defined as WITH HOLD.
d. Both B and C are correct.

Quote:

Ans:d
is not true
C is the answer.
as far as I know, the only IMPLICIT COMMIT is issued by the OP-SYS at task termination.
_________________
Dick Brenholtz
American in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DB2 SQL - DB2 PROGRAMMING All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts two reports to compare , both different format - URGENT 1 ar3 1493 Wed Jul 15, 2009 7:57 pm
Frank Yaeger View latest post
No new posts If both the JOBCAT & STEPCAT statements are coded in a s 1 Krishna 2095 Tue May 12, 2009 6:43 pm
Krishna View latest post
No new posts Commit both in DB2 and MQ 3 jackie 2824 Fri Jul 27, 2007 3:52 pm
dbzTHEdinosauer View latest post
No new posts How to use both lower and upper case letters in cobol? 1 Divya 4885 Fri Mar 09, 2007 10:27 pm
Veera View latest post
No new posts Stop Run in both called and calling programs !!! 2 arrbee 4480 Fri Mar 10, 2006 12:13 pm
jaydeeppal View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB