You are on page 1of 16

Run your first CICS application on a PC using

TXSeries for Windows


Skill Level: Intermediate

Wen Z Lu (wenlu1@uk.ibm.com)
TXSeries Product Team
IBM

Alex Marshall
Software Engineer
Student

26 Nov 2007

Learn the basics of the IBM® Customer Information Control System (CICS). With a
hands-on exercise, learn how to get your first CICS application up and running on
your desktop using TXSeries® V6.1 for Windows®. The tutorial shows you how to
download and install a free trial version of TXSeries V6.1.

Section 1. Before you start

About this tutorial


Learn the basic concepts and terminology to demystify the IBM Customer
Information Control System (CICS). Learn to install TXSeries for Multiplatforms V6.1
on Windows, and to deploy a pre-compiled sample application written in COBOL.
The tutorial skips complex setup requirements by taking advantage of the free trial
download of TXSeries V6.1 and a comprehensive example.

This tutorial is for newcomers to CICS, and does not require any explicit
programming experience.

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 16
developerWorks® ibm.com/developerWorks

Objectives
Upon completion of this tutorial, you will understand the value and basic concepts of
CICS. The hands-on experience will give you enough information to work with CICS
to solve more complex business problems.

Prerequisites
It is assumed you have a general familiarity with the Microsoft® Windows operating
system, Web-browsers such as Internet Explorer, and Windows utilities such as the
command line interface.

System requirements

To complete the steps in this tutorial, you need to install TXSeries for Multiplatforms
V6.1, which requires one of the following operating systems:
• Windows XP Professional with Service Pack 2
• Windows Server 2003 Standard Edition with Service Pack 1
• Windows Server 2003 Enterprise Edition with Service Pack 1

This tutorial was written using Windows XP Professional with Service Pack 2. You
must have Administrator privileges for your Microsoft Windows user account.

Section 2. What is CICS?


This section covers some basic concepts. With CICS, people are usually referring to
CICS Transaction Server for z/OS, which is an industrial strength transaction
processing system on IBM System z. CICS can also refer to the IBM CICS family,
which is a rich set of transaction processing solutions, connectors, and tools. CICS
supports high levels of transaction processing needs of many businesses around the
world. Millions of transactions get processed daily as the backbone of critical
business operations.

A transaction implements a self contained business task with a "once-only"


guarantee, such as credit and debit accounts, or a ticket reservation. Typically a
transaction has many users accessing shared data that must be kept consistent,
accurate, and safe. To stay competitive, businesses also require that transactions

Run your first CICS application on a PC using TXSeries for Windows


Page 2 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

execute quickly, and around the clock.

To ensure optimum data consistency, and to avoid cases of financial loss (such as
an interrupted credit/debit, leaving both accounts short), a transaction conforms to
the atomic, consistent, isolated, and durable (ACID) property. It must succeed or fail
as a complete unit and not in any intermediate state, guaranteeing the integrity of
data and operations.

A transaction processing system provides a set of interfaces and services to:


• Allow applications to be written in a range of programming languages
• Exploit the architecture benefits of different operating platforms
• Handle issues of security, workload balancing, and communication with
other systems and databases
• Leave the application to only implement business logic, and solve the
business problem

TXSeries for Multiplatforms is the transaction processing environment for managing


CICS applications, or transactions on distributed platforms, such as AIX, Solaris, and
Windows. TXSeries shares the same design principals and workings of CICS
Transaction Server.

Deployment
To deploy any transaction, or a CICS application, you need to consider how to:
• Write the CICS program
• Store data involved in a transaction
• Present the outcome of the transaction to the end user

A three-tier architecture is commonly used in business application deployments. The


three tiers are:

Data logic
This, in effect, is a data store where data can be retrieved, updated, and
over-written to complete the transaction. An example is a bank balance after a
cash withdrawal from an ATM. The data logic is handled by data servers, or
enterprise information systems (EIS) that TXSeries connects to, such as IMS
and DB2. The exercise in this tutorial uses the Structure File System (SFS) that
is a part of TXSeries as a data store.

Business logic

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 3 of 16
developerWorks® ibm.com/developerWorks

Real business problems are solved by running a program in this tier containing
necessary instructions about what to do with data. With the business logic,
TXSeries acts as a business application server, processing a CICS application
reliably and securely.

Presentation logic
Deals with the user interface. This tutorial uses the CICS Universal Client.
Alternatively, you can have a Web application to connect to the business logic
running in CICS.

Section 3. Install TXSeries


To install the trial version of TXSeries:

1. Download the TXSeries for Multiplatforms V6.1.

2. Save the setup file in a directory. Extract the files into a temporary folder,
such as Desktop for easy access.

3. Install TXSeries by launching the setup file named


TXSeriesV61-windows.exe.

1. Read the TXSeries License Agreement and Terms, and click


Accept.

2. Install to the default directories:


C:\opt for TXSeries
C:\Program Files\ibm\CUC for CICS Universal Client (CUC).

3. A trial license, valid for 90 days, is enabled. During installation you


are informed in a window of the date and time when the trial
license will expire.

