Skip to main content

Using IBM WebSphere Developer for System z and TXSeries for Multiplatforms to build CICS applications

Madhu Ananthapadmanabh (madhu.b.a@in.ibm.com), Software Developer, TXSeries, IBM
Picture of Madhu
Madhu B Ananthapadmanabh is a software engineer at IBM India Software Lab in Bangalore, India. He is a TXSeries developer. You can reach Madhu at madhu.b.a@in.ibm.com.

Summary:  This article teaches how to write CICS® applications in IBM COBOL using IBM® WebSphere® Developer for System z v7.0 (hereafter called WebSphere Developer) and IBM TXSeries for Multiplatforms v6.1 (hereafter called TXSeries). It is intended for users developing applications for CICS Transaction server (hereafter called CICS-TS) and TXSeries that have a good understanding of CICS-TS and TXSeries API usages, and the COBOL programming language

Date:  10 Apr 2007 (Published 14 Mar 2007)
Level:  Intermediate
Activity:  221 views

Introduction

WebSphere Developer for System z consists of a common workbench and an integrated set of tools that support end-to-end, model-based application development, run-time testing, and rapid deployment of on demand applications. It offers integrated development environments (IDEs) with advanced, easy-to-use tools and features to help WebSphere, CICS, and IMS developers rapidly design, code, and deploy complex applications.

CICS (Customer Information Control System) is a family of application servers and connectors that provides industrial-strength, on-line transaction management and connectivity for mission-critical applications. CICS Transaction Server for z/OS is the premium transaction processing monitor (TPM) from IBM. IBM supplies the total infrastructure that companies need to model, develop, deploy, and manage their critical business applications. As part of this infrastructure, CICS TS exploits the qualities of service associated with the z/OS platform. Today, a lot of businesses across the industry (banking, insurance, telecom...) run on CICS TS.

TXSeries is the next generation of distributed CICS. It is a non-J2EE transaction server, and a rapid deployment, non-J2EE integration server. Being part of the CICS family of products it shares the same value proposition: robust, secure, extendable, and scalable. It is the only distributed transaction-processing solution designed to enable you to scale your applications to CICS Transaction Server on the mainframe if your business requirements grow. And because it follows the CICS programming paradigm, it is an ideal companion product for mainframe CICS users with distributed application or integration requirements.

Recent versions of WebSphere Developer (v7 onwards) use TXSeries v6.1 as the underlying engine to support:

  • Developing CICS applications in IBM PL/I and COBOL for Windows®
  • Checking the syntax of multiple versions of COBOL CICS applications, CICS-TS and TXSeries.
  • Translating, compiling and testing TXSeries COBOL CICS applications.

This article takes you through the necessary steps to:

  1. Configure WebSphere Developer V7.0 and TXSeries.
  2. Check the syntax, compile, deploy and test a sample COBOL CICS application for TXSeries.
  3. Check the syntax of CICS-TS COBOL CICS applications.

Preparing your workstation

To prepare your workstation, you need to complete the following tasks:

  1. Check the hardware and software prerequisites for both WebSphere Developer and TXSeries.
  2. Install WebSphere Developer
  3. Install TXSeries.
  4. Configure a TXSeries region.
  5. Configure a CICS local terminal

Hardware and software prerequisites

Table1 lists the combined hardware prerequisites for WebSphere Developer and TXSeries.

Table 1: Hardware requirements for WebSphere Developer and TXSeries

HardwareRequirements

Processor

800 MHz Pentium(R) III or higher

Memory

Minimum: 768 MB RAM

Disk space

3.5 GB for default installation of WebSphere Developer.

200MB for TXSeries

Display

1024 x 768 display minimum using 256 Colors (Higher is recommended)

Other hardware

Microsoft® mouse or compatible pointing device

Software prerequisites

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

In this article we will work with Windows Server 2003 Enterprise Edition.

Installing WebSphere Developer

The steps for installing WebSphere Developer are detailed in the IBM WebSphere Developer for System z Installation Guide (SC31-6316-06). WebSphere Developer sits on top of Rational Application Developer. You will need to use the IBM Installation Manager, which is installed first if not available on your machine.

Installing TXSeries

You can invoke the TXSeries installer either form the WebSphere Developer launcher program or directly form the TXSeries installation CD. The steps for installing TXSeries are detailed in the TXSeries for Multiplatforms V6.1 CICS Installation Guide (SC34-6632-01).

Configuring a TXSeries region

