using service flow modeler v6 to create web …...service flow modeler (sfm) is a component of...

40
Using Service Flow Modeler V6 to create Web services for CICS screen-based applications Skill Level: Intermediate Freddy Lu ([email protected]) Staff Software Engineer IBM Rick Hwang ([email protected]) Software Engineer IBM Natalius Huang ([email protected]) Software Engineer IBM Dave Lin ([email protected]) Staff Software Engineer IBM 31 Jan 2007 Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host application developers to create Web services on CICS, especially for screen-based application. SFM creates Web services by extracting screen-based host application business logic without source code. This article introduces SFM and explains how to develop a CICS Web service for screen-based applications without modifying source code. Introduction Many corporations today face the problem that many of the applications that are fundamental to their business, applications running on large transaction processing systems for example, were developed many years ago. These applications in their current state do not lend themselves to a service-oriented architecture (SOA). Using Service Flow Modeler V6 to create Web services for CICS screen-based applications © Copyright IBM Corporation 1994, 2006. All rights reserved. Page 1 of 40

Upload: others

Post on 20-May-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Using Service Flow Modeler V6 to create Webservices for CICS screen-based applicationsSkill Level: Intermediate

Freddy Lu ([email protected])Staff Software EngineerIBM

Rick Hwang ([email protected])Software EngineerIBM

Natalius Huang ([email protected])Software EngineerIBM

Dave Lin ([email protected])Staff Software EngineerIBM

31 Jan 2007

Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeriesV6. SFM provides a development environment for host application developers tocreate Web services on CICS, especially for screen-based application. SFM createsWeb services by extracting screen-based host application business logic withoutsource code. This article introduces SFM and explains how to develop a CICS Webservice for screen-based applications without modifying source code.

Introduction

Many corporations today face the problem that many of the applications that arefundamental to their business, applications running on large transaction processingsystems for example, were developed many years ago. These applications in theircurrent state do not lend themselves to a service-oriented architecture (SOA).

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 1 of 40

Page 2: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Corporations continue to rely on them mainly because they have been tried andtested over time and represent a substantial investment.

Corporations do not want to commit the IT development resources to redesign orrecreate the business functions already present in their existing enterpriseinformation systems (EIS). Instead, corporations want access to tools that integratethe business functions in existing applications and systems with the technology thatsupports on-demand business goals and objectives. Figure 1 illustrates thistransformation.

Figure 1: Enterprise Information Systems

By implementing a service-oriented architecture, a corporation can unite employees,partners, and suppliers with the systems and information that enable them to dobusiness more effectively.

In the following sections we’ll look at each of the key components needed for thistransformation: the Service Flow Modeler, XML Services for the Enterprise, and theCICS Service Flow Runtime.

Service Flow Modeler overview

The Service Flow Modeler (SFM), a component of WebSphere Developer for

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 2 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 3: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

zSeries (hereafter called WebSphere Developer), is a multi-functional toolsupporting modern application architectures, and the transformation and reuse ofexisting application processes. It helps leverage your investment and the quality ofservice (QoS) of existing enterprise information systems and the CICS runtime. Atthe same time, SFM enables the move towards a service-oriented architecture.Figure 2 shows the major components that comprise SFM.

Figure 2: Service Flow Modeler

You can use SFM to perform the following tasks:

• Model a newly composed business service -- or flow -- using processes orservices and their interfaces.

• Capture existing EIS (screen or communication area) interfaces orgenerate new SOA-suitable interfaces.

• Generate adapters to and from interfaces that support both theaccumulation of information -- used in requests and response processing

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 3 of 40

Page 4: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

-- and data transformation activities between the flow and the interface.

• Expose business flows as a service or Web service.

XML Services for the Enterprise overview

XML Services for the Enterprise (XSE) is another component of WebSphereDeveloper that helps you generate Web service components for enterprise services.

The Web service components include:

• XML schema

• WSDL

• Bind file

• COBOL converters (or correlators)

XSE features an easy-to-use set of wizards for creating a Web service from a singleCOBOL data structure (COMMAREA).

You should consider using XSE if you can map your Web service directly to a singleCICS COMMAREA transaction, or if creation of the Web service needs to beintegrated with an automated build process.

CICS Service Flow Runtime overview

CICS Service Flow Runtime 3.1 is the server runtime environment for the adapterservices that you model, generate and deploy using SFM. An adapter service is areusable, composed business function that exposes a programmatic interface to aservice requestor in an EIS.

The CICS Service Flow Runtime environment supports four types of adapters:

• Distributed Program Link (DPL) adapters

• Link3270 Bridge adapters