5. Configure the users and groups for accessing CICS by setting your
Windows logon account. For example, Alex will be a member of cicsgroup
for access to execute CICS commands.

1. Launch the Control Panel and select Administrative Tools >


Computer Management.

2. From the left menu select Users from Local Users and Groups.

Run your first CICS application on a PC using TXSeries for Windows


Page 4 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

3. Within this view, locate your current user account, right-click and
select properties.

4. In the user properties pane select Member Of and click Add.


Figure 1. Setting correct user permissions

5. Enter cicsgroup in the text box and click OK.

6. Click OK to close the preferences window, but leave the Computer


Management window open for the next step.

7. Set the TXSeries service to run under this user to avoid any restrictions
on the execution of applications and services.

1. From the Computer Management window, which should still be


open, select Services from Services and Applications.

2. Locate TXSeries LWI Service in the list, right-click on it, and select
properties.

3. Select the Log On tab, and check This account.

4. Enter the name of your Windows account, which is case sensitive,


and the account password.
Figure 2. Checking if TXSeries Service is running correctly

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 5 of 16
developerWorks® ibm.com/developerWorks

5. Click OK to confirm the changes.

9. You must restart your computer to enable these changes. On reboot, the
TXSeries service will launch in the background.

Well done -- you installed TXSeries.

Section 4. Configure TXSeries


In this section you use the Web-based IBM TXSeries Administration Tool to create

Run your first CICS application on a PC using TXSeries for Windows


Page 6 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

and configure a TXSeries region.

1. From the Start menu select IBM > TXSeries for Multiplatforms and
launch IBM TXSeries Administration Tool.

2. It will ask you to log in. Use your Windows account name and password,
which are case sensitive.

3. Create a new CICS Region:

1. Select Regions from the menu on the left and click All Regions.

2. Click Create.

3. Enter a name for the new CICS Region. Use Test for this tutorial.
Leave the File Management option set to SFS, which is the default.
Figure 3. Creating a new CICS Region

5. Create a listener for the region, for example by specifying the protocol
format:

1. Expand the Test region you just created by clicking on + (plus


sign).

2. Select listeners.

3. Click Add.
Figure 4. Creating a new listener

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 7 of 16
developerWorks® ibm.com/developerWorks

4. On the next panel, enter LST1 in the Listener Name field, change
the Protocol type to Named Pipe, and enter CICSCC for the Local
Named Pipe name.

5. Click Submit. A message should tell you the listener has been
created successfully.

7. Create an SFS Server for the region. A CICS Structures File System
(SFS) is a virtual storage access method. It is a record-oriented file
system that can provide indexed, relative, and sequential access to
file-based data. The SFS lets you store fully recoverable file-based data.

1. Expand SFS Servers from the left menu in the Web-based


Administration Console.

2. Select All SFS Servers.

3. Select Create.

4. On the next panel, in the Name field enter Test.

5. Click Submit. A message should indicate that the SFS has been

Run your first CICS application on a PC using TXSeries for Windows


Page 8 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

created successfully.

Now you're ready to work with the CICS application.

Section 5. Run the sample program


In this section you use the TXSeries Installation Verification Program (IVP) as a
sample program to verify the installation.

To install and configure IVP:

1. TXSeries comes with the source code for the IVP, but the compilation of
IVP is outside of the scope of this tutorial. Download and use the
pre-compiled IVP binaries in IVP-C.ZIP.
Download IVP-C.ZIP and extract the files into the
c:\opt\cics\samples\ivp\C directory, which should already exist but doesn't
contain any files.

2. Start a Windows command prompt. Change to the CICS directory using


the command:

cd c:\opt\cics\bin

3. Enter the following command to retrieve the SFS volume name:

sfsadmin list lvols -server


/.:/cics/sfs/Test

Write down or remember the volume name because you'll need it for the
next command. The name of the SFS server is shown in bold.

4. Enter the following command to add the programs into the CICS region,
but substitute <sfs_volume_name> for the name of the SFS volume
returned by the previous command.

cicsivp -r Test -lC -s


/.:/cics/sfs/Test -v
<sfs_volume_name>

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 9 of 16
developerWorks® ibm.com/developerWorks

A return code of 0 is displayed to suggest that the command has been


completed successfully.

5. To start the region, in the Web-based TXSeries Administration Console


select All Regions in the left pane. Click on the test region, and
drop-down boxes will appear where you can change the Start Type to
Cold. Click Start to start the region so that you can connect to it.
Figure 5. Starting the region

6. When the region starts, which may take a few moments, a message
confirms the success of the process.

Running the application


The next step is to configure and start a local terminal to test the IVP, or the MENU
application that you just deployed.

One way to access a terminal-based CICS application residing on a TXSeries region


is with the CICS local terminal. A CICS terminal application is supplied and installed
along with the TXSeries Evaluation.

1. Open the CICS local terminal initialization file (c:\opt\cics\bin\cicslcli.ini) in


a text editor such as Notepad.

2. Scroll down to the first server definition and change the server name to
our TXSeries region name, Test.

