SlideShare a Scribd company logo
1 of 21
CICS - Application Programming
DAY 1 – SESSION 2
Updated in Nov 2004
Session 2 : ObjectivesTo understand
The languages that support CICS
CICS Command format and Argument Values
CICS Embedding in COBOL Application program
The CICS Control block EIB
The DFHCOMMAREA
Program preparation and execution
The Task flow
Host Languages
COBOL
Assembler
PL/1
C and C++
Java
CICS Command Format
EXEC CICS function
[option ( argument value)]
[option ( argument value)]
...
[RESP ( argument value)]
END-EXEC
Argument values
Data Value
Data Area
Name
Label
Time in hhmmss format
Pointer Reference
CICS Commands - Examples
EXEC CICS RECEIVE
INTO(WS-INPUT)
LENGTH(WS-IN-LENGTH)
RESP(WS-CICS-RESP-CODE)
END-EXEC.
EXEC CICS SEND
FROM(WS-OUTPUT)
LENGTH(WS-OUT-LENGTH)
RESP(WS-CICS-RESP-CODE)
END-EXEC.
EXEC CICS
RETURN
TRANSID(WS-NXT-TRANSID)
COMMAREA(WS-COMM-AREA)
END-EXEC.
COMMAREAA COMMAREA is a CICS maintained unit of storage for
passing and receiving data between CICS programs
Any changes to the COMMAREA in the linked program,
will be available to the linking program after RETURN
Coded as DFHCOMMAREA in the Linkage Section
Transaction Execution -
COMMAREA
WORKING STORAGE SECTION
01 WS-COMM-AREA
LINKAGE SECTION
01 DFHCOMMAREA
PROCEDURE DIVISION.
……...…...…….
...Processing…
EXEC CICS RETURN TRANSID(‘TXN1’)
COMMAREA(WS-COMM-AREA)
END-EXEC.
First Execution - TXN1
WORKING STORAGE SECTION
01 WS-COMM-AREA
LINKAGE SECTION
01 DFHCOMMAREA
Next Execution - TXN1
Communication Area -
Maintained by CICS
Between Executions
Structure of CICS Application program -
COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID . XXXXXXXX.
ENVIRONMENT DIVISION. <=== THIS DIVISION MUST BE EMPTY
DATA DIVISION. <=== FILE SECTION IS OMITTED
WORKING- STORAGE SECTION.
77 --------------------- .
01 --------------------- .
05 ---------------- .
LINKAGE SECTION. <=== LINKAGE SECTION IS MANDATORY
01 DFHCOMMAREA. <=== COMMUNICATION AREA required for
05 -----------------. passing data for subsequent execs.
PROCEDURE DIVISION .
( COBOL STATEMENTS) + <=== CICS statements mixed with COBOL
( CICS STATEMENTS) statements. Some COBOL verbs not
. allowed.
GOBACK.
Structure of CICS Application
program – COBOL (Contd.)
The following COBOL statements cannot be issued in a CICS
application program.
- ACCEPT - DATE - DISPLAY - EXHIBIT
- RELEASE - SORT - STOP RUN - TRACE
- Any I/O statements ( OPEN ,CLOSE, READ, WRITE,
REWRITE, DELETE , START)
The Execute Interface Block (EIB)
A CICS area that contains information related to the current Task –
data, time, transaction-id
The definition is automatically inserted into the LINKAGE SECTION of
the program before the DFHCOMMAREA at the time of program
translation
EIB variables are available in the copy book DFHEIBLK
Information in the EIB fields can be used for
◦ Handling error/exceptions (EIBRESP, EIBRESP2)
◦ Checking the length of data passed to the program through its DFHCOMMAREA
(EIBCALEN)
◦ Identifying the function key pressed
EIB : ExampleEVALUATE TRUE
WHEN EIBCALEN = ZERO
MOVE LOW-VALUE TO INQMAP10
……..
……..
PERFORM 1400-SEND-CUSTOMER-MAP
WHEN EIBAID = DFHCLEAR
MOVE LOW-VALUE TO INQMAP10
……..
……..
PERFORM 1400-SEND-CUSTOMER-MAP
WHEN EIBAID = DFHPA1 OR DFHPA2 OR DFHPA3
CONTINUE
WHEN EIBAID = DFHPF3 OR DFHPF12
EXEC CICS
……
Sample CICS Program –
COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID . SAMPPROG.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING STORAGE SECTION.
77 WS-LENGTH PIC S9(4) COMP.
77 WS-RESP PIC S9(4) COMP.
01 WS-INPUT.
05 WS-TRAN-IDPIC X(4) .
05 FILLER PIC X.
05 WS-IN-DATA PIC X(15).
01 WS-OUTPUT.
05 WS-MSG_DESC PIC X(17).
05 FILLER PIC X .
05 WS-OUT-DATA PIC X(15).
LINKAGE SECTION.
01 DFHCOMMAREA.
05 LS-COMMAREA PIC X.
PROCEDURE DIVISION.
MOVE 40 TO WS-LENGTH.
MOVE LOW-VALUES TO WS-INPUT
EXEC CICS RECEIVE INTO (WS-INPUT)
LENGTH (WS-LENGTH)
RESP(WS-RESP)
END-EXEC.
IF WS-RESP = DFHRESP(NORMAL)
MOVE LOW-VALUES TO WS-OUTPUT
MOVE WS-IN-DATA TO WS-OUT-DATA
MOVE ‘MSG RECEIVED IS :’
TO WS-MSG-DESC
MOVE 53 TO WS-LENGTH
ELSE
MOVE LOW-VALUES TO WS-OUTPUT
MOVE WS-IN-DATA TO WS-OUT-DATA
MOVE ‘ERROR IN TXN : ’
TO WS-MSG-DESC
MOVE 53 TO WS-LENGTH
END-IF.
EXEC CICS SEND
FROM (WS-OUTPUT)
LENGTH(WS-LENGTH)
END-EXEC.
EXEC CICS
RETURN
END-EXEC .
CICS Program Preparation
Compile
Object
ModuleLink-Edit
Load
Module
Translator
Listing
Compiler
Listing
Translated
Source
Source
Program
Translate
CICS - DB2 Program Preparation
Compile
Object
Module
Link-Edit
Load
Module
Compiler
Listing
Translated
Source
Source
Program
Translator
Listing
Translate
Precompile
Listing
Pre-Compile
Application
Plan
DBRM
Bind
CICS Program Preparation
(Contd.)
COBOL-CICS programs should be compiled with RENT
option to make it Re-entrant.
A CICS-DB2-COBOL program would require a few
more additional steps like a Pre-compile and a Bind.
The pre-compiler would generate a DBRM (Database
Request Module) and the bind will generate a plan
or package using the DBRM.
CICS Security - Sign-on, Sign-
off
Security for accessing CICS system
Until CICS 2.2 users required to be defined as
resources in CICS System Table - Signon Table
(SNT). But with higher releases the SNT has
become obsolete and RACF is used as the External
Security manager.
CESN or CSSN for signon, CESF or CSSF for signoff
CICS Program Execution
Register the transaction in PCT
Register the Programs and Maps in PPT
Sign on to CICS
Enter transaction identifier
Starting a TASK
TXN1 Trans. Program
TXC1 MAPPGC1
TXC2 MAPPGC2
TXN1 TXNPGM1TXN1 TXNPGM1
TXN2 TXNPGM2
PCT
Program. Location
MAPPGC1 In Storage
MAPPGC2 On Disk
TXNPGM1 In StorageTXNPGM1 In Storage
TXNPGM2 On Disk
PPT
Load Module Library
MAPPGC1 MAPLIB
MAPPGC2 MAPLIB
TXNPGM1 PGMLIBTXNPGM1 PGMLIB
TXNPGM2 PGMLIB
CICS Address Space
TXNPGM1
MAPPGC1
CICS Statements after
Translation
Original Source Code :
EXEC CICS
READ DATASET(ACCMSTR) INTO(ACCT-MSTR-DTLS)
RIDFLD(ACCT-NO) RESP(RESP-CODE)
END-EXEC.
Translated Source
* EXEC CICS
* READ DATASET(‘ACCMSTR’) INTO(ACCT-MSTR-DTLS)
* RIDFLD(ACCT-NO) RESP(RESP-CODE)
* END-EXEC.
MOVE ‘..0……00061 ‘ TO DFHEIV0
MOVE ‘ACCMSTR’ TO DFHC0080
MOVE LENGTH OF ACCT-MSTR-DTLS TO DFHB0020
CALL ‘DFHEI1’ USING DFHEIV0 DFHC0080 ACCT-MSTR-DTLS
DFHB0020 ACCT-NO
MOVE EIBRESP TO RESP-CODE.
Session 2 : Summary
Language support and Embedding in COBOL
Command syntax & Argument values
Structure of a CICS application program
Control Block and Common Area to pass data across
programs
Program preparation and Program execution - PCT, PPT
Task flow diagram

