Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing...

44
Murach’s Mainframe COBOL Accessing the mainframe as a “server”

Transcript of Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing...

Page 1: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Accessing the mainframe as a

“server”

Page 2: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Accessing the Mainframe

Past:

• Many applications are tied to z/OS (CICS, DB2)

• New developments made on other platforms

Now:

• Integrate both on z/OS

Page 3: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Using the MF as a server

Two basic ways to use the mainframe as a server:

• MQ - messaging via queues

• Web Services - HTTP, J2EE

Page 4: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Using the MF as a server - MQ

Two basic ways to use the mainframe as a server:

• MQ - messaging via queues

– Messaged-queue based communication

– Assured delivery: messages do not get lost and they

arrive only once

– No synchronous access needed

– Message driven application

– Quicker development due to shielding of the network

– Available on multiple platforms

– On z/OS it has interfacing to CICS, IMS, Batch or TSO

Page 5: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Using the MF as a server -

Web ServicesTwo basic ways to use the mainframe as a server:

• Web Services - HTTP, J2EE

– EBCDIC/ASCII file access

– System Management Facilities

– Tracing & logging

– Server Side Includes

– Cookies support

– Multi Format Processing

– Persistent connections

– Virtual hosts

– Security

Page 6: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using MQ

Page 7: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using MQ

MQ is a Multi-platform messaging system

• Available on all major platforms

• Takes care of data conversions & communications

• Enables a web server running on a platform to

access CICS transactions running on anotherplatform.

An “MQ CICS Bridge” enables one to access (via MQ) a

3270 transaction (and get the response back via MQ)

Page 8: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

MQ Synchronous communication

model

AA

BB

MQI

MQI

MQI

MQI

Queue 1

Queue 2

Page 9: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

MQ Asynchronous

communication model

AA

BB

MQI

MQI

MQI

MQI

Queue 1

Queue 2

CC

Page 10: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

MQ: Styles of Communication

Program

AProgram

B

Program

B

Program

A

Program

C

Program

A

Program

A

Conversational

Messaging

Call and return

Page 11: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Data Integrity

DBDBWriteSend

Syncpoint

ReceiveWrite DBDB

Syncpoint2-phasa

commit

Synchronousmodel

Unit of work

DBDB Write

PutSyncpointUnit of work 1

Unit of work 2

Unit of work 3

qq Get

WriteSyncpoint

DBDB

Asynchronousmodel

Page 12: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Travel agency example

MQPUT CAR RENTAL

MQPUT FLIGHT

MQPUT HOTEL

MQGET Reply-to-queue

Car rental

Flight

Hotel

Car

Flight

Hotel

MQPUT

MQPUT

MQPUT

Reply-to queue

Page 13: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using Web Services

Page 14: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

HTTP server capabilitiesSecurity functions:

• Thread level security

• HTTPS/SSL support

• LDAP support

• Certificate authentication

• Proxy support

File caching:

• HTTP server caching HFS files

• HTTP server caching z/OS data sets

• Unix System Service caching HFS files

• Fast Response Cache Accelerator (FRCA)

Page 15: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Z/OS HTTP Server

• Server modes:

• Stand-alone server

• Scalable server

• Multiple servers

• Static Web pages

• Dynamic Web pages

Page 16: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 16

Reviewing CICS services

CICS

subsystem

Inquiry

program

(User 1)

Browse

program

(User 2)

Order entry

program

(User 3)

Inquiry

program

(User 4)Tasks

INQ1 INQ2 ORD1 INQ1

Terminal control and BMS modules

File control

User 1(Inquiry)

User 2(Browse)

User 3(Order entry)

User 4(Inquiry)

Trans-id

VSAM

Data

Page 17: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 17

Three benefits of using CICS with web applications

• CICS is especially designed for handling a large number of users

and a large number of transactions while insuring the integrity of the data being processed.

• A large number of mission-critical business applications are already written in CICS.

• It’s easier and less expensive to web-enable a COBOL/CICS application that it is to rewrite it in another language for another platform.

Page 18: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 18

CICS and the Internet

• An Internet user can access a CICS application running on a

mainframe directly or through an intermediate server such as a PC server.

• To access the Internet, a web browser is run on the client machine.

• The main job of the browser is to process pages written in HTML

(Hypertext Markup Language).

• The browser communicates with the mainframe or intermediate

