z390 Portable Mainframe Assembler and Emulator

z390 Service Oriented Architecture  Support for COBOL and Assembler

Automated Software Tools Corporation

                                      Screen capture of MFE COBOL
                                      calling z390 assembler
                                      Click picture for full screen PDF
                                      Click description for explanation.


    MFE COBOL and z390 Assembler

z390 SOA Overview

System Oriented Architecture (SOA) is a software design model to address the need to share and reuse application components across diverse applications and network users.  z390 now includes tools to enable users to generate low level SOA type COBOL and z390 client server assembler applications.  For COBOL clients, the EZASOKET interface is called to send and receive SOA messages via TCP/IP.  For z390 assembler clients and servers, the z390 TCPIO macro and svc are used to send and receive SOA messages via J2SE sockets support. No other SOA frameworks or languages such as CICS, XML or C are required.

For COBOL client applications on Windows which call mainframe assembler, Micro Focus Mainframe Express now has EZASOKET support available which is supported by the z390 SOA COBOL client generator.  See COBOL SOA Demo for more details.

The z390 TCPIO macro supports client and server TCP/IP messaging using J2SE sockets via SVC X'7C'.  z390 servers running on Windows or Linux can issue OPEN to listen for messages from clients on a specified port.  z390 clients on Windows or Linux can issue OPEN for specific HOST port to connect and SEND and RECEIVE messages from the server.

z390 Assembler SOA Client Server Demo

A z390 demo application consisting of a main program DEMOMAIN.MLC which calls 2 subroutines DEMOSUB1.MLC and DEMOSUB2.MLC are included in new SOA directory.  As a base line, the demo can be assembled, statically linked, and executed locally using the command SOA\DEMO\DEMOSTD.BAT.  Then the demo can be converted to an SOA client server application, assembled, linked, and executed using the command SOA\DEMO\DEMOSOA.BAT.  The demo SOA application generation is driven by the user defined SOAGEN macro call:

   SOAGEN CTYPE=MLC,                                                                                                             X
                    MAIN=DEMOMAIN, MAIN CLIENT APPLICATION PGM                              X
                    CLIENT=DEMOCMGR, SOA CLIENT MSG MGR NAME                                X
                    SERVER=DEMOSMGR, SOA SERVER MSG MGR NAME                              X
                    HOST=*, ( HOST SERVER NAME (*=LOCAL)                                 X
                    PORT=3900, HOST SERVER PORT                                                                        X
                    SERVICES=((DEMOSUB1,-45,-45,45), SERVICES WITH PARM LEN              X
                    (DEMOSUB2,-4,-4,4)), (NOTE -LENGTH FOR READ ONLY)                             X
                    GENDIR=D:\WORK\Z390\SOA\DEMO, DIRECTORY FOR SOA APPL            X
                    GENBLD=DEMOBLD, GENERATED BUILD BAT FILE                                    X

The z390 SOA application generation macros create the following source files from the above:

  1. DEMOCMGR.MLC - demo application client SOA message manager.
  2. DEMOSMGR.MLC - demo application server SOA message manager
  3. SOA_STUB_DEMOSUB1.MLC - demo application stub for service calls to DEMOSUB1
  4. SOA_STUB_DEMOSUB2.MLC - demo application stub for service calls to DEMOSUB2
  5. DEMOBLD.BAT - command to assemble and link the demo SOA application
  6. DEMORUN.BAT - command to start server and then run the client application

The z390 SOA generated command DEMOBLD.BAT builds the following executables:

  1. DEMOMAIN.390 - demo client main program statically linked with 2 SOA stubs for service calls.
  2. DEMOCMGR.390 - demo SOA client message manager dynamically called from stubs
  3. DEMOSMGR.390 - demo SOA server  message manager processes messages from client
  4. DEMOSUB1.390 - service loaded by DEMOSMGR on first service call
  5. DEMOSUB2.390 - service loaded by DEMOSMGR on first service call

The demo SOA client server application has been run on single CPU, local LAN connected client and server PCs, and again on wireless LAN connected client and server PC's to generate initial z390 SOA Demo Timing Statistics showing that after initial transaction, the average overhead for the z390 SOA TCP/IP messaging is about 2-3 milliseconds.  For complex services performing I/O to databases, this overhead is relatively negligible compared to the major benefit of simplifying the sharing and maintenance of services across diverse applications and users.  Future plans for z390 enhancements will include support for XML and registry type services to provide unit test environment for higher level SOA type application components.

COBOL SOA Client and z390 Assembler Server Demo

An IBM Enterprise COBOL compatible version of the z390 assembler SOA client demo has been created named soa\demo\DEMOMAIN.CBL.  The SOAGEN macro has been updated to support the name keyword CTYPE=CBL in addition to the default CTYPE=MLC.  The new command soa\demo\DEMOSOAC.BAT will generate the COBOL stubs and COBOL client message manager required to run the COBOL demo program using the same z390 assembler server as the z390 assembler client demo.  The generated COBOL client message manager issues calls to the HLL standard EZASOKET interface which is now available for running mainframe COBOL and z390 assembler applications on Windows via Micro Focus Mainframe Express 3.1.

The COBOL SOA application generation macros create the following source files from the above:

  1. DEMOCMGR.CBL  - demo application client SOA message manager which calls EZASOKET.
  2. DEMOSMGR.MLC - demo application server SOA message manager (no changes)
  3. DEMOSUB1.CBL    - demo application stub for service calls to DEMOSUB1
  4. DEMOSUB2.CBL    - demo application stub for service calls to DEMOSUB2
  5. DEMOSOAC.BAT   - command to generate the above COBOL and assemble SOA application

To  run the COBOL SOA demo using Micro Focus Mainframe Express on Windows perform the following steps:

  1. Install Micro Focus Mainframe Express 3.1 for Windows XP or Vista
  2. Create a project named EZASOKET
  3. Import latest version of field developed EZASOKET.CBL and EZAMFE.CBL available to MFI customers
  4. Compile EZASOKET.CBL  as "Enterprise COBOL" with option STICKY-LINKAGE"1"
  5. Compile EZAMFE.CBL as "non-mainframe" (This interface issues Windows Winsock calls from COBOL)
  6. Install J2SE 6.0+ runtime
  7. Install z390 v1.4.01 and latest PTF v1.4.01e
  8. Start z390 GUI interface by double-clicking on desktop icon.
  9. Enter the command: start soa\demo\DEMORUNS notime tracet con
    This will start the SOA server for DEMOMAIN application, display the name of the host, and wait for next service request.  The notime option prevents timeout after 15 seconds.  The tracet option displays hex dump of each TCPIO send and receive message and each operation performed.  The con option turns console output back on as any trace option turns it off.  All output will be on the DEMSMGR.LOG file.
  10. Run soa\demo\DEMOSOAC.BAT to generated the COBOL stubs and client message manager
  11. Add the following COBOL programs to the MFE project from soa\demo directory:
    1. DEMOMAIN.CBL - COBOL version of the original DEMOMAIN.MLC
    2. DEMOSUB1.CBL - generated stub for DEMOSUB1 calls
    3. DEMOSUB2.CBL - generated stub for DEMOSUB2 calls
    4. DEMOCMGR.CBL - generated client message manager which issues EZASOKET calls 
  12. Edit the DEMOCMGR.CBL program to change host name from DSH3 to the name of your PC displayed in prior step at server startup.
  13. Compile the demo COBOL programs as "Enterprise COBOL"
  14. Start the MFE TSO command interface
  15. Enter CALL DEMOMAIN to start animation the SOA demo COBOL client application
  16. After each send and receive via EZASOCKET call, you can view the records in the server trace.
  17. See this screen capture for quick overview of how it all looks:
    1. MFE Animation of the DEMOMAIN.CBL program source is in the background
    2. MFE Application output is at the bottom left of screen showing displays left in each program for demo.
    3. In the center of the screen is pop-up showing the value of field DFP3 after returning from call to DEMOSUB1.390 which was loaded and executed by the SOA server message manager DEMOSMGR.390 to calculate the sum of 1.1 + 2.2 using IBM Decimal Floating Point (DFP).
    4. In the upper right is the z390 GUI screen used to issue the start command shown to launch the SOA server DEMOSMGR.390 with the options NOTIME to prevent timeout, TRACET to trace all TCPIO operations and dump each message received and sent.
    5. In the lower right is the started z390 server task showing the trace dump of last messages received and sent with the results of service call to DEMOSUB1.390.  The first service request message shows the input fields with 1.1 and 2.2.  The service response messages shows the 3.3 result.

Ok, so the demo works, now how do I get my mainframe COBOL and assembler application to work using this new option so I can do development and testing on my Windows PC?  First I'd recommend talking to both Micro Focus and Automated Software Tools to determine if the Micro Focus and z390 tools will support the application requirements.  Then if the requirements are met, the tools can be installed and the process to generate one or more SOA z390 servers can be started along with setting up the COBOL client application in Mainframe Express or Server Express.



IBM, CICS, HLASM, MVS, OS/390, VSAM, z9, z10, and z/OS
 are registered trademarks  of International Business Machines Corporation

This page last updated Sunday September 07, 2008.   Webmaster  Sitemap
Copyright 2008 Automated Software Tools Corporation