0% found this document useful (0 votes)
77 views

Cics and XML: Geoff Sharman

The document discusses how XML can be used with CICS to enable electronic business-to-business transactions, noting that while parsers and basic functionality exist, further work is needed to develop full solutions for integrating XML with CICS, supporting various transport protocols, and providing performance optimization and comprehensive tooling to facilitate real-world adoption.

Uploaded by

gatrived
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

Cics and XML: Geoff Sharman

The document discusses how XML can be used with CICS to enable electronic business-to-business transactions, noting that while parsers and basic functionality exist, further work is needed to develop full solutions for integrating XML with CICS, supporting various transport protocols, and providing performance optimization and comprehensive tooling to facilitate real-world adoption.

Uploaded by

gatrived
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

CICS and XML

Geoff Sharman
[email protected]

CICS TP Gold Briefing, 31st October 2000


XML Technology Overview
Traditional data description
Problem :

message structure
Content message validity
Structure rendering method
Document meaning difficult to extract
content coupling

depend on implementation
Rendering

XML data description

Content separate description


separate renderings
MarkUp & values well-formedness checks
validity checks
Rendering Structure
industry grammars
XSL DTD Internet enabled
(XML Style Language) (Document Type Definition)
An XML Example
XML
?XML version="1.0"?>
<!DOCTYPE balanceinquiry SYSTEM "banking.dtd"
<BALANCE>
<ACCNAME>Smith J</ACCNAME>
<ACCOUNT>
<ACCNO>1234</ACCNO>
<AMOUNT>1200</AMOUNT> ACCNAME
</ACCOUNT>
</BALANCE>

ACCNO
HTML
<h1>BALANCE</h1> AMOUNT
<h2>ACCNAME</h2>
<p>Smith J</p>
<h3>ACCNO</h3>
<p>1234</p>
<h3>AMOUNT</h3>
<p>1200</p>

Well-formed XML: conforms to syntax rules


Valid XML: conforms to specified DTD
XML Technologies
Parsers:
DOM (Document Object Model) builds a tree
structure as a result of parsing an input message
SAX (Simple API for XML) triggers an event when a
tag etc. is encountered, causing the execution of an
event handler
Generators:
DOM based generators walk the tree structure and
produce a valid XML document as a result
Template based generators insert data values into a
pre-built XML message template
Transformers:
Transform a document conforming to one DTD into a
document conforming to another DTD, using
corresponding tags
What are the uses of XML?
Structured Data Interchange
A mechanism to enable business systems to
exchange messages of a few thousand bytes in real
time or near real time
Capturing Metadata
Descriptions of programs, files, databases, process
flows, etc which may be used at development time or
runtime
Storing/retrieving documents
XML databases allow storage of documents and
query/update of document parts
Document processing
Parse and manipulate large documents, eg. Old
Testament ... Not for OLTP users!
Where will XML SDI be used?

Not only better than HTML ...


... but also the enabler of a better
way to do business ...

Business to
Consumer
(B2C)
Business to
Business (B2B)

Buyer Seller
B2C = request-at-a-time electronic commerce with
programmed rendering & simple seller side processing
B2B = fully automated electronic commerce with
programmed buyer-side & seller side processing
Typical Customer Requirements
"I want to replace all the business APIs in my
company with XML grammars"
"I want parse an XML input message, transform into
a COMMAREA, run a CICS program, then transform
output COMMAREA into an XML output message "
"I want to parse an incoming message, run
sequence of 3270 programs and generate output"
"I want to call an XML parser from my CICS COBOL
program ... to enable custom transforms"
IBM's B2B Serving Strategy

XML WebSphere OS/390


Distributed
+

Existing S/390
Applications
Connectors
WebSphere
XML intranet/ OS/390
extranet/
internet
+
Connectors

XML CICS
Transaction
Server

Scalable
Enable XML messages to invoke applications High Performance
Provide XML adapters in multiple environments
Support multiple protocols - XML over HTTP,
IIOP, MQSeries, CICS ISC, etc.
What Do We Need for B2B?
Header
Routing Information
message Message Type
envelope -
header Date/Time Stamp
Authentication
Context
message body
Body
Data understood by
target application
Trailer
message
Message digest
envelope -
trailer
More on Envelopes
Sender Tamper Evident (Sealed) Receiver
Contents When Sent?