A TXSeries region is a named collection of resources controlled by CICS as a unit. A CICS resource is any facility or component of a CICS system that is required to perform a task. You can configure a region using either the Web administration console or through the CICS control program (CICSCP) utility. In this article we will use the CICSCP utility to create and configure a TXSeries region.

  1. Open a command window
  2. At the prompt enter the following command, as shown in Figure 1.
    cicscp –v create region test



    Figure 1. Creating a TXSeries region
    Creating a TXSeries region

  3. Edit the regions’ environment file (c:\var\cics_regions\test\environment) and append the following line:
    PATH=c:\Program Files\IBM\SDP70\bin;%PATH%

    This command tells the region to pick up the correct COBOL runtime environment.

Configuring a CICS local terminal

The CICS local terminal is one of the ways to access a terminal-based CICS application residing on a TXSeries region.

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

    Figure 2. CICS local terminal initialization file
    CICS local terminal initialization file

  2. Scroll down to the first server definition and change the server name to our TXSeries region name, test.
  3. Make a note of the NamedPipeName value (in this case it is CICSCC), which is required to configure a Named Pipe listener on a TXSeries region.
  4. Save and close the file.
  5. Open the TXSeries Web administration console by entering the following URL in the browser window: http://localhost/txseries/admin
  6. On the first screen, sign-in as Administrator or any user who has administrator privileges.
  7. On the left frame, when you expand the Regions you should see your test region. Expand test and click Listeners (Figure 3).

    Figure 3. TXSeries web administration console
    TXSeries web administration console

  8. On the right frame click the Add button.
  9. On the next screen, in the Listener Name field enter LST1, change the Protocol type to Named Pipe,and enter the named pipe name you noted from the initialization file, CICSCC (Figure 4). Click the Submit button.
  10. When the listener configuration process finishes, a message confirms the success of the process.

    Figure 4. Listener configuration
    Listener configuration


Building a sample CICS application in WebSphere Developer

In this section we use the sample CICS application supplied with WebSphere Developer.

To open the sample CICS application:

  1. Start WebSphere Developer by selecting Start - All Programs - IBM Software Development Platform - IBM WebSphere Developer for System z - IBM WebSphere Developer for System z
  2. Open the CICS sample program by selecting File - New - Example.
  3. Expand Workstation COBOL and select COBOL sample with CICS (Figure 5). Click Next to continue.

    Figure 5. New CICS sample project
    New CICS sample project

  4. Enter Timezone for the Project name. Click Next to continue.
  5. Check the Invoke pre-processor option. Click Next to continue.
  6. Select DLL for the Build to create and enter /de –imp:cicsprIBMCOB.lib in the Link Options field, as Figure 6 shows. Click Finish to create the project.
  7. On the left frame, expand the Timezone project and double-click the TIMEZONE.cbl COBOL source file.

    Figure 6. Link options
    Link options

  8. Right-click on the editor window and select the Syntax Check option (Figure 7).

    Figure 7. Syntax check
    Syntax check

  9. The sample program should compile without any errors and the TIMEZONE.ibmcob file appears the output directory, which you can deploy on TXSeries.
  10. If your program has CICS API syntax errors, you see red cross marks beside the APIs that have invalid syntax. To see the exact error message, move the mouse cursor on the red cross.

Deploying the sample application on a TXSeries region

To test the application we just built, you need to deploy it on a TXSeries region. Follow these steps to deploy the program on our test region:

  1. Copy the TIMEZONE.ibmcob file from the BuildOutput directory in the Timezone project to the bin directory under the CICS regions (c:\var\cics_regions\test\bin).
  2. Open the TXSeries Web administration console by entering the following URL in the browser window: http://localhost/txseries/admin.
  3. On the first screen, sign-in as Administrator or any user who has administrator privileges.
  4. Expand Regions and test, and click program. On the right frame click Add (Figure 8).

    Figure 8. Add program
    Add program

  5. Enter TZON for the Program Name and TIMEZONE for the Program path name (this is the name of the DLL that we built, without the .ibmcob extension). Click Submit to deploy the program (Figure 9).

    Figure 9. Program entry
    Program entry

  6. When the program is deployed, a message confirms the success of the process.
  7. We now need a transaction definition. Click Transaction on the left pane and click Add on the right pane.
  8. For the Transaction name, enter TZON .
  9. Expand Transaction and for the First program name enter TZON. Click Submit to add the transaction entry (Figure 10).

    Figure 10. Transaction entry
    Transaction entry

  10. When the transaction is installed, a message confirms the success of the process.
  11. Now we need to start our region. Click ALL Regions on the left pane. Select the test region and change the Start Type to Cold. Click Start to start the region (Figure 11).

    Figure 11. Starting a region
    Starting a region

  12. When the region starts, a message confirms the success of the process.

Testing the application

Next we need to start a local terminal to test the program we just deployed.

  1. Enter the following command at the command prompt to start a local terminal:
    Cicslterm /S=test

  2. You now have a terminal connected to the test region. For the Transaction name enter TZON and press the right Ctrl key.
  3. The current date and time display on the terminal (Figure 12).

    Figure 12. Program output
    Program output