server using HTTP (Hypertext Transfer Protocol).

• The mainframe or intermediate server must provide web server software that interprets the HTTP requests sent from the user’s web

browser and translates them into a form that CICS recognizes.

Page 19: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 19

Two ways to connect a client machine to a mainframe through the Internet

S/390 or z/Series mainframe

PC server

Client machine

Client machine Internet

Page 20: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 20

How a web server running under OS/390 or z/OS accesses CICS programs

OS/390 or z/OS

CICS server

Application

program

HTTP

Web server

CICS Transaction

Gateway

Web browser

Page 21: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 21

How a web server running on a separate system accesses CICS programs

OS/390 or z/OSWeb Server

CICS server

Application

program

HTTP CICS Transaction

Gateway

Web browser

Page 22: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 22

How CICS provides for web support on its own

OS/390 or z/OS

CICS server

Application

program

HTTP CICS Web

Support

(CWS)

Web browser

Page 23: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using Web Services

- Using CICS Web Support

Page 24: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 24

Techniques for accessing CICS programs from aWeb browser

• The services needed to access CICS applications from a web

browser can be provided by the CICS Transaction Gateway or by

CICS Web Support (CWS).

• The CICS Transaction Gateway runs under the control of a web

server on either the same OS/390 system as CICS or on a separate

server platform.

• CICS Web Support provides the services needed for CICS to

function as a web server on its own.

Page 25: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 25

An overview of the CICS Transaction Gateway

Web server

CICS Transaction Gateway

CICS server

Java gateway

applicationJava class library

Java program

Requestfrom

browser

Businesslogic

program

3270

program

ECI

EXCI

EPI

Reply

tobrowser

Page 26: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 26

How the CICS Transaction Gateway works

• The CICS Transaction Gateway includes a Java gateway

application, which provides services for communicating with CICS programs, and a Java class library, which provides the programming interface for using the gateway application services.

• A Java program provides the graphical user interface for a CICS program.

• If a CICS program contains only business logic, the CICS Transaction Gateway can invoke that program using EXCI (the

external CICS interface) when the Gateway is running on the same

system as the CICS program or ECI (the External Call Interface) when it’s running on a separate system.

• If the CICS Transaction Gateway is running on a separate system, you can use EPI (the External Presentation Interface) to

communicate with a CICS program that includes 3270 terminal I/O.

Page 27: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 27

How the 3270 Bridge exit works

• The 3270 Bridge exit lets CICS programs that perform 3270

terminal I/O run on a Web browser with no source code changes.

• The main function of the 3270 Bridge exit is to translate HTML

data to 3270 data, and vice versa.

• Before you can use the 3270 Bridge exit with a program, you must

modify the BMS mapset for the program with specialized macros.

Then, reassembling the mapset creates an HTML version which the 3270 Bridge exit uses to perform the necessary translations.

• The BMS macros for creating HTML documents were introduced with CICS TS 1.3 and provide for some basic formatting of HTML

pages.

Page 28: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL © 2004, Mike Murach & Associates, Inc. Chapter 20, Slide 28

The customer inquiry screen displayed in a web browser

Page 29: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using Web Services

- Using CGI

Page 30: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Dynamic Web PagesCommon Gateway Interface (CGI)

HTTP ServerAddress Space

http://www.myzseries.com/cgi-bin/test.cgi

httpd.conf

URL

Response

ClientBrowser

11

22

33

CGI

application

test2.cgi

CGI

application

test.cgi

z/OSAddress Spaces

Page 31: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Access using Web Services

- Using the WebSphere

Application Server / J2EE

Page 32: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Dynamic Web Pages - Interaction

with WebSphere

WebSphere plug-in, same address space

HTTP Serverhttp://www.myzseries.com/my.jsp

was.conf

CICS Server

or

IMS Server

httpd.conf

WAS

plugin

Servlet

URL

Response

ClientBrowser

Page 33: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Dynamic Web Pages - Interaction

with WebSphere

Web container inside HTTP Server, separate EJB container

HTTP Serverhttp://www.myzseries.com/my.jsp

was.conf

EJBContainer

httpd.conf

WAS

plugin

Servlet

URL

Response

ClientBrowser

CICS Server

or

IMS Server

EJB

J2EE Server

Page 34: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Dynamic Web Pages - Interaction

with WebSphereSeparate J2EE server with both Web container and EJB container

