advanced c ics

Upload: chinu267

Post on 03-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Advanced c Ics

    1/119

    Advanced CICS Programming inCOBOL

    Cognizant Technology Solutions

  • 7/28/2019 Advanced c Ics

    2/119

    March 18,2000 BNG Version 2.0 2

    SESSION BREAKUP

    Day Session & Topic1 1 File Handling

    2 File Handling (contd.)

    2 1 Terminal Handling2 Temporary Storage

    3 1 Interval & Task Control2 Program & Storage Control

    4 1 Error Processing5 1 Intercommunication

    2 Intercommunication (contd.)

  • 7/28/2019 Advanced c Ics

    3/119

    Day 1 - Session 1

    File Handling

  • 7/28/2019 Advanced c Ics

    4/119

    March 18,2000 BNG Version 2.0 4

    File Handling

    Sequential Processing using BROWSEcommands

    VSAM Alternate IndexGeneric KeyMass InsertCICS Data Tables

  • 7/28/2019 Advanced c Ics

    5/119

    March 18,2000 BNG Version 2.0 5

    Sequential Processing Using

    Browse CommandsSTARTBR CommandREADNEXT Command

    READPREV CommandENDBR CommandRESETBR Command

  • 7/28/2019 Advanced c Ics

    6/119

    March 18,2000 BNG Version 2.0 6

    STARTBR CommandSTARTBR DATASET(filename)

    RIDFLD(data-area)REQID(data-value)[RRN | RBA]

    [GTEQ | EQUAL][GENERIC][KEYLENGTH(data-value)]RESP(data-area)

    EXEC CICS

    STARTBR DATASET(CUSTMAS ) RIDFLD(CUSTOMER-NO)RESP(RESPONSE-CODE)

    END-EXEC

  • 7/28/2019 Advanced c Ics

    7/119

    March 18,2000 BNG Version 2.0 7

    STARTBR Command

    DATASET The file name from the file control tableRIDFLD The field identifying the record where the

    browse operation will start

    RRN The file is relative record fileRBA The file is a ESDSGTEQ The browse operation will start at the first

    record whose key is greater than or equal tothe value in RIDFLD

    EQUAL The browse operation will start at the recordwhose key value is equal to the value inRIDFLD

  • 7/28/2019 Advanced c Ics

    8/119

    March 18,2000 BNG Version 2.0 8

    STARTBR Command

    GENERIC Only part of the key in the RIDFLD fieldshould be used

    KEYLENGTH

    A binary half word or literal value that indicatethe length of the key

    RESP A binary full word item

  • 7/28/2019 Advanced c Ics

    9/119

    March 18,2000 BNG Version 2.0 9

    READNEXT CommandREADNEXT DATASET(filename)

    INTO(data-area)RIDFLD (data-area)[RRN | RBA]

    [GENERIC][KEYLENGTH(data-value)]

    EXEC CICSREADNEXT DATASET(ACCOUNT )

    INTO(ACCOUNT-RECORD)RIDFLD(AR-ACCUONT-NUMBER)RESP(RESPONSE-CODE)

    END-EXEC

  • 7/28/2019 Advanced c Ics

    10/119

    March 18,2000 BNG Version 2.0 10

    READNEXT Command

    DATASET The file name from the File Control TableINTO The area that will contain the record being

    read

    RIDFLD Must specify the same data name specified inthe STARTBR command

    RRN The file is a relative record fileRBA The file is a ESDSGENERIC Only a part of the key in the RIDFLD should

    be used

  • 7/28/2019 Advanced c Ics

    11/119

    March 18,2000 BNG Version 2.0 11

    READNEXT Command

    KEYLENGTHA binary half word or literal value thatindicates the length of the key.

  • 7/28/2019 Advanced c Ics

    12/119

    March 18,2000 BNG Version 2.0 12

    Skip Sequential Processing

    Can be achieved by increasing the RIDFLD value before issuing the next READNEXT command

    Applied only for forward browsingVSAM reads forward in the index from thecurrent positionFaster for relatively close but not adjacent recordsIf the records are very far, the response time willincrease. In such cases, RESTBR should be used

  • 7/28/2019 Advanced c Ics

    13/119

    March 18,2000 BNG Version 2.0 13

    READPREV Command

    READPREV DATASET(filename)INTO(date-area)

    RIDFLD(data-area)[RRN | RBA][GENERIC][KEYLENGTH(data-value)]

  • 7/28/2019 Advanced c Ics

    14/119

    March 18,2000 BNG Version 2.0 14

    READPREV Command

    DATASET The file name from the File Control TableINTO The area that will contain the record being

    read

    RIDFLD Must specify the same data name specified inthe STARTBR command

    RRN The file is a relative record fileRBA The file is an ESDSGENERIC Only part of the key in the RIDFLD field

    should be used

  • 7/28/2019 Advanced c Ics

    15/119

    March 18,2000 BNG Version 2.0 15

    READPREV Command

    KEYLENGTHA binary half word or literal value thatindicates the length of the key.

  • 7/28/2019 Advanced c Ics

    16/119

    March 18,2000 BNG Version 2.0 16

    ENDBR Command

    ENDBR DATASET(filename)

    Should be issued before any updateoperation can be performed on the file.Other wise the results are un-predictable

    Syncpoint should be preceeded by ENDBR command. Basically Browing is a LUW.Always use to avoid dead locks

  • 7/28/2019 Advanced c Ics

    17/119

    March 18,2000 BNG Version 2.0 17

    RESETBR Command

    RESETBR DATASET(file name)RIDFLD(data-area)

    [RRN | RBA][GTEQ | EQUAL][GENERIC][KEYLENGTH(data-value)]

  • 7/28/2019 Advanced c Ics

    18/119

    March 18,2000 BNG Version 2.0 18

    RESETBR Command

    DATASET The file name from the File Control tableRIDFLD The field identifying the record where the

    browse operation will be repositioned

    RRN The file is a relative record fileRBA The file is as ESDSGTEQ The browse operation will be repositioned at

    the first record whose key is greater than or equal to the value in RIDFLD

    EQUAL The browse operation will be repositioned atthe record whose key is equal to the value idRIDFLD

  • 7/28/2019 Advanced c Ics

    19/119

    March 18,2000 BNG Version 2.0 19

    RESETBR Command

    GENERIC Only a part of the key in the RIDFLD fieldshould be used

    KEYLENGTH

    A binary half word or literal value thatindicates the length of the key.

  • 7/28/2019 Advanced c Ics

    20/119

    March 18,2000 BNG Version 2.0 20

    Exceptional Conditions

    DSIDERR The data set is not in the FCTENDFILE There are no more records to be readILLOGIC A VSAM error has occurredINVREQ The browse request is invalid (not specified in

    FCT)IOERR An I/O error has occurredLENGERR A length error has occurred

    NOTFND The record specified in a STARTBR commanddoes not exist

    NOTOPEN The data set is not open

  • 7/28/2019 Advanced c Ics

    21/119

    March 18,2000 BNG Version 2.0 21

    Exceptional Conditions

    DUPKEY Indicate that more records existwith the same key (AIX)

  • 7/28/2019 Advanced c Ics

    22/119

  • 7/28/2019 Advanced c Ics

    23/119

    March 18,2000 BNG Version 2.0 23

    VSAM Alternate Index

    Terminology Alternate Index Base Cluster Unique Key Non unique Key

    Path

    Upgrading / Upgradable Index / Upgrade set

  • 7/28/2019 Advanced c Ics

    24/119

    March 18,2000 BNG Version 2.0 24

    Using Alternate Index in CICS

    Browse commands are to be used for retrieving non-uniquekey recordsDATASET option to have the Path name

    STARTBR command to have EQUAL option Check for NOTFND condition

    Allowable Response codes DUPKEY & NORMAL

    Check for DUPKEY condition raised if there is atleast one more record with the same key

  • 7/28/2019 Advanced c Ics

    25/119

    March 18,2000 BNG Version 2.0 25

    STARTBR Example

    STARTBR DATASET(INVPATH ) RIDFLD(CM-CUSTOMER-NO)

    EQUALRESP(RESPONSE-CODE)

  • 7/28/2019 Advanced c Ics

    26/119

    March 18,2000 BNG Version 2.0 26

    Using Generic Key in CICS

    Portion of a primary or alternate key used toidentify records in a KSDSHas to begin at the first byte of the complete keyThe length can not be equal to the complete key of the KSDSRIDFLD should be large enough to hold thecomplete keyForward browsing only is possible. READPREVwill raise INVREQ condition

  • 7/28/2019 Advanced c Ics

    27/119

    March 18,2000 BNG Version 2.0 27

    Using Generic Key in CICS

    Can be used with browse commandsGENERIC & KEYLENGTH options are to be codedRIDFLD should be large enough to hold the record s entirekeyINVREQ is raised if KEYLENGTH is not less than thelength of the complete keyWhen used with STARTBR command the effect is similar to GTEQGENERIC option can be used in READ & DELETEcommands alsoLength could be changed using RESETBR

  • 7/28/2019 Advanced c Ics

    28/119

    March 18,2000 BNG Version 2.0 28

    Using Generic Key in CICSExample with GTEQ MOVE VENDNOI TO IP-VENDOR-NO.MOVE LOW-VALUE TO IP-ITEM-NO.EXEC CICS

    STARTBR DATASET(INVPART ) RIDFLD(IP-RECORD-KEY)

    GTEQRESP(RESPONSE-CODE)

    END-EXECExample with GENERIC MOVE VENDOI TO IP-VENDOR-NOEXEC CICS

    STARTBR DATASET(INVPART)

    RIDFLD(IP-RRECORD-NO)GENERICKEYLEN(4)EQUALRESP(RESPONSE-CODE

    END-EXEC

  • 7/28/2019 Advanced c Ics

    29/119

    March 18,2000 BNG Version 2.0 29

    Using Generic Key in CICSExample for GENERIC in READ READ DATASET(INVPART )

    INTO(INV-PARTS-REC)RIDFLD(IP-REC-KEY)

    GENERICKEYLENGTH(4)EQUALRESP(RESPONSE-CODE)

    Example for GENERIC in DELETE DELETE DATASET(INVPART )

    RIDFLD(IP-REC-KEY)GENERICKEYLENGTH(4)EQUAL

    NUMREC(WS-DEL-CTR)

    RESP(RESPONSE-CODE)

  • 7/28/2019 Advanced c Ics

    30/119

    March 18,2000 BNG Version 2.0 30

    MASSINSERT

    Used when more than one record is to bewritten to the same point in a file

    Makes insertion more efficientApplicable for KSDS, ESDS & PATHUNLOCK command has to be used to end

    the MASSINSERT operation No file control command can be issued before the MASSINSERT ends.

  • 7/28/2019 Advanced c Ics

    31/119

    March 18,2000 BNG Version 2.0 31

    MASSINSERT example

    WRITE DATASET(CUSTINV ) FROM(INVOICE-REC)

    RIDFLD(INV-REC-KEY)MASSINSERTRESP(RESPONSE-CODE)

  • 7/28/2019 Advanced c Ics

    32/119

    March 18,2000 BNG Version 2.0 32

    CICS Data Tables

    To improve the performance of files that are accessedfrequentlyA virtual storage copy of a KSDS file

    The KSDS is copied to the table at CICS startupTypes of Data Tables CICS maintained tables (CMT)

    CICS automatically updates the source data set whenver an update

    takes place & vice versa User program need not have to wait till the update is completed in thesource data set

    User maintained tables (UMT) Needs a user written program that periodically updates the source data

    set

  • 7/28/2019 Advanced c Ics

    33/119

    March 18,2000 BNG Version 2.0 33

    CICS Data Tables

    Types of data tables (contd) Shared Data Tables

    Works like CMT or UMT but it can be accessed by more than

    one CICS system under the same MVS system Kept in a separate address space accessible by mulltiple CICS

    systems It is owned by one of the CICS regions

    The tables are defined by the system programmer in FCT through batch or RDO

  • 7/28/2019 Advanced c Ics

    34/119

    March 18,2000 BNG Version 2.0 34

    Performance improvements on

    VSAM Data set accessMinimize the time that VSAM resources arereserved for exclusive useUse MASSINSERT if you are inserting multiplerecords at the same position of the file.Use skip sequential if records are not together butthey are relatively close.

    Use GENERIC option to delete records with keysstarting with the same string.

  • 7/28/2019 Advanced c Ics

    35/119

    Day 2 - Session 1

    Terminal Handling

  • 7/28/2019 Advanced c Ics

    36/119

    March 18,2000 BNG Version 2.0 36

    Terminal Handling

    Logical Message Building Concepts & Terminology

    SEND TEXT SEND PAGE

    Printer Output

    Message RoutingRECEIVE CommandSEND Command

  • 7/28/2019 Advanced c Ics

    37/119

    Logical Message Building

    Concepts & Terminology

  • 7/28/2019 Advanced c Ics

    38/119

  • 7/28/2019 Advanced c Ics

    39/119

    March 18,2000 BNG Version 2.0 39

    Logical Message BuildingConcepts & Terminology

    Terminal Disposition Logical message is directly sent to the terminal as it iscreated

    Message flow Page & text build program a component of BMS module

    processes SEND TEXT & SEND MAP commands & formats thedata in page buffer

    When the page is full, terminal page processor, another component of BMS module transfers the data to the terminal

    Logical message is built & delivered one page at a time

  • 7/28/2019 Advanced c Ics

    40/119

    March 18,2000 BNG Version 2.0 40

    Logical Message BuildingConcepts & Terminology

    Paging DispositionEntire message is held in temporary storage until anoperator retrieves it.

    When the page buffer is full, the page is written to atemporary storage

    Terminal StatusAffects how messages with paging disposition are

    delivered to the terminal2 options Paging Status Auto page Status

  • 7/28/2019 Advanced c Ics

    41/119

    March 18,2000 BNG Version 2.0 41

    Logical Message BuildingConcepts & Terminology

    Paging StatusBMS delivers pages one at a time as the operator requests themThe terminal operator enters a message retrievalcommand page retrieval program a component of BMS

    retrieves the requested page from temporarystorage & displays it on the terminal

  • 7/28/2019 Advanced c Ics

    42/119

    March 18,2000 BNG Version 2.0 42

    Logical Message BuildingConcepts & Terminology

    Autopage statusEntire message is delivered as soon as the terminal is readyUsually the output will be on a printer

    Message RetrievalOne page is displayed at a timeMessage retrieval commands are to be used for subsequent

    pagesFirst page gets displayed automatically when you invokeCSPG transaction

  • 7/28/2019 Advanced c Ics

    43/119

    March 18,2000 BNG Version 2.0 43

    Logical Message BuildingConcepts & Terminology

    Message Retrieval CommandsP/n Retrieve page nP/+n Retrieve the page that is n pages past the current

    pageP/-n Retrieve the page that is n pages before the

    current pageP/L Last page

    P/N Next pageP/P Previous pageT/B Terminate the retrieval session & purge the

    messages being displayed

  • 7/28/2019 Advanced c Ics

    44/119

    Logical Message Building

    SEND TEXT

  • 7/28/2019 Advanced c Ics

    45/119

  • 7/28/2019 Advanced c Ics

    46/119

    March 18,2000 BNG Version 2.0 46

    SEND TEXT SyntaxFROM Name of the field that contains the data to be

    added to the logical messageLENGTH Length of the FROM field.ACCUM Build a logical pagePAGING Pages to be written to temporary storage for

    later retrieval under operator controlERASE Erase terminal buffer as each page is sent

    during page retrieval

    HEADER Name of the field containing header informationTRAILER Name of the field containing trailer information

  • 7/28/2019 Advanced c Ics

    47/119

  • 7/28/2019 Advanced c Ics

    48/119

    March 18,2000 BNG Version 2.0 48

    Automatic Page NumberingSpecify a non blank value in the third byte of the

    prefix. This charcter is used as part of the header or trailer message to indicate the position for displaying the

    page number When an overflow condition occurs BMS scans

    the header & trailer data & replaces this particular character with the page number Maximum 5 bytes for page number

  • 7/28/2019 Advanced c Ics

    49/119

    March 18,2000 BNG Version 2.0 49

    SEND TEXT Example

    SEND TEXT FROM(PRODUCT)

    ACCUMPAGINGERSAEHEADER (HD-AREA)

    TRAILER (TR-AREA )

  • 7/28/2019 Advanced c Ics

    50/119

    March 18,2000 BNG Version 2.0 50

    SEND PAGE

    Ensures that the last page of data is written totemporary storage even if it is not completeSpecifies when the user can retrieve the message

    by issuing retrieval commandsIt is mandatory after the last SEND TEXTcommand

    Syntax:SEND PAGE OPERPURGE

  • 7/28/2019 Advanced c Ics

    51/119

    March 18,2000 BNG Version 2.0 51

    SEND PAGE

    SEND PAGE [OPERPURGE][RETAIN | RELEASE]

    OPERPURGE Operator must issue a messagetermination to delete the logicalmessage

    RETAIN Control returns to the application

    program when the user finishesviewing the message

    RELEASE Control never returns to the program

  • 7/28/2019 Advanced c Ics

    52/119

    Logical Message Building

    SEND MAP

  • 7/28/2019 Advanced c Ics

    53/119

    March 18,2000 BNG Version 2.0 53

    Map Definition

    Formatname DFHMDI SIZE=(lines,columns),

    [LINE=line number | NEXT,][COLUMN=col.no,][JUSTIFY=FIRST | LAST,][HEADER=YES | TRAILER=YES]

    ExampleMAP4 DFHMDI SIZE=(2,80),

    LINE=NEXT,COLUMN=1,TRAILER=YES

  • 7/28/2019 Advanced c Ics

    54/119

    March 18,2000 BNG Version 2.0 54

    Map DefinitionLogical message considerationLine positioning is done mostly by making use of LINE=NEXTMap positioning is done mostly by specifyingJUSTIFY=FIRST (normally for header map) or JUSTIFY=RIGHT (normally for trailer map)JUSTIFY parameter controls the positioning of

    header & trailer mapHEADER & TRAILER parameters are used tocontrol overflow processing

  • 7/28/2019 Advanced c Ics

    55/119

    March 18,2000 BNG Version 2.0 55

    SEND MAP Command

    FormatSEND MAP(map name)

    [MAPSET(map set name)]

    [FROM(data area)] [MAPONLY | DATAONLY][ACCUM] [PAGING] [ERASE]

    ExampleSEND MAP(MAP4)

    MAPSET(MAPSET4) FROM(LASTMAP4)ACCUM PAGING ERASE

  • 7/28/2019 Advanced c Ics

    56/119

  • 7/28/2019 Advanced c Ics

    57/119

  • 7/28/2019 Advanced c Ics

    58/119

    Printer Output

  • 7/28/2019 Advanced c Ics

    59/119

    March 18,2000 BNG Version 2.0 59

    Printer Concepts

    The printer has a printer buffer similar to page buffer. It is the intermediate storgae

    between the host system & the printer s print mechanismWhen the BMS page buffer is full, themessage is sent to the printer buffer The page overflow features can not be used.It has to be done by keeping track of a linecounter

  • 7/28/2019 Advanced c Ics

    60/119

    March 18,2000 BNG Version 2.0 60

    Printer Control Chacters

    Form FeedUsed to skip to the top of the next page. Its hexa value is 0C . It occupies

    the first position of the first line in the next page. It is printed as space.New LineUsed to direct the printing to continue from the first position of the next

    line.Carriage ReturnSame as New line, but paper does not advance to new page. Printing starts

    from the 1 st column of the same pageEnd of MessageMarks the end of a page. It is taken care of by BMS

  • 7/28/2019 Advanced c Ics

    61/119

    March 18,2000 BNG Version 2.0 61

    SENDTEXT & SENDMAPoptionsPRINT optionTo activate the print mechanismNLEOM option

    Tells BMS to use new line & end of message controlcharacters while sending the data to the printer

    FORMFEED optionTells BMS that a form feed control character to be

    inserted, in the first position of the Printer buffer

  • 7/28/2019 Advanced c Ics

    62/119

    March 18,2000 BNG Version 2.0 62

    Printing Considerations

    Overflow processing is to be done by the program.Hence no need to specify HEADER & TRAILER optionsFORMFEED option is to be used to skip pagesPAGING option is not to be used if the message isto be directly printed

    SEND PAGE is to be issued to force the last pageof the message to be sent

  • 7/28/2019 Advanced c Ics

    63/119

    Message Routing

  • 7/28/2019 Advanced c Ics

    64/119

    March 18,2000 BNG Version 2.0 64

    ROUTE Command

    SyntaxROUTE LIST(data-name)

    INTERVAL(hhmmss) | TIME(hhmmss)

    [NLEOM]ExampleROUTE LIST(ROUTE-LIST)

    TIME(173000)

  • 7/28/2019 Advanced c Ics

    65/119

    March 18,2000 BNG Version 2.0 65

    ROUTE Command

    01 ROUTE-LIST05 LIST-ENTRY-1.

    10 LE1-TERM-ID PIC X(4) VALUE L1P1 .

    10 FILLER PIC X(12) VALUE SPACES.05 LIST-ENTRY-2.

    10 LE2-TERMI-ID PIC X(4) VALUE L2P3 . 10 FILLER PIC X(12) VALUE SPACES.

    05 FILLER PIC S9(4) VALUE -1 COMP.

  • 7/28/2019 Advanced c Ics

    66/119

    RECEIVE Command

  • 7/28/2019 Advanced c Ics

    67/119

    March 18,2000 BNG Version 2.0 67

    RECEIVE Command

    SyntaxRECEIVE INTO(data-area)

    LENGTH(data-area)RESP(data-area)

    Example

    RECEIVE INTO(CMD-LINE)LENGTH(CMD-LENGTH)RESP(RESPONSE-CODE)

  • 7/28/2019 Advanced c Ics

    68/119

    SEND Command

  • 7/28/2019 Advanced c Ics

    69/119

    March 18,2000 BNG Version 2.0 69

    SEND Command

    Syntax SEND FROM(data-name)

    [LENGTH(data-value)][CTLCHAR(data-name)][ERASE]

    ExampleSEND FROM(CUST-DATA)

    ERASE

  • 7/28/2019 Advanced c Ics

    70/119

    Day 2 - Session 2

    Temporary Storage&

    Transient Data

  • 7/28/2019 Advanced c Ics

    71/119

    Temporary Storage

  • 7/28/2019 Advanced c Ics

    72/119

    March 18,2000 BNG Version 2.0 72

    Temporary Storage

    Temporary storage is divided into Temporary Storagequeues (TS Queues)Each TS queue can contain one or more records

    Each TS Queue is identified by a queue name (of 1 to 8characters)Each record is assigned an item number Access could be

    Sequential (in item number sequence) Random (by specifying the item no)

    Records can be re-written

  • 7/28/2019 Advanced c Ics

    73/119

    March 18,2000 BNG Version 2.0 73

    WRITEQ TS Command

    SyntaxWRITEQ TS QUEUE(name)

    FROM(data-area)

    LENGTH(data value)[ITEM(data-area) | REWRITE][MAIN | AUXILIARY]

    ExampleWRITEQ TS QUEUE(TSQ-NAME)

    FROM(TSQ-RECORD)LENGTH(TSQ-LENGTH)

  • 7/28/2019 Advanced c Ics

    74/119

    March 18,2000 BNG Version 2.0 74

    READQ TS Command

    SyntaxREADQ TS QUEUE(name)

    INTO(data-area)LENGTH(data-area)[ITEM(data-value) | NEXT]

    ExampleREADQ TS QUEUE(TSQ-NAME)

    INTO(TSQ-REC)

    LENGTH(TSQ-LENGTH)ITEM(TSQ-ITEM-NO)RESP(RESP-CODE)

  • 7/28/2019 Advanced c Ics

    75/119

    March 18,2000 BNG Version 2.0 75

    DELETEQ TS Command

    SyntaxDELETEQTS QUEUE(NAME)

    ExampleDELETEQTS QUEUE(TSQ-NAME)

    If a TS queue is not deleted after processing, it exists indefinitely No provision to delete a single record

  • 7/28/2019 Advanced c Ics

    76/119

    Transient Data Queue

    T i D Q

  • 7/28/2019 Advanced c Ics

    77/119

    March 18,2000 BNG Version 2.0 77

    Transient Data Queue(TD queue)

    TD queue is also called destinationsTD queue should be defined in the DestinationControl Table (DCT). DCT contains the queuename (or destination id) & the queue scharacteristicsRecord gets deleted when it is read from the queue

    Two types of transient data queues Extra partition data queue Intra partirion data queue

    E t titi t i t d t

  • 7/28/2019 Advanced c Ics

    78/119

    March 18,2000 BNG Version 2.0 78

    Extra partition transient dataqueue

    Can be accessed by batch programs alsoapart from CICS

    Mainly used for capturing data online & process later by batch programsIt is a sequential file (QSAM)

    It need not have to be in disk only; It can beon tape also.

    I t titi t i t d t

  • 7/28/2019 Advanced c Ics

    79/119

    March 18,2000 BNG Version 2.0 79

    Intra partition transient dataqueue

    Most commonly used than extra partition dataqueueIt is stored in a VSAM file named DFHNTRA.(all queues)Provides a facility for Auomatic TransactionInitiation (ATI).

    A triger level is defined in DCT & the correspondingtransaction When the number of records reach the triger level, the

    transaction is initiated automatically

  • 7/28/2019 Advanced c Ics

    80/119

    March 18,2000 BNG Version 2.0 80

    WRITEQ TD Command

    SyntaxWRITEQ TD QUEUE(name)

    FROM(data-area)[LENGTH(data-value)]

    Example

    WRITEQ TD QUEUE(L86P ) FROM (PRINT-AREA)

  • 7/28/2019 Advanced c Ics

    81/119

    March 18,2000 BNG Version 2.0 81

    READQ TD Command

    SyntaxREADQ TD QUEUE(name)

    INTO(data-area)[LENGTH(data-area)]

    Example

    READQ TD QUEUE(L86P ) INTO(PRINT-AREA)LENGTH(PRT-LEN)RESP(RESP-CODE)

  • 7/28/2019 Advanced c Ics

    82/119

    March 18,2000 BNG Version 2.0 82

    DELETEQ TD Command

    SyntaxDELETEQ RD QUEUE(name)Example

    DELETEQ TD QUEUE(L86P ) Though the records are delelted on completion of the readopertaion, the space occupied by the queue is not release.Hence it can be deleted to release the space.

    DCT entry is not removedDELETEQ command is not valid for extra partitiondestination

  • 7/28/2019 Advanced c Ics

    83/119

    Day 3 - Session 1

    Interval Controland

    Task Control

  • 7/28/2019 Advanced c Ics

    84/119

    Interval Control

  • 7/28/2019 Advanced c Ics

    85/119

    March 18,2000 BNG Version 2.0 85

    ASKTIME Command

    SyntaxASKTIME [ABSTIME(data-area)]

    ABSTIME 15 byte packed decimal field where CICS places an abslute time value representing thenumber of milliseconds that have elapsed sinceJan 1 1900

    ExampleASKTIME ABSTIME(ABSOLUTE-TIME)

  • 7/28/2019 Advanced c Ics

    86/119

    March 18,2000 BNG Version 2.0 86

    FORMATTIME commandFORMATTIME ABSTIME(data-area)

    [DATE(data-area) [DATEFORM(data-area)]][MMDDYY(data-area)][DDMMYY(data-area)][YYMMDD(date-area)][YYDDMM(data-area)][YYDD(data-area)][DATESEP[(data-value)]][DAYCOUNT(data-area)][DAYOFWEEK(data-area)]

    [DAYOFMONTH(data-area)][MONTHOFYEAR(data-area)][YEAR(data-area)][TIME(data-area)[TIMESEP[(data-value)]]

  • 7/28/2019 Advanced c Ics

    87/119

    March 18,2000 BNG Version 2.0 87

    FORMATTIME command

    ABSTIME Data area containing the absolute timeDATE Date formated in installation specific formDATEFORM Installation standard is returned

    MMDDYY Date in MMDDYY FormatDDMMYY Date in DDMMYY FormatYYMMDD Date in YYMMDD formatYYDDMM Date in YYDDMM formatYYDDD Date in YYDDD formatDATESEP Separator between day, month & year

  • 7/28/2019 Advanced c Ics

    88/119

    March 18,2000 BNG Version 2.0 88

    FORMATTIME command

    DAYCOUNT No of days from Jan 1 1900DAYOFWEEK The number that corresponds to the day

    of the week

    DAYOFMONTH Day in the current monthMONTHOFYEAR Number that corresponds to the month

    in current year YEAR full year (4 digits)

    TIME Time in hhmmsss formatTIMESEP Separator used for time

  • 7/28/2019 Advanced c Ics

    89/119

    March 18,2000 BNG Version 2.0 89

    START Command

    START TRANSID(name)INTERVAL(hhmmss) TIME(hhmmss)AFTER [HOURS(hh)] [MINUTES(mins)]

    [SECONDS(secs)]AT [HOURS(hh)] [MINUTES(mins)]

    [SECONDS(secs)][TERMID(name)][FROM(data-area) [LENGTH(data-value)]][RTERMID(name)] [RTRANSID(name)][QUEUE(name)] [REQID(name)]

  • 7/28/2019 Advanced c Ics

    90/119

    March 18,2000 BNG Version 2.0 90

    RETRIEVE COMMAND

  • 7/28/2019 Advanced c Ics

    91/119

    March 18,2000 BNG Version 2.0 91

    RETRIEVE COMMAND

    SyntaxRETRIEVE INTO(data area)

    [LENGTH(data-area)][RTRANSID(name)][RTERMID{name)]

    [QUEUE(name)]

  • 7/28/2019 Advanced c Ics

    92/119

  • 7/28/2019 Advanced c Ics

    93/119

  • 7/28/2019 Advanced c Ics

    94/119

    March 18,2000 BNG Version 2.0 94

    SUSPEND Command

    SUSPEND

  • 7/28/2019 Advanced c Ics

    95/119

    March 18,2000 BNG Version 2.0 95

    ENQ Command

    ENQ RESOURCE(data area)LENGTH(data value)

    RESOURCE 1 to 255 byte long character string that identifies the

    resource to be ENQedLENGTH Length of the RESOURCE

    field. Half word binary

  • 7/28/2019 Advanced c Ics

    96/119

    March 18,2000 BNG Version 2.0 96

    DEQ Command

    DEQ RESOURCE(data area)LENGTH(data value)

    RESOURCE 1 to 255 byte long character string that identifies the

    resource to be DEQedLENGTH Length of the RESOURCE

    field. Half word binary

  • 7/28/2019 Advanced c Ics

    97/119

    Day 4 - Session 1

    Error Processing

  • 7/28/2019 Advanced c Ics

    98/119

    ABEND Processing

  • 7/28/2019 Advanced c Ics

    99/119

    March 18,2000 BNG Version 2.0 99

    HANDLE ABEND Command

    SyntaxHANDLE ABEND PROGRAM(name) |

    LABEL(proc-name) |CANCELRESET

    ExampleHANDLE ABEND

    PROGRAM(ABEND1 )

  • 7/28/2019 Advanced c Ics

    100/119

    March 18,2000 BNG Version 2.0 100

    ABEND Command

    SyntaxABEND [ABCODE(data-value)]

    [CANCEL]ExampleABEND ABCODE(X100 )

    CANCEL

  • 7/28/2019 Advanced c Ics

    101/119

    Recovery Processing

  • 7/28/2019 Advanced c Ics

    102/119

    March 18,2000 BNG Version 2.0 102

    Recovery Processing

    LoggingDynamic Transaction Backout

    Emergency RestartLogical Unit of Work SYNCPOINT Command

  • 7/28/2019 Advanced c Ics

    103/119

    Day 4 - Session 2

    Error Processing (contd)

  • 7/28/2019 Advanced c Ics

    104/119

    WRITE JOURNALNUM

  • 7/28/2019 Advanced c Ics

    105/119

    March 18,2000 BNG Version 2.0 105

    WRITE JOURNALNUMCommandWRITE JOURNALUM(data-value)

    JTYPEID(data-value)FROM(data-area)[LENGTH(data-value)][WAIT][REQID(data-area)][STARTIO][PREFIX(data-area)

    [PFXLENG(data-value]]

    WAIT JOURNALNUM

  • 7/28/2019 Advanced c Ics

    106/119

    March 18,2000 BNG Version 2.0 106

    WAIT JOURNALNUMCommandWAIT JOURNALNUM(data-value)

    [REQID(data-area)]

    [STARTIO]

  • 7/28/2019 Advanced c Ics

    107/119

    Day 5 - Session 1

    Inter communication

  • 7/28/2019 Advanced c Ics

    108/119

    March 18,2000 BNG Version 2.0 108

    Inter Communication

    Transaction RoutingFunction Shipping

    Distributed Program Link Asynchronous ProcessingDistributed Transaction Processing

    h

  • 7/28/2019 Advanced c Ics

    109/119

    March 18,2000 BNG Version 2.0 109

    Communication Mechanisms

    Multi Region Operation (MRO) InterRegion Communication Access Method

    Unique to CICS Depends on Supervisor Calls

    Cross-Memory Services Data exchanged directly between address spaces

    No overhead of supervisor callInterystem Communication (ISC) Connected through VTAM

  • 7/28/2019 Advanced c Ics

    110/119

    March 18,2000 BNG Version 2.0 110

    Transaction Routing

    A terminal owned by one CICS system run a transaction insome other systemPCT Entry in TOR

    DFHPCT TYPE=REMOTE,TRANSID=INQ1,SYSIDENT=CTSC

    PCT Entry in AOR

    DFHPCT TYPE=ENTRYTRANSID=INQ1PROGRAM=CUSTINQ

    T i R i

  • 7/28/2019 Advanced c Ics

    111/119

    March 18,2000 BNG Version 2.0 111

    Transaction Routing

    CEDF expects the transaction to be owned by the same systemTo avoid this The terminal should be defined as a remote

    terminal in AOR CRTE transaction should be initiated as

    CRTE SYSID=CTSC To end the about routing transaction (CRTE)

    CANCEL command should be entered

    F i Shi i

  • 7/28/2019 Advanced c Ics

    112/119

    March 18,2000 BNG Version 2.0 112

    Function Shipping

    A program in one CICS system accessresources owned by another CICS system.Supported Resources VSAM files Transient Data Destinations Temporary Storage queues IMS data basses

    F i Shi i

  • 7/28/2019 Advanced c Ics

    113/119

    March 18,2000 BNG Version 2.0 113

    Function Shipping

    FCT Entry in AOR DFHFCT TYPE=REMOTE

    DATABASE=CUSTMASSYSIDNT=CTSC

    LRECL=80KEYLEN=4

    FCT Entry in FOR

    DFHFCT TYPE=DATASETDATASSET=CUSTMAS

    ACCMETH=(VSAM,KSDS)SERVREQ=(BROWSE,DELETE,UPDATE)RECFORM=(FIXED,BLOCKED)

    F i Shi i

  • 7/28/2019 Advanced c Ics

    114/119

    March 18,2000 BNG Version 2.0 114

    Function Shipping

    SYSID in CICS commandsREAD DATASET(CUSTMAS )

    INTO(CUST-REC)RIDFLD(CUST-NO)SYSID(CTSC )

    LENGTH(CMAS-LEN)KEYLENGTH(4)RESP(RESP-CODE)

    Di ib d P Li k

  • 7/28/2019 Advanced c Ics

    115/119

    March 18,2000 BNG Version 2.0 115

    Distributed Program Link

    A program running in one CICS system canissue a LINK command that invokes a

    program in another CICS systemEasy way to implement client-server applicationsCan be used to avoid long sequence of function shipping requests

    Di ib d P Li k

  • 7/28/2019 Advanced c Ics

    116/119

    March 18,2000 BNG Version 2.0 116

    Distributed Program Link

    Format of LINK commandLINK PROGRAM(name)

    [COMMAREA(data-vaue)[LENGTH(data-value)]]

    [SYSID(system name)]

    [SYNCONRETURN]

  • 7/28/2019 Advanced c Ics

    117/119

    Distributed Transaction

  • 7/28/2019 Advanced c Ics

    118/119

    March 18,2000 BNG Version 2.0 118

    Processing2 or more programs running on differentsystems communicate with each other. Thisis called conversationThe program that initiates the transaction iscalled front endThe other program is called back endThis is CICS implementation of APPC

  • 7/28/2019 Advanced c Ics

    119/119

    THANK YOU