• Front End Programming Interface (FEPI) adapters

• WebSphere MQ adapters

Depending on how you model the adapter service, it can contain a wide variety offunctionality, such as:

• Control flow

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 4 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 5: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

• Data flow

• Sequential navigation

• Conditional branching including decision and iteration

• Data typing

• Storing data context

• Transformation of data elements

• Logical operations

• Custom code.

Overview of creating a service flow for a CICS screen application

In an EIS, CICS screen-based applications with terminal interfaces are widely usedand are one of most important application types. The CICS screen-based applicationis usually composed of the following source components:

• Application process: Where you define the application process andbusiness logic. Usually written in COBOL or other languages.

• Screen definition: Where you define the layout and field attributes in theapplication screens. The screens are usually defined as Basic MappingSupport (BMS) maps.

• CICS resource definition: Where you define the program, screen,transaction and other resources in the CICS region.

With SFM, you can create service flows for CICS screen-based applications toextract business logic without modifying any source components. To achieve thisgoal, in SFM we need to define:

• Screen recognition: Specify screen recognition criteria to recognizeeach screen of the screen-based application

• Screen operation: Record screen operating actions, specify the fields tobe inserted or extracted and action keys for each screen.

• Flow execution: Specify a CICS SFR-supported adapter to execute theservice flow. The adapters that support the CICS screen-based flow arethe Link3270 Bridge adapter and the FEPI adapter.

Prerequisites

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 5 of 40

Page 6: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

To prepare your environment for this tutorial, make sure the following products areinstalled on your host system:

• z/OS V1.4

• COBOL compiler

• CICS Transaction Server 3.1

• Ensure that SFR is ready

• Ensure that Web services and TCPIPSERVICE on CICS are wellconfigured

• MVS/TSO/USS System

• Remote System Explorer (RSE)

For more details, such as the required components and program temporary fixes(PTFs) for the programs listed above, please refer to WebSphere Developer forzSeries

Creating the CICS Web service

To create a CICS Web service, you need to complete the following developmenttasks, which are covered in detail in the following sections:

1. Install the host application

2. Install Rational Application Developer and WebSphere Developer forzSeries

3. Create a terminal-based application in an SFM project

4. Record an SFM flow

5. Create and configure generation properties

6. Deploy the runtime code to CICS

7. Test the CICS Web service via the Web Service Explorer

This article was developed and tested on a Windows 2000 Professional workstationconnected to a z/OS system called NKAP. Parts of the article require that you haveestablished connectivity to a z/OS system that contains a running CICS Transaction

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 6 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 7: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Server Version 3.1 region.

1. Install the host application

The NKAP host application is a CICS screen-based application used in this tutorialas the target application. NKAP includes the two screens below: The first screen(Figure 3) allows you to input an account number. In our example, account 1000 iscreated.

Figure 3: First screen of the application

The second screen (Figure 4) returns detailed information about the account.

Figure 4: Second screen of the application

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 7 of 40

Page 8: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

The COBOL source files and BMS map are attached in the Download section in thisarticle. Please download the file, transfer it to the host, compile and deploy it to yourCICS TS 3.1 region.

2. Install Rational Application Developer and WebSphereDeveloper for zSeries

In this section you’ll install Rational Application Developer and WebSphereDeveloper for zSeries (which sits on top of Application Developer), and apply anyfixes:

1. Rational Application Developer (RAD) V6 must be installed prior toinstalling WebSphere Developer. From disk 1 of RAD V6, launchlaunchpad.exe to bring up the Launchpad shown on Figure 5. Fordetailed information on installation procedures, see the installation guide.

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 8 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 9: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Figure 5: Rational Application Developer Launchpad

2. Next install WebSphere Developer V6 by launching launchpad.exe ondisk 1 of WebSphere Developer, as shown in Figure 6. Follow theinstruction to install the product.Figure 6: WebSphere Developer for zSeries Launchpad

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 9 of 40

Page 10: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

3. The next step is to apply the update for the installed products. RationalProduct Updater helps you find and update your installed product asshown in Figure 7. Please remember to install the J2EE connection tools.For more detailed information, see the Rational Product Updater onlinehelp.Figure 7. Rational Product Updater for installed products

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 10 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 11: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. Create a Service Flow Modeler project

Before creating a new SFM project, ensure all steps in the previous step have beencompleted:

1. In WebSphere Developer, open theService Flow Modeler perspective.Select Window -Open Perspective -Other. In the Select Perspectivedialog box, check Show all, as shown in Figure 8. Click OK.Figure 8: List of all perspectives

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 11 of 40

Page 12: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

If you can’t find the Service Flow Modeler perspective in the SelectPerspective dialog box, check that WebSphere Developer installedsuccessfully.

When the Service Flow Modeler perspective opens, the SFM ProjectExplorer displays, as shown in Figure 9:

Figure 9. SFM Project Explorer

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 12 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 13: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. To create a new SFM project, selectNew - Project - Service FlowModeler - Service Flow Project. In the Choose a project name andlocation dialog box, specify the project name (we used SFMProject),and check the I will specify the service flow later box as Figure 10shows. Click Finish.Figure 10. Create a new SFM Project

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 13 of 40

Page 14: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

3. Download the NKMAP01.bms file from the Downloads section. To keepthe screen for later, you need to import the BMS file NKMAP01.bms intothe SFM. Right-click on SFMProject.Terminal and select Import - BMSas shown in Figure 11. In the Import wizard, specify the BMS file to importand click Finish.Figure 11. Import the BMS file

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 14 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 15: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

After the BMS file imports successfully, you see two screens(Nkmap01.Nkmap11.mxsd and Nkmap01.Nkmap12.mxsd) in theSFMProject.Terminal. To increase the recognition performance, we’ll modifyrecognition criteria for the two screens, which entails deleting the old descriptors andadding new ones. Let’s start with the screen Nkmap01.Nkmap11.mxsd:

1. Delete the default screen descriptor by selectingNkmap01.Nkmap11.mxsd and opening the Screen Description tab.Delete the default screen descriptors Fields, InputFields and FieldsChecksum as shown in Figure 12:Figure 12. Screen descriptions

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 15 of 40

Page 16: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. To add the new screen descriptor, right-click on the screen descriptionNkmap11 and select Add Descriptor - Add Num Input FieldsDescriptor as shown in Figure 13 and Figure 14. Save the modified file.Figure 13. Add descriptor

Figure 14. Descriptor input fields

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 16 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 17: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

3. Now we’ll modify recognition criteria for the second screenNkmap01.Nkmap12.mxsd in the same way. To delete the default screendescriptor, select Nkmap01.Nkmap12.mxsd and open the ScreenDescription tab. Delete the default screen descriptors Fields,InputFields and Fields Checksum.

4. To add a new screen descriptor, right-click on the screen descriptionNkmap12 and select Add Descriptor - Add Field Pattern Descriptor -Select ACCNMF field as the pattern descriptor as shown in Figure 15and Figure 16. Save the modified file.Figure 15. Add descriptor

Figure 16. Pattern descriptor

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 17 of 40

Page 18: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

3. Record an SFM flow

In this section you create a host connection and then record the SFM flow:

1. A host connection is required for recording an SFM flow. To create a newhost connection, right-click SFMProject.Terminal and select New - HostConnection as shown in Figure 17. In the New Host Connection wizard,enter the file name (we use mvs040) and click Next. Specify your Hostname, Port, Type, Code Page and Screen Size, and click Finish.Figure 17. Create a new connection

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 18 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 19: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. When the new host file mvs040.host gets created, it establishes aconnection to the host system. Logon to CICS V3.1 and execute NKAP.Verify that it recognizes the first screen Nkmap01.Nkmap11.mxsd asshown in Figure 18. Enter 1000 to test the next screen,Nkmap01.Nkmap12.mxsd. Verify that it recognizes the second screenas well.Figure 18. Screen Nkmap01.Nkmap11.mxse is recognized

3. To start recording the SFM flow, click Start Recording Flow in mvs040’stool bar. In the New Flow Recording dialog box, input a flow name (weused NKFlow) or keep the default value in Record a terminal flow, asFigure 19 shows. Click Next.Figure 19.Record a terminal flow

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 19 of 40

Page 20: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

4. In Associate operation, ensure that theAssociate interface operationwith flow box is checked. Click Create New to create a new Input/OutputMessage, as in Figure 20:Figure 20. Associate operation

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 20 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 21: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

5. Now input the Interface Operations file and Operation names (we usedthe default values intf_NKFlow.wsdl and intf_NKFlow). Click CreateNew for both Input Message and Output Message as Figure 21 shows:Figure 21.Create Operations File

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 21 of 40

Page 22: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

6. In the Create Message File dialog, use the default message file name (o_NKFlow.mxsd) and message name (o_NKFlow) as Figure 22 shows.Click OK to return to the Operations Filedialog. Click OK to return to theAssociate operation dialog and click Next.Figure 22.Create Message File

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 22 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 23: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

