50 %
50 %
Information about cics_csc

Published on December 18, 2008

Author: vishaljainiitd


CICS Overview : CICS Overview Version 1.0 Introduction : Introduction Customer Information Control System (CICS) Runs on VSE/ESA, MVS/XA, MVS/ESA, MS/DOS or OS/2 Can be used with VSAM, IMS-DL/I, SQL/DS and DB2 Topics of Discussion : Topics of Discussion Fundamentals Basic Mapping Support Maps & Display Addressability Techniques Error Handling in CICS CICS Queuing Facilities IBM supplied CICS transactions Command Summary Fundamentals : Fundamentals Online vs. Batch Programs CICS Management Functions Multitasking & Multithreading Conversational & Psuedo Conversational Programming Quasi reentrancy Task & Transaction Execution Interface Block COMMAREA Link & XCTL CICS Management Functions : CICS Management Functions Terminal Management Security Management Task Management Program Management File Management Queue Management Recovery Management System Services Terminal Control : Terminal Control End-User enters the transaction-id and presses the enter key. VTAM receives the message and passes it to CICS. Terminal Control accepts this input message and passes it to CICS. TCT is referred to determine the terminal status. Task Control : Task Control A task is created to execute the transaction All transactions are defined in PCT Task Control validates transactions by checking the PCT, and passes the control to the correct application program. Invalid Trans-id, error message shown. Program Control : Program Control Program Control receives control from the Task Control. All Application Programs are defined in the PPT. When Application Program is first loaded, its address is also stored in PPT. Only one copy of the program is loaded into the memory and many end-users can access it simultaneously (Multi-Threading) User Application Programs : User Application Programs PCP passes control to the Application Program Application program now process the input and issues commands to request services needed. BMS - Input : BMS - Input BMS simplifies programming for 3270 devices by providing Format & Device Independence. Device Independence – Enabling AP to communicate with Terminal without knowing internal hardware control characteristics Format Independence – Simplifies positioning of data on the terminal. File Control & Database Access : File Control & Database Access Application program issues command to retrieve data from a VSAM file/DB2 Table All VSAM files are defined in FCT. CICS supports DB2 via SQL commands. Journal Control : Journal Control If a record in a file or database is changed, the change is registered in system log through Journal Control Facility to permit recovery in case of a failure. When appropriately defined, journal processing is performed automatically. The System Log is defined in JCT Temporary Storage Control : Temporary Storage Control Application program may need to store info for later retrieval temporarily Temporary Storage Facility will facilitate such storage An Application Program can use CICS commands to write records to storage queue A TST is required for recovery purposes Transient Data Control : Transient Data Control Another CICS queuing facility. Records are stored in the order they are written. Transient data has two types of queues viz. IntraPartition & ExtraPartition. DCT contains queue definitions BMS - Output : BMS - Output Application Program has to now extract the necessary fields from the VSAM file / DB2 table that it has read and set up a map output area to be sent to the terminal. BMS Commands formats the fields for transmission to the terminal BMS moves the data from the map area to terminal I/O area and terminal control will pass to VTAM. Ending the Transaction : Ending the Transaction The Transaction is ended by issuing the return Command All storage allocated to this task is released and made available for use by other tasks. Multi-Tasking : Multi-Tasking A single task will not keep CICS busy, and hence CICS can accept input from many terminals. When a currently executing task ends or waiting for I/O, another task is ready to execute. Thus, CICS can run many tasks at a time and hence, Multi-tasking. CICS decides, which ready-to-run task to execute depending on Task-dispatching. Multi-Threading : Multi-Threading Because of Multi-Tasking, CICS loads one copy of the application program for each task. Thus, many tasks share the use of the program i.e., they will multi-thread through the code. Multi-Threading is totally transparent to the Application Programmer. Task Termination : Task Termination When Program finishes processing for a given task, it returns control to CICS. All storage associated with the task is released except for program storage TIOA Conversational Design : Conversational Design Whole Dialogue takes place within one CICS transaction The transaction is initiated when the user requests the menu and is terminated when the final confirmation message is displayed. Task has to wait for a longer time while the user thinks & keys data. Conflicting two important CICS design rules: Tasks should exist in system for minimum possible time Resources should be locked and therefore unavailable for shortest possible time Pseudo-Conversational Design : Pseudo-Conversational Design Dialogue implemented as a sequence of CICS tasks, where each task processes one message pair Task will terminate after sending a message to the terminal CICS RETURN command allows the programmer to preset the identifier to the next transaction This invokes a task automatically when the next input message arrives from the terminal This task receives the user input, process it, SEND the next output screen and presets the next transaction to be executed Quasi-Reentrancy : Quasi-Reentrancy Reentrancy with in CICS environment A Program which can reenter itself and continue processing when interrupted is a reentrant program CICS enables it by keeping all Static Variables in Working Storage & all Dynamic Variables in Dynamic Working Storage Sections. Execution Interface Block : Execution Interface Block Lets the application developer to Communicate with the Execute Interface Program Contains Useful information about the terminal-id, task associated with, CICS command response code etc. Used in application programs to access the information. COMMAREA : COMMAREA Storage Areas outside the program are accessed via the Linkage Section. Done by coding DFHCOMMAREA in Linkage Section. Should be the first variable. Used for data transfer. This is necessary while developing pseudo conversational programs. Link & XCTL Commands : Link & XCTL Commands Used for Modularising the Design Link & XCTL are both used to pass control from one CICS program to the other. With Link, the Calling program expects control to come back to it from the Called program whereas the reverse is true with XCTL. Basic Mapping Support : Basic Mapping Support CICS used BMS to manage terminal Input / Output BMS provides with a set of Assembler Macros to define and manage Terminal Input / Output Application Developer has to know to code two Assembler Commands (PRINT & END) and three BMS instructions (DFHMSD, DFHMDI & DFHMDF). MAP : MAP A map is just a set of code that is used by CICS to construct the 3270 data stream format to send/receive from terminal. Maps can be developed through coding MACRO. Macro contains set of assembler commands MAP has two components Physical Map & Symbolic Map BMS macro has to be Assembled twice to create Physical as well as Symbolic Mapset Physical Map : Physical Map Physical map set is a load module BMS uses to map data transmitted to and received from the display station. It resides in program load library along with program loads. The Physical Map is loaded when executing program requests Send or Receive BMS services. Symbolic Map : Symbolic Map Symbolic Map is a copy member that is copied into the program Defines the format of the screen data that is processed by the program Symbolic map resides in copy library Symbolic map is often referred to as DSECT which is an assembler language A symbolic MAP will have data fields for the length, the attribute byte & data component for each data fields excluding constant fields MAP Preparation : MAP Preparation Example of IBM-created symbolic MAP : Example of IBM-created symbolic MAP 01 EMPLIN1I. 02 FILLER PIC X (12). 02 EMPNAL COMP PIC S9(4). 02 EMPNAF PIC X. 02 FILLER REDEFINES EMPNAF. 03 EMPNAA PIC X. 02 EMPNAI PIC X(21). 01 EMPLIN1O REDEFINES EMPLIN1I. 02 FILLER PIC X(12). 02 FILLER PIC X(3). 02 EMPNAO PIC X(21). 3270 Display Device Characteristics : 3270 Display Device Characteristics Data displayed by BMS on a 3270 terminal is organised into fields Each field is associated with specific attributes that control its appearance and operation. Field attributes of 3270s can be divided into two classes Standard Extended Standard Attributes : Standard Attributes Available on all 3270 models. Occupies the character location on the screen that is immediately before the field it affects. Specified by a single byte, called an attribute byte. The three Standard attributes are: Protection Attribute Intensity Attribute Shift Attribute Extended Attributes : Extended Attributes Available on special 3270 models Don’t occupy positions on the screen The four important Extended Attributes are: Extended Colour Extended Highlighting Must-enter field Programmed Symbols Modified Data Tag : Modified Data Tag Last Bit in the Attribute Byte Used to indicate whether the field should be transmitted to the host system when the operator presses an AID key. If MDT is ON (1), the field is sent. MDT can be turned ON/OFF programmatically. Also used for Cursor Positioning Coding BMS Map sets : Coding BMS Map sets BMS map set is an Assembler Language program that consists of Macro Instructions When BMS macro is processed using JCL it generates Map load & Map copy book Assembler Language Coding rules are to be followed while coding BMS Macros Rules for Coding Macros : Rules for Coding Macros Column 1: Label (up to 7 characters) Column 10 : Macro name, followed by at least one space Column 17-71 : Optional keywords, each one separated by comma with no intervening spaces Use continuation character * in 72 column for continuation For a comment, code * in column 1 MAP Module Structure : MAP Module Structure Three macros to define a map DFHMSD - coded twice, this defines a MAPSET DFHMDI - coded once for each map to be defined DFHMDF - coded for each field to be defined. DFHMSD - MAPSET : DFHMSD - MAPSET Name on which the (physical map) & copybook (symbolic map) would be created Must be defined in PPT Syntax: MAPSET1 DFHMSD TYPE=MAP, * MODE=INOUT Keywords for MAPSET : Keywords for MAPSET TYPE=&SYSPARM|DSECT|MAP| FINAL LANG=COBOL|ASM|PL1|C MODE=INOUT|IN|OUT TERM=term type|ALL TIOAPFX=YES|NO STORAGE=AUTO|BASE CTRL=FREEKB|ALARM|FRSET| PRINT|length DFHMDI-MAP Definition : DFHMDI-MAP Definition Defines a map within a map set Supplies map’s name and other useful information such as its size and position Overrides defaults specified in DFHMSD macro Keywords for Map : Keywords for Map SIZE=(line,column) LINE=number COLUMN=number Justify = Left | Right Header = Yes | No Trailer = Yes | No EXTATT=Yes | No VALIDN = MUSTENTER |MUSTFILL| TRIGGER DFHMDF - MAP FIELD definition : DFHMDF - MAP FIELD definition Defines the map field by specifying its position, length and attributes Actually defines an attribute byte. To define a Protected Field, DFHMDF macro is coded once as it needs just one attribute byte To define an Unprotected field, DFHMDF macro is coded twice, one to mark the beginning and the other to mark the end. Keywords for Map Field : Keywords for Map Field POS = (line,column) LENGTH= number INITIAL=‘literal’ ATTRB= ASKIP |PROT |UNPROT |BRT| DRK| NORM| NUM| FSET| IC PICIN=‘COBOL PIC value’ PICOUT=‘COBOL PIC value’ Assembler Commands : Assembler Commands Used for Documentation purposes TITLE - This causes a heading to appear on each page of the assembled listing. PRINT NOGEN - This statement tells the assembler that you do not want the generated code to appear on the listing. STOPPER fields : STOPPER fields BMS does not automatically generate attribute byte to mark the end of an unprotected field. Done by the user himself by using Stopper Fields Done by coding ASKIP in the ATTRB Keyword Doing so would jump the cursor automatically to the next input field on the map Example for a Stopper Field : Example for a Stopper Field EMPNAME DFHMDF POS=(2,26) LENGTH=5 ATTRB=(NORM,UNPROT), DFHMDF POS=(2,32) LENGTH=1 ATTRB=ASKIP Logical Steps During SEND MAP : Logical Steps During SEND MAP CICS constructs the data stream using MAP. Data fields containing LOW-VALES are not included. Attribute bytes from symbolic MAP will replace those in physical MAP The first length field in the symbolic MAP that is -1 becomes the cursor position, overriding any specified in MAP Using options in the SEND MAP command, the data stream is sent to the terminal. Logical Steps During RECEIVE MAP : Logical Steps During RECEIVE MAP CICS RECEIVES the terminal input when user presses AID (termination key) CICS updates the EIB & then initiates the transaction identified for this terminal from the previous RETURN TRANSID command. When the application issues a RECEIVE MAP command, CICS formats the data into the symbolic MAP identified in the RECEIVE command. SEND MAP command : SEND MAP command Sends maps to the screen Keywords used with SEND MAP are as follows: MAP (map name) FROM(data name) DATAONLY|MAPONLY MAPSET (Map set name) Cursor (Value) FREEKB, ALARM & FRSET ERASE|ERASEUP HANDLE|NOHANDLE|RESP RECEIVE MAP command : RECEIVE MAP command This command receives the data values from the terminal Keywords used with RECEIVE MAP are as follows: MAP, MAPSET, HANDLE : same as in SEND MAP command SET (pointer) INTO(data name) Controlling Cursor on SEND : Controlling Cursor on SEND Using IC Option with DFHMDF Macro Using CURSOR (data value) on the SEND MAP command. By moving -1 in the length field of the map field in which the cursor is to be placed before the SEND MAP command. Controlling Cursor on RECEIVE : Controlling Cursor on RECEIVE EIBCPOSN in EIB contains the cursor position relative to zero. The cursor position is defined as follows : cursor-position = (row -1) * 80 + column-position - 1 IF EIBCPOSN > 1130 AND < 1147 Program to program communications commands : Program to program communications commands RETURN command returns control to CICS. RETURN TRANSID command will pass control to trans-id when the designated terminal enters data. Link Command is used to pass control from one application program to another at one logical level lower to it. The XCTL command is used to pass control from application program to another at the same logical level. Program to program communications commands cont.. : Program to program communications commands cont.. CICS Program. A Program B Program C XCTL LINK RETURN (without transid) RETURN(with or without transid) Start Level 0: Level 1: Level 2: File Handling : File Handling Studied under three Heads: - File Control – Random Access - File Control – Sequential Access - File Control – Advanced Topics File Control – Random Access : File Control – Random Access File Control – Random Access CICS FCP supports VSAM & BDAM access methods VSAM/KSDS, RRDS & ESDS are supported by CICS. For Random Access to VSAM/KSDS, the Commands used are: READ, WRITE, REWRITE, DELETE & UNLOCK File Control – Random Access : File Control – Random Access READ Commands: - Read Command with INTO Option Using Full Key - Read Command with SET Option Using Full Key - Read Command with GENERIC Option - Read Command with GTEQ Option File Control – Random Access : File Control – Random Access Exceptional Conditions with READ Command DUPKEY – Duplicate Record Found NOTFND – No Record Found LENGERR – Specified record length shorter than the Actual length NOTOPEN – Trying to read an Unopened File File Control – Random Access : File Control – Random Access Read / Update & Rewrite Commands Read Command with Update Option reads the file for update purposes. Rewrite Command following Read / Update would update the file INVREQ is the exceptional condition associated with Read / Update & Rewrite commands INVREQ occurs when a rewrite command is issued without a read Command. File Control – Random Access : File Control – Random Access Unlock Command: Read Command with Update option acquires unique control over the record and maintains it until : - Record is updated - Transaction is completed. To release the exclusive control over the record, UNLOCK command is used. File Control – Random Access : File Control – Random Access WRITE Command Used to add a record directly to a file based on the key specified. The exceptional conditions associated with WRITE command are: DUPREC – Record already present NOSPACE – No Disk Space LENGERR – Length specified is greater than maximum specified length in VSAM Cluster File Control – Random Access : File Control – Random Access DELETE COMMAND Delete Command is used to delete one / group of records from a file Two Approaches of using the DELETE Command: - Delete After Read / Update - Direct Delete Exceptional Conditions associated are: - DUPKEY - NOTFND File Control – Sequential Access : File Control – Sequential Access Sequential Access of VSAM Files under CICS is called Browsing The following commands are available: - STARTBR - READNEXT - READPREV - RESETBR - ENDBR File Control – Sequential Access : File Control – Sequential Access READNEXT Command Used to read a record sequentially forward Exceptional Conditions associated with this command are: DUPKEY – Key of the record is a duplicate of the next records key ENDFILE – EOF condition detected LENGERR – The Actual record length is greater than the length specified File Control – Sequential Access : File Control – Sequential Access READPREV Command Used to read a record sequentially backward Exceptional Conditions associated with this command are: NOTFND – Record positioned by STARTBR / RESETBR is not found. INVREQ – GENERIC option mustn’t be used in STARTBR command prior to READPREV Command File Control – Sequential Access : File Control – Sequential Access RESETBR Command Used to reestablish another starting point within the same browse operation against the same file. Works same way as STARBR but reposition is much better as the file is already in use. NOTFND – Record positioned by STARTBR / RESETBR is not found. INVREQ – GENERIC option mustn’t be used in RESETBR command prior to READPREV Command File Control – Sequential Access : File Control – Sequential Access ENDBR Command Used to terminate the file browse at the physical / logical end of the file. RESRTBR Command NOTFND – File to be terminated browse not found File Control – Advanced Concepts : File Control – Advanced Concepts VSAM / ESDS – Sequential Read - VSAM / ESDS file can be read sequentially forward or backward - Commands available are STARTBR, READNEXT, READPREV with RBA option - RBA gives the Relative Byte Address for that file File Control – Advanced Concepts : File Control – Advanced Concepts VSAM / ESDS – Sequential Write WRITE command with RBA option is used No browsing operation involved, the specified record is written at the end of the file Error handling : Error handling CICS when encounters an error situation which it cannot recover, raises an exceptional condition. Each exceptional condition has name. E.g. NOTFND For most conditions CICS default action is to terminate the task abnormally. User when want to prevent this ABEND has to do one of the following: Give a HANDLE CONTION command Perform Response code checking using RESP option HANDLE CONDITION : HANDLE CONDITION HANDLE CONDITION command - This command specifies a procedure name that’s given control if a specified condition occurs EXEC CICS HANDLE CONDITION NOTFND(2100-NOTFND) END-EXEC HANDLE COMMAND applies to only those CICS commands that follow it A single HANDLE CONDITION command can specify actions for up to 16 exceptional conditions Response code checking : Response code checking Done by the RESP option A binary full word item PIC S9(8) COMP in working storage has to be defined Then, the RESP option on CICS commands has to be defined Communicating between tasks & programs : Communicating between tasks & programs Done in the following two ways in CICS applications These are basically used in Menu Driven environment. Using DFHCOMMAREA Using Queues Using DFHCOMMAREA : Using DFHCOMMAREA It refers to communication area. The COMMAREA is maintained by CICS from one task to next. Not a fixed area throughout the dialogue and depends on the task Not true for a CALL or LINK command. Using Queues : Using Queues Facility provided by CICS when the COMMAREA is insufficient to pass data between programs Two Types of Queues are provided by CICS - Temporary Storage Queues - Transient Data Queues Transient Data Queues : Transient Data Queues Allows the CICS to pass data from one program to another CICS TDP (Transient Data Program) uses a CICS transaction to deal with TDQ There are two types of TDQ are Intrapartition – Group of sequential records produced and processed in the same CICS region Extrapartition – Group of sequential records which are interfaces between the transactions of the CICS region and systems outside the CICS region Intrapartition is used for applications such as ATI, Message Routing & Message Broadcast Extrapartition is used for Interface to batch or Interface from batch jobs Transient Data Queues : Transient Data Queues The Commands available for TDQ processing are: WRITEQ TD – Used for sequentially write a record to a TDQ READQ TD – Used for sequentially reading records in a TDQ DELETEQ TD – Used for deleting an Intrapartition TDQ. Not Valid for Extrapartition TDQ All the control information related to a TDQ is registered in DCT. TDQ is read destructive Number of records in a TDQ initiates a transaction automatically in ATI. The task must be defined in DCT Temporary Storage Queues : Temporary Storage Queues It is a queue of stored records It is created and deleted by the application programs without specifying anything in the CICS tables until the data recovery is not intended. TSQ is a scratch pad memory TSQ is identified by a 8 character queue-id Record within a TSQ is identified by item number Records in a TSQ can be read sequentially / directly. Records in a TSQ can be updated, deleted or added. TSQ can be accessed by same transaction / different transaction from the same / different terminals Temporary Storage Queues : Temporary Storage Queues The different commands available for TSQ include WRITEQ TD – Used to write or rewrite a record in a TSQ READQ TS – Used to read a record in a TSQ DELETEQ TS – To delete a TSQ Temporary Storage Queues : Temporary Storage Queues WRITEQ TS Syntax EXEC CICS WRITEQ TS QUEUE (TSQUEUE-NAME) FROM (TS-QUEUE-RECORD LENGTH(TS-QUEUE-LENGTH) ITEM (TS-ITEM-NUMBER) REWRITE END-EXEC In case of rewrite if you specify queue that doesn’t exist, the QUEUEERR is raised. And if you specify an item number that does not exist within queue, the ITEMERR condition is raised Temporary Storage Queues : Temporary Storage Queues READQ TS command - To retrieve records from temporary storage queue, you use the READQ TS command. E.g. EXEC CICS READQ TS QUEUE (TS-QUEUE-NAME) INTO (TS-QUEUE-RECORD) LENGTH(TS-QUEUE-LENGTH) ITEM (TS-ITEM-NUMBER) / NEXT END-EXEC For processing a queue that contains more than one item, specify NEXT rather than ITEM to retrieve the queue item in sequence. Using Queues cont.. : Using Queues cont.. DELETEQ TS - Used to delete a TSQ when processing is finished else, the queue remains indefinitely(till CICS is restarted) wasting valuable disk or main storage. DELETEQ TS command deletes an entire TS queue - there is no way to delete a single record. DELETEQ TS Command Syntax EXEC CICS DELETEQ TS QUEUE (TSQ-ID) END-EXEC IBM supplied CICS transactions : IBM supplied CICS transactions IBM provides various transactions which can be used to for Providing control information Setting control information Debugging Inquiry Logon/logoff They are as follows : CEDA : CEDA Different versions of the command available like CEDA, CEDB & CEDC. CEDA has the most capacity & is usually assigned only for system programmers because CEDA allows a user to assign, modify & install resources to a CICS system(I.e. updating of system tables.) CEDB is as capable as CEDA with some minor changes. CEDC is more a view facility of system information entered thru CEDA/CEDB. CEMT : CEMT The Master Terminal Command The CEMT transaction is normally used by application programmers for maintenance of their work environment. This includes verifying that files are allocated, opening or closing files, setting programs to enable or disable status, refreshing program & map loads & similar functions. CEDF : CEDF Mainframe Debugger for CICS Commands CEDF was designed to help programmers step through their work in a debugging mode. CEDF does not trap each COBOL instruction, but focuses instead on every CICS command, showing the status both before & after executing the instruction. CECI & CECS : CECI & CECS They are called command line interpreters. CECI executes command immediately. The CECS only ensure that you coded it correctly. CEBR : CEBR CEBR is designed to to let you browse existing storage queues It first searches for one named after your term-id with prefix as CEBR. - E.g. your term-id is CT19 it would search for one named CEBRCT19. CESN, CSSN & CESF : CESN, CSSN & CESF CESN - This transaction is used to logon to CICS. CSSN - This is same as CESN CESF - This transaction is used to log out off the CICS.

Add a comment

Related presentations

Related pages

SICS- Reinsurance Management Solutions | CSC

CSC's reinsurance management software, SICS, supports all your reinsurance strategies with a real-time business intelligence system. Learn more at
Read more

Csc Mainframe Jobs | LinkedIn

Skill :0 mainframe Developer- JCL, COBAL,VASAM,IMS DB2, CICS. Skill :0 mainframe Developer- JCL, COBAL,VASAM,IMS DB2, CICS.
Read more

CICS resources subject to command security checking

If you are running CICS with command security, define resource profiles to RACF, with access lists as appropriate, using the resource names in Table 1 as ...
Read more

Rajib Kumar Das - Mainframe Anwendungsentwickler und ...

Mainframe Anwendungsentwickler und Application Consultant Lead ... Das Profilbild sehen Sie, wenn Sie sich bei XING einloggen.
Read more

College of Information & Computer Science

Department of Computer Science/Management Engineering - Graduate Catalog . CSC 502 - Introduction to Computer Science I This course introduces the computer ...
Read more

Post | LIU

EXPLORE LIFE AS A PIONEER. Choosing the right college for you is a big decision. LIU Post’s Admissions team is here to answer questions, show you around ...
Read more

Carl Coffey | LinkedIn

Carl Coffey. Senior Middleware & Integration Consultant, Financial Messaging, Financial Services Sector. Location Ireland Industry Information Technology ...
Read more


cics000-csc clutch slave cylinder concentric slave cylinder thrust bearing assy assembly
Read more