CICS Access with the Aid of WebSphere MQ and by jef20128

VIEWS: 15 PAGES: 31

									                                      Tutorial 11
CICS Access with the Aid of WebSphere MQ and a Java Client

1. Introduction
1.1 Overview

Electronic Mail is a widely used Messaging Service. A Client sends a message to a
Mail Server. This stores the message in a queue designated as a mailbox, which the
Server supports on its hard drive. The owner of the mailbox can later retrieve the message.

                    Mail                                           Mailbox
                Presentation-                                      Business-
                   Logic                                            Logic

                   Client                                           Server
                                            Figure 1

Message oriented Middleware (MOM), also known as Message based Queuing (MBQ) is a
similar process. In contrast to Electronic Mail, the Client stores the message in a queue on it's
own hard drive. A MOM-Instance on the Client then moves the message to a queue on the
MOM-Server. Both MOM-Instances work on the Acid Principal;
 “The delivery of the message to the server queue is assured.”

The connection between the Client and Server is called a Channel (not to be confused
with the concept of a Channel in the S/390 I/O-Architecture). A MOM-channel is
unidirectional.

             Sender-Queue                                       Empfänger-Queue



                 Client                                               Server
                                            Figure 2

A connection between two Computers commonly consists of two Channels (and two Queues
on each Computer), one is a Sender and one the Receiver.




                 Client                                              Server
                                            Figure 3


WebSphere MQ (also called MQSeries) is a popular MOM-Product of IBM. It is available on
many Platforms including Windows, Linux, Sun Solaris, AIX, HP-UX, AS/400, OS/390 and
z/OS.

1.2 What are we going to do

The task to be performed concerns a Client/Server Application. The Business Logic is
available in the form of a CICS Transaction on a OS/390 Server. The Presentation Logic is
available in the form of a Java Application on the Client. Client and Server communicate with
each other via two WebSphere MQSeries Channels.

                   Java            MQSeries-channel               CICS
                Präsentations-                                   Business-
                   Logic           MQSeries-channel               Logic

            Windows 2000-Client                               OS/390-Server
                                           Figure 4

WebSphere MQ and Java Presentation Logic need to be installed on the Windows 2000
Client. Thereafter the Java Presentation Logic should communicate via WebSphere MQ and
the WebSphere MQ CICS Bridge on the OS/390 machine with the CICS business logic. For
this you need to use the OS/390 machine jedi.informatik.uni-leipzig.de, on which WebSphere
MQ and the CICS Business Logic is already installed.

On the OS/390 machine jedi.informatik.uni-leipzig.de a CICS transaction with the name
(Transaction ID, TRID) NACT is installed. We want a Java GUI-Client to access the
COMMAREA of the NACT CICS transaction. The connection between the Client and the
OS/390 CICS Transaction Server should be effected with the aid of WebSphere MQ. For this
we use a Windows 2000 Client, on which we will install a Java-GUI for the NACT CICS
Transaction as well as a WebSphere MQ Server. On our OS/390 machine jedi.informatik.uni-
leipzig.de, a WebSphere MQ Server with the WebSphere MQ CICS Bridge already installed.
This configuration is depicted in Figure 5.


       Java GUI           MQSeries                            MQSeries
        Java GUI          MQSeries                            MQSeries               CICS
       MQClient            Server                              Server
                                              TCP/IP

            Windows 2000                                                  OS/390

                   Client                                                 Server
                                           Figure 5

MQClient and the Client side WebSphere MQ Server run on Windows in two separate
address spaces.

On the Client side the WebSphere MQ-Server runs a Java Bridge Task (a Java Class). On
the Server side the WebSphere MQ-Server runs a CICS Bridge task. A queue manager runs
on each of the WebSphere MQ Servers as well as a used configured customisation program
(here labelled as MQCommunicator).

Each Queue Manager hosts a Queue for the transmission of messages to the Partner Queue
Manager, the Transmission Queue, as well as a queue for receiving messages from the
Partner Queue manager, the ReplyTo Queue. In addition each Queue Manager has a further
queue, the Remote Queue. Two (WebSphere MQ) Channels are assigned to each Queue
Manager. On the OS/390 side, the ReplyTo Queue of the CICS Bridge of the Queue Manager
connects to the CICS NACT-Transaction. On the Windows 2000 side a Server Connection of
the Java Application connects to the ReplyTo Queue. Each Queue Manager uses further
internal objects for the purposes of Security and Availability, but these are of no further
interest to us.

The Client Queue Manager is called PRAKT20.NACT.
The Server Queue Manager is called MQA1.

1.3 Prerequisites and Preparation
In this example, On the Client machine, the Windows 2000 Operating System is installed on
the Client machine in the H: directory, with at least Support Pack 3. You may of course use a
Windows client, where the operating system is installed in a different directory.

You can download all the required software for Tutorial 11 using FTP from a Server:

IP-Address of the Server:                         139.18.12.179
FTP login:                                        os390
Directory on which the files can be found:        /H:/tools
Compressed downloadable files:                    T11CD01.ZIP and
                                                   j2sdf-1_3_1_04-windows-i586.exe
Local Target Directory for the Download:          H:\download (or whatever directory
                                                   your operating system resides in)

The password for the login "os390" can be obtained from the tutor or by email from Herr
Müller (gmueller@informatikDodTuni-leipzig.de). The download can only be run in passive
mode.

Next all the data from the archive T11CD01.ZIP should be unzipped using WinZip to
H:\PRAKT20 (replace PRAKT20 by your User and Group names). The complete directory
tree of the archive should be unzipped. After the unzip the directory H:\PRAKT20 should
contain thirteen files as well as four sub-directories.

Task : Work through this tutorial. Install, as described in this Tutorial, all software components
required for Tutorials 11 and 12 (JDK, WebSphere MQ, Support Pack) and place them in the
correct path.

In the scripts for this Tutorial, for all Object References (e.g. Queues and Channels) replace
PRAKT20 by your login ID on the OS/390 server. For example, instead of PRAKT20 you
would have PRAKT56 or PRAK100.

In the following text, "Click" or "Double-Click" means a click or double-click with
the left mouse button.

2 JDK Installation
For the Installation of JDK we log on with the Administrator account (e.g. Administrator) to
Windows, bring up Windows Explorer and select the directory
H:\download. With the left mouse button double click on j2sdk-1_3_1_04-windows-i586.exe

-> Next -> yes -> Destination Folder H:\jdk1.3.1_04 -> Next -> select Microsoft Internet
Explorer -> Next

Program Files
Native Interface files
Old Native Interface files                        select all, Next
Demos
Java Sources

-> Files being copied. -> Setting up Java Runtime Environment -> Finish

Now the Envrionment Variables must be set:
Start -> Click on Control Panel -> Click on System -> Click on Advanced ->
finally click on Environment Variables
                                           Figure 6


Double click on the line Path in the Window System Variables (or alternatively single
click on the line Path in the Window System Variable to mark it; next a single
click on Edit).
                                            Figure 7


The window Edit System Variables appears (see Figure 7), with the cursor in the
field Variable Value. With the Arrow Key <- scroll to the left (alternatively use the key Pos1).

In this Tutorial, all references to paths assume that you are using the directory H: .
If you use a different directory, you must make corresponding changes to the path names. For
example, if you use the directory C:, then "H:\jdk1.3.1_04\bin;" would be
"C:\jdk1.3.1_04\bin;".

In front of %SystemRoot% insert the value "H:\jdk1.3.1_04\bin;"; next click the OK button.
                                          Figure 8

In the Window User Variables for the Administrator click once on the button New.
                                            Figure 9

In the New User Variables window that pops up, enter the following values:

Name of Variable: classpath
Value of Variable: H:\example

Afterwards we click OK in the window New User Variables, then OK in the
Window Environment Variables and finally OK in the Window System Properties.
Now we restart the Computer - this will make the new Environment Variables
available.

Now we open a DOS window and navigate to the directory H:\example (if necessary type cd
H:\ to get to the root directory "H:", then type mkdir example). In the directory H:\example we
will create the following program with any editor
(e.g. Start -> Program -> Accessories ->Editor):


        class hallo {
           public static void main(String[] args) {
              System.out.println("Hello World, really");
           }
        }


We save this program as the file hallo.java in the directory H:\example. After the
file hallo.java has been created, we navigate to the directory H:\example in the
open DOS Window (e.g. using the command cd h:\example).
We compile the Program with the command javac hallo.java (typed in the open DOS window)
and wait for a moment. If no error messages are displayed, the compilation was successful. In
this event, the file hallo.class will be in the directory H:\example.
We run this Java Program by typing java hello. The message
        “Hello World, really”
should be displayed.