7. In Select a variable message, click Create New to create an outputmessage file for the message variable. As in the previous step, we usethe default message file name ( v_NKFlow.mxsd) and message name(v_NKFlow), as Figure 23 shows. Click OK to return to the Select avariable message dialog. Click Finish.Figure 23. Select a variable message

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 23 of 40

Page 24: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

8. Next you need to insert data into the screen. Click Insert Data intoScreen in the terminal’s tool bar (see Figure 24) to open the SelectVariable dialog box, as Figure 25 shows.Figure 24. Insert Data into Screen

Figure 25. Select Variable

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 24 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 25: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

9. In the Select Variable dialog, click Add new variable and input avariable name (we use input_account), as Figure 26 shows. Click OKto return to the Select Variable dialog. The variable name should beappend to the list view as Figure 27 shows. Click OK to close the SelectVariable dialog and return to the terminal.Figure 26. Add New Variable

Figure 27. Add input_account to Select Variable list

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 25 of 40

Page 26: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

10. Click the ACCUMT field. A blue underline appears in the field as shown inFigure 28. Enter 1000 in the ACCUMT field and click Enter.Figure 28. Insert data into screen

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 26 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 27: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

11. Next you extract the data from the screen. Click Extract Data fromScreen to open the Select Variable dialog box, as Figure 29 shows:Figure 29. Extract Data from Screen

12. In the Select Variable dialog, click Add new variable, and input avariable name (we used output_name) in New Variable as Figure 30shows. Close the Add New Variable and Select Variable dialogs to returnto terminal.Figure 30. Add output_name variable in Select Variable dialog

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 27 of 40

Page 28: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

13. Place the cursor on the LAST NAME field, which displays red brackets,as Figure 31 shows.Figure 31. Extract data from screen

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 28 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 29: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

14. Press Enter to submit the change and to return to the first screen ofNKAP.

15. Click Stop Recording Flow to stop recording, and click Save Flow tosave the flow.

16. (Optional) To test and playback the flow, load the flow by clicking LoadFlow and select the flow to load. Click Play Screen Interaction andselect the screen interaction to test.

4. Create and configure generation properties

In this section you’ll create a generation properties file, and set some properties.

To create a new generation properties file:

1. Right-click the flow NKFlow.seqflow and select New GenerationProperties File, as shown in Figure 32.Figure 32. Create a new generation properties file

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 29 of 40

Page 30: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. In the New Generation Properties dialog box, input the file name (weused the default name new_generation_props.wsdl) in GenerationProperties, and select New File and Next.

3. In Generation Properties – Runtime selection, select CICS ServiceFlow Runtime and click Finish.

4. Specify the values for Flow Type, Request Name, Program Name,Transaction ID, Generate Web Service Files, Initial PFKey, StartupTransaction Data, End Point URI, WSBIND File Name, WSDL FileName and WSDL HFS File Path as shown in Figure 33, Figure 34, andFigure 35:Figure 33. Specify the generation properties

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 30 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 31: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Figure 34. Specify the link3270 bridge flow properties

Figure 35. Specify the Web services generation properties

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 31 of 40

Page 32: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

5. Deploy the Generated Code to CICS

In this section we establish a remote z/OS system connection and generate theruntime code. We then deploy the code to the host and compile the runtimeprogram.

1. Use the RSE facilities to create a remote z/OS system connection.Ensure that you successfully connected to the host system. For moreinformation, refer to the Remote System Explorer Overview.

2. To generate the runtime code, right-click on thenew_generation_props.wsdl generation properties file and selectGenerate Runtime Code as shown in Figure 36:Figure 36. Generate runtime code

3. In the Generate run time code dialog box, ensure that the Deploy toremote target location box is checked, input the appropriate values inJob Control information, and select Next as shown in Figure 37:Figure 37. Specify the value in Job Control information

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 32 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 33: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

4. In Deployment Properties – Remote deployment selection, selectDeploy to remote location, input the appropriate values in MVSDeployment information and in USS Deployment information asFigure 38 shows. Click Finish.Figure 38. Specify the value in MVS Development information andUSS Development information

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 33 of 40

Page 34: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

After deploying the generated code to the host system, you should be able to find:

• CVNKMAPD.CBL ,NKFLPROG.CBL in data set USER50.SFM.COBOL.

• INKMAP01.CPY ,ONKMAP01.CPY ,VNKMAP01.CPY ,NKMAP11.CPY,NKMAP12.CPY in data set USER50.SFM.COPY.

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 34 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 35: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

• @NKFLREQ.JCL ,CVNKMAPD.JCL ,RDOJOB.JCL and NKFLPROG.JCLin data set USER50.SFM.JCL.

