Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Db2 Questions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Fri Jun 10, 2005 11:22 pm    Post subject: Db2 Questions
Reply with quote

1) What is the use of PACKAGE
2) How Deadlock can happen in realtime
3) Justify why you need a ROLLBACK
4) When you need a Dynamic SQL
5) Realtime application of Coloumn level lock
6) which system table holds plan information
7) What is an timestamp error and what is the sqlcode
8) What is corelated sub query explain with example
9) union and union all difference
10) what is the user of SYSIBM.SYSPACKAGES table
11) GRANT falls under which category DATA MANIPULATION/DATA CONTROL or .....
12) What is the PLAN Authority error and its SQLCODE
13) what is the use of CASCADE ?.
14) RCT entry in CICS what is the use of it
Back to top
View user's profile Send private message

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 2:02 pm    Post subject:
Reply with quote

I hope in these answers:

1) What is the use of PACKAGE
It's an object that containing a set of SQL statements that
have been bound statically and that are available for processing.
It is used to optimize access path to the data.

2) How Deadlock can happen in realtime
When you have more than one task that are updating the same table.
Usually is a problem of commit in sql statement.

3) Justify why you need a ROLLBACK
when an application failed in a part of its process and
integrity of data could be corrupted so I can recover it.

4) When you need a Dynamic SQL
when I need to create a select with variable and submit it in real time in a program.

5) Realtime application of Coloumn level lock
I don't know what do you means with "Column level lock".

6) which system table holds plan information
SYSIBM.SYSPLAN

7) What is an timestamp error and what is the sqlcode
-180 THE DATE, TIME, OR TIMESTAMP VALUE value IS INVALID
Explanation: The length or string representation of a DATE, TIME, or
TIMESTAMP value does not conform to any valid format.

8) What is corelated sub query explain with example
A subquery or subselect is a predicate and it's a component of the fullselect.
A subselect specifies a result table derived from the result of its first FROM clause
and remaind it to the previous predicate of the fullselect.
This is a sample:
Select Id,First_Name,Last_Name
from Tab.Employed
Where Id in(Select distinct(Id)
From Tab.Absence
Where DateAb = Current_Date)

9) union and union all difference
Derives a result table by combining two other result tables, R1 and R2.
If UNION ALL is specified, the result consists of all rows in R1 and R2.
If UNION is specified without the ALL option, the result is the set of all rows in
either R1 or R2, with duplicate rows eliminated.


10) what is the user of SYSIBM.SYSPACKAGES table
SYSIBM.SYSPACKAGES does not exist.. do you mean SYSIBM.SYSPACKAGE?
What do you mean with User? The creator(Creator) ? from who is created(CreatedBy)?
The TBCREATOR? For the first and second asked question is SYSIBM and the third usually is blank
but I assume that is SYSIBM.

11) GRANT falls under which category DATA MANIPULATION/DATA CONTROL or .....
Data Definition Language(DDL)

12) What is the PLAN Authority error and its SQLCODE
Its SQLCODE is -922
But there are several reason and error that you can receive.
In which kind of operation?

13) what is the use of CASCADE ?.
Is a definition in DDL that allow you to delete a row defined as key and its reletionship
in other table with a "on Cascade" concept that is top-down.

14) RCT entry in CICS what is the use of it
RCT: Resource Control Table
It contains Transaction Identifier and DB2 plan name. This table is used only when SQL
statements are there in your transaction
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 2:52 pm    Post subject: Re: Db2 Questions
Reply with quote

MGIndaco....Grant Command fall under DCL and this command is used to issue certain specific privileges to the user.

MGIndaco .....Time Stamp Error is SQL Code is 818.i think it is type mistake.You get this error when the Timestamp is mismatching in the Loadlib and Plan.

Corrections are welcome
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 2:56 pm    Post subject: Re: Db2 Questions
Reply with quote

MGIndaco....Grant Command fall under DCL and this command is used to issue certain specific privileges to the user.

MGIndaco .....Time Stamp Error is SQL Code is 818.i think it is type mistake.You get this error when the Timestamp is mismatching in the Loadlib and Plan.

Corrections are welcome
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 2:56 pm    Post subject:
Reply with quote

For the Grant you are correct and apologize me.
But for the TimeStamp error, it is not specify what kind of error has happened. That is one... but there are other kind of error for the same concept.
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 2:59 pm    Post subject: Re: Db2 Questions
Reply with quote

Hi MGIndaco,

I am curious to know the other reasons for the Time Stamp Error.

Could you List out them.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jun 16, 2005 3:45 pm    Post subject:
Reply with quote

These are some sample of error of TimeStamp from messages and codes
and if you don't specify in which kind of operation your error is done I assume that there are several reasons(From precompiler, in Arithmetic operation, as a bad definition of data...and other):

Quote:
-818 THE PRECOMPILER-GENERATED TIMESTAMP x IN THE LOAD
MODULE IS DIFFERENT FROM THE BIND TIMESTAMP y BUILT FROM
THE DBRM z

The SQL precompiler places timestamp 'y' in the DBRM, and time stamp 'x' in the parameter list in the application program for each SQL statement. At BIND time, DB2 stores the DBRM timestamp for run-time use. At run-time, timestamp 'x', for the SQL statement being processed, is compared with timestamp 'y' derived from the DBRM 'z' at BIND time.
If the two timestamps do not match, the DBRM and the application program were not the result of the same precompile.

Quote:
-183 AN ARITHMETIC OPERATION ON A DATE OR TIMESTAMP HAS A
RESULT THAT IS NOT WITHIN THE VALID RANGE OF DATES

The result of an arithmetic operation is a date or timestamp that is not within the valid range of dates which are between 0001-01-01 and 9999-12-31

Quote:
-187 A REFERENCE TO A CURRENT DATE/TIME SPECIAL REGISTER IS
INVALID BECAUSE THE MVS TOD CLOCK IS BAD OR THE MVS
PARMTZ IS OUT OF RANGE


DB2 has encountered an invalid time-of-day (TOD) clock. The user referenced one of the special registers: CURRENT DATE, CURRENT TIME, CURRENT TIMESTAMP, or CURRENT TIMEZONE. If the user referenced CURRENT TIMEZONE, the MVS parameter PARMTZ was out of range.

Quote:
-303 A VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE
NUMBER position-number BECAUSE THE DATA TYPES ARE NOT
COMPARABLE

...
In addition, for datetime and timestamp values, the host variable must be a character string variable with a correct length.

---------------------------------------------------------------------------
One of the common error in timestamp is that I've describe above.

I can still be wrong...
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 16, 2005 4:27 pm    Post subject: Re: Db2 Questions
Reply with quote

MGIndaco,

Useful info for me....Thanx
Back to top
View user's profile Send private message
vivekbalokhra
Warnings : 1

New User


Joined: 15 Jul 2005
Posts: 6

PostPosted: Wed Aug 31, 2005 3:16 pm    Post subject: How to slove -180 error ??
Reply with quote

How to solve -180 error without going physically to flat file ?????
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts SAS Programming - Basic Questions Techelm All Other Mainframe Topics 3 Fri Mar 18, 2016 10:53 pm
No new posts Where can i find Interview questions ... Elixir Mainframe Interview Questions 4 Sat Feb 20, 2016 12:38 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us