cics_trianing class_03.ppsx

Upload: ravikiran8p

Post on 14-Apr-2018

247 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    1/21

    Program Preparation

    CICS Training Class -03

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    2/21

    Required Steps

    Preparing a COBOL-CICSProgram.

    Write a program

    Compile

    Define the program in PPTtable with in CICS

    Define the transactionto the program in PCTtable.

    Executethe program with the Defined Transaction.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    3/21

    Concepts to be Known

    Before we start writing a program one should be clear with

    TS!and Transaction

    "ultitas#ing$ "ultithreading

    %uasi&'eentranc(

    Con)ersational"odes

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    4/21

    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-IDis a - character length alpha&numeric name but

    should not start with character C/ which are actuall( used b(

    the s(stem related transaction.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    5/21

    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 instanceof 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(stemis called multitas#ing

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    6/21

    ulti-t!reading

    "ultithreadingis 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(

    3orexample* one transaction ma( begin to execute an application

    program1 while these happening another transaction ma( then

    execute the same cop( of the application program

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    7/21

    "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)eits 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.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    8/21

    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

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    9/21

    CICS Consideration & Restrictions

    5. "ust e)entuall( return control to CICS

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

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

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

    @. ,o 3I2ESECTI:,so no :PE, C2:SE 'ED :' otherC:B:2 file related )erb instead we use CICS read $ write

    command

    -. CCEPT DISP2A ST:P ';, and e)en ?:BC! area)oided. Stop run $ ?:BC! are sometimes included in

    order to eliminate compiler diagnostic but ne)er executed at

    all.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    10/21

    Required Cop# %ooks

    To write a C:B:2&CICSprogram we ma( be re0uired few

    of the below mentioned C:PA B::!S

    5. SA"B:2IC "ap7. D3=EIB2!

    @. D3=ID

    -. D3=B"SC

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    11/21

    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 MAPNAMEIis 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 inthe "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 fieldhas changed. The names for these fields are created b( adding

    a onecharacter suffix to the label that was coded on the

    D3="D3 macro in the mapset.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    12/21

    '()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 DFHCOAREA!COAREA("#($)%o&')

    EIBDATE!EIBTIE Dte Ti&e *hen The T+, "tted

    EIBFN F.n%tion Code Of The L+t Co&&nd

    EIBRCODE Re+'on+e Code Of L+t Co&&nd

    EIBTRNIDTn+%tion Id 1-$ Ch+

    EIBTRID Te&in/-id 1-$ Ch+

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    13/21

    '(+I Cop# %ook

    IDis used to initiate the tas# from the terminal

    ll the ID #e(s are defined under D3=IDcop(boo#

    ID #e(s*

    PF Kes PA Kes ! Enter and clear kes

    =,D2EID can be used to handle when an( ID #e( is

    in)o#ed instead we can use EIBIDof EIB to wor# in

    application program

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    14/21

    '(%SC+

    IB" also supplies a standard cop( member1 named

    D3=B"SC1 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 there0uired attribute to the field.

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    15/21

    S), Command

    EEC CICS

    SE,D "P6"P8

    "PSET6"PSET8

    3':"6I,%"P5:8 FDT:,2A+"P:,2AG

    C;'S:'6>2;E8F2'" H 3'EE!B H E'SE H 3'SET G

    =,D2E+,:=,D2E

    'ESP6WS&DT&ITE"8

    E,DEEC.

    Conditions # LENE$$% IN&$E'

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    16/21

    R)C)I)Command

    EEC CICS 'ECEI>E

    "P6"P,"E8

    "PSET6"PSET ,"E8

    I,T:6DT,"E8

    2E,?T=6"S?&2E,8=,D2E+,:=,D2E

    'ESP68

    E,D&EEC.

    Conditions # MAPFAIL% IN&$E'

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    17/21

    R)T.R, Command

    EEC CICS 'ET;',

    T',SID6,"E8

    C:""'E6DT&>2;E8

    2E,?T=6DT&>2;E8

    E,D&EEC.

    Conditions # LENE$$% IN&$E'

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    18/21

    C/%/* CICS Compilation

    The C:B:2 CICS undergoes t(ree levelsof processing to

    generates the 2oad "odule.

    5. Translation process

    D3=ECP7. Compilation I?AC'CT2

    @. 2in#&edited IEW2+ =EW2

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    19/21

    Translation Process

    ,ow we ha)e a source code with C:B:2 CICSthen a

    normal compilation process cannot be good enough

    =ere we use a process #now as T',S2TI:,process to

    remo)e the CICS command and replace with C:B:2

    understandable code li#e C:""E,Tand C22

    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 the2:D":D;2E

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    20/21

    )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

  • 7/27/2019 CICS_Trianing Class_03.ppsx

    21/21

    T!ank 1ou