• nkflow.wsbind and nkflow.wsdl in the directory /u/dbcs .

Now it’s almost time to compile the runtime program, but first review your runtimeprogram. You might have to modify arguments in the JCLs to match with your hostsystem. (Contact your host administrator)

To compile the runtime program:

1. Submit the JCL files sequentially: CVNKMAPD.JCL, NKFLPROG.JCL,@NKFLREQ.JCL and RDOJOB.JCL.

2. Go to CICS region, install the group (the group in RDOJOB.JCL) and loadthe programs.

3. Scan the service provider pipeline. For more information, see the CICSWeb Services Guide Version 3 Release 1(SC34-6458-02).

6. Test the CICS Application via the Web Service Explorer

You’re now ready to test your CICS Web service

1. Right-click the nkflow.wsdl file and select Web Service - Test with WebServices Explorer, as shown in Figure 39.Tip: If you couldn’t find Web service in the popup menu, enable the WebService Developer in the Workbench Preferences by selecting Window -Preferences… - Workbench - Capabilities. Ensure that Web ServiceDeveloper is checked.

Figure 39. Test the Web service with Web Services Explorer

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 35 of 40

Page 36: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

2. In the Web Services Explorer, input appropriate values toSERVICEINPUTAREA. For detailed information, see CICS Service FlowRuntime User Guide (SC34-5899-06).

3. Specify the input_account as 1000, and click GO. You should see theresult shown in Figure 40.Figure 40. Result

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 36 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 37: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Conclusion

Share this...

Diggthisstory

Posttodel.icio.us

Slashdotit!

You now should be able to use SFM to quickly and easilty convert your CICSscreen-based applications to Web services to integrate your modern commercialenvironment. SFM also supports advanced features like while loop, switch node,error and exception handling and more for screen-based applications.

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 37 of 40

Page 38: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Downloads

Description Name Size Download method

The BMS file for the target application nkmap01.zip 2 KB FTP

The source code for NKAP nkpgm01.zip 2 KB FTP

The sample SFM project sfmproject.zip 46 KB FTP

Information about download methods

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 38 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.

Page 39: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Resources

Learn

• Using WebSphere Developer for zSeries V6 to Create a CICS Web service inCICS Transaction Server for z/OS V3.1

• Tutorial: Creating and consuming Web services with EGL using WebSphereDeveloper for zSeries

• Using WebSphere Developer for zSeries V6 to Connect to COBOL/CICS

• CICS Web Services Guide Version 3 Release 1 (SC34-6458-02)

• CICS Service Flow Runtime User Guide (SC34-5899-06)

• Remote System Explorer Overview

• WebSphere Developer for System z

• developerWorks WebSphere on System z zone

• developerWorks WebSphere development tools zone

Get products and technologies

• Trial: WebSphere Host Access Transformation Services V6.0.4

Discuss

• CICS Transaction Server for z/OS forum

• developerWorks blogs

About the authors

Freddy LuFreddy Lu is a Staff Software Engineer with the IBM China Software DevelopmentLab (CSDL). Currently he is working on HACP as the DBCS development lead. Freddyis familiar with C++, Java and J2EE technologies. You can reach Freddy [email protected].

Rick Hwang

ibm.com/developerWorks developerWorks®

Using Service Flow Modeler V6 to create Web services for CICS screen-based applications© Copyright IBM Corporation 1994, 2006. All rights reserved. Page 39 of 40

Page 40: Using Service Flow Modeler V6 to create Web …...Service Flow Modeler (SFM) is a component of WebSphere® Developer for zSeries V6. SFM provides a development environment for host

Rick Hwang is a Software Engineer on the SFM project team at the IBM ChinaSoftware Development Lab (CSDL). His expertise includes Java related technology,Web services, and IBM Host integration. You can reach Rick at [email protected].

Natalius HuangNatalius is a Software Engineer with the IBM China Software Development Lab(CSDL). He works on the SFM project team. He is implementing DBCS for theenterprise solution. His expertise includes J2EE technology, Web services, Eclipseplug-ins, and WebSphere Host Transformation. You can reach Natalius [email protected].

Dave LinDave Lin is a Staff Software Engineer with the IBM China Software Development Lab(CSDL). Currently he is working on SFM as the DBCS project lead. Dave is familiarwith Java and J2EE technologies, Web applications, Eclipse plug-ins, Web servicesand WebSphere Host Transformation. You can reach Dave at [email protected].

developerWorks® ibm.com/developerWorks

Using Service Flow Modeler V6 to create Web services for CICS screen-based applicationsPage 40 of 40 © Copyright IBM Corporation 1994, 2006. All rights reserved.