[ZOIS] Site Home Page * Contact ZOIS * Search * Contents * Demonstrations * Blog

CICS

History

CICS was not the first Transaction Processing Monitor (TPM), that honour falls to the predecessors of TPF in the airline industry. The production of CICS was influenced by these early TPM such as the SABRE project. CICS is the work of many people, but like all things started with one, Ben Riggins. Riggins saw that the many opportunities that things like the SABRE project had brought to the Airline industry could equally well be applied to the Public Utility market in the United States. PUCICS (Public Utility Customer Information Control System) was basically written to fulfill that need. CICS, as it eventually became know, first saw the light of day as a free program in 1968, although you did need to have bought one of those new, powerful 32 bit IBM 360s. It is written in assembler and was really only a terminal control program with some database capability. CICS eventually goes through several versions picking up more and more of the attributes of a TPM along the way (for example elementary Transaction Control by the early 70's).

[Picture:  Country house (detail)]
Hursley Park: IBM's home for CICS

By 1979 it was realised that the assembler based CICS with its poor multi-threaded single memory model could not continue into future, and a new CICS, the basis of the current Mainframe version, was written in a high level language. This rework was so extensive that it was incorporated gradually and it was not until the late 80's that it was finally complete when version 3 was introduced. In the early 90's the CICS Application Programming Interface was extended to the AS400 and OS/2 platforms, with the Encina Tool Kit version being announced on AIX, IBM's UNIX like operating system in 1992.

General Description

As we have seen CICS is actually more than just one product (indeed more that one product from one company). IBM have four different code bases all of which are called CICS. In addition to CICS IBM have two further TPM, IMS and TPF. Six Transaction Process Monitors, not bad for one company, but it is rather large. Here's the, currently, exhaustive, in our estimation, list of CICSen.

Mainframe CICS
Currently available for z/OS (quondam MVS/ESA) operating system on IBM and IBM look alike mainframe architectures. Both the successors to the original 360 and the newer MPP based 390 ones are supported. The current release is now called CICS TS 3/2. This is the definitive CICS, it has a slight variant which can be used on the older VSE operating system. This CICS now has the ability to run Enterprise Java Beans (EJB) in conjunction with `ordinary' CICS programs. More can be found at the OS/390 CICS web site.

iSeries (quondam AS/400) CICS (now withdrawn)
This was found on the IBM's AS/400 series computers, but is now withdrawn.

CICS/ETK (officially TXSeries for Multiplatform)
"CICS/ETK" is not really the official name since it has various names on the different platforms that it finds itself. This is the CICS that was formally built on top of the Encina Tool Kit (ETK). It is found on various UNIXs, AIX, DIGITAL/UNIX (formally known as OSF/1, now withdrawn), HP-UX, SINIX (now withdrawn) and Solaris. It is also latterly found in Windows NT (where it was once known as Transaction Server) and now Windows 2003. This is the CICS that ZOIS is familiar with (and specialises in) and its current release is v7.1. The oft-promised Linux version still seems to be in the works.

As part of the reorganisation that took place when IBM fully purchased Transarc responsibility for this particular CICS moved to Transarc. It was then bundled with Encina itself (not just the Tool Kit) and the resultant package called TXSeries. It was, for a time, further bundled up in Websphere Enterprise Edition (WSEE), IBM's major offering in the Enterprise Java Beans (EJB) server market. Subsequently the Encina component was withdrawn and the IBM TXSeries web site has more.

CICS/Small-Systems (now sort-of withdrawn)
This isn't a fully functional Transaction Monitor in the true sense, it makes a good job of implementing the API but cannot participate in Transactions (Logical Units of Work). It was available on OS/2 and on Windows NT, where it was the Official CICS for NT prior to version 4. This CICS made a comeback as part of the Visual Age for COBOL development suite (on Windows platforms).

Then there are CICS Clones which have grown up around Mainframe CICS and are not IBM products.

UniKix (now called this again after several name changes)
Originally UniKix existed as a separate company. It was then owned by Bull, Fisher Technology Group (FTG), PeerLogic, Critical Path and then SUN. This TPM is widely recognized as being the first (of sorts) available on UNIX. SUN followed Critical Path's example and had renamed it MTP. UniKix is currently owned by Clerity and the UniKix name was revived. Further information can be had from the UniKix web pages.

CICX
Briefly subject to announcements in 1998 from BEA Systems, this was Tuxedo with a CICS API. It is no longer available and BEA's web-site makes no mention of it.

As an update (April 2010), as of version 11, Oracle Tuxedo, is now boasting a CICS interface again. This seems to be an entirely new effort and aimed squarely at the Mainframe re-hosting market. For now, it doesn't have a very snappy name, being called on the web-site "Oracle Tuxedo Application Runtime for CICS and Batch".

Further information on things called CICS and things which look like CICS as a whole can be gained from the Distributed CICS book [Schreiber & Ogden], which analyses the various CICSen with a view to down-sizing mainframe applications.

On this site, of the CICSen around, CICS/ETK is the one with which we (that is ZOIS) are the most familiar. So the following narrative concerns it. The examples though can apply to all of the CICSen, so long as they support Direct Program Link.

CICS is a client/server system, with clients making requests of servers. In CICS the servers are known as Application Servers or AS. These are individual operating system processes running under the control of the Application Manager or AM. The AS's are grouped into domains known as Regions. The Regions support a number of Programs known as Transaction Programs, or simply (and confusingly for the non-CICS person as Transactions). These programs are loaded dynamically into the Application Servers upon demand and are identified by often cryptic four letter names (four letters is the maximum).

CICS's Transactions are managed by the TRAN component of the Encina Tool Kit and thus it is the individual ASs which track the Transactions in a separate thread of control, much as Encina. The Application Servers are permanently connected to the Resource Managers (such as databases). With the retirement of Encina the TRAN component has been internalised and is now known as CICS/OLTP.

More Information

There is more on CICS/ETK in [Kolban] one of a number of books on OLTP dedicated to this particular TPM. IBM also have a web site on CICS, although much of the material there is of the form of a product brochure they do have the CICS/ETK Manuals online.

Example Code for CICS

Remember the Source Code caveats.

In this example we're using the CICS Direct Program Link mechanisms, The sharp eyed will spot that there is no attempt by CICS to define an interface between the two systems that we are using (there is no IDL or Tuxedo VIEW mechanism for example). This lack of interface reflects the COBOL parentage and relatively mono-architecture base of this TPM.

Found in the client ...


        exec cics getmain set (buf) length (sizeof (struct buf_struct));
        
        buf->delta = delta;
        buf->remote_account = remote_account;
                        
        
        exec sql select amount from dosh_on_local_database 
                into :amount
                where 
                account = :local_account;
        
        if (amount - delta < 0) {
                report_to_user ("cant go overdrawn!");
                exec syncpoint rollback;
                exec cics return;
        } /* if */
        
        exec sql update dosh_on_local_database 
                set amount = amount - :delta 
                where 
                account = :local_account and 
                amount = :amount;
        
        exec cics link program ('DBCT') sysid ('RMT') 
                commarea (buf) length (sizeof (struct buf_struct));
        
        exec cics return;

CICS employs a chained Transaction model, with the Transaction beginning as soon as the program is started and a new one starting as soon as an exec cics syncpoint or syncpoint rollback is encountered. In this respect it differs from the other TPM mentioned on this site (see the Site Home Page). A Transaction is completed either with a return (implying implicitly COMMIT) or by an exec cics syncpoint, which completes one Transaction (known in the CICS jargon as a Logical Unit of Work) and starts another.

We can prematurely mark a Transaction as a failure using exec cics abend, in the example we don't want to go overdrawn. The exec cics link statement has a vote in the two phase commit. Should the transaction be marked as a failure then the client will be abnormally terminated too. This can be handled neatly with a handle abend statement, but for the sake of clarity and laziness this has not been shown. In the absence of such a handle the client program will 'abend' too, but with a code to say that a part of a transaction failed, and it didn't know what to do. In either case the preceding update will be rolled back (or Backed Out in CICS jargon).

Note the private memory allocation, via exec cics getmain.

The client, which as we can see has the Transaction control calls the DBCT Transaction Program. ...

        struct buf_struct *buf;

        exec cics address commarea (buf);

        exec sql select amount from dosh_on_remote_database
                into :amount
                where
                account = :buf->remote_account;

        if (amount + buf->delta) < 0) {
                report_to_user ("can't go overdrawn!");
                exec cics abend nodump abcode ('ODRW');
        } /* if */

        exec sql update dosh_on_remote_database
                set amount = amount + :buf->delta
                where
                account = :buf->remote_account and 
                amount = :amount;
        
        exec cics return;

As far as the SQL is concerned the server is much like the client. We deliberately assumed that the architecture of the two machines are identical so that we can pass a `C' struct willy-nilly across a network. This is most definitely not good programming practice. In reality the data in the buffer can be either converted by CICS using a form and code page mechanism or the user can send the data in a display format (easier to achieve in COBOL than 'C') or employ an interface language like XDR explicitly.

Pronouncing 'CICS'

In our travels we've encountered CICS in a number of locations and on a number of sites. There seems to be two ways to pronounce CICS and these divide the English Speaking World. The American way is enunciate the letters, so it is "see-eye-see-ess" and the European way is to pronounce it as a word, "kicks" though the harness of the 'C' varies with language. We are of the opinion that as Hursley is now the home of CICS and they call it "kicks" there then that's what it should be called. You can guarentee, however, that some American will point out that CICS was invented across the Atlantic, so the letters should be enunciated.

So, don't get us started on the pronunciation of SQL, SNA, Linux, vi, &c., &c. ...

~Z~


$Date: 2012/07/18 10:07:21 $


Break Frame * E-mail Webmaster * Author * Copyright