IBM Systems Magazine, Mainframe - May/June 2017 - 44

ADMINISTRATOR

LOGICAL Process
IBM CICS asynchronous API allows for more natural program creation

O

ne of the new features of CICS* Transaction Server (TS) V5.4 open beta is the
asynchronous API, making it easy to orchestrate concurrent logic in your CICS
programs. This article explores some of the design choices made while developing
the API, as well as demonstrates how to take advantage of it and its benefits.

Chris Poole
is an IBM Master
Inventor working
in the CICS
Development
team.

Concurrent Processing
An important property of most
CICS programs is the time it
takes to execute. For example,
an ATM may require a response
within five seconds and any
back-end system it calls must
respond in that time. Typically
the service-level agreement (SLA)
outlines these expectations. With
a program consisting of a set
of sequential instructions, the
obvious thing to do is to minimize
the time these instructions take to
execute. But doing this can only
take you so far.
The next obvious step to
reducing execution time is to run
parts of a program concurrently.
This has been the subject of
much research in the field of
computer science, with several
different implementations in
wide use. Threads and locks, and
the management they require,
are common technologies.
However, lock management
quickly becomes complicated,
largely because the concurrency
model often isn't natural for the

44 // MAY/JUNE 2017 ibmsystemsmag.com

programmer and the problem he
or she is trying to solve.
Communicating Sequential
Processes, a language developed
by C.A.R. Hoare in the 1970s,
allows for a more natural style
of encoding concurrency into
programs. The basic concept is
to construct a program out of
entities that communicate by
message passing alone and share
no state. A related development
is the actor model; descendent
implementations of these
technologies can be found in the
Erlang and Golang languages.
These schemes fit our own
human model of concurrency
well. For example, consider email.
You-an actor in this system-
could be emailed and asked
to provide some information
to someone. To reply, you first
email two people, asking them
to perform different tasks.
When they reply to say they've
completed their tasks, returning
any information you asked for,
you in turn can respond to the
original request.

Create Concurrent
Programs
This brings us to CICS. Existing
ways of performing asynchronous
processing in CICS include TS
Queues and polling, and/or
EXEC CICS START invocations.
Introduced in CICS TS V5.4 open
beta is a set of API commands,
providing a more natural way of
creating concurrent programs.
In the actor-style model of
concurrency, entities (actors) start
child entities (other actors); the
entities here are defined to be
CICS tasks. The message passing
semantics for communication
between entities (CICS tasks)
is achieved with channels and
containers, an existing technology
in CICS.
First, we introduce a command to
start child tasks in the CICS region:
EXEC CICS RUN
TRANSID(...) CHILD(...)
CHANNEL(...)

While similar to the EXEC CICS
START command, crucially with


http://www.ibmsystemsmag.com

Table of Contents for the Digital Edition of IBM Systems Magazine, Mainframe - May/June 2017

Table of Contents
Editor's Desk: Blockchain's Assets
IBM Perspective: The Foundation for Trust in Blockchains
Infographic: Securing Your Blockchian: The details that matter
Techbits: Spurring Economic Growth in Africa
Partner PoV: Current Demand: Modernize environment and applications to stay competitive
R&D: Cognitive Conditioning: How IBM researchers use machine learning to make storage smarter
Cover Story: The Business of Blockchain: The ledger technology is set to streamline markets and transform industries
Feature: Added Security: IBM delivers additional protection for blockchain
Feature: Shared Information: Blockchain works with systems of record to integrate data
TECH Showcase: To Serve and Protect: IBM Lab Services for z Systems and LinuxONE helps clients stay vigilant against data hackers
Administrator: Logical Process: IBM CICS asynchronous API allows for more natural program creation
Solutions: Mainframe Operations Intelligence, CA Technologies; GIT for IBM z/OS, Rocket Software; SMA_RT Software V3.3.005, Type80 Security Software Inc.; Topaz for Total Test, Compuware Corporation
Stop Run: From Military to Mainframe: McLaughlin defies the odds with determination and hard work
Reference Point - Global Events, Education, Resources for Mainframe
2017 Mainframe Solutions Edition
IBM Systems Magazine, Mainframe - May/June 2017 - Intro
IBM Systems Magazine, Mainframe - May/June 2017 - Cover1
IBM Systems Magazine, Mainframe - May/June 2017 - Cover2
IBM Systems Magazine, Mainframe - May/June 2017 - 1
IBM Systems Magazine, Mainframe - May/June 2017 - Table of Contents
IBM Systems Magazine, Mainframe - May/June 2017 - 3
IBM Systems Magazine, Mainframe - May/June 2017 - 4
IBM Systems Magazine, Mainframe - May/June 2017 - 5
IBM Systems Magazine, Mainframe - May/June 2017 - Editor's Desk: Blockchain's Assets
IBM Systems Magazine, Mainframe - May/June 2017 - 7
IBM Systems Magazine, Mainframe - May/June 2017 - IBM Perspective: The Foundation for Trust in Blockchains
IBM Systems Magazine, Mainframe - May/June 2017 - Infographic: Securing Your Blockchian: The details that matter
IBM Systems Magazine, Mainframe - May/June 2017 - Techbits: Spurring Economic Growth in Africa
IBM Systems Magazine, Mainframe - May/June 2017 - 11
IBM Systems Magazine, Mainframe - May/June 2017 - Partner PoV: Current Demand: Modernize environment and applications to stay competitive
IBM Systems Magazine, Mainframe - May/June 2017 - 13
IBM Systems Magazine, Mainframe - May/June 2017 - R&D: Cognitive Conditioning: How IBM researchers use machine learning to make storage smarter
IBM Systems Magazine, Mainframe - May/June 2017 - 15
IBM Systems Magazine, Mainframe - May/June 2017 - 16
IBM Systems Magazine, Mainframe - May/June 2017 - 17
IBM Systems Magazine, Mainframe - May/June 2017 - Cover Story: The Business of Blockchain: The ledger technology is set to streamline markets and transform industries
IBM Systems Magazine, Mainframe - May/June 2017 - 19
IBM Systems Magazine, Mainframe - May/June 2017 - 20
IBM Systems Magazine, Mainframe - May/June 2017 - 21
IBM Systems Magazine, Mainframe - May/June 2017 - 22
IBM Systems Magazine, Mainframe - May/June 2017 - 23
IBM Systems Magazine, Mainframe - May/June 2017 - 24
IBM Systems Magazine, Mainframe - May/June 2017 - 25
IBM Systems Magazine, Mainframe - May/June 2017 - 26
IBM Systems Magazine, Mainframe - May/June 2017 - Feature: Added Security: IBM delivers additional protection for blockchain
IBM Systems Magazine, Mainframe - May/June 2017 - 28
IBM Systems Magazine, Mainframe - May/June 2017 - 29
IBM Systems Magazine, Mainframe - May/June 2017 - 30
IBM Systems Magazine, Mainframe - May/June 2017 - 31
IBM Systems Magazine, Mainframe - May/June 2017 - Feature: Shared Information: Blockchain works with systems of record to integrate data
IBM Systems Magazine, Mainframe - May/June 2017 - 33
IBM Systems Magazine, Mainframe - May/June 2017 - 34
IBM Systems Magazine, Mainframe - May/June 2017 - 35
IBM Systems Magazine, Mainframe - May/June 2017 - 36
IBM Systems Magazine, Mainframe - May/June 2017 - TECH Showcase: To Serve and Protect: IBM Lab Services for z Systems and LinuxONE helps clients stay vigilant against data hackers
IBM Systems Magazine, Mainframe - May/June 2017 - 38
IBM Systems Magazine, Mainframe - May/June 2017 - 39
IBM Systems Magazine, Mainframe - May/June 2017 - 40
IBM Systems Magazine, Mainframe - May/June 2017 - 41
IBM Systems Magazine, Mainframe - May/June 2017 - 42
IBM Systems Magazine, Mainframe - May/June 2017 - 43
IBM Systems Magazine, Mainframe - May/June 2017 - Administrator: Logical Process: IBM CICS asynchronous API allows for more natural program creation
IBM Systems Magazine, Mainframe - May/June 2017 - 45
IBM Systems Magazine, Mainframe - May/June 2017 - Solutions: Mainframe Operations Intelligence, CA Technologies; GIT for IBM z/OS, Rocket Software; SMA_RT Software V3.3.005, Type80 Security Software Inc.; Topaz for Total Test, Compuware Corporation
IBM Systems Magazine, Mainframe - May/June 2017 - 47
IBM Systems Magazine, Mainframe - May/June 2017 - Stop Run: From Military to Mainframe: McLaughlin defies the odds with determination and hard work
IBM Systems Magazine, Mainframe - May/June 2017 - Cover3
IBM Systems Magazine, Mainframe - May/June 2017 - Cover4
IBM Systems Magazine, Mainframe - May/June 2017 - Reference Point - Global Events, Education, Resources for Mainframe
IBM Systems Magazine, Mainframe - May/June 2017 - 2017 Mainframe Solutions Edition
IBM Systems Magazine, Mainframe - May/June 2017 - SE2
IBM Systems Magazine, Mainframe - May/June 2017 - SE3
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20191112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/relevantz_20190102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/2019mfse
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20181112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/2018mfse
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20171112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_sesupp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_linuxsupp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20161112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/MainframeSecurity
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20151112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150910_se
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150910
http://www.ibmsystemsmagmainframedigital.com/MFSkills
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150506_supp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20141112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_gt_201405
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/BigData
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20131112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20121112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/buyersguide2013
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/ibmsystems_mainframe_2012bg
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20111112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20101112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100910_bg
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20091112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090506
http://www.nxtbook.com/nxtbooks/ibmsystemsmag/mainframe_20090304
http://www.nxtbook.com/nxtbooks/mspcomm/ibmsystems_mainframe_200901
http://www.nxtbookMEDIA.com