3. Installation of the WebSphere MQSeries Server under
Windows 2000
Our Windows computer acts as a Client for the OS/390 Server. Maybe you find it confusing
that the WebSphere MQ components installed on the Windows Client are designated as a
WebSphere MQ Server. Never mind.

3.1 WebSphere MQ Base Installation

We close all windows that we no longer require, bring up Windows Explorer and change to
the directory
  H:\Prakt20\WebSphere MQ\mqnt521_server\server
(where "Prakt20" must be replaced by our user account).
Next we start Setup by double clicking on the Setup Icon:




                                         Figure 10

We wait several seconds, until the Animation disappears and the above Window appears. We
then click once on Software Requirements.
                                           Figure 11

Check that there is a tick to the right of every OK. Then click on Network Configuration.




                                           Figure 12

No action should be required.

Click once on the button WebSphere MQ Installation.
                                          Figure 13

Click once on the button Launch IBM WebSphere MQ Installer.

Next -> Accept the Licence Agreement -> Next -> Choose the pre-selected Install option
"Typical" -> Next -> Install (takes several minutes) -> Finish

"Welcome to the Prepare WebSphere MQ Wizard" will be displayed in a new
window -> Next.

A window will appear as depicted in Figure 14.
                                          Figure 14

Check, whether "No" is selected, and then click on Continue (Figure 14).




                                          Figure 15
In the window depicted in Figure 15 click on Continue.

"Completing the Prepare WebSphere MQ Wizard" appears in a new window
on the screen (Figure 16).




                                           Figure 16

Simply start WebSphere MQ Explorer by selecting it with a tick, remove all other ticks so that
the Window appears as depicted in Figure 16. Next press the button "Install complete".

WebSphere MQ has now been successfully installed. The WebSphere MQ Console Root
Window will appear.
                                         Figure 17




                                         Figure 18

The following appears on the screen to the right under the WebSphere MQ symbol. It appears
automatically every time you start up the Computer. To shut down the Computer we close the
WebSphere MQ Console Window. Eventually the following question will be displayed (see
Figure 19):




                                        Figure 19
This question should be answered with "Yes", but can also be answered with "No".
3.2 Support Pack Installation

We open a DOS window and create the directory H:\temp\support

We then change to the directory H:\Prakt20\WebSphere MQ\SupportPacs\MA88. In this
directory you will find the file ma88_win.zip. We unzip the file to the directory
H:\temp\support which we just created (with WinZip, WinAce or another unzip
package). There should be 13 files in the directory H:\temp\support plus the
subdirectory Program Files.

Carry out the following steps, to unzip the data utilising WinAce:

 Click on Start -> Select Programs -> Select WinAce -> Click on WinAce ->
 Click on Back to Program. In WinAce Archive Version 2.2 we select the
 Path H:\Prakt20\WebSphere MQ\SupportPacs\MA88 in the left window.
 Click on ma88_win.zip and next Click on the button Unzip (in H:\temp\support).

We open Windows Explorer and change to the directory H:\temp\support, and then we select
Setup by double clicking on the appropriate icon. Be aware that Setup can not be started from
a DOS window!

We select English as the Language. Next we click on OK.




Figure 20

Wait a few seconds -> Next -> click on the button Accept -> Next -> Enter Name and
Organisation (Figure 21) -> the Application will be installed for everyone who uses this
Computer -> Next
                                         Figure 21




                                         Figure 22


We select Complete and then click on Next (Figure 22).
                                          Figure 23

Click on Install and then wait approximately 5 seconds.




                                          Figure 24

Clicking on Complete ends the Installation of the Support Pack.

3.3 WebSphere MQ Configuration
We start up WebSphere MQ Explorer as follows Start -> Programs -> IBM ->
WebSphere MQ (see Figure 25).




                                        Figure 25

The Console Base Window (see Figure 26), which is identical to the Window which you
opened at the end of the WebSphere MQ Base Installation, is displayed.




                                        Figure 26

We open a DOS Window and change to the directory "H:\Prakt20\dipl_BusseT\WebSphere
MQ\definitions\1.Start.
We now want to run the Script step1.cmd. The script is as follows:


@echo off
rem   *****************************************************************
rem   * This command file sets up the MQ Queue definitions
rem   *****************************************************************
rem   The parameter specifies the queue manager name
rem   eg. CrtQ default for PRAKT20

title Setting up MQ Series for PRAKT20

echo * End the MQ queue manager if already running
echo endmqm -i PRAKT20.NACT
endmqm -i PRAKT20.NACT
echo.

echo * Delete the old MQ queue manager if one exists
echo dltmqm PRAKT20.NACT
dltmqm PRAKT20.NACT
echo.

echo * Create the new queue manager
echo crtmqm -q PRAKT20.NACT
crtmqm -q PRAKT20.NACT
echo.

echo * Start the new queue manager
echo strmqm PRAKT20.NACT
strmqm PRAKT20.NACT
echo.

pause
exit

                                          Figure 27

Next we run step1. The processing of the Script takes a certain time. The following
messages will appear (see Figure 28):
H:\Prakt20\dipl_BusseT\mqseries\definitions\1.Start>step1
* End the MQ queue manager if already running
endmqm -i PRAKT20.NACT
AMQ8118: MQSeries-Warteschlangenmanager nicht vorhanden.

* Delete the old MQ queue manager if one exists
dltmqm PRAKT20.NACT
AMQ8118: MQSeries-Warteschlangenmanager nicht vorhanden.

* Create the new queue manager
crtmqm -q PRAKT20.NACT
MQSeries-Warteschlangenmanager erstellt.
Standardobjekte für PRAKT20.NACT werden erstellt bzw. ersetzt.
Standardobjektstatistik: 29 erstellt. 0 ersetzt. 0 fehlgeschlagen.
Konfiguration wird abgeschlossen.
Konfiguration beendet.

* Start the new queue manager
strmqm PRAKT20.NACT
MQSeries-WS-Manager 'PRAKT20.NACT' gestartet.

Press any key to continue . . .

                                       Figure 28

The DOS Window disappears if an arbitrary key is pressed. By installing the new Queue
Manager PRAKT20.NACT, the internal system objects required for the Queue Manager will
also be made available.

In the Console Base Window (Indexcard "Structure"), double click on
 "IBM WebSphere MQ", "WS-Manager" and then on "PRAKT20.NACT" to open these three
objects. The directories "Queues" and "Advanced" will appear.
                                         Figure 29

If we open the directory "Queues", it appears that we don't have any queues
(Figure 29). By clicking on the directory "Advanced", 5 Subdirectories are
displayed (see Figure 30).




                                         Figure 30

None of the 5 Subdirectories contain any Objects. For example, the subdirectory
"Channels" does not contain any objects (see Figure 31).




                                         Figure 31

We now start up a new DOS Window and change to the directory
H:\Prakt20\dipl_BusseT\WebSphere MQ\definitions\1.start“

Next we run the Script step2.cmd. The Script step2.cmd reads:


            @echo off
            title Define MQ definitions

            echo Ensure MQ Series is running
            echo strmqm PRAKT20.NACT
            strmqm PRAKT20.NACT
            echo.

            echo Load the MQ definitions for the QManager PRAKT20.NACT
            echo runmqsc "< MQadmvs.def > MQadmvs.out"
            runmqsc < MQadmvs.def > MQadmvs.out
            echo.

            :quit
            pause
            exit


                                         Figure 32
This script creates all the other objects required for the WebSphere MQ Queue Manager
PRAKT20.NACT with the aid of the Script Mqadmvs.def, which can be found in the same
directory as step2.cmd (see Figure 33).



      DEFINE QLOCAL('PRAKT20.NACT.XMITQ.WIN') REPLACE +
              TRIGDATA(PRAKT20.NACT.WIN.OS) +
              TRIGGER   +
              INITQ(SYSTEM.CHANNEL.INITQ) +
              USAGE(XMITQ)

      DEFINE QLOCAL('PRAKT20.NACT.REPLYQ') REPLACE +
              DEFPSIST(YES) +
              SHARE

      DEFINE QREMOTE('PRAKT20.NACT.REMOTEQ') REPLACE +
              RNAME('SYSTEM.CICS.BRIDGE.QUEUE') +
              RQMNAME('MQA1') +
              XMITQ('PRAKT20.NACT.XMITQ.WIN')

      DEFINE CHANNEL('PRAKT20.CLIENT') CHLTYPE(SVRCONN) TRPTYPE(TCP) +
              MCAUSER(' ') REPLACE

      DEFINE CHANNEL('PRAKT20.NACT.WIN.OS') CHLTYPE(SDR) TRPTYPE(TCP)
      +
              XMITQ('PRAKT20.NACT.XMITQ.WIN') +
              CONNAME('139.18.4.97(1414)') +
              MCAUSER(' ') REPLACE

      DEFINE CHANNEL('PRAKT20.NACT.OS.WIN') +
              CHLTYPE(RCVR) +
              TRPTYPE(TCP) +
              SEQWRAP(999999999) +
              MCAUSER(' ') REPLACE

                                         Figure 33

Now we run step2.cmd. During the execution of the script the following messages
will appear (see Figure 34):


           H:\Prakt20\dipl_BusseT\mqseries\definitions\1.Start>step2
           Ensure MQ Series is running
           strmqm
           MQSeries-Warteschlangenmanager ist aktiv.

           Load the MQ definitions
           runmqsc "< MQadmvs.def > MQadmvs.out"

           Press any key to continue . . .

                                         Figure 34
Pressing an arbitrary key will close the DOS Window.

During the execution of the script step2.cmd a logfile MQadmvf.out will be created, which will
be placed in the directory from which the script was invoked. In our case the directory is
called
"H:\Prakt20\dipl_BusseT\WebSphere MQ\definitions\1.start".
This logfile will indicate whether the objects for the Queue Manager for the application
KanDoIT BANK Application were created without any errors. We can check this using an
editor or with the MSDOS command "type" (see Figure 35).

If you already have a DOS Window open, choose the latter option.

If necessary, change to the directory
"H:\Prakt20\dipl_BusseT\WebSphere MQ\definitions\1.start“
by using the MSDOS command
 cd H:\Prakt20\dipl_BusseT\WebSphere MQ\definitions\1.start.

Next type MQadmvs.out in the DOS Window.

You can also use the Windows 2000 integrated editor to view the logfile:

Click on Start -> Programs -> Accessories -> Editor

Content of MQadmvs.out
47P8479, 5639-B43 (C) Copyright IBM Corp. 1994, 2001. ALLE RECHTE
VORBEHALTEN.
MQSeries-Befehle werden gestartet.


     1 :     DEFINE QLOCAL('PRAKT20.NACT.XMITQ') REPLACE +
       :                  TRIGDATA(PRAKT20.NACT.WIN.OS) +
       :                  TRIGGER   +
       :                  INITQ(SYSTEM.CHANNEL.INITQ) +
       :                  USAGE(XMITQ)
AMQ8006: MQSeries-Warteschlange erstellt.
       :
     2 :     DEFINE QLOCAL('PRAKT20.NACT.REPLYQ') REPLACE +
       :            DEFPSIST(YES) +
       :            SHARE
AMQ8006: MQSeries-Warteschlange erstellt.
       :
     3 :     DEFINE QREMOTE('PRAKT20.NACT.REMOTEQ') REPLACE +
       :            RNAME('SYSTEM.CICS.BRIDGE.QUEUE') +
       :            RQMNAME('MQA1') +
       :            XMITQ('PRAKT20.NACT.XMITQ')
AMQ8006: MQSeries-Warteschlange erstellt.
       :
     4 :     DEFINE CHANNEL('PRAKT20.CLIENT') CHLTYPE(SVRCONN) TRPTYPE(TCP)
+
       :            MCAUSER(' ') REPLACE
AMQ8014: MQSeries-Channel erstellt.
       :
     5 :     DEFINE CHANNEL('PRAKT20.NACT.WIN.OS') CHLTYPE(SDR) TRPTYPE(TCP)
+
       :            XMITQ('PRAKT20.NACT.XMITQ') +
       :            CONNAME('139.18.4.97(1414)') +
       :            MCAUSER(' ') REPLACE
AMQ8014: MQSeries-Channel erstellt.
       :
     6 :     DEFINE CHANNEL('PRAKT20.NACT.OS.WIN') +
       :            CHLTYPE(RCVR) +
       :            TRPTYPE(TCP) +
       :            SEQWRAP(999999999) +
       :            MCAUSER(' ') REPLACE
AMQ8014: MQSeries-Channel erstellt.
       :
6 MQSC-Befehle gelesen.
Keine Befehle mit Syntaxfehler.
Alle gültigen MQSC-Befehle verarbeitet.


                                          Figure 35

The last 3 lines indicate that all objects for the Queue Manager have been created without
any errors (Figure 35).

Task: Send your Supervisor the File "MQadmvs.out" by E-Mail.
4. Configure Java
4.1 Environment Variables

After the Support Pack for WebSphere MQ has been installed (see Chapter 3.2)
you will find in the directory H:\programme\IBM\WebSphere MQ
the subdirectory Java.

Open a DOS Window. Change to the directory
 H:\programme\IBM\WebSphere MQ\Java\lib.
Here you will find four files:

H:\Programme\IBM\WebSphere MQ\Java\lib\com.ibm.mq.iiop.jar;
H:\Programme\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;
H:\Programme\IBM\WebSphere MQ\Java\lib\com.ibm.mqbind.jar;
H:\Programme\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;

These four files must be added to the Classpath.
Additionally it may be important to add the following file to the Classpath:

H:\jdk1.3.1_04\jre\lib\rt.jar;

This may be required for the successful installation of the source program
MQClient.java.

So that typos and errors are minimised, the entry can be updated by using
Cut and Paste on the file h:\Prakt20\classpath.txt. Using a text editor,
copy the following string from the file h:\Prakt20\classpath.txt

H:\jdk1.3.1_04\jre\lib\rt.jar;H:\Programme\IBM\WebSphere
MQ\Java\lib\com.ibm.mq.iiop.jar;H:\Programme\IBM\WebSphere
MQ\Java\lib\com.ibm.mq.jar;H:\Programme\IBM\WebSphere
MQ\Java\lib\com.ibm.mqbind.jar;H:\Programme\IBM\WebSphere MQ\Java\lib\c
om.ibm.mqjms.jar;.;

into the Scratch Pad (this can be done, for example, by marking the region to be copied using
the shortcut Ctrl+C). Then Start -> Control Panel -> Systems Variables -> double click on
System -> Click on Advanced -> Click on Environment Variables -> then on Classpath in the
Window User Variables

Now append the string copied into the Scratch Pad to the string Value of Classpath.
Click in the field Variable Value, by pressing the key Pos1 with the cursor placed in the
leftmost position and add the new path by using the shortcut Ctrl+V. Between the two newly
created Paths in addition to the old Path H:\example there must be a semicolon as a
separator.

The Sequence „;.;“ at the end of the Variable is important !!! The Full Stop "." represents an
actual directory. Without this Sequence the Java Compiler will not find classes (= .class-
Files), which are stored in the relevant directory so that the called Main Classes are invoked
by javac <Main Class>.

Be aware, that in all Paths you must of course replace the drive "H:\" by the drive you use. If
you use drive "C:" for example, you should replace all references to "H:\" with “C:\".

Press the OK button three times (one for each Window) and close the Window
Systems Variables.

Obviously the jar Files can be copied to “H:\jdk1.3.1_04\jre\lib\ext“ so that they are
automatically bound. Don't forget to add the Symbol “;.;“to the Classpath.
4.2 Interpreting Java Programs

To update the Classpath, the Computer must be restarted. Before the Java Programs
are interpreted, you should check that the Classpath Variable is correctly set.
To do this, we type set Classpath in a new DOS Window:


H:\>set classpath
Classpath=H:\jdk1.3.1_04\jre\lib\rt.jar;H:\example;H:\Progra
a\lib\com.ibm.mq.iiop.jar;H:\Programme\IBM\MQSeries\Java\lib
rogramme\IBM\MQSeries\Java\lib\com.ibm.mqbind.jar;H:\Program
\lib\com.ibm.mqjms.jar;.;

H:\>

                                             Figure 36

If you have copied all the jar Files to the Directory “H:\jdk1.3.1_04\jre\lib\ext“
and only have the Symbol “;.;“ in the Classpath, then the output will obviously
be as follows:


                                     H:\>set classpath
                                     Classpath=H:\example;.;

                                     H:\>

                                             Figure 37

We use a Java Client, which contains the Presentation Logic for our CICS Access. You will
find the corresponding JAVA source code in the file MQClient.java as well as a series of
further *.java files in the Directory H:\Prakt20\dipl_busseT\java.
We bring up the open DOS Window and change to this Directory.

This Directory contains a subdirectory “images“ as well as eight files (see
Figure 38):
H:\Prakt20\dipl_BusseT\java>dir
 Datenträger in Laufwerk H: hat keine Bezeichnung.
 Datenträgernummer: B8BF-9933

 Verzeichnis von H:\Prakt20\dipl_BusseT\java