Possible standards:
Advanced Message Interface (AMI) from IBM
and Open Applications Group (OAG)
Simple Object Access Protocol (SOAP) from
Microsoft (and W3C?)
Example of a SOAP Call

POST /StockQuote HTTP/1.1


Host: www.stockquoteserver.com
Content-Type: text/xml
Content-Length: nnnn
SOAPMethodName: Some-Namespace-URI#GetLastTradePrice

<SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1">
<SOAP:Body>
<m:GetLastTradePrice
xmlns:m="Some-Namespace-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP:Body>
</SOAP:Envelope>
SOAP 1.1 Specification
SOAP 1.0 enables an XML message to cause the
invocation of a method of a component
internet enabled
messages can only be flowed over http
only COM or CORBA components can be invoked
SOAP 1.1 extends specification
open for invocation of components in any
technology
messages can be flowed over any protocol
but no architected support for security, routing,
multicast, transactions, etc.

"... a very simple but solid foundation for defining the standards
that will support universal connectivity across businesses ..."
What else do we need for B2B?
Standardization
Industry dialects of XML for message body
Industry agreement on message envelope
Performance optimisation
Fast XML parser (validating vs. non-validating)
Fast XML generators
Compression of XML documents during transmission
Tooling
Create DTD from existing program structures
Create code to parse & transform in-coming
messages
Create code to transform & generate out-going
messages
What Exists Today?
Parsers:
XML4J: W3C conformant parser written in Java, providing
DOM and SAX APIs. Works under CICS TS 1.3 JVM slowly,
but not when compiled with HPCJ.
XML4C: W3C conformant parser written in C, providing
DOM and SAX APIs. Does not work under CICS.
B2B: technology release of an efficient event-based parser,
written in Java and/or C. Works in servlet environment.
Generators:
EXEC CICS DOCUMENT interface: provides template
based generation for applications in COBOL, C, PL/I, not
Java.
JSP (Java Server Pages): provides template based
generation for Java servlet applications. Does not work
under CICS.
Customer Experience
B2B solution feasible using XML with CTG
Proof of concept study completed with one customer
Mapped XML message(s) to CICS COMMAREA(s)
Performance reqt. was 1500 tps
Used B2B parser + transform for each CICS program
Performance is critical for web enablement
Benchmarking CCF & CTG for customers
Motivated enhancements in VA-J 3.02
Requirement for performance optimisation with
CTG/390
Continuing study of servlet performance
Tooling is critical for effective deployment
Functional Steps for XML & CICS
CICS CICS Need to do something now...
XML HTTP XML Gateway Service and learn from it
Servlet
Source & Tools Application HTTP only
proprietary envelope
very simple tools
Tactical
Need CICS adapter
support variety of transport protocols
XML XML
CICS integrated in CICS or Gateway
XML message flow Service full tools suite
Source Adapter
Application
parser available for direct use

Strategic
Need integrated solution
interoperates with MQSI
XML Adapter MQSI
CICS enables execution of process flow
(i.e. navigation)
Service
Adapter
Source Transform Route Application local connection to other backends
tools build process flow

Integrated with MQSI


Initial Implementation of XML with CICS

message input
parser mapper target
XML ECI
HTTP CICS
Source program
message output
generator mapper

CICS Transaction CICS TS


"message parsing, Gateway CICS/ESA
input mapping, CICS/VSE
output mapping and
XML parser TXSERIES
WebSphere Stnd Edtn
message generation
CICS/400
Windows NT, OS/390
CICS OS/2
run as Java servlets
in WebSphere"
CTG XML Beta Offering
Implement adapter with CTG for XML to
COMMAREA conversion
Support alternative parsers including new B2B XML parser
Provides single pass, event based parsing with low garbage
creation
Optimised encoding, few or no data conversions
Support proprietary XML envelope plus application
defined XML body
Provide simple tool for creating DTDs from
Field name
Field datatype
Field offset
Field length
Simple repeating groups
Example of XML input format
<CICS_ECI_STREAM>
<CICS_ECI_DATA ID="1">
<REQUEST_DETAILS>
<SERVER>CICSTCP</SERVER>
<USERNAME>garethb</USERNAME>
<PASSWORD>xml</PASSWORD>
<PROGRAM>GETBAL</PROGRAM>
<TRANSID>GBAL</TRANSID>
<EXTENDMODE>ECI_NO_EXTEND</EXTENDMODE>
<LUWTOKEN>1</LUWTOKEN>
</REQUEST_DETAILS>
<MESSAGE>
<GETBAL>
<ACCNO>1234</ACCNO>
<ACCNAME>garethb</ACCNAME>
</GETBAL>
</MESSAGE>
</CICS_ECI_DATA>
</CICS_ECI_STREAM>
Example of XML output format

