IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

some Interview queries


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 33
Location: Andorra

PostPosted: Tue Apr 26, 2005 11:45 pm
Reply with quote

helo all,

i have some doubts,

1)I know that mainframe supports multithreading.But
when going through a material on mainframe It said it
supports ?single-threading at maximum level? as
property of mainframe. What is that mean ?

2) what sql error code we get if the number of columns
of a table is not equal to the number of cobol
variables in an embedded sql?( a column name of a
table is missing in the sql but corresponding host
variable is given or viceversa)

3)can anybody demonstrate with an illustration, how to
write a query to delete few rows assigned by
hostvariable from a table using cursor?

4)What is the use of coding sql statements COMMIT &
ROLLBACK in programming. How is COMMIT performed in
normal situation?

expecting your replies
bye
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Feb 03, 2006 6:14 pm
Reply with quote

Hi,
see this for 3rd question.

SQLCODE -117 The number of values you are trying to INSERT
does not match the number of columns

SQLCODE -216
You need to use the same number of expressions on both sides of the comparison.
when using multiple operands in a comparison,
Correct example:
WHERE (E.SALARY, E.COMM) IN
(SELECT S.PAY, S.COMMISSION
Incorrect example:
WHERE (E.SALARY, E.COMM, E.BONUS) IN
(SELECT S.PAY, S.COMMISSION
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Feb 03, 2006 7:34 pm
Reply with quote

Multithreading is functionally the same as multitasking. The technical
differences are one process id vs. many, and different semantics
for starting, managing and communicating between tasks. Micro Focus
supports multithreading with Cobol verbs start and wait, as well as a
function library. In addition, a Cobol program can directly call the
OS supplied threads library (where function names start with thr_).

single threading:The object only receives one client request at a time. You don't need to deal with threading issues.
let us suppose there are two clients and one objects. clients are passing requests to the object.
First client method call creates object.
Second client's method call will be queued d until other client method calls on done
Second client will connect to same (single) object when no other client calls are in queue.

COM serializes client requests so that the application receives one request at a time.
Clients are handled one at a time so no threading support is needed.
No performance benefit.

When to use:
Objects that clients will use briefly and in rapid succession, like:
A logon and authentication provider.
A background process trigger, like a batch process invoker.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Comp interview questions Mainframe Interview Questions 5
No new posts Index related queries DB2 5
No new posts Interview Questions on Cobol DB2 program Mainframe Interview Questions 5
No new posts The Last Two Question For You To Ask ... Mainframe Interview Questions 0
No new posts Need help with below queries DB2 3
Search our Forums:

Back to Top