HTTP Serverhttp://www.myzseries.com/my.jsp

was.conf

EJBContainer

httpd.conf

WAS

plugin

URL

Response

ClientBrowser

CICS Server

or

IMS Server

EJB

J2EE Server

WebContainer

Servlet

JSPs

Page 35: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

J2EE Application Model in z/OS

Same as on other platforms, following SDK:

• Functional

• Reliable

• Usable

• Efficient

• Maintainable

• Portable

Page 36: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Running WebSphere Application

Server for z/OS

• Basics of WebSphere on z/OS

• Consolidation of workloads

• WebSphere for z/OS Security

• Continuous availability (see next slide)

• Performance

Page 37: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

WebSphere on z/OS - continuous

availability

WebSphere with Sysplex Distributor

WebSphere

Application Server

RARAConnection

Addressspace

EIS/DB

RACF RRS

WebSphere

Application Server

RARAConnection

Addressspace

EIS/DB

RACF RRS

clusterz/OS

z/OS

SDSD

SYSPLEX

TCP/IP

memoryto

memory

Page 38: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

WebSphere on z/OS - continuous

availability

Clustering of Server in Cell

Clusterservers B

and D

InstallApplication into Cluster

BrowserBrowser

Deployment Manager

AA

Daemon

CR CR SR

Server A

CR SR

Server B

MVS System or LPAR

Daemon

CR CR SR

Server C

CR SR

Server D

MVS System or LPAR

Cluster

APP APP

APPHFSHFS HFSHFS

SYSA SYSB

CF

Page 39: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

WebSphere on z/OS - continuous

availability Vertical and Horizontal Cluster

MVS System or LPARMVS System or LPAR

"Vertical"Cluster Two or moreservers in thesame systemor LPAR

DM

CR AA

Node Agent

CR

CR SR

Server A

CR SR

Server B

Node

Node

CR SR

Server C

Daemon

CR

Daemon

CR

Node Agent

CR

CR SR

Server D

CR SR

Server E

Node

CR SR

Server F

Cell A CF

"Horizontal" Cluster Two or moreservers across multiple nodes (or systems)

Servers are clustered through the administrative interface.

Any given server may be a member of only one cluster at a time

You can not have Server_C be a member of two different clusters, for example.

Hybrid of vertical and horizontal is permitted

Page 40: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Running WAS on z/OS -

Performance

WebSphere uses three distinct functions of WLM:

• Routing

• Queuing

• Prioritizing

Page 41: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

Accessing IMS Data

Web Services & Using SOAP

Page 42: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

� Protect customers’ investment by enabling

integrated access to IMS applications and data

�Designed to support open integration technologies

�Modernize IMS Transactions and Data

� Enabling tool development/usage to easeapplication development/enablement

� Encourage new application development bysupporting standards – XML, SOAP, JAVA

Scalable

Reliable

High Performance

IMS Integration Strategy

Page 43: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

IMS with Web Services &

Service-Oriented Architecture• Web services - allows programmable elements be placed

on sites for distributed web access across platforms

• Web services enables unchanged IMS Transactionssupport a Services Oriented Architecture

– Leveraging past investments

– Reducing new programming efforts

– Aiding business process transformation

• IMS Transactions enabled as Web servicesvia WebSphere/Rational Servers/Tooling

• IMS Transactions enabled as Web services via IMS SOAP Support

Data

NewService Logic

B2B

Interactions

SOAP Service Request

(e.g. J2EE, .NET)

Portal Service

Existing Applications

IMS Applications

IMS Data

Service flow

Page 44: Accessing the mainframe as a “server” - Wikispaces13... · Murach’s Mainframe COBOL Accessing the mainframe as a “server ... • CICS is especially designed for handling a

Murach’s Mainframe COBOL

IMS Application Integration with IMS

SOAP support� Enables Reuse of IMS Applications as Web Services

�Support WebService specifications

� Leverages open standards and utilizes flexible tooling support

� Provides IMS Transaction Interoperation with Client Apps� Independent of location, programming language, and platform

�SOAP Clients can be Microsoft .Net, SAP, Java, etc.

IMS

O TMA

MPP/IFP/JMP

…GU IOPCB

ISRT IOPCB

IMS IMS

ConnectConnect

XML Adapter

z/OS

IMSIMS

SOAPSOAP

SupportSupport

request

via SOAP