CICS Overview by Pai

download CICS Overview by Pai

If you can't read please download the document

Transcript of CICS Overview by Pai

  • 7/27/2019 CICS Overview by Pai

    1/153

    CICS

    Customer Information Control

    System

  • 7/27/2019 CICS Overview by Pai

    2/153

    Version 2.1

  • 7/27/2019 CICS Overview by Pai

    3/153

    Day-wise Schedule

    Day 1 Introduction To CICS

    System Components

    Data Communication Operation in CICS

    Characteristics of CICS

    Command Level Programming

    CICS COPY BOOKS

    Day 2 BMS Programming Considerations

    Exceptional Conditions

    Terminal Control Operations

  • 7/27/2019 CICS Overview by Pai

    4/153

    Day-wise Schedule

    Day 3 Interval Control Operations

    Program Control Operations

    File Control Operations

    Day 4 Advanced File Control Operations

    Temporary Storage Control

    CICS transactions

    Day 5 CICS transactions continued

    Assignment Completion

  • 7/27/2019 CICS Overview by Pai

    5/153

    Introduction To CICSFeature Batch On-Line

    Data Collection Off-Line On-LineInput Sequential In Batch Random

    Job Schedule At specific intervals Instantaneous

    Resources Not Sharable Sharable

    Response Time Not Critical Critical

    Output In Printed Format On the Terminal

    Security Simple Complex

    Recovery Simple Complex

    Information Not always current Always current

    Updation In Batch Immediate

  • 7/27/2019 CICS Overview by Pai

    6/153

    Introduction To CICS

    Interactive Programs Data Entry Program

    Inquiry Program

    File Maintenance Program

    Menu Program

    Interactive System Considerations

    Shared Files

    Response Time Security

    Recovery

  • 7/27/2019 CICS Overview by Pai

    7/153

    Introduction To CICS

    CICS acts as an interface between the Operating

    system and application programs

    Application

    Program

    CICS

    Op. System

  • 7/27/2019 CICS Overview by Pai

    8/153

    Introduction To CICS

    CICS System Concept

    Data-Communication Functions

    Data Handling Functions

    Application Program Services

    System Services

    Monitoring Functions

  • 7/27/2019 CICS Overview by Pai

    9/153

    Operating System (MVS/XA)

    Database Data Access Telecommunication

    Access Method Method Access Method

    (DL/I, DB2) (VSAM, (VTAM, TCAM,Data Storage BDAM) BTAM)

    CICS/MVS Terminals

    System Services

    Data-handling Monitoring Data-Comm.

    Functions Functions Functions

    Application

    Program Services

    CICS Application programs (COBOL, PL/I, Assembler)

    Other

    Systems

  • 7/27/2019 CICS Overview by Pai

    10/153

    Introduction To CICS

    Features Of CICS

    DB/DC

    Multiprogramming Multitasking

    Scheduling

  • 7/27/2019 CICS Overview by Pai

    11/153

    System Components

    Management Modules

    Tables

    Control Blocks

  • 7/27/2019 CICS Overview by Pai

    12/153

    System Components

    Management Modules Are the CICS/MVS program that interface between the

    operating system and the application program.

    Each management module performs a particular function.

    Tables

    Defines the CICS/MVS systems environment.

    The tables are functionally associated with the managementmodules.

  • 7/27/2019 CICS Overview by Pai

    13/153

    System Components

    Control Blocks

    Contain system type information

  • 7/27/2019 CICS Overview by Pai

    14/153

    Management Modules

    TerminalControlBasic

    MappingSupport

    ProgramControl

    TaskControl

    IntervalControl

    TransientData

    ControlTemporaryStorageControl

    JournalControl

    StorageControl

    DumpControl

    TraceControl

    FileControl

    Nucleus

  • 7/27/2019 CICS Overview by Pai

    15/153

    Management Modules

    Terminal Control program Management

    Module (TCP)

    TCP is CICS interface to telecommunication access methods

    (VTAM/TCAM)

    Transfers data between the application program and the

    terminal

    Handles hardware communication requirement

    Requests initiation of the new tasks

    BMS is an interface between application program and

    Terminal Control program management module.

  • 7/27/2019 CICS Overview by Pai

    16/153

    Management Modules

    Task control Program Management Module(KCP)

    Creates a task for the transaction requested

    Checks the validity of the transaction-id and the authority of

    the operator.

    Allocates processor time among the tasks

    Keeps control of the status of all CICS tasks being

    processed concurrently

    Transaction request can be made either

    By entering transaction Id at the terminal

    By another CICS transaction

  • 7/27/2019 CICS Overview by Pai

    17/153

    Management Modules

    Program Control Program ManagementModule (PCP)

    Manages the flow of control within task

    Responsible for locating application program and if necessaryload them into storage for execution.

    Also responsible for transferring control to the program and

    returning control back to CICS

    Uses PCT and PPT table to perform its actions.

    PCP knows if there are any tasks currently using the same

    program, from the value of USE COUNTER in PPT.

  • 7/27/2019 CICS Overview by Pai

    18/153

    Management Modules

    File Control program Management Module

    (FCP)

    Manages file processing activities of each application

    program FCP makes use of a table called File Control Table (FCT)

    FCT includes an entry for each file that is to be used during

    the operation of CICS.

    Thereby freeing application programmer from defining thephysical organization and other file attributes.

    Provides exclusive control during the updation of a record by

    a task

  • 7/27/2019 CICS Overview by Pai

    19/153

    Management Modules

    Storage Control Program Management

    Module (SCP)

    Maintains full control over the virtual storage

    Acquires, controls and releases dynamic storage during

    execution of a task

    Allocation of main storage is automatic Controls requests for the main storage

  • 7/27/2019 CICS Overview by Pai

    20/153

    Tables

    The tables define the resources that CICS controls

    Each table is associated with corresponding

    management modules

    The tables are brought into storage when CICS is

    initialized.

  • 7/27/2019 CICS Overview by Pai

    21/153

    Tables

    Some of the important tables in CICS/MVSare:

    FCT: File Control Table PCT: Program Control Table

    PPT: Processing Program Table

    TCT: Terminal Control Table

    DCT: Destination Control Table

    SIT: System Initialization Table

  • 7/27/2019 CICS Overview by Pai

    22/153

    Control Blocks

    Dynamically created by CICS when needed

    Accessed by CICS modules during execution of tasks

    Released when no longer needed

    Example: Execute Interface Block (EIB), Task ControlArea

  • 7/27/2019 CICS Overview by Pai

    23/153

    Data Communication Operation In

    CICS Terminal Control Program Management Module

    (TCP)

    Basic Mapping Support (BMS)

    Batch Data Interchange (BDI)

    Data Comm nication Operation In

  • 7/27/2019 CICS Overview by Pai

    24/153

    Data Communication Operation In

    CICS Terminal Control Program Management Module (TCP)

    Is the basic method for communicating with devices

    BMS and BDI use terminal control facilities when invoked by an application

    program

    Basic Mapping Support (BMS)

    Interface between TCP and application program

    Provides commands and options that can be used to format data in a standard

    manner It converts data streams provided by the application program to conform to the

    requirements of devices.

    Facilitates development of device & format independent programs

  • 7/27/2019 CICS Overview by Pai

    25/153

    Basic Mapping Support

    BMS removes the responsibility of formatting the

    screen from the application program.

    BMS places the data with necessary controlcharacters in a TIOA.

    It allows repositioning of fields without modifying

    application program BMS makes the application program Format

    Independent and Device Independent

  • 7/27/2019 CICS Overview by Pai

    26/153

    Basic Mapping Support

    Format Independence

    Application programs are written without concern for

    physical position of data fields within a display

    In an application program symbolic labels are used to

    refer the fields

    BMS relates the label to the actual position in the

    display

  • 7/27/2019 CICS Overview by Pai

    27/153

    Basic Mapping Support

    Device Independence

    Application programs can be developed without any

    concern for physical characteristics of the terminals

    BMS prepares the message based on the terminal type

    being used

  • 7/27/2019 CICS Overview by Pai

    28/153

    BMS Maps

    A Screen defined through BMS is called a

    map.

    A mapset contains a single or multiple maps

    defined for one terminal type.

    Two ways of defining maps

    CICS supplied macros

    Screen Definition Facility (SDF)

    Map represents BMS coding for a screen, and

    Mapset represents a load module

  • 7/27/2019 CICS Overview by Pai

    29/153

    Map Generation

    Design Screen

    Code Map

    Assemble

    Symbolic MapPhysical Map

    -Load Library

    -Contains Literals

    -Source Library

    -Contains Data-fields

  • 7/27/2019 CICS Overview by Pai

    30/153

    Physical Map

    Describes display format for a given terminal type It includes

    The format of input & output data

    The fixed data such as page headings

    Symbolic names of variable data-fields

    The device type to which map relates.

    Physical Map Generation

    BMS macro coding Assembly Link-edit

    Load Module LOADLIB To be used by CICS

  • 7/27/2019 CICS Overview by Pai

    31/153

    Symbolic Map

    Defines all variable data fields

    Ensures device and format independence

    Used by application program which issues a COBOL COPY statementin order to include a symbolic map in the program.

    Symbolic Map Generation:

    BMS macro coding Assembly Symbolic map definition

    COPYLIB Copied into CICS application program

  • 7/27/2019 CICS Overview by Pai

    32/153

    Map and Mapset

    Map A representation of one screen format is called a map

    One or group of maps makes up a mapset

    Mapset

    A group of maps, which are linkedited together is called mapset

    Each mapset must be registered in PPT

  • 7/27/2019 CICS Overview by Pai

    33/153

    Map and Mapset

    Mapset The mapset name consists of two parts as follows:

    Generic Name: 1 to 7 characters

    Suffix : 1 character

    Application program uses only the generic name. The suffix isrequired at the mapset definition time in order to distinguish the

    device types if the same mapset is used for different types of

    terminals.

    CICS automatically inserts the suffix depending on the terminal inuse, thereby ensuring the device independence to the application

    program

  • 7/27/2019 CICS Overview by Pai

    34/153

    Components Of A Screen

    CICS identifies screen into three components:

    Mapset

    Maps

    Physical Map

    Symbolic Map

    Fields

    Unnamed (Literals)

    Named (Data fields)

    Stopper

  • 7/27/2019 CICS Overview by Pai

    35/153

    Attribute Byte Format

    The attribute character is always thefirst character of a field.

    It occupies a character position on thescreen but appears as a blank

    0 1 2 3 4 5 6 7

    ProtectionIntensity MDT

    Attribute Byte Bit Position :`

  • 7/27/2019 CICS Overview by Pai

    36/153

    Positions Functions Bit Settings

    0-1 Information about bits 2 thru 7

    2-3 protection 00 = Unprotected alphanumeric

    01 = Unprotected numeric

    10 = Protected

    11 = skip

    4-5 Intensity 00 = Normal

    01 = Normal

    10 = Bright

    11 = No-display6 Must be 0

    7 MDT 0 = Field has not been modified

    1 = Field has been modified

    Attribute Byte Format

  • 7/27/2019 CICS Overview by Pai

    37/153

    Attribute Byte Format

    Field Protection

    Unprotected

    Protected

    Auto-skip

    Field Intensity

    Normal

    Bright No-display

    Shift

  • 7/27/2019 CICS Overview by Pai

    38/153

    Modified Data Tag (MDT)

    MDT is the one bit of the attribute character

    If it is zero, it indicates that this field has not been modified by the

    terminal operator

    If it is one, it indicates that this field has been modified by the operator.

    Only when it is ON, will data of the field be sent by the terminal to

    the application program.

    Effective use of MDT reduces the data traffic in the communication

    line, thereby improving performance significantly

  • 7/27/2019 CICS Overview by Pai

    39/153

    Modified Data Tag (MDT)

    Following are the three ways to set MDT ON:

    By data-entry

    By setting attribute byte in the physical map

    By moving MDT attribute in the application program

  • 7/27/2019 CICS Overview by Pai

    40/153

    Map Definition Macros

    Available Macros

    DFHMSD

    DFHMDI

    DFHMDF

    General Format

    Col1 Col 10 Col16 Col17 Col72

    Symbolic Opcode Parameter(s) Contd

    Name Additional parameters Char.

  • 7/27/2019 CICS Overview by Pai

    41/153

    Map Definition Macros

    Example

    1 10 16 17 72

    MENU DFHMSD TYPE=&SYSPARM X

    MODE=INOUT,

    LANG=COBOL..

  • 7/27/2019 CICS Overview by Pai

    42/153

    Map Definition Macros

    Order of Map-Code

    PRINT NOGEN ----> Assembler Command

    Label DFHMSD ----> Mapset Definition

    Label DFHMDI ----> Map Definition

    DFHMDF ----> Field Definition

    Label DFHMDF ----> Field Definition

    Map1 |

    |

    |

    DFHMDF

    Map2 DFHMDI

    DFHMDF

    ||

    DFHMDF

    DFHMSD Type = Final --> Mapset Definition

    END -------------------> Assembler command

  • 7/27/2019 CICS Overview by Pai

    43/153

    DFHMSD Macro

    Function

    The DFHMSD macro is used to define a mapset and its characteristics or to end a mapset definition.

    Only one mapset definition is allowed within one assembly run.

    Format

    Label DFHMSD TYPE=DESECT|MAP|&SYSPARM|FINAL

    [,MODE=IN|OUT|INOUT]

    [,LANG=ASM|COBOL|PLI][,STORAGE=AUTO|BASE=name]

    [,CTRL=(FREEKB, ALARM, FRSET)]

    [,HIGHLIGHT=OFF|BLINK|REVERSE|UNDERLINE]

    [,VALIDN=MUSTFILL|MUSTENTER]

    [,TERM=TYPE|SUFFIX=n]

    [,TIOAPFX=YES|NO]

    [,DATA=FIELD|BLOCK]

  • 7/27/2019 CICS Overview by Pai

    44/153

    DFHMSD Macro

    End of Mapset Definition

    DFHMSD TYPE=FINAL

  • 7/27/2019 CICS Overview by Pai

    45/153

    DFHMDI Macro Function

    The DFHMDI macro is used to define a map and its characteristics in a mapset.

    Label DFHMDI [SIZE=(LINE , COLUMN)]

    [, LINE=number | NEXT | SAME]

    [, COLUMN=ASM | COBOL | PLI ]

    [, STORAGE=AUTO | BASE=name]

    [, CTRL=([FREEKB] [, ALARM] [, FRSET])]

    [, HIGHLIGHT=OFF | BLINK | REVERSE | UNDERLINE]

    [, VALIDN=MUSTFILL | MUSTENTER]

    [, TERM=TYPE | , SUFFIX=n]

    [, TIOAPFX=YES | NO]

    [, DATA=FIELD | BLOCK]

  • 7/27/2019 CICS Overview by Pai

    46/153

    DFHMDF Macro

    Function

    The DFHMDF macro is used to define a field in map and its characteristics. The DFHMDF macro can be issued as many times as you wish within

    one DFHMDI macro.

    Label DFHMDF POS=(line | column)

    [, LENGTH=number]

    [, JUSTIFY=([LEFT | RIGHT])

    [, ATTRB=(ASKIP | PROT | UPROT [, NUM]][, BRT | NORM | DRK]

    [, IC][, FSET]) ]

    [, HILIGHT=OFF | BLINK | REVERSE | UNDERLINE]

    [, VALIDN=([MUSTFILL | MUSTENTER])

    [, OCCURS=number]

    *, INITIAL=value+

    *, PICIN=value+*, PICOUT=value+

    f b l

  • 7/27/2019 CICS Overview by Pai

    47/153

    Format Of Symbolic Map

    A COBOL program must contain a COBOL COPY statement for eachsymbolic map definition in working storage section.

    It starts with the 01 level definition of FILLER PC X(12), which is the

    TIOA prefix created by TIOPFX=YES of the DFHMSD macro.

    Each symbolic map field consists of sub-fields. Each sub-field has a

    different suffix.

  • 7/27/2019 CICS Overview by Pai

    48/153

    Format Of Symbolic Map

    nameL: Indicates length of the data entered in the field.

    nameF: It sets to ON when field gets modified

    nameA: The attribute byte for input/output field

    nameI: The input data field.

    nameO: The output data field.

    Example

    http://localhost/var/www/apps/conversion/tmp/scratch_3/MAPS.CPYhttp://localhost/var/www/apps/conversion/tmp/scratch_3/MAPS.CPY
  • 7/27/2019 CICS Overview by Pai

    49/153

    Characteristics Of CICS

    Multithreading

    Quasi-Reentrancy

    Pseudo-Conversational Programming

    Transaction Driven

    Quasi-Reentrant Program

  • 7/27/2019 CICS Overview by Pai

    50/153

    Q g

    VirtualStorage

    Program A

    Object Code

    Program A

    Working

    Storage

    (User1)

    Program A

    Working

    Storage

    (User2)

    User 1

    Running

    Program A

    User 2

    Running

    Program A

  • 7/27/2019 CICS Overview by Pai

    51/153

    Command Level Programming

    CICS Program Development

    Macro Level Programming

    Command Level Programming

    CICS C d F

  • 7/27/2019 CICS Overview by Pai

    52/153

    CICS Command Format

    CICS commands are embedded into the Host language, e.g. in the Procedure

    Division of COBOL program.

    CICS commands in a COBOL program are delimited by

    EXEC CICSEND-EXEC.

    EXEC CICS is coded in margin B of COBOL program.

    The command level translator replaces these statements by COBOL MOVE

    statements followed by COBOL CALL statement.

    The translated module is compiled & linked to produce an executable load

    module.

    The translator also includes copy books into program.

  • 7/27/2019 CICS Overview by Pai

    53/153

    CICS Command Format

    EXEC CICS Function[option(argument)

    option(argument)

    --------

    --------

    ]

    END-EXEC.

    C d L T l t

  • 7/27/2019 CICS Overview by Pai

    54/153

    Command Language Translator

    COBOL Source

    Program

    Translator

    Translated Source

    Program

    COBOL Compiler

    Object Module Link Edit Load Module

  • 7/27/2019 CICS Overview by Pai

    55/153

    COBOL/CICS Program Structure

    IDENTIFICATION DIVISION.PROGRAM-ID.

    ENVIRONMENT DIVISION.

    DATA DIVISION.

    WORKING-STORAGE SECTION.

    Variable declaration

    File layoutSymbolic map

    Copy books

    DFHEIVAR

    LINKAGE SECTION.

    DFHCOMMAREA

    EIBBLOCK

    BLL CELLS

    PROCEDURE DIVISION.

    COBOL/CICS P St t

  • 7/27/2019 CICS Overview by Pai

    56/153

    COBOL/CICS Program Structure

    The following COBOL statements are prohibited ina CICS application program:

    ACCEPT, CURRENT-DATE, DATE DAY, DISPLAY, EXHIBIT,

    STOP RUN, TRACE

    Any I/O statements (OPEN, CLOSE, READ, WRITE,

    REWRITE, DELETE, START

    REPORT WRITER Feature

    SORT Feature

    ass ng e a a us ng

  • 7/27/2019 CICS Overview by Pai

    57/153

    ass ng e a a us ngCOMMAREA

    Passing of data from one program to another is achieved by

    COMMAREA defined in working-storage section.

    The receiving program will receive the data in its linkage section,

    under DFHCOMMAREA.

    May be used in functions like RETURN/XCTL/LINK

    The length of COMMAREA must be specified in the LENGTH

    parameter of the LINK or XCTL command in the calling program.

    The LENGTH parameter must be defined as a half-word binary

    fields (S9(04) COMP).

    Called program can find length of data passed using the EIB field

    EIBCALEN

  • 7/27/2019 CICS Overview by Pai

    58/153

  • 7/27/2019 CICS Overview by Pai

    59/153

    CICS COPY BOOKS

    Exec Interface Block (EIB) In Linkage Section

    Keeps record of system related information.

    One EIB is created per task.

    EIB for a task contains information about the task, which is initiated.

    Copy of DFHEIBLK as EIB is automatically included in linkage section of application

    program during translation.

    Program can only access data using EIB field names.

    User should not update data in EIB fields.

    CICS COPY BOOKS

  • 7/27/2019 CICS Overview by Pai

    60/153

    CICS COPY BOOKS

    Some of the EIB fields are EIBAID

    EIBCALEN

    EIBCPOSN

    EIBDATE

    EIBTIME

    EIBDS

    EIBRCODE

    EIBREQID

    EIBRESP

    EIBTRMID

    EIBTRNID

    EIBTASKN

  • 7/27/2019 CICS Overview by Pai

    61/153

    CICS COPY BOOKS Standard Attribute Byte List

    DFHBMSCA

    Constants Meaning

    DFHBMPEM Printer end-of-message

    DFHBMPNL Printer new line

    DFHBMASK Auto-Skip

    DFHBMUNP UnprotectedDFHBMUNN Unprotected & num

    DFHBMPRO Protected

    DFHBMPRY Bright

    DFHBMDAR Dark

    DFHBMFSE MDT setDFHBMPRF Protected and MDT set

    DFHBMASF Auto-Skip & MDT set

    DFHBMASB Auto-Skip & bright

    CICS COPY BOOKS

  • 7/27/2019 CICS Overview by Pai

    62/153

    CICS COPY BOOKS

    Installation Defined

    01 Field-Attribute-Definition.

    05 FAC-UNPROT PIC X VALUE ' '.

    05 FAC-UNPROT-MDT PIC X VALUE 'A'.

    05 FAC-UNPROT-BRT PIC X VALUE 'H'.

    05 FAC-UNPROT-BRT-MDT PIC X VALUE 'I'.

    05 FAC-UNPROT-DARK PIC X VALUE '

  • 7/27/2019 CICS Overview by Pai

    63/153

    CICS COPY BOOKS

    Installation Defined Message File

    01 WS-MESSAGES.05 WS-FATAL-ERROR-MSG PIC X(30) VALUE 'YOU CAN ONLY START

    FROM MENU'.

    05 WS-NORMAL-EXIT-MSG PIC X(30) VALUE 'SESSION ENDS HAVE A

    NICE DAY'.

    05 WS-INVALID-KEY-MSG PIC X(30) VALUE 'INVALID AID KEY

    PRESSED'.

    05 WS-NOT-UNIQUE-MSG PIC X(30) VALUE 'ISSUE NOTE NO EXISTING'.

    05 WS-ITEM-NOT-FND-MSG PIC X(30) VALUE 'ITEM NOT FOUND'.

    05 WS-INVALID-QTY-MSG PIC X(30) VALUE 'INVALID QUANTITY ENTERED'.05 WS-DUP-REC-MSG PIC X(30) VALUE 'DUPLICATE RECORD'.

  • 7/27/2019 CICS Overview by Pai

    64/153

    CICS COPY BOOKS

    Attention Identifier (AID) Attention Identifier indicates which method the terminal operator

    has used to initiate the transfer of information from the terminal

    device to CICS

    AID keys are: PF keys, PA keys, ENTER key, and CLEAR key. The EIBAID field in EIB contains the AID code of the most

    recently used AID.

    CICS provides the standard AID list in a form of copy library

    member(DFHAID), so that a program can use this list byspecifying in the program: COPY DFHAID

    CICS COPY BOOKS

  • 7/27/2019 CICS Overview by Pai

    65/153

    CICS COPY BOOKS

    The DFHAID member contains such AID codes as:

    DFHENTER: ENTER key

    DFHCLEAR: CLEAR key

    DFHPA1-3: PA1 TO PA3 keys

    DFHPF1-24: PF1 TO PF24 keys

    Example

    IF EIBAID = DFHPF3

    PERFORM 2100-END-ROUTINE

    ELSE IF EIBAID = DFHPA1

    PERFORM 2200-CANCEL-ROUTINE

    ELSE IF EIBAID = DFHENTER

    PERFORM 2300-NORMAL-ROUTINE

    ELSE

    PERFORM 2400-WRONG-ROUTINE.

    Application Program

  • 7/27/2019 CICS Overview by Pai

    66/153

    pp gHousekeeping

    Exceptional Conditions

    An abnormal situation during execution of a CICS command is

    called an exceptional condition.

    Exceptional conditions can be handled using any ofthe following:

    HANDLE CONDITION command

    IGNORE CONDITION command

    NOHANDLE option

  • 7/27/2019 CICS Overview by Pai

    67/153

    HANDLE CONDITION Command

    EXEC CICS HANDLE CONDITION

    condition(label)

    *condition(label).+

    [ERROR(label)]

    END-EXEC.

    The condition represents an exceptional condition. If a label is specified,

    control will be passed to the labeled paragraph when the condition specified

    occurs.

    If no label is specified, it has the effect of canceling the previously set HANDLE

    CONDITION request and the default action will be taken.

  • 7/27/2019 CICS Overview by Pai

    68/153

    HANDLE CONDITION Command

    The general error condition (ERROR) can be specified

    within the same list to specify that all other conditions

    cause control to be passed to the label specified.

    Not more than 16 conditions can be specified in a singleHANDLE CONDITION command.

    You can specify more than one HANDLE CONDITIONcommand in the program.

    HANDLE CONDITION Command

  • 7/27/2019 CICS Overview by Pai

    69/153

    HANDLE CONDITION Command

    Example:2110-RECEIVE-CHOICE SECTION.EXEC CICS HANDLE CONDITION

    MAPFAIL(2110-MAP-FAIL)

    END-EXEC.

    EXEC CICS RECEIVE MAPSET('MENUMAP')

    MAP('MENUMAP')

    INTO(MENUMAPI)

    END-EXEC.

    GO TO 2110-EXIT.

    2110-MAP-FAIL.

    MOVE 'MAP FAIL SESSION ENDED' TO WS-END-SESSION-MESSAGE.

    MOVE 'Y' TO WS-END-SESSION.

    IGNORE CONDITION Command

  • 7/27/2019 CICS Overview by Pai

    70/153

    IGNORE CONDITION Command

    Causes no action to be taken if the condition specified occurs in the program. Control will returned to the next instruction following the command, which

    encountered the exceptional condition.

    The request by the IGNORE CONDITION command is valid until the subsequent

    HANDLE CONDITION command for the same condition.

    Format

    EXEC CICS IGNORE CONDITION

    condition

    [condition]

    END-EXEC.

    IGNORE CONDITION Command

  • 7/27/2019 CICS Overview by Pai

    71/153

    IGNORE CONDITION Command Example

    EXEC CICS IGNORE CONDITION

    LENGERR

    END-EXEC.

    EXEC CICS RECEIVE MAP(MAP1)

    MAPSET(MAP1)

    INTO(MAP1I)

    LENGTH(80)

    END-EXEC.

    NOHANDLE Option

  • 7/27/2019 CICS Overview by Pai

    72/153

    NOHANDLE Option

    This option can be specified in any CICS command, and it will cause

    no action to be taken for any exceptional condition occurringduring execution of this command

    Example

    EXEC CICS SEND

    MAP(----)MAPSET(------)

    FROM(------)

    LENGTH(---)

    NOHANDLE

    END-EXEC.

  • 7/27/2019 CICS Overview by Pai

    73/153

    NOHANDLE Option

    RESP option If RESP option is specified in a command, CICS places a response

    code at a completion of the command

    The application program can check this code, then proceed to the

    next processing. If the RESP option is specified in a command, the NOHANDLE

    option is applied to this command. Therefore, the HANDLE

    CONDITION requests will have no effect in this case.

    NOHANDLE Option

  • 7/27/2019 CICS Overview by Pai

    74/153

    NOHANDLE Option

    Example:

    EXEC CICS RECEIVE

    MAP(----)

    MAPSET(------)

    INTO(------)LENGTH(---)

    NOHANDLE

    RESP(WS-RESP-FIELD)

    END-EXEC.

    IF WS-RESP-FIELD = DFHRESP(NORMAL)

    -----------

    ELSE IF WS-RESP-FIELD = DFHRESP(MAPFAIL)

    -----------

    HANDLE AID Command

  • 7/27/2019 CICS Overview by Pai

    75/153

    HANDLE AID Command

    This command is used to specify the label to which control is to be passed when

    the specified AID is received. This is one way of substituting the EIBAID checking approach.

    AID keys are PA keys, PF keys, ENTER and CLEAR key.

    CLEAR and any of the PA keys do not transmit data.

    Format:

    EXEC CICS HANDLE AID

    Option(label)

    END-EXEC.

    HANDLE AID Command

  • 7/27/2019 CICS Overview by Pai

    76/153

    Commonly used Options Any key name (PA1 to PA3, PF1 to PF24, ENTER, CLEAR

    ANYKEY (Any of the above except ENTER key)

    Example:

    EXEC CICS HANDLE AID

    PF3(2100-END-ROUTINE)

    PA1(2100-CANCEL-ROUTINE)ENTER(2100-NORMAL-ROUTINE)

    ANYKEY(2100-WRONG-KEY-ROUTINE)

    END-EXEC.

    EXEC CICS RECEIVE MAP(MAP1)

    MAPSET(MAP1)INTO (MAP1I)

    LENGTH(WS-MAP-LENGTH)

    END-EXEC.

  • 7/27/2019 CICS Overview by Pai

    77/153

    Disadvantage of Using HANDLEAID Command

    EIBAID

    http://localhost/var/www/apps/conversion/tmp/scratch_3/handle_aid.txthttp://localhost/var/www/apps/conversion/tmp/scratch_3/handle_aid.txthttp://localhost/var/www/apps/conversion/tmp/scratch_3/handle_aid.txthttp://localhost/var/www/apps/conversion/tmp/scratch_3/handle_aid.txt
  • 7/27/2019 CICS Overview by Pai

    78/153

    EIBAID

    The 3270 terminal transmits the AID characterto the EIBAID field of EIBAID field of EIB, at the

    time of task initiation.

    EIBAID can be used to find which AID key hasbeen pressed by user

    CICS copy book DFHAID fields are used to

    identify the key pressed

    IF EIBAID = DFHAID(ENTER)

    BMS Programming

  • 7/27/2019 CICS Overview by Pai

    79/153

    Considerations

    Dynamic attribute Character Assignment

    Cursor Positioning Techniques

    Dynamic Attribute Character

  • 7/27/2019 CICS Overview by Pai

    80/153

    Assignment

    COPY DFHBMSCA in Working Storage section ofthe application program.

    You can assign a default attribute character in aBMS map.

    For a dynamic attribute character assignment youplace the predefined attribute character to thefieldname+A of the field to which you wish todynamically assign the attribute character.

    Dynamic Attribute Character

  • 7/27/2019 CICS Overview by Pai

    81/153

    Assignment Example

    WORKING-STORAGE SECTION.

    -------

    COPY 'MAPSETA'.

    -------

    COPY 'DFHBMSCA'.

    -------

    PROCEDURE DIVISION.-------

    MOVE DFHBMBRY TO CUSTNO-A.

    MOVE DFHDMPRO TO CUSTNAME-A.

    MOVE DFHDMPRO TO AMOUNT-A.

    EXEC CICS SEND

    MAP ('MAPNAME')

    MAPSET('MAPSETA')

    FROM(MAPSETAI)

    END-EXEC.

    h

  • 7/27/2019 CICS Overview by Pai

    82/153

    Cursor Positioning Techniques

    Static Cursor Positioning

    Dynamic/Symbolic Cursor Positioning

    Relative Cursor Positioning

    h

  • 7/27/2019 CICS Overview by Pai

    83/153

    Cursor Positioning Techniques

    Static Cursor Positioning In this approach, you define a cursor position in a map by

    placing IC in the ATTRB parameter of the DFHMDF macro

    for a particular field.

    When the map is sent, the cursor will appear in this field

    If there are more than one field with IC specified in one map, the

    last IC would be honored.

    Example:

    DFHMDF POS=(3,16),

    ATTRB=(UNPROT, FSET, IC) LENGTH=8

    C P iti i T h i

  • 7/27/2019 CICS Overview by Pai

    84/153

    Cursor Positioning Techniques

    Symbolic Cursor Positioning

    In this approach, you dynamically position a cursor

    through an application program using a symbolic name of

    the symbolic map by placing1 into the fields length

    field (i.e., filename+L) of the field where you wish to

    place the cursor.

    The SEND MAP command to be issued must have the

    CURSOR option (without argument).

    ExampleMOVE1 TO CHOICEL.

    EXEC CICS SEND MAP(MAP1)

    MAPSET(MAP1)

    CURSOR

    Cursor Positioning Techniques

  • 7/27/2019 CICS Overview by Pai

    85/153

    Cursor Positioning Techniques

    Relative Cursor Positioning

    In this approach, you dynamically position a cursor through an

    application program using the CURSOR(data-value) option in

    the SEND MAP command.

    The map will be displayed with the cursor at the specified

    position, overriding the static cursor position defined at the

    map definition time

    Data-value is calculated as: (row-1) * 80 + (column1)

    Example

    EXEC CICS SEND

    MAP(------)

    MAPSET(-------)

    T i l C t l O ti

  • 7/27/2019 CICS Overview by Pai

    86/153

    Terminal Control Operations

    RECEIVE MAP:Formatted data transfer. To receivea map.

    SEND MAP:Formatted data transfer. To send amap.

    RECEIVE:Unformatted data transfer. To receive a

    text.

    RECEIVE MAP Command (Formatted Data Transfer)

  • 7/27/2019 CICS Overview by Pai

    87/153

    ( )

    Function

    This command is used to receive a map from a terminal.

    At the completion of the command, the symbolic map of the

    specified map will contain the data from the terminal in the

    following fields per each field defined by the DFHMDF macro.

    Fieldname+L

    Fieldname+F

    Fieldname+I

    RECEIVE MAP Command (Formatted Data Transfer)

  • 7/27/2019 CICS Overview by Pai

    88/153

    ( )

    Format

    EXEC CICS RECEIVE MAP(map name)

    [MAPSET(mapset name)][INTO(data-area)]

    END-EXEC.

    d ( d f )

  • 7/27/2019 CICS Overview by Pai

    89/153

    RECEIVE MAP Command (Formatted Data Transfer)

    Common Exceptional Conditions

    MAPFAIL

    If the data to be mapped has the length of zero.

    If user presses the ENTER without typing data.

    If map is received by pressing CLEAR or any of the PA keys.

    SEND MAP Command (Formatted Data Transfer)

  • 7/27/2019 CICS Overview by Pai

    90/153

    Function This command is used to send a map to a terminal.

    Before issuing this command, the application program must

    prepare the data in the symbolic map of the map to be sent,

    which has following fields per each field defined by theDFHMDF macro.

    Fieldname+L

    Fieldname+A

    Fieldname+O

    SEND MAP Command (Formatted Data Transfer)

  • 7/27/2019 CICS Overview by Pai

    91/153

    SEND MAP Command (Formatted Data Transfer)

    Format

    EXEC CICS SEND MAP(map name)

    MAPSET(mapset name)

    [FROM(data-area)][CURSOR/CURSOR(data-value)]

    [ERASE/ERASEAUP]

    [FREEKB] [ALARM][FRSET]

    [DATAONLY | MAPONLY]

    -

    SEND MAP Command (Formatted Data Transfer)

  • 7/27/2019 CICS Overview by Pai

    92/153

    ( )

    Example

    WORKING-STORAGE SECTION.

    ---------------

    COPY MAPA.

    --------------

    PROCEDURE DIVISION.

    --------------

    EXEC CICS HANDLE CONDITION

    INVMPSZ(BIG-MAP)

    END-EXEC.

    ---------------

    EXEC CICS SEND MAP MAP(MAPA)

    MAPSET(MAPA)

    FROM(MAPAI)-

    RECEIVE C d (U f tt d D t T f )

  • 7/27/2019 CICS Overview by Pai

    93/153

    RECEIVE Command (Unformatted Data Transfer)

    Function This command is used to receive an unformatted message from the

    terminal.

    In this data transfer maps are not involved.

    Format

    EXEC CICS RECEIVE INTO(data-area)

    LENGTH(data-value)

    END-EXEC.

  • 7/27/2019 CICS Overview by Pai

    94/153

  • 7/27/2019 CICS Overview by Pai

    95/153

    Interval Control Operations

    ASKTIME Command

    FORMATTIME Command

    ASKTIME Command

  • 7/27/2019 CICS Overview by Pai

    96/153

    ASKTIME Command

    Function This command is used to request the current date and

    time.

    Also updates the EIBDATE and EIBTIME fields.

    Format

    EXEC CICS ASKTIME

    [ABSTIME(data-area)]

    END-EXEC.

    FORMATTIME Command

  • 7/27/2019 CICS Overview by Pai

    97/153

    Function

    This command is used to receive the information of dateand time in various formats.

    Format

    EXEC CICS FORMATTIME ABSTIME(data-area)[YYDDD(data-area)]

    [YYMMDD(data-area)]

    [YYDDMM(data-area)]

    [MMDDYY(data-area)][DDMMYY(data-area)]

    [DATESEP(data-value)]

    [DAYOFWEEK(data-area)]

    [DAYOFMONTH(data-area)]

    Program Control Operations

  • 7/27/2019 CICS Overview by Pai

    98/153

    Program Control Operations

    RETURN: To return to the next higher-level programor CICS.

    LINK: To pass control to another program at lowerlevel.

    XCTL: Tp pass control to another program at thesame level.

    LOAD: To load a ro ram.

    RETURN Command

  • 7/27/2019 CICS Overview by Pai

    99/153

    RETURN Command

    Format

    EXEC CICS RETURN

    [TRANSID(name)

    [COMMAREA(data-

    area)

    [LENGTH(data-

    value)]]]

    END-EXEC.

  • 7/27/2019 CICS Overview by Pai

    100/153

    LINK and XCTL Command

  • 7/27/2019 CICS Overview by Pai

    101/153

    Format Of LINK Command

    EXEC CICS LINK

    PROGRAM(name)

    [COMMAREA(data-area)]

    [LENGTH(data-value)]END-EXEC.

    LINK and XCTL Command

  • 7/27/2019 CICS Overview by Pai

    102/153

    Function of XCTL Command

    Used to pass control from one application program to another

    application program at the same logical level.

    Format Of XCTL Command

    EXEC CICS XCTL

    PROGRAM(name)

    [COMMAREA(data-area)]

    [LENGTH(data-value)]

    END-EXEC.

    LINK d XCTL C d

  • 7/27/2019 CICS Overview by Pai

    103/153

    LINK and XCTL Command

    Common Exceptional Conditions

    NOTAUTH

    PGMIDERR

    XCTL vs LINK

  • 7/27/2019 CICS Overview by Pai

    104/153

    Calling program is releasedfrom the main memory

    Control is transferred to the

    same logical level

    Return can be to CICS or tothe application program

    COMMAREA option can be

    used to pass data to the

    invoked program

    Calling program is not released

    from the main memory

    Control is transferred tosame

    logical level Return is always to the

    application program

    COMMAREA option is not

    required in RETURN because

    the invoked program does pass

    pointer to the communication

    area of the calling program.

    XCTL LINK

    File Control Operations (Random

    )

  • 7/27/2019 CICS Overview by Pai

    105/153

    Access)

    Supported Access Methods CICS File Control supports the VSAM and BDAM data

    access method under CICS.

    There are three types of VSAM file, all of which are

    supported by CICS. These are as follows:

    Key-Sequenced Dataset (KSDS)

    Entry-Sequenced Dataset (ESDS)

    Relative-Record Dataset (RRDS)

    File Control Operations (RandomAccess)

  • 7/27/2019 CICS Overview by Pai

    106/153

    Access)

    Available Commands

    READ: To read a record directly

    WRITE: To newly write a record

    REWRITE: To update an existing record

    DELETE: To delete a record

    UNLOCK: To release exclusive control acquired for update

    File Control Operations (RandomA )

  • 7/27/2019 CICS Overview by Pai

    107/153

    Access)

    Special services of File Control Program

    Data Independence

    Exclusive control during updates

    File Open/Close

    READ Command Using Full Key

  • 7/27/2019 CICS Overview by Pai

    108/153

    READ Command Using Full Key

    Function

    The READ command with the INTO option using the full

    key of a record is used to read a specific record by the fullkey.

    The data content of the record will be moved into the

    specified field defined in the working-storage section of theprogram

    READ Command Using Full Key

  • 7/27/2019 CICS Overview by Pai

    109/153

    READ Command Using Full Key

    Format

    EXEC CICS READ

    DATASET(name)

    INTO(data-area)

    RIDFLD(data-area)

    [LENGTH(data-value)]

    END-EXEC.

    READ Command Using Full Key

  • 7/27/2019 CICS Overview by Pai

    110/153

    Common Exceptional conditions

    DUPKEY

    NOTFND

    LENGERR

    NOTOPEN

    READ Command Using GTEQOption

  • 7/27/2019 CICS Overview by Pai

    111/153

    Option Function

    The READ command with the GTEQ option is used to

    read a nonspecific record whose key is equal to or greater

    than the full key data specified

    Format/Example

    MOVE 35 TO WK-LEN.

    MOVE NY003 TO REC-KEY. =must be afull key

    EXEC CICS READ

    DATASET(FILE2)

    INTO(FILE-IOAREA)

    READ/UPDATE and REWRITECommands

  • 7/27/2019 CICS Overview by Pai

    112/153

    Commands Function

    A combination of the READ command with theUPDATE option and the REWRITE command is used toupdate a record.

    Format/Example

    MOVE 35 TO WK-LEN.MOVE NY001 TO REC-A-KEY.

    EXEC CICS READDATASET(FILE2)INTO(FILE-IOAREA)RIDFLD(REC-A-KEY)

    UPDATE

    UNLOCK Command

  • 7/27/2019 CICS Overview by Pai

    113/153

    The READ command with the UPDATE option

    normally maintains exclusive control over the

    record read until:

    The record is updated by the REWRITE command.

    The transaction is normally or abnormally completed.

    Format/Example

    EXEC CICS UNLOCK

    DATASET(FILE2)

    -

    WRITE Command

  • 7/27/2019 CICS Overview by Pai

    114/153

    Function

    This command is used to write a record directly into a file

    based on the key specified.

    Format

    EXEC CICS WRITEDATASET(name)

    FROM(data-area)

    LENGTH(data-value)

    RIDFLD(data-area)

    END-EXEC.

    WRITE Command

  • 7/27/2019 CICS Overview by Pai

    115/153

    Example

    MOVE 35 TO WK-LEN.

    MOVE NY004 TO REC-A-KEY.

    Move symbolic map fields to the recordarea

    EXEC CICS WRITE

    DATASET(FILE2)FROM(FILE-IOAREA)

    RIDFLD(REC-A-KEY)

    -

    WRITE Command

  • 7/27/2019 CICS Overview by Pai

    116/153

    WRITE Command

    Exceptional Conditions

    DUPREC

    NOSPACE

    LENGERR

  • 7/27/2019 CICS Overview by Pai

    117/153

    WRITE Command with MASSINSERTOption

  • 7/27/2019 CICS Overview by Pai

    118/153

    Option Format/Example

    PROCEDURE DIVISION..

    MOVE TX000 TO REC-A-KEY.

    MASS-INS-LOOP SECTION.

    ADD 1 TO REC-A-KEY-SEQ.

    .

    (Prepare the record content)

    .

    EXEC CICS WRITEDATASET(FILE2)

    FROM(FILE-IOAREA)

    RIDFLD(REC-A-KEY)

    LENGTH(WK-LEN)

    DELETE Command

  • 7/27/2019 CICS Overview by Pai

    119/153

    Function

    The DELETE command is used to delete one record or a

    group of records from a file.

    There are three approaches to using the DELETE command

    DELETE after READ/UPDATE Approach

    Direct DELETE Approach

    Group Record DELETE Approach

    DELETE after READ/UPDATEApproach

  • 7/27/2019 CICS Overview by Pai

    120/153

    Approach

    In this approach, the DELETE command is used

    without the record key information, after the

    READ command with the UPDATE option has

    been completed.

    The record which was read by the READ/UPDATE

    command will be deleted from the file

    DELETE after READ/UPDATEApproach

  • 7/27/2019 CICS Overview by Pai

    121/153

    Approach Format/Example

    MOVE 35 TO WK-LEN.

    MOVE NY001 TO REC-A-KEY.

    EXEC CICS READ

    DATASET(FILE2)

    INTO(FILE-IOAREA)

    RIDFLD(REC-A-KEY)

    UPDATE

    LENGTH(WK-LEN)

    Direct DELETE Approach

  • 7/27/2019 CICS Overview by Pai

    122/153

    In this approach, the DELETE command isissued with the full key information in theRIDFLD field.

    The record specified will be directly deletedfrom the file.

    Format/Example

    MOVE NY001 TO REC-KEY.

    EXEC CICS DELETE

    Group Record DELETE Approach

  • 7/27/2019 CICS Overview by Pai

    123/153

    In this approach, DELETE command is issued with

    the GENERIC option.

    A group of records, which satisfy generic key

    specified, will be deleted from the file.

    Format/Example

    PROCEDURE DIVISION...

    MOVE NY TO RE-A-KEY.

    EXEC CICS DELETE

    File Control Operations (Seq.

    A )

  • 7/27/2019 CICS Overview by Pai

    124/153

    Access)

    Under CICS any of the VSAM datasets can beaccessed randomly as well as sequemntially.

    Available Commands: STARTBR : To establish the position of the BROWSE operation

    READNEXT : To read a next record (Forward)

    READPREV : To read a previous record (backward)

    RESETBR : To reestablish another position for a new browse

    ENDBR : To complete a browse operation.

    STARTBR Command

  • 7/27/2019 CICS Overview by Pai

    125/153

    Function This command is used to establish a browse starting position

    for a file.

    Format

    EXEC CICS STARTBR

    DATASET(name)

    RIDFLD(data-area)

    [GTEQ/EQUAL]

    [KEYLENGTH(data-area)

    GENERIC]

    STARTBR Command

  • 7/27/2019 CICS Overview by Pai

    126/153

    Example

    WORKING-STORAGE SECTION.01 WK-LEN PIC S9(4) COMP.01 FILE-IO-AREA.

    05 REC-A-KEY.10 REC-A-KEY-CITY PIC X(02).10 REC-A-KEY-SE PIC

    9(03).05 REC-A-DETAIL PIC X(30).

    PROCEDURE DIVISION.:

    MOVE NY000 TO RE-A-KEY.

    EXEC CICS STARTBR

    STARTBR Command

  • 7/27/2019 CICS Overview by Pai

    127/153

    Exceptional Conditions

    DSIDERR

    NOTFND

    READNEXT Command

  • 7/27/2019 CICS Overview by Pai

    128/153

    Function

    The READNEXT command is used to read a record of a filesequentially forward.

    Format

    EXEC CICS READNEXT

    DATASET(name)

    INTO(data-area)

    [LENGTH(data-value)]

    RIDFLD(data-area)

    [RBA/RRN]

    READNEXT Command

  • 7/27/2019 CICS Overview by Pai

    129/153

    Exceptional Conditions DUPKEY

    ENDFILE

    LENGERR

    READPREV Command

  • 7/27/2019 CICS Overview by Pai

    130/153

    Function

    This command is used to read a record of a file backward.

    Format/Example

    Exceptional Conditions

    NOTFND

    INVREQ

    Skip Sequential Read

    http://localhost/var/www/apps/conversion/tmp/scratch_3/readprev.txthttp://localhost/var/www/apps/conversion/tmp/scratch_3/readprev.txt
  • 7/27/2019 CICS Overview by Pai

    131/153

    This technique is used to skip records while

    continuing the browse operation established

    by the prior STARTBR command

    For the READNEXT command, the new key for

    skipping must be in the forward direction from

    the current record.

    Similarly, for the READPREV command, the new

    key for skipping must be in the backward

    Changing Direction of Browse

  • 7/27/2019 CICS Overview by Pai

    132/153

    g g

    After the STARTBR command, the direction ofbrowse can be changed from forward to backward

    by simply switching the READNEXT command to

    the READPREV command, or vice versa.

    The first READPREV (or READNEXT) command

    after the direction change will read the samerecord as th elast READNEXT (or READPREV)

    command

  • 7/27/2019 CICS Overview by Pai

    133/153

    ENDBR Command

  • 7/27/2019 CICS Overview by Pai

    134/153

    Function At physical end of file or logical end of file, the

    browser operation is terminated using this command.

    Format/Example

    EXEC CICS ENDBRDATASET(FILE2)

    END-EXEC.

    Multiple Browse Operations

  • 7/27/2019 CICS Overview by Pai

    135/153

    p p

    The multiple browse operations are used to

    perform several concurrent browse operations

    against the same file.

    One browse operation is to be identified by the

    REDQID parameter in the browse command.

    Temporary Storage Control

  • 7/27/2019 CICS Overview by Pai

    136/153

    The CICS Temporary Storage Control

    Program (TSP) provides the applicationprogram with an ability to store and

    retrieve the data in a Temporary Storage

    Queue (TSQ). Typically TSQ is used for passing of data

    among transactions.

    A Temporary Storage Queue is queue ofstored records (data).

    It is created and deleted dynamically by an

    a lication ro ram without s ecif in in

    Temporary Storage Control

  • 7/27/2019 CICS Overview by Pai

    137/153

    A TSQ is identified by the queue id (1 to 8 bytes),and the relative position number called itemnumber identifies a record within a TSQ.

    The records in TSQ once written, remainaccessible until the entire TSQ is explicitlydeleted.

    The records in TSQ can be read sequentially ordirectly. Also records in TSQ can be updated.

    TSQ in MAIN Storage or AuxiliaryStorage

  • 7/27/2019 CICS Overview by Pai

    138/153

    g TSQ can be written in main storage.

    In this case, accessing TSQ is a fast and convenient operation.

    But TSQ in this mode are not recoverable.

    TSQ can also be written in auxiliary storage in a

    VSAM file (DFHTEMP) established by the systemprogrammer.

    It is always available to the application program, which implies

    that no file open/close is required.

    TSQ in this mode is recoverable.

    In case of large quantity of data auxiliary storage is

    preferred.

    Temporary Storage Control

  • 7/27/2019 CICS Overview by Pai

    139/153

    Available Commands

    WRITEQ TS: To write or rewrite a record in a TSQ

    READQ TS: To read a record in a TSQ

    DELETEQ TS: To delete a TSQ

    WRITEQ TS Command (NoUpdate)

  • 7/27/2019 CICS Overview by Pai

    140/153

    p

    Function This command is use to write a record (item) in a TSQ.

    Format/Example

    EXEC CICS WRITEQ TS

    QUEUE(AttttM01)

    FROM(TSQ-DATA)LENGTH(TSQ-LEN)

    ITEM(TSQ-ITEM)

    MAIN

    WRITEQ TS Command (No

    Update)

  • 7/27/2019 CICS Overview by Pai

    141/153

    Update)

    Common Options

    NOSUSPEND

    AUXILIARY

    Exceptional Condition

    NOSPACE

    READQ TS Command (DirectRead)

  • 7/27/2019 CICS Overview by Pai

    142/153

    Function

    This command is used to read a particular record (item) of aparticular TSQ.

    Format/Example

    EXEC CICS READQ TSQUEUE(TSQ-QID)

    INTO(TSQ-DATA)

    LENGTH(TSQ-LEN)

    ITEM(TSQ-ITEM)

    END-EXEC.

    READQ TS Command (DirectRead)

  • 7/27/2019 CICS Overview by Pai

    143/153

    Commonly Used Options

    NUMITEMS

    NEXT

    Exceptional Condition

    QIDERR

    ITEMERR

    READQ TS Command (SequentialRead)

  • 7/27/2019 CICS Overview by Pai

    144/153

    Function

    The READQ TS command can be used also for reading all records

    sequentially in the queue.

    But this reading should be performed based on the programmingtechniques, instead of NEXT option of the READQ TS command.

    Format/Example

    READQ TS Command (Sequential Read)

  • 7/27/2019 CICS Overview by Pai

    145/153

    *ESTABLISH HANDLE CONDITION.EXEC CICS HANDLE CONDITION

    ITEMERR(TSQ-EOF)ERROR(SQ-ERROR)

    END-EXEC.LOOP.

    ADD 1 TO TSQ-ITEM.MOVE 200 TO TSQ-LEN.

    *READ A QUEUE.EXEC CICS READQ TS QUEUE(TSQ-QID)INTO(TSQ-DATA)LENGTH(TSQ-

    LENGTH)ITEM(TSQ-ITEM)

    END-EXEC.

    :(PROCESS A RECORD)

    :GO TO LOOP.

    TSQ-EOF.(EOF PROCESSING):

    READQ TS Command (SequentialRead)

  • 7/27/2019 CICS Overview by Pai

    146/153

    Read) Note:

    The sequential read of TSQ should be done By providing

    ITEM.

    This is a better approach than specifying the NEXT

    option in the READQ TS command. If NEXT option is specified, and if other task have read

    several records of the same TSQ after the last read by this

    task, then this task would read a skipped record.

    Therefore NEXT option should be used very carefully.

    WRITEQ TS Command with REWRITEOption

  • 7/27/2019 CICS Overview by Pai

    147/153

    Opt o

    Function

    The WRITEQ TS command with REWRITE option is used

    to rewrite a record of a TSQ, which has been read.

    Format/Example

    WRITEQ TS Command with REWRITE Option

  • 7/27/2019 CICS Overview by Pai

    148/153

    EXEC CICS READQ TS

    QUEUE(TSQ-QID)INTO(TSQ-DATA)

    LENGTH(TSQ-LEN)

    ITEM(TSQ-ITEM)

    END-EXEC.

    :*Process data in TSQ-DATA

    :

    EXEC CICS WRITEQ TS

    QUEUE(TSQ-QID)

    FROM(TSQ-DATA)LENGTH(TSQ-LEN)

    ITEM(TSQ-ITEM)

    REWRITE

    MAIN

    END-EXEC.

    DELETEQ TS Command

  • 7/27/2019 CICS Overview by Pai

    149/153

    Function

    This command is used to delete a TSQ entirely

    Format/Example

    EXEC CICS DELETEQ TS

    QUEUE(TSQ-ID)

    END-EXEC.

    Exceptional Condition

    QIDERR

    CICS Transactions

  • 7/27/2019 CICS Overview by Pai

    150/153

    CSSN: Sign-On CEBR: Temporary Storage Browse

    CECI: Command Level Interface

    CEDF: Execution Diagnostic Facility

    CEMT: Master Terminal Transaction

    CEDA: Resource Definition Online

    CSSF: Sign-Off

    CICS Transactions

    CSSN

  • 7/27/2019 CICS Overview by Pai

    151/153

    CSSN

    Enables CICS to associate user with the terminal

    Name and password should be defined in a SignoN Table(SNT)

    CEBR

    It browses TSQ

    Content of TSQ can be displayed

    CECI

    It performs syntax checking of a CICS command.

    If syntax is correct, it will execute the command.

  • 7/27/2019 CICS Overview by Pai

    152/153

  • 7/27/2019 CICS Overview by Pai

    153/153