<CICS_ECI_STREAM>
<CICS_ECI_DATA ID="2">
<RESPONSE_DETAILS>
<RETURNCODE VALUE="0">ECI_NO_ERROR</RETURNCODE>
</RESPONSE_DETAILS>
<MESSAGE>
<GETBAL>
<BALANCE>1200</BALANCE>
</GETBAL>
</MESSAGE>
</CICS_ECI_DATA>
</CICS_ECI_STREAM>
CICS XML Directions
Medium term
Productise CTG XML beta offering
Provide equivalent function in CICS TS
Make parser available in CICS environment
Longer term
Implement/influence B2B envelope standards
Automatically generate transformation code
Provide full set of development tools
Future XML CICS Adapter

input
message COMMAREA
parser mapper
Client XML over ASCII -
DPL target
app HTTP, MQ EBCDIC
CICS
output Convert
message Pgm
COMMAREA
generator mapper

optimised XML parser any CICS


CICS Transaction Server

Generated
code
MQSI Agent for CICS
Message Adapter for CICS
OS/390
a controlling 1 invocation:
application MQSeries
client run server run time
time adapter
request
provided
Java EAB ADAPTER
Command adapter REQUEST
reply PROCESSING
(MQSeries only)

NAVIGATION
CICS ECI link
adapter request/reply

BUSINESS FLOW
Link
MQSeries-enabled MICRO-CONTROL-
Custom
or ECI-enabled FLOWS:
program

3270 PUT GET


Data- Link
stream

MQ-
enabled Program
Legacy system
application
MQSI Agent - Buildtime
Message Adapter for CICS
build time
Windows NT OS/390

Message Adapter Builder


server run time

modeling
micro-
controlflows modeling
flow components,
primitives and via Builder
predicates
send and compile
generator on server run time
Message read and COBOL
importers generate
Repository source
code
definitions

3270 screens and


COBOL record descriptions Ÿ Legacy CICS/IMS applications
Ÿ Existing CICS transactions
Future XML Adapter in CICS
target
protocol adapter dispatch application

ECI DPL
listener Program
C
HTTP O
listener M routing
B
R
BMS Pgm
XML
XML I
-----------------
M ASCII- D
adapter
adapter
G
E 3270 Pgm
A EBCDIC
MQ
R conv
listener
E MQSI
A Agent for
IIOP CICS
listener
existing or planned link
proposed link
Future Adapter Tooling
repository user interface
mapping tool
flow diagram editor

DTD
map names/fields analyse

export metadata import COBOL


DTD COPYBOOK
repository

defines defines
generate

Application transcode/xform CICS COMMAREA


XML message XML B2B parser
conversion macro
runtime adapter CTG / CICS (in CICS)
Summary and Questions
Do you agree this function is needed?
in servlet environment?
in CICS environment?
Is the XML message structure appropriate?
architected XML message envelope/header?
application defined grammar for message body?
mapping to COMMAREA?
What protocol(s) would you use with XML?
HTTP, IIOP, MQSeries, CICS ISC, other?
How important is high performance to you?
How important are good tools to you?
Generation vs. interpretation?
Further Reading
Maruyama, Tamura & Uramoto, XML & Java,
Addison-Wesley (1999)
Pelegri-Llopart & Cable, JavaServer Pages
Specification, Sun (1999)
Box, Ehnebuske, et al, Simple Object Access Protocol
Specification 1.1, Microsoft (2000)
http://www.ibm.com/developer/xml/ - IBM
developerWorks site for XML offerings
[email protected] - discussion
group for XML and CICS

You might also like