Sie sind auf Seite 1von 7

MFSTUDY CENTER MEMBERS FAQ’s

CICS
Q. what is sync point?

A. syncpoint is 2 phase commit keyword in cics.all the changes made by cics and db2 will be
commited when we issue syncpoint.

Q. Can anyone tell me in deatil about the following


things in CICS.

1) What is EXCI (External CICS Interface)?


2) What is DPL (Distributed Program Link)?

A. The External CICS Interface (EXCI) is specifically designed to allow a batch job (or indeed any
non-CICS address space) to initiate a CICS transaction.

Distributed program link (DPL) extends the use of the EXEC CICS LINK command so that the
linked-to program can be on a remote CICS system. When the linked-to program is on a remote
CICS system, it is referred to as the back-end program. DPL is used when either the linked-to
program is defined as remote in the Program Definitions (PD) for that program, when the SYSID
option is specified on the EXEC CICS LINK command, or when the program is linked with the
dynamic distributed program link user exit.

Q. What is a CICS DB2 Interface?

A. Info on the CICS/DB2 interface.

DB2 resides in its own address space and it is the CICS Attachment Facility provided by DB2
which allows CICS to access DB2 resources through connections established using the MVS Sub
System Interface (SSI) protocol. The CICS Attachment Facility provides the following functions:
Â¥ An application program interface
Â¥ Attachment commands
Â¥ DB2 commands.

THE APPLICATION PROGRAM INTERFACE


This permits programs written in Assembler, COBOL, and PL/I to issue Structured Query
Language (SQL) commands to access or modify DB2 databases with the Data Manipulation
Language (DML) part, define DB2 objects (databases, tables, etc) using the Data Definition
Language (DDL), and control authority (GRANT and REVOKE). DB2 is available only to CICS
programs that use the command-level interface and EXEC SQL statements. Updates to DB2
resources are fully synchronised with updates to resources protected by CICS such as file
control, temporary storage, intra-partition transient data, and DL/I databases. The Attachment
Facility controls the routing of SQL statements to DB2. When the CICS program issues a
syncpoint or it terminates, the Attachment Facility is invoked to synchronise commit processing
between CICS and DB2. A Unit of Recovery (UR) is defined as the updates performed by DB2
within a CICS Logical Unit of Work (LUW).

ATTACHMENT COMMANDS

These are commands that display and control the status of the Attachment Facility. They can be
issued using the CICS-supplied transaction DSNC. Attachment commands can be used to:
Â¥ Start the connection to DB2 (STRT)
Â¥ Stop the connection to DB2 (STOP)

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

Â¥ Display the status of the connection to DB2 (DISP)


Â¥ Modify the characteristics of the connection to DB2 (MODI).

DB2 COMMANDS

Once a connection between CICS and DB2 is established, terminal users may also use the CICS
transaction code DSNC to enter CICS commands. The Attachment Facility provides a multi-
thread connection between CICS and DB2.There is a thread for each CICS transaction accessing
DB2. A thread is a bi-directional path between a user in a subsystem and specific DB2 resources.
A resource is an application plan or a command processor. The threads are located in the CICS
address space. A new CICS table, the Resource Control Table (RCT), is used to define the
number and types of threads used by the CICS/DB2 interface. Two or more regions can share the
same DB2 system; however, all CICS systems accessing DB2 must run under the same MVS
system as DB2. Note that a CICS region can be connected to only one DB2 subsystem at a time.
Every CICS that connects to DB2 must have an RCT. The RCT is used to define the
characteristics of the CICS/DB2 interface at attach time. The RCT contains such information as:
Â¥ The authorisation-id to be used by the CICS Attachm ent Facility to sign on to DB2.
Â¥ The name of the DB2 subsystems to be accessed.
Â¥ The maximum number of active threads.
Â¥ The CICS transactions that can receive dedicated threads and the dispatching priority for the
thread subtasks.
The Communications Control Table (CCT) is built from the RCT following the CICS attach at
PLTPI time or when the DSNC STRT command is entered. For each thread defined in the RCT
there is a corresponding entry in the CCT. The CCT is an internal representation of the RCT. Each
entry in the CCT is a possible thread.
There are three types of thread:
Â¥ A command thread - reserved exclusively for DSNC.
Â¥ Pool threads - shared by all transactions without dedicated threads. They can also be used by
transactions that run out of dedicated threads defined for them.
Â¥ Entry threads - reserved for a transaction or group of transactions.
Entry threads can be defined as protected or non-protected. Protected threads are not terminated
even if they are not used for a period. Many CICS transactions can use the same protected
thread and avoid the overhead involved in creating and terminating the thread for each
transaction. Non-protected threads are usually terminated at CICS task termination time.

When a transaction issues its first SQL command, a DB2 thread is created based upon
specifications in the RCT. A new thread is created if an existing one cannot be used. When a new
thread is created or when an existing thread is re-used, DB2 checks the authorisation-id. The
sign-on call in CICS (not to beconfused with CICS sign-on) provides the authorisation-id. Sign-on
is used only in multi-thread connections, such as CICS, to identify the thread user to DB2.
DB2 checks that the user is authorised to access the requested plan or command.
These include requests from an application program.
Within the CICS address space, CICS executes under a main task
Õs Task Control Block (TCB).
Besides the main task, there can be a number of subtasks executing in the CICS address space.
This thread is executed under its own MVS subtask TCB. The thread uses cross memory
services to execute DB2 code to satisfy the SQL request. On completion of the SQL request, data
is passed, return codes are set, and control returns to the Attachment Facility code. The CICS
task regains control and the thread may or may not be terminated depending on whether it is
protected or non-protected. Non-protected threads are usually terminated at CICS task
termination time. Protected threads that have not been re-used during two consecutive 30-second
purge cycles are terminated. If the thread is not terminated, the thread TCB remains inactive
(MVS wait) until the next SQL request is received. If the thread is terminated, the MVS subtask
TCB associated with it is not necessarily detached. MVS subtasks are detached only
when the number of active TCBs is within two of the RCT-specified parameter

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

THRDMAX - the maximum number of threads that can be created between CICS and DB2
within this RCT.

When CICS applications use DB2 data, new design aspects are added to the application
architecture. One of the most important things to consider is the relationship between CICS
transaction-ids, DB2 plans, and program modules. For every CICS program that issues SQL
calls, there must be a corresponding DB2 plan available. An application program made up of one
or more modules will usually become one plan. The plan to be used is specified in the RCT. Only
one plan may be specified for a given CICS transaction-id. More than one transaction may
use the same plan. In order to prepare a CICS program that issues SQL calls for execution, the
following steps are required:
1 DB2 pre-compile (new)
2 Command-level translation
3 Compile source statements
4 Link edit
5 BIND to get a new application plan (new).
The DB2 pre-compiler builds a Database Request Module (DBRM) that contains information
about each of the programÕs SQL statements. SQL statements are also validated in this step.
In the BIND process, the DBRM is used to produce an application plan which allows the program
to access DB2 data at execution time. A group of transactions specified in the same RCT entry
must use the same application plan,that is, their DBRMs must be bound together.
To control the characteristics of the plan and the Attachment Facility threads,the relationship
among CICS transaction-ids, DB2 plans, and program modules must be carefully defined during
the design phase.

Q. How to create a lock on row level? if possible give me in detail.

A. This is regarding the Page / Row level locks in DB2.

Lock can be PAGE level or ROW level.


It can be escalated to table or table space level which is determined by IRLM,the lock manager.
Normally page / row lock can be specified in the Bind plan /package in the parameter
ISOLATION.
For eg ISOLATION(CS), where CS is the Cursor Stability which is the most efficient
page/row lock in terms of the concurrency it offers.
We can also use other values like RR(Repeatable Read) or UR (Uncommitted Read or Dirty
Read). But the most widely used is CS.
UR is used incase when we have to read a data from the table which is under Update Lock by
some other program.In this case it will read the uncommitted data.It can be used only when we
are sure that the table that we'r going to read is less prone to updation by any other program.
Table /table space lock is specified as below:
For Batch:
ACQUIRE(ALLOCATE)
RELEASE(DEALLOCATE)
For onlines :
ACQUIRE(WEB)
RELEASE(COMMIT)

Q. Can anyone tell me the detailied significance of setting MDT(Modified Data Tag) for a field in
an Online screen. Does it affect the data alone or does it have something to do with the attributes
as well.
A. If you set the MDT(FSET) on field level, then independant of whether the user modified the
field or not,it's content will be transfered to the program during receieve.This will reduce the
unwanted data traffic.

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

MDT will be set automatically whenever user entered somethings.

As far as I know,the signifance is with data transfer only.

FieldA - is attribute field of 1 byte.(8 bits).In this 8 bits,1 bit


is used for MDT flag.If that bit is 1 MDT will be set and attribute
value will be different.

So based on MDT,Attribute value will be different.If you want to know


the MDT bit of attribute field,please refer some good cics books or
update you tomorrow.

Pasted the IBM guide proof:

FSET specifies that the modified data tag (MDT) for this field should be set when the field is
sent to a terminal. Specification of FSET causes the 3270 to treat the field as though it has been
modified. On a subsequent read from the terminal, this field is read, whether or not it has been
modified. The MDT remains set until the field is rewritten without ATTRB=FSET, or until an output
mapping request causes the MDT to be reset. Either of two sets of defaults may apply when a
field to be displayed on a 3270 is being defined but not all parameters are specified. If no ATTRB
parameters are specified, ASKIP and NORM are assumed. If any parameter is specified,
UNPROT and NORM are assumed for that field unless overridden by a specified parameter.

Q. can any one of you help me in the problem:

I want to reprogram the PF keyts like say PF3:TOP page PF4: Bototm page , PF5 - BWD , PF^
FWD etc...How do i do this ?

A. You cannot directly reprogram the CICS PF Keys; you can only interpret what action you wish
to take (or ignore) based on what PF Key CICS reports in the EIB (or Handle Aid). The closest
approximation to what your asking would involve coding a routine to intercept the PF Key being
reported by CICS and then reinterpreting it to something else before your application code
interrogates it. If your using the EIB to to this its much easier. If your using Handle Aid commands
it will involve some recoding to avoid the "go to" logic intorduced by the Handle Aid.

If I were doing this I would define an indicator to indicate functions like "top of page", "bottom of
page", "BKWD", "FWRD", etc. Then at the top of my program I would set the function indicator
based on what the contents of EIBAID was when my program was invoked by CICS.
Then in the program logic I would test the setting of the function indicator instead of the contents
of EIBAID to determine what I needed to do.

Q. Can anyone pls let me know in how many different ways we can initiate a transaction in cics
system.

A. Following are the ways to initiate CICS transactions;

a) Using Transcation ID (User defined, 1-4 characters)

b) Using Attention Identifier

c) Using START command

d) Automatic Transcation Initiation

e) Pseudo Conversation Technique

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

Q. I am working on a project where we have to develop in which there are options of browsing.
And we are using the DB2 as the database and right now we are using DB2 fetches for browsing
but because of that the cursor size is too big. The other way out is to use a TSQ and fetch all the
records into the TSQ and display the required information by browsing the TSQ as and when
required. But now I am in a dilemma whether to use the TSQ or to go with my idea of DB2
detches as per the response time and cost efficiency.

A1. I don't have the details but here is a workable solution: "Scrollable" cursors. Another
possibility is to add a column to the table with the column being a sequential number. Then build
an index on the where clause columns plus this new column and change the where clause to
include a range on the new column. You will then be able to fetch a much smaller result set and
limit the processing time.

A2. We had an application like this a couple of years ago. If I remember it was dependent upon
the application. As an example, we had a columnar screen of "students" in CICS. We listed 16 per
page. Normally our users would start the browse at the approximate key and go forward (usually
never backwards) to select the student's detail. So we used the OPTIMIZE parameter in the SQL
to limit our "results" on the Normalized key (and not ORDERED by) to 48. This returned three
screens worth of data. We wrote the 48 rows of information (ie not all of the columns of the DB2
table, just what we needed in the browse screen to the TSQ and the key to the student). Then we
could browse forward to the second and third screen using the data in the TSQ, we would permit
them to browse back to the second and first screen also with the TSQ data. But once they
displayed the third screen, we warned them that they would not be able to browse back if they
went forward (to the fourth screen). If they did go to the 4th screen, they could only browse back
an forth between the 4th and 6th screen (and so on). We did this because the user had a tendency
to need to get the first screen, browse to the second and then go back to the first. If your user
needs to go back and forth between the first and the 10th screen, then OPTIMIZE on enough rows
for 10 screens. If your user doesn't need to browse backward at all, then forget this whole thing
and just OPTIMIZE the number on the screen. Then makes your logic a heck of a lot simplier.

A3. I am not sure whether this will work or not. But you can give it a try. I would always advise you
to go for DB2, rather than TSQ. Lets take an example. Suppose you want to show the employee
records in a screen with 10 (or N) records at a time. Define a sequence number in the
table for all the records. For the first page, let the Front end send you a request with sequence
number 0(We will call it S ) . Fetch 10 ( or N) valid records from the table ( using a cursor) , with
sequence number > 0 and send it back to FE. ( 1-10 records). Now if the user clicks on next
button, then FE should send a request with sequence number as 10 ( 'S' ) . ( front end will have to
store the last sequence number displayed, if web based ). Now fetch 10 ( or N ) valid records with
seq. number > 10 ('S' ) and sent back to FE. Now FE will display 11(S+1)-20(S+N+1) records.

