1 / 105

CICS Overview

CICS Overview. 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. Fundamentals Basic Mapping Support Maps & Display Addressability Techniques

Télécharger la présentation

CICS Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CICS Overview

  2. 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.

  3. Topics of Discussion • Fundamentals • Basic Mapping Support • Maps & Display • Addressability Techniques • Error Handling in CICS • CICS Queuing Facilities • IBM supplied CICS transactions • Command Summary

  4. Fundamentals • Online vs. Batch Programs • CICS Management Functions • Multitasking & Multithreading • Conversational & Psuedo Conversational Programming • Quasi reentrancy • Task & Transaction • Execution Interface Block • COMMAREA • Link & XCTL

  5. CICS Management Functions • Terminal Management • Security Management • Task Management • Program Management • File Management • Queue Management • Recovery Management • System Services

  6. 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.

  7. 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.

  8. Program Control • Program Control receives 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

  9. User Application Programs • PCP passes control to the Application Program • Application program now process the input and issues commands to request services needed.

  10. 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.

  11. 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.

  12. 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

  13. Temporary Storage Control • Application program may need to store info for later retrieval. • 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.

  14. 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

  15. 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.

  16. 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.

  17. 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.

  18. 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.

  19. 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

  20. Conversational Design 1 • Whole Dialogue takes place within one CICS transaction • It means all processing takes place in one CICS transaction • The transaction is initiated when the user requests the menu and is terminated when the final confirmation message is displayed.

  21. Conversational Design 2 • Task has to wait for a longer time while the user thinks & keys data. • Contravenes 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

  22. Pseudo-Conversational Design 1 • 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.

  23. Pseudo-Conversational Design 2 • 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. • Main benefit is that the task exists for the time taken to process a message pair.

  24. Pseudo-Conversational Design 3 • Records are not locked across the Conversation • It is implemented as one transaction to the user, but is actually implemented as more than one transaction to CICS. • This can be reduced to implement as one CICS transaction as well.

  25. 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.

  26. 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.

  27. 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.

  28. 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.

  29. 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).

  30. 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 Mapsets.

  31. Physical Map • Physical map set is a load module BMS uses to map data transmitted to and received from the display station. • In other words, it can be called as load of the map. It resides in program load library along with program loads. • The Physical Map is loaded when executing program requests Send or Receive BMS services.

  32. Symbolic Map - 1 • 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.

  33. Symbolic Map - 2 • Symbolic map is often refereed to as DESECT 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.

  34. MAP Preparation

  35. 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).

  36. 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

  37. 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

  38. 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

  39. 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

  40. 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.

  41. 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

  42. MAP module structure There are 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.

  43. DFHMSD-MAPSET def • Means provided by CICS to package all MAPs that a given program might use. • Name in which the (physical map) & copybook (symbolic map) would be created. • Must be defined in PPT. • Syntax: MAPSET1 DFHMSD TYPE=MAP, * MODE=INOUT

  44. 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

  45. 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.

  46. 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

  47. 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.

  48. MAP FIELD keywords • 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’

  49. Overriding attributes on the screen • You can manage the attributes of fields from within your program. • When changing the attribute of a field, remember that you must not just specify the attribute to change; you must specify all attributes that apply to the field. This is because attribute are bit combinations that are prepackaged in the DFHBMSCA copybook.

  50. Assembler Commands These statements are not required, but they are very helpful in improving the documentation of your listing of assembled MAPs. • 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.

More Related