Checking program syntax with the CICS-TS level of APIs

TXSeries supports only a subset of CICS-TS APIs. If you have a CICS-TS application that has CICS APIs that are not supported by TXSeries, you cannot compile and deploy the application on a TXSeries region. However, you can check the syntax of your CICS-TS applications.

Let's insert a CICS-TS API into our existing application

  1. Add the following statement just before EXEC CICS RETURN END-EXEC, as Figure 13 shows.
    EXEC CICS GDS ASSIGN RETCODE(area) END-EXEC.

  2. Save the file.

    Figure 13. Inserting CICS-TS API
    Inserting CICS-TS API

  3. Right-click on the editor and select Syntax Check from the menu.
  4. You should see a red cross mark beside the new statement. If you move the mouse cursor over it, it displays Command GDS not recognized. TXSeries does not support GDS APIs; we have to change the COBOL compiler options to check the syntax of CICS-TS APIs.
  5. Open the project properties by selecting Project Properties. Click LocalCOBOL build options. In the Compile options text box, add CICS ('CTS31') to the Compile Options (CTS31 stands for CICS-TS version 3.1). Click OK to continue (Figure 14).

    Figure 14. CICS-TS compiler option
    CICS-TS compiler option

  6. Right-click on the editor and select Syntax Check from the menu. Your code should now be error free.

Using the command line to check syntax, compile and link the CICS application

You can check syntax and compile CICS applications with the command line using the COBOL compiler. Use the cics compiler option and its parameter (refer to Table 2) to invoke the integrated CICS syntax checker and translator feature of the compiler.

Table 2: CICS parameters

CICS parameterDescription Supported by

EDF

Indicates that CEDF is to be used to debug the program

TXSeries

NOEDF

EDF turned off (default)

TXSeries

DEBUG

Produces code that passes, through CICS, line numbers that are to be used by CEDF.

TXSeries

NODEBUG

DEBUG turned off (default)

TXSeries

CTS31

CICS Transaction Server V3.1 API syntax check.

CICS-TS

Examples:

  1. Check the syntax and compile a TXSeries application:
    cob2 -c -qcics -qlib -qthread -I$prodDir\include myprog.cbl

  2. Check the syntax and compile a TXSeries application with EDF option:
    cob2 -c –q”cics(‘EFD’)” -qlib -qthread -I$prodDir\include myprog.cbl

  3. Check the syntax of a CICS transaction server v3.1 application:
    cob2 –q”cics(‘CTS31’)” myprog.cbl

  4. Use the cicstcl (CICS translate, compile and link) utility to compile and link TXSeries applications:
    cicstcl –l IBMCOB –p myprog.ccp

Linking TXSeries application object files

If you use the command line COBOL compiler to check the syntax and compile a TXSeries application, the compiler generates an object file, which you then need to link to build a module that can be deployed on a TXSeries region.

  1. Run the following commands at the command prompt:
    ilib /nol /gendef /gi:myprog myprog.OBJ "%WDZ70INSTDIR%\lib\iwzrwin4.obj"

  2. You now have a myprog.def file. Edit the file and insert the following line at the top:
    LIBRARY myprog.ibmcob

  3. Run the following commands at the command prompt.

    Important: Although we cannot display it as such here, you must enter the second command on a single line.

    C:\> ilib /nol /def:myprog.def /genimplib
    C:\>ilink /free /nol /dll /o:myprog.ibmcob myprog.ibmcob.exp myprog.obj 
    "%WDZ70INSTDIR%\lib\iwzrwin3.obj" "%WDZ70INSTDIR%\lib\iwzrwin4.obj" 
    c:\opt\cics\lib\cicsprIBMCOB.lib
    

  4. This command generates myprog.ibmcob, which you can deploy on a TXSeries region.

Conclusion

In this article you’ve learned how to configure a TXSeries region and local terminal to deploy and test a sample application. You checked the syntax of a sample and compiled it using WebSphere Developer. You then linked the object file and deployed it on a TXSeries region, and tested the application using a CICS local terminal. Because TXSeries supports only a subset of CICS-TS APIs, you cannot compile and deploy a CICS-TS application on a TXSeries region. However you did learn how to check the syntax of CICS-TS applications. This scenario illustrates how using WebSphere Developer teamed with TXSeries can help you rapidly design, code, and deploy complex CICS applications.


Resources

About the author

Picture of Madhu

Madhu B Ananthapadmanabh is a software engineer at IBM India Software Lab in Bangalore, India. He is a TXSeries developer. You can reach Madhu at madhu.b.a@in.ibm.com.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=201491
ArticleTitle=Using IBM WebSphere Developer for System z and TXSeries for Multiplatforms to build CICS applications
publish-date=04102007
author1-email=madhu.b.a@in.ibm.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers