View previous topic :: View next topic
|
Author |
Message |
sunojsm Warnings : 1 New User
Joined: 21 Jun 2004 Posts: 33 Location: Andorra
|
|
|
|
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 |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
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 |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
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 |
|
|
|