More Related Content

What's hot

What's hot (20)

MVS ABEND CODES
MVS ABEND CODESMVS ABEND CODES
MVS ABEND CODES
 
DB2 Accounting Reporting
DB2  Accounting ReportingDB2  Accounting Reporting
DB2 Accounting Reporting
 
DB2 utilities
DB2 utilitiesDB2 utilities
DB2 utilities
 
Cics tutorial
Cics tutorialCics tutorial
Cics tutorial
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
Cics Connectivity
Cics ConnectivityCics Connectivity
Cics Connectivity
 
I Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfI Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdf
 
z/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS Resolverz/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS Resolver
 
Networking with Linux on System z
Networking with Linux on System zNetworking with Linux on System z
Networking with Linux on System z
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
Smpe
SmpeSmpe
Smpe
 
IBM Utilities
IBM UtilitiesIBM Utilities
IBM Utilities
 
Sapscript
SapscriptSapscript
Sapscript
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
 
ALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARMALL ABOUT DB2 DSNZPARM
ALL ABOUT DB2 DSNZPARM
 
DB2 Systems Programming Tools of the Trade NA07B03
DB2 Systems Programming Tools of the Trade NA07B03DB2 Systems Programming Tools of the Trade NA07B03
DB2 Systems Programming Tools of the Trade NA07B03
 