06.01.2003     17:30       <DIR>          .
06.01.2003     17:30       <DIR>          ..
06.01.2003     17:30       <DIR>          images
14.05.2002     08:49                   38 about.txt
26.01.2002     20:56                1.534 AccountHistory.java
28.06.2000     19:33                1.400 AccountHistoryTableModel.java
26.01.2002     21:00                5.606 AccountRecord.java
28.06.2000     19:33                  712 DisplayField.java
14.05.2002     08:52               29.208 MQClient.java
28.01.2002     17:53                9.590 MQCommunicator.java
14.05.2002     08:58                  101 starting.bat
                  8 Datei(en)         48.189 Bytes
                  3 Verzeichnis(se), 11.034.722.304 Bytes frei


                                           Figure 38

Next we translate the *.java Programs in this Directory into java byte code.
We do this by entering the following command from the DOS Window:

javac –g –verbose MQClient.java

The parameter -verbose results in messages being produced during the translation.
If the translation is successful, no error messages should appear. If we now enter the
command dir from the Directory H:\Prakt20\dipl_busseT\java, we see that for every *.java file
there is at least one *.class file (see Figure 39).
H:\Prakt20\dipl_BusseT\java>dir
 Datenträger in Laufwerk H: hat keine Bezeichnung.
 Datenträgernummer: B8BF-9933

 Verzeichnis von H:\Prakt20\dipl_BusseT\java

14.01.2003     20:48       <DIR>          .
14.01.2003     20:48       <DIR>          ..
06.01.2003     17:30       <DIR>          images
14.05.2002     08:49                   38 about.txt
14.01.2003     20:48                1.556 AccountHistory.class
26.01.2002     20:56                1.534 AccountHistory.java
14.01.2003     20:48                1.549 AccountHistoryTableModel.class
28.06.2000     19:33                1.400 AccountHistoryTableModel.java
14.01.2003     20:48                4.504 AccountRecord.class
26.01.2002     21:00                5.606 AccountRecord.java
14.01.2003     20:48                  743 DisplayField.class
28.06.2000     19:33                  712 DisplayField.java
14.01.2003     20:48                  582 MQClient$1.class
14.01.2003     20:48                  617 MQClient$2.class
14.01.2003     20:48                  617 MQClient$3.class
14.01.2003     20:48                  616 MQClient$4.class
14.01.2003     20:48                  621 MQClient$5.class
14.01.2003     20:48                  695 MQClient$6.class
14.01.2003     20:48               20.997 MQClient.class
14.05.2002     08:52               29.208 MQClient.java
14.01.2003     20:48                6.655 MQCommunicator.class
28.01.2002     17:53                9.590 MQCommunicator.java
14.05.2002     08:58                  101 starting.bat
                 20 Datei(en)         87.941 Bytes
                  3 Verzeichnis(se), 11.034.628.096 Bytes frei

                                       Figure 39

The preparation of the CICS Access with the aid of WebSphere MQ and a JAVA Client is now
complete.

We stop the Queue Manager PRAKT20.NACT, before we continue with Tutorial
12.

How to stop a Queue Manager and how to stop a WebSphere MQ Server is described in the
next Chapter.

5. Stopping WebSphere MQ
5.1 Stopping a Queue Manager.

The Queue Manager is stopped by right clicking once on PRAKT20.NACT in
WebSphere MQ Explorer and selecting “Stop“.
                                         Figure 40

The Queue Manager can be brought down in a Controlled or Immediate way.
We select the Controlled method. Click OK with the left Mouse Button.




                                         Figure 41

While the Queue Manager is stopping, the following Message will be displayed:
                                         Figure 42

As soon as the Queue Manager has stopped, the green arrow will change to red.
The Queue Manager has stopped.




                                         Figure 43

From here you can continue seamlessly with Tutorial 12.
5.2 Stopping WebSphere MQ Server

If WebSphere MQ Explorer is still open, close it. The following message will appear:




                                          Figure 44


Here you can select “Yes“ or “No“, depending on whether you want to stop the
Shutdown. Select “Yes“, then a Warning may appear (see Figure 19).

After WebSphere MQ Explorer has been closed, the Windows 2000 WebSphere MQ Server
can be brought down.

Click on the WebSphere MQ Symbol with the right Mouse button in the Task List.




A Popup Menu will appear. Click on Stop IBM WebSphere MQ




                                          Figure 45




                                          Figure 46


Answer this question with “Yes“, then the Windows WebSphere MQ Server will shut down.

The WebSphere MQ Symbol on the Task List will now have a red arrow to the right of it.

								
To top