Anda di halaman 1dari 21

Program Preparation

CICS Training Class -03

Required Steps

Preparing a COBOL-CICS Program.

Write a program Compile

Define the program in PPT table with in CICS Define the transaction to the program in PCT table. Execute the program with the Defined Transaction.

Concepts to be Known

Before we start writing a program one should be clear with

T S! and Transaction "ultitas#ing $ "ultithreading %uasi& 'eentranc( Con)ersational "odes

Task & Transaction

Task* a basic unit of wor# which is scheduled b( the operation s(stem + CICS

Sending a map + 'ecei)ing a map

Transaction * Is an entit( which initiates execution of a tas#. In CICS transaction is identified b( the transaction identifier #nown as T' ,S&ID. Trans-ID is a - character length alpha&numeric name but should not start with character .C/ which are actuall( used b( the s(stem related transaction.

ulti-Tasking

When CICS recei)es a re0uest to run a the program1 CICS starts running instance of re0uested program for that user. Simultaneousl( if CICS recei)es another re0uest to run the same program+another program1 CICS starts running instance of that re0uest program for that user also. 2i#e this CICS can able to handle thousands of re0uests1 can able to run multiple tas#s simultaneousl(. This capabilit( of executing multiple tas#s b( a single s(stem is called multitas#ing

ulti-t!reading

"ultithreading is sub&concept of multi&tas#ing. "ultithreading is a techni0ue that almost a single cop( of a program to be processed b( se)eral transaction concurrentl(

3or example* one transaction ma( begin to execute an application program1 while these happening another transaction ma( then execute the same cop( of the application program

"uasi- Reentranc#

The feature of storing the program data in a separate storage area1 when there is a interruption and restoring the same state is #nown as 'eentranc( but in CICS it4s called %uasi& 'eentranc( process. When CICS recei)es 5st re0uest to a program1 CICS starts executing that program1 at the same time1 another re0uest67nd8 recei)ed b( CICS1 which is more priorit(1 then CICS halts processing of 5st re0uest $ preser)e its state to separate storage area and initiali9e the program. :nce second re0uest is o)er. It initiali9es the program again $ restores 5st re0uest state to this program and start executing the program.

Terminal Con$ersation

Conversational* mode of dialogue between program and terminal based on a combination of sending message and recei)ing message within the same tas#.

Since human response is slower than the CP; speed a


significant amount of resource will be wasted <ust waiting.

Pseudo-Conversational* mode of dialog between program and terminal which appears to the operator as a continues con)ersation but which is actuall( carried b( a series of tas#s. We can achie)e the pseudo&Con)ersational with a )ariable EIBC 2E, which is defined with in D3=EIB2! Cop(boo#

CICS Consideration & Restrictions

5. 7. @. -.

"ust e)entuall( return control to CICS

chie)ed b( using 'ET;', Command

Should not code E,>I':,"E,T DI>ISI:,

So no C:,3I? :' I,P;T&:;TP;T SECTI:,


,o 3I2E SECTI:, so no :PE, C2:SE 'E D :' other C:B:2 file related )erb instead we use CICS read $ write command CCEPT DISP2 A ST:P ';, and e)en ?:B C! are a)oided. Stop run $ ?:B C! are sometimes included in order to eliminate compiler diagnostic but ne)er executed at all.

Required Cop# %ooks

5. 7. @. -.

To write a C:B:2&CICS program we ma( be re0uired few of the below mentioned C:PA B::!S SA"B:2IC "ap D3=EIB2! D3= ID D3=B"SC

S#mbolic

ap

S(mbolic map can be generated at the time of B"S map compiler or manuall( This cop(boo# contains group item named MAPNAMEI is redefined b( a group item named MAPNAMEO. The fields in the " P, "EI group item are intended for use with input operations1 and the fields in the " P, "E: group item are intended for use with output operations.

The s(mbolic map contains a data field1 a length field1 an attribute field1 and a field that indicates if the )alue of the field has changed. The names for these fields are created b( adding a oneBcharacter suffix to the label that was coded on the D3="D3 macro in the mapset.

&'()I%*K Cop#book

EIB EXEC INTERFACE BLOCK contains some s(stem related information to each tas# as exec interface bloc# LIKE:

EIBAID Attention-id (1 BYTE) EIBCALEN Length Of DFHCO


("#($)%o&')

AREA!CO

AREA

EIBDATE!EIBTI E D(te ) Ti&e *hen The T(+, "t(-ted EIBFN F.n%tion Code Of The L(+t Co&&(nd Re+'on+e Code Of L(+t Co&&(nd Te-&in(/-id 1-$ Ch(-+ EIBRCODE EIBTR ID

EIBTRNID T-(n+(%tion Id 1-$ Ch(-+

&'(+I& Cop# %ook

ID is used to initiate the tas# from the terminal ll the ID #e(s are defined under D3= ID cop(boo# ID #e(s*

PF Ke s PA Ke s ! Enter and clear ke s


= ,D2E ID can be used to handle when an( ID #e( is in)o#ed instead we can use EIB ID of EIB to wor# in application program

&'(% SC+

IB" also supplies a standard cop( member1 named D3=B"SC 1 that defines man( attribute settings. Aou can change the colour1 and protection attributes b( changing the field. To do this (ou should cop( the D3=B"SC cop(boo# into wor#ing storage. This contains definitions for attributes e!". D3=B" S! to set a field to S!IP. Then mo)e the re0uired attribute to the C C field.

S),& Command
EDEC CICS SE,D " P6E" PC8 " PSET6E" PSETC8 3':"6I,%" P5:8 FD T :,2A+" P:,2AG C;'S:'6> 2;E8 F 2 '" H 3'EE!B H E' SE H 3'SET G = ,D2E+,:= ,D2E 'ESP6WS&D T &ITE"8 E,DBEDEC. Conditions # LENE$$% IN&$E'

R)C)I-) Command
EDEC CICS 'ECEI>E " P6" P, "E8 " PSET6" PSET , "E8 I,T:6D T , "E8 2E,?T=6"S?&2E,8 = ,D2E+,:= ,D2E 'ESP68 E,D&EDEC. Conditions # MAPFAIL% IN&$E'

R)T.R, Command
EDEC CICS 'ET;', T' ,SID6, "E8 C:"" 'E 6D T &> 2;E8 2E,?T=6D T &> 2;E8 E,D&EDEC. Conditions # LENE$$% IN&$E'

C/%/* 0 CICS Compilation

The C:B:2 I CICS undergoes t(ree levels of processing to generates the 2oad "odule.

5. Translation process D3=ECP 7. Compilation I?AC'CT2 @. 2in#&edited IEW2 + =EW2

Translation Process

,ow we ha)e a source code with C:B:2 I CICS then a normal compilation process cannot be good enough =ere we use a process #now as T' ,S2 TI:, process to remo)e the CICS command and replace with C:B:2 understandable code li#e C:""E,T and C 22 In this process a C:PAB::! D3=EIB2! will be included with&in the lin#age section of the application program The modified code then further get processed and generates the 2: D ":D;2E

)ntries Required in CICS )n$ironment



The application program and the related map has to be defined in the PPT table and a transaction id to initiate the tas# in pct table. PPT ENT$) CED DE3 " PSET6" PSET , "E8 ?6?':;P , "E8 CED I,S " PSET6" PSET , "E8 ?6?':;P , "E8 CED DE3 P':?' "6P':?' " , "E8 ?6?':;P , "E8 CED I,S P':?' "6P':?' " , "E8 ?6?':;P , "E8 PCT ENT$) CED DE3 T' ,S6T' ,&ID8 P':?' "6P':?' " , "E8 ?6?':;P , "E8 CED I,S T' ,S6T',58 ?6?':;P , "E8 To #now all entr( with in a group CEDA DI *+*$O,P NAME-

T!ank 1ou

Anda mungkin juga menyukai