3. Set the NamedPipeName value to the name of the listener created


earlier, CICSCC.

4. Save and close the file.

5. Now that the terminal is configured you can connect to the region. From
the Windows Start menu select Programs > IBM >TXSeries for
Multiplatforms > Start Local Terminal. From the list of servers, select
TEST and click OK to connect.

Run your first CICS application on a PC using TXSeries for Windows


Page 10 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

6. The terminal, which is now connected to the Test region, should appear
blank with a green line along the bottom. The cursor position is
highlighted by a flashing underscore.
To enter the transaction name, type MENU in the top left of the terminal
and press the right-hand CTRL key to execute the MENU application.

Figure 6. Terminal awaiting input

7. The application will be executed by CICS, and the output displayed on the
terminal. Using the simple menu based system you can add and create
records that are saved in the SFS region. To create a record:

1. The cursor will be in the transaction field by default. Type ADDS.


The cursor will then jump to the next field. Enter 000001 in the
Number field. Press Enter to execute the command.
Figure 7 shows the result. You can now enter data into the
application. Press Enter again to commit this data.

2. You can repeat this process, incrementing the number field, to add
more records.

3. To try the Inquiry option, enter INQY and 000001. The first record
you created will be displayed.

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 11 of 16
developerWorks® ibm.com/developerWorks

4. Now that you are familiar with using MENU, try the BRWS and UPDT
options.
Figure 7. Performing an inquiry

Congratulations! You have successfully run your first CICS application on your PC.

Section 6. Troubleshooting
If you are trying to complete this tutorial offline, disconnected from a Local Area
Network connection, you might require the Microsoft Loopback adapter. TXseries
relies upon the network layer to operate.

See Resources for more information about the Loopback adapter from Microsoft.

Section 7. Conclusion
In this tutorial you learned the basics of a CICS application, and took the first
practical step in running it on your desktop using TXSeries.

Run your first CICS application on a PC using TXSeries for Windows


Page 12 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

TXSeries and CICS Transaction Server for z/OS share the same design principles,
and TXSeries shares a subset of its functions. Any CICS application run or tested on
TXSeries can be easily migrated onto and integrated with Transaction Server for
z/OS to exploit the architectural advantages of the z/OS platform.

To further enhance your productivity in application development, you can use


Rational Developer for System z (RDz) to write and compile for TXSeries and CICS
TS applications. You can also use it to optimize the test and debug process for
mainframe CICS applications by running it in a form of TXSeries before deploying to
CICS TS.

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 13 of 16
developerWorks® ibm.com/developerWorks

Downloads
Description Name Size Download method
TXSeries IVP Compiled Binaries ivp-c.zip 17KB HTTP

Information about download methods

Run your first CICS application on a PC using TXSeries for Windows


Page 14 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks®

Resources
Learn
• The IBM Redbook Revealed! The Next Generation of Distributed CICS (ISBN
0-7384-9577-8) discusses distributed IBM Customer Information Control
System (CICS) solutions and how best to develop distributed CICS applications.
• Designing & Programming CICS Applications (ISBN 1-56592-676-5), O'Reilly
Media, introduces new users of IBM's mainframe (OS/390) to CICS features. It
shows experienced users how to integrate existing mainframe systems with
newer technologies, including the Web, CORBA, Java, CICS clients, and Visual
Basic, as well as how to link MQSeries and CICS.
• The TXSeries for Multiplatforms CICS Application Programming Guide
describes the IBM TXSeries for Multiplatforms application programming
interface (API). It explains how to prepare application programs that use CICS
on AIX, HP-UX, Solaris, and Windows systems.
• The TXSeries for Multiplatforms V6.1 CICS Installation Guide is useful for
installation questions.
• "Using IBM WebSphere Developer for System z and TXSeries for
Multiplatforms to build CICS applications" (developerWorks, Apr 2007) explains
how to write CICS applications in IBM COBOL using IBM WebSphere
Developer for System z v7.0 and IBM TXSeries for Multiplatforms v6.1.
• Find more information about the Loopback adapter from Microsoft.
• Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
• Download a trial version of TXSeries for Windows V6.1.
Discuss
• Check out developerWorks blogs and get involved in the developerWorks
community.

About the authors


Wen Z Lu
Wen Lu is a software engineer at the IBM Hursley Lab. Wen has worked in
Information Development, System Test, and Integration Test for WebSphere
products. She joined the TXSeries offering team in 2005. Wen holds a degree in
Mathematics and Computation from University of Oxford, England.

Run your first CICS application on a PC using TXSeries for Windows


© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 15 of 16
developerWorks® ibm.com/developerWorks

Alex Marshall
Alex Marshall is a software engineering student from Durham University. He is
currently working for the CICS Test department as part of an internship with IBM. His
interests include transaction processing, Web development, and social networking.
His current research includes visualizing and providing tools for analyzing unusual
sources of temporal based datatr using Web-based mapping services.

Run your first CICS application on a PC using TXSeries for Windows


Page 16 of 16 © Copyright IBM Corporation 1994, 2008. All rights reserved.

You might also like