If user clicks prev button at this point of time, then FE should send sequence number as Starting
seq. number - (N+1). Here Starting seq.number = 11 and N =10. 11-(10+1) = 0. This will display
the first page again. Since you are fetching only few records at a time depending on the
sequence number , this shouldn't be an overhead.

Q. Is it require TSQ to be registered in any control Table ??? I guess no.

A. No need to register TSQ.All existing TSQs will be deleted during CICS shut down.If you want
to save the TSQ or recover it during system crash,you need to register it in TST.

Q. Is it possible for CICS pgm without CMMAREA ???.

A. SURE, BUT EVEN IF ONE EXISTS IN THE PROGRAM, IF YOU DON'T REFERENCE
ANY FIELD IN IT, THEN YOU OBVIOUSLY DON'T NEED IT.

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

Q. What is the difference among CICS LINK, CICS XCTL, CICS LOAD commands?, When we
CICS load, the program needs to be in PPT?

A. CICS LINK will LOAD a program into executable storage, branch to it's logic, execute it and
return to the point were CICS LINK was executed.

CICS XCTL will LOAD a program into executable storage, branch to it's logic, execute it and
return to the logical point that started the program that contained the CICS XCTL. In other words,
A LINKS to B, B XCTLS to C, C will return to A where the LINK to B occurred. Sometimes A
happens to be CICS itself. TRANSACTION WXYZ starts B, B XCTLS to C, when C returns, it is
just returning to CICS.

CICS LOAD will LOAD a program into executable storage.

Q. what is the difference between "Copy mapset" (which copies the symbolic structure parametrs
to cobol pgm) and Exec SQL include SQLCA End-exec.?

A. Copy expands at the time of compilation and include expands at the time of recompilation

Q.In VScobol2 some supervisory calls like Stop RUn are allowed..when a programmer issues this
command what happens to the task ?Does it terminates if issued from another task or control just
go back to CICS?

A : it goes back to the CICS

Q. A full read will itself delets the TDQ datas then why the DELETEq TD command should be
issued for ?
A : Delteq TD is to delete the TDQ itself. Even in TSQ also you can't delete a record

Q. How to lock a vsam dataset in cics environment? Please send answer to this question.

A. If you have the share options set so only one Job can update the VSAM file at the time, and
that Job is VSAM, then in theory you don't need to lock the VSAM dataset. If the share options
are different than that, then I don't think that you can lock the dataset (check on that
for me guys).

VSAM will lock out the Control Interval (for you non VSAMers that is almost like a Block), but if
you want to make sure that multiple tasks can not get the VSAM resource while some other task
has it, then look up the use of ENQUE and DEQUE instructions. You aren't locking the VSAM file,
but you are locking on something, that freezes everybody else out until they can lock on it.

Q. how to give new entry in FCT?

A. As an application programmer ,you have to create FRMFCT forms describing the DDname and
the filename to be defined in the FCT ( File control table ) entries of CICS.Create packages to
move the forms to respective test regions. As a CICS system programmer, you can define these
entries online using CICS supplied transactions.The CEDA transaction is used to define PCT
(transactions), FCT (files) and PPT (programs and maps) entries online. Whenever you add a
PCT,PPT or FCT entry , it should be added to a group (CICS entity ). The groups should be
added to a list ( another CICS entity).
CEDA DEFINE FILE(FILEDDNAME) GROUP(FCTGRP) DSNAME(XX.XXX.FILE)

Whenever fields are added , you have to install the group.CEDA INSTALL GROUP(FCTGRP)

Q. how to view all the entries in FCT and edit them.

MFSTUDY CENTER MEMBERS FAQ’s


MFSTUDY CENTER MEMBERS FAQ’s

A. You can view the entries in multiple ways.


a) Use CEMT transaction and see all the entries defined in a particular CICS region.( What we do
!! ) CEMT I FILE(*)
b) Use CEDA transaction to view the resource definition attributes. CEDA VIEW
FILE(FILEDDNAME)

Q. CEBR is for browsing tsq only or both tsq and tdq.

A. CEBR is used to read from both tsqs and tdqs. To read from tdq, you have to copy the
contents to a tsq using GET command. It can be either intra or extra partition tdq. GET tdq-name
will write the contents to the tsq on display. ( Warning : GET will delete the record from tdq, like a
normal read. So use PUT command to restore the contents in tdq. ). Now you can proceed to
read the contents, as lke a tsq.

MFSTUDY CENTER MEMBERS FAQ’s

Das könnte Ihnen auch gefallen