Mvs commands
Mvs commandsMvs commands
Mvs commands
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
JCL MAINFRAMES
JCL MAINFRAMESJCL MAINFRAMES
JCL MAINFRAMES
 

Similar to CICS Application Programming Overview

Blue Phoenix Idms Migration
Blue Phoenix Idms MigrationBlue Phoenix Idms Migration
Blue Phoenix Idms MigrationGilShalit
 
Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology OverviewHaim Ben Zagmi
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...Christopher Diamantopoulos
 
DACHSview++features
DACHSview++featuresDACHSview++features
DACHSview++featuresA. Steinhoff
 
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...VMware Tanzu
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0Thomas Conté
 
WAVV 2009 - Migration to CICS TS for VSE/ESA
WAVV 2009 - Migration to CICS TS for VSE/ESAWAVV 2009 - Migration to CICS TS for VSE/ESA
WAVV 2009 - Migration to CICS TS for VSE/ESAillustrosystems
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Aljoscha Krettek
 
Impact2014 session #1317 you have got a friend on z - tales from cics tran...
Impact2014  session #1317   you have got a friend on z - tales from cics tran...Impact2014  session #1317   you have got a friend on z - tales from cics tran...
Impact2014 session #1317 you have got a friend on z - tales from cics tran...Elena Nanos
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMchiportal
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKSPhil Reay
 
Logic synthesis with synopsys design compiler
Logic synthesis with synopsys design compilerLogic synthesis with synopsys design compiler
Logic synthesis with synopsys design compilernaeemtayyab
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019corehard_by
 

Similar to CICS Application Programming Overview (20)

Skillwise cics part 1
Skillwise cics part 1Skillwise cics part 1
Skillwise cics part 1
 
Blue Phoenix Idms Migration
Blue Phoenix Idms MigrationBlue Phoenix Idms Migration
Blue Phoenix Idms Migration
 
Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology Overview
 
Model_Driven_Development_SDR
Model_Driven_Development_SDRModel_Driven_Development_SDR
Model_Driven_Development_SDR
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
IMAGE CAPTURE, PROCESSING AND TRANSFER VIA ETHERNET UNDER CONTROL OF MATLAB G...
 
DACHSview++features
DACHSview++featuresDACHSview++features
DACHSview++features
 
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
Faster, more Secure Application Modernization and Replatforming with PKS - Ku...
 
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + KubernetesMongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
WAVV 2009 - Migration to CICS TS for VSE/ESA
WAVV 2009 - Migration to CICS TS for VSE/ESAWAVV 2009 - Migration to CICS TS for VSE/ESA
WAVV 2009 - Migration to CICS TS for VSE/ESA
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
 
Impact2014 session #1317 you have got a friend on z - tales from cics tran...
Impact2014  session #1317   you have got a friend on z - tales from cics tran...Impact2014  session #1317   you have got a friend on z - tales from cics tran...
Impact2014 session #1317 you have got a friend on z - tales from cics tran...
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Application Modernisation with PKS
Application Modernisation with PKSApplication Modernisation with PKS
Application Modernisation with PKS
 
Cobol
CobolCobol
Cobol
 
Logic synthesis with synopsys design compiler
Logic synthesis with synopsys design compilerLogic synthesis with synopsys design compiler
Logic synthesis with synopsys design compiler
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
 

More from Srinimf-Slides

software-life-cycle.pptx
software-life-cycle.pptxsoftware-life-cycle.pptx
software-life-cycle.pptxSrinimf-Slides
 
Python Tutorial Questions part-1
Python Tutorial Questions part-1Python Tutorial Questions part-1
Python Tutorial Questions part-1Srinimf-Slides
 
Cics testing and debugging-session 7
Cics testing and debugging-session 7Cics testing and debugging-session 7
Cics testing and debugging-session 7Srinimf-Slides
 
Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Srinimf-Slides
 
Cics data access-session 4
Cics data access-session 4Cics data access-session 4
Cics data access-session 4Srinimf-Slides
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3Srinimf-Slides
 
The best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherThe best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherSrinimf-Slides
 
The best ETL questions in a nut shell
The best ETL questions in a nut shellThe best ETL questions in a nut shell
The best ETL questions in a nut shellSrinimf-Slides
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialSrinimf-Slides
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysSrinimf-Slides
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersSrinimf-Slides
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfSrinimf-Slides
 
Writing command macro in stratus cobol
Writing command macro in stratus cobolWriting command macro in stratus cobol
Writing command macro in stratus cobolSrinimf-Slides
 
PLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersPLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersSrinimf-Slides
 
PL/SQL Interview Questions
PL/SQL Interview QuestionsPL/SQL Interview Questions
PL/SQL Interview QuestionsSrinimf-Slides
 

More from Srinimf-Slides (20)

software-life-cycle.pptx
software-life-cycle.pptxsoftware-life-cycle.pptx
software-life-cycle.pptx
 
Python Tutorial Questions part-1
Python Tutorial Questions part-1Python Tutorial Questions part-1
Python Tutorial Questions part-1
 
Cics testing and debugging-session 7
Cics testing and debugging-session 7Cics testing and debugging-session 7
Cics testing and debugging-session 7
 
Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5
 
Cics data access-session 4
Cics data access-session 4Cics data access-session 4
Cics data access-session 4
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3
 
100 sql queries
100 sql queries100 sql queries
100 sql queries
 
The best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherThe best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresher
 
The best ETL questions in a nut shell
The best ETL questions in a nut shellThe best ETL questions in a nut shell
The best ETL questions in a nut shell
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven Days
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe Programmers
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by Srinimf
 
Writing command macro in stratus cobol
Writing command macro in stratus cobolWriting command macro in stratus cobol
Writing command macro in stratus cobol
 
PLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersPLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe Programmers
 
PL/SQL Interview Questions
PL/SQL Interview QuestionsPL/SQL Interview Questions
PL/SQL Interview Questions
 
Macro teradata
Macro teradataMacro teradata
Macro teradata
 
DB2-SQL Part-2
DB2-SQL Part-2DB2-SQL Part-2
DB2-SQL Part-2
 
DB2 SQL-Part-1
DB2 SQL-Part-1DB2 SQL-Part-1
DB2 SQL-Part-1
 
Teradata - Utilities
Teradata - UtilitiesTeradata - Utilities
Teradata - Utilities
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

CICS Application Programming Overview

  • 1. CICS - Application Programming DAY 1 – SESSION 2 Updated in Nov 2004
  • 2. Session 2 : ObjectivesTo understand The languages that support CICS CICS Command format and Argument Values CICS Embedding in COBOL Application program The CICS Control block EIB The DFHCOMMAREA Program preparation and execution The Task flow
  • 4. CICS Command Format EXEC CICS function [option ( argument value)] [option ( argument value)] ... [RESP ( argument value)] END-EXEC
  • 5. Argument values Data Value Data Area Name Label Time in hhmmss format Pointer Reference
  • 6. CICS Commands - Examples EXEC CICS RECEIVE INTO(WS-INPUT) LENGTH(WS-IN-LENGTH) RESP(WS-CICS-RESP-CODE) END-EXEC. EXEC CICS SEND FROM(WS-OUTPUT) LENGTH(WS-OUT-LENGTH) RESP(WS-CICS-RESP-CODE) END-EXEC. EXEC CICS RETURN TRANSID(WS-NXT-TRANSID) COMMAREA(WS-COMM-AREA) END-EXEC.
  • 7. COMMAREAA COMMAREA is a CICS maintained unit of storage for passing and receiving data between CICS programs Any changes to the COMMAREA in the linked program, will be available to the linking program after RETURN Coded as DFHCOMMAREA in the Linkage Section
  • 8. Transaction Execution - COMMAREA WORKING STORAGE SECTION 01 WS-COMM-AREA LINKAGE SECTION 01 DFHCOMMAREA PROCEDURE DIVISION. ……...…...……. ...Processing… EXEC CICS RETURN TRANSID(‘TXN1’) COMMAREA(WS-COMM-AREA) END-EXEC. First Execution - TXN1 WORKING STORAGE SECTION 01 WS-COMM-AREA LINKAGE SECTION 01 DFHCOMMAREA Next Execution - TXN1 Communication Area - Maintained by CICS Between Executions
  • 9. Structure of CICS Application program - COBOL IDENTIFICATION DIVISION. PROGRAM-ID . XXXXXXXX. ENVIRONMENT DIVISION. <=== THIS DIVISION MUST BE EMPTY DATA DIVISION. <=== FILE SECTION IS OMITTED WORKING- STORAGE SECTION. 77 --------------------- . 01 --------------------- . 05 ---------------- . LINKAGE SECTION. <=== LINKAGE SECTION IS MANDATORY 01 DFHCOMMAREA. <=== COMMUNICATION AREA required for 05 -----------------. passing data for subsequent execs. PROCEDURE DIVISION . ( COBOL STATEMENTS) + <=== CICS statements mixed with COBOL ( CICS STATEMENTS) statements. Some COBOL verbs not . allowed. GOBACK.
  • 10. Structure of CICS Application program – COBOL (Contd.) The following COBOL statements cannot be issued in a CICS application program. - ACCEPT - DATE - DISPLAY - EXHIBIT - RELEASE - SORT - STOP RUN - TRACE - Any I/O statements ( OPEN ,CLOSE, READ, WRITE, REWRITE, DELETE , START)
  • 11. The Execute Interface Block (EIB) A CICS area that contains information related to the current Task – data, time, transaction-id The definition is automatically inserted into the LINKAGE SECTION of the program before the DFHCOMMAREA at the time of program translation EIB variables are available in the copy book DFHEIBLK Information in the EIB fields can be used for ◦ Handling error/exceptions (EIBRESP, EIBRESP2) ◦ Checking the length of data passed to the program through its DFHCOMMAREA (EIBCALEN) ◦ Identifying the function key pressed
  • 12. EIB : ExampleEVALUATE TRUE WHEN EIBCALEN = ZERO MOVE LOW-VALUE TO INQMAP10 …….. …….. PERFORM 1400-SEND-CUSTOMER-MAP WHEN EIBAID = DFHCLEAR MOVE LOW-VALUE TO INQMAP10 …….. …….. PERFORM 1400-SEND-CUSTOMER-MAP WHEN EIBAID = DFHPA1 OR DFHPA2 OR DFHPA3 CONTINUE WHEN EIBAID = DFHPF3 OR DFHPF12 EXEC CICS ……
  • 13. Sample CICS Program – COBOL IDENTIFICATION DIVISION. PROGRAM-ID . SAMPPROG. ENVIRONMENT DIVISION. DATA DIVISION. WORKING STORAGE SECTION. 77 WS-LENGTH PIC S9(4) COMP. 77 WS-RESP PIC S9(4) COMP. 01 WS-INPUT. 05 WS-TRAN-IDPIC X(4) . 05 FILLER PIC X. 05 WS-IN-DATA PIC X(15). 01 WS-OUTPUT. 05 WS-MSG_DESC PIC X(17). 05 FILLER PIC X . 05 WS-OUT-DATA PIC X(15). LINKAGE SECTION. 01 DFHCOMMAREA. 05 LS-COMMAREA PIC X. PROCEDURE DIVISION. MOVE 40 TO WS-LENGTH. MOVE LOW-VALUES TO WS-INPUT EXEC CICS RECEIVE INTO (WS-INPUT) LENGTH (WS-LENGTH) RESP(WS-RESP) END-EXEC. IF WS-RESP = DFHRESP(NORMAL) MOVE LOW-VALUES TO WS-OUTPUT MOVE WS-IN-DATA TO WS-OUT-DATA MOVE ‘MSG RECEIVED IS :’ TO WS-MSG-DESC MOVE 53 TO WS-LENGTH ELSE MOVE LOW-VALUES TO WS-OUTPUT MOVE WS-IN-DATA TO WS-OUT-DATA MOVE ‘ERROR IN TXN : ’ TO WS-MSG-DESC MOVE 53 TO WS-LENGTH END-IF. EXEC CICS SEND FROM (WS-OUTPUT) LENGTH(WS-LENGTH) END-EXEC. EXEC CICS RETURN END-EXEC .
  • 15. CICS - DB2 Program Preparation Compile Object Module Link-Edit Load Module Compiler Listing Translated Source Source Program Translator Listing Translate Precompile Listing Pre-Compile Application Plan DBRM Bind
  • 16. CICS Program Preparation (Contd.) COBOL-CICS programs should be compiled with RENT option to make it Re-entrant. A CICS-DB2-COBOL program would require a few more additional steps like a Pre-compile and a Bind. The pre-compiler would generate a DBRM (Database Request Module) and the bind will generate a plan or package using the DBRM.
  • 17. CICS Security - Sign-on, Sign- off Security for accessing CICS system Until CICS 2.2 users required to be defined as resources in CICS System Table - Signon Table (SNT). But with higher releases the SNT has become obsolete and RACF is used as the External Security manager. CESN or CSSN for signon, CESF or CSSF for signoff
  • 18. CICS Program Execution Register the transaction in PCT Register the Programs and Maps in PPT Sign on to CICS Enter transaction identifier
  • 19. Starting a TASK TXN1 Trans. Program TXC1 MAPPGC1 TXC2 MAPPGC2 TXN1 TXNPGM1TXN1 TXNPGM1 TXN2 TXNPGM2 PCT Program. Location MAPPGC1 In Storage MAPPGC2 On Disk TXNPGM1 In StorageTXNPGM1 In Storage TXNPGM2 On Disk PPT Load Module Library MAPPGC1 MAPLIB MAPPGC2 MAPLIB TXNPGM1 PGMLIBTXNPGM1 PGMLIB TXNPGM2 PGMLIB CICS Address Space TXNPGM1 MAPPGC1
  • 20. CICS Statements after Translation Original Source Code : EXEC CICS READ DATASET(ACCMSTR) INTO(ACCT-MSTR-DTLS) RIDFLD(ACCT-NO) RESP(RESP-CODE) END-EXEC. Translated Source * EXEC CICS * READ DATASET(‘ACCMSTR’) INTO(ACCT-MSTR-DTLS) * RIDFLD(ACCT-NO) RESP(RESP-CODE) * END-EXEC. MOVE ‘..0……00061 ‘ TO DFHEIV0 MOVE ‘ACCMSTR’ TO DFHC0080 MOVE LENGTH OF ACCT-MSTR-DTLS TO DFHB0020 CALL ‘DFHEI1’ USING DFHEIV0 DFHC0080 ACCT-MSTR-DTLS DFHB0020 ACCT-NO MOVE EIBRESP TO RESP-CODE.
  • 21. Session 2 : Summary Language support and Embedding in COBOL Command syntax & Argument values Structure of a CICS application program Control Block and Common Area to pass data across programs Program preparation and Program execution - PCT, PPT Task flow diagram