Anda di halaman 1dari 16

IBM Student Mainframe Challenge

Part Two
Time to complete about six to eight hours
Welcome to the Mainframe Challenge Banking Corporation!
The bank's system needs to be upgraded. You have been asked to ork in a team that
is developing a prototype for the replacement to the bank's system that processes credit
card transactions. !etails of credit card transactions arrive via Web"phere M#
messages$ and are processed via a C%C" transaction. The C%C" transaction processes
the re&uests and records the transaction details in a !B' database$ updating the
available credit on the card at the same time. The C%C" transaction sends a reply back
for each transaction via Web"phere M#$ indicating hether it as processed
Your colleagues have started to develop the prototype but are struggling to get it orking. The aim of
this part of the challenge is to successfully complete the prototype so that you can simulate a payment
on your credit card.
We are going to use credit cards ith a name instead of a ()*digit number for simplicity. Your credit
card name$ and logon for the C%C" system$ are the same as your z/OS user id.
You may find the folloing references useful hen completing the tasks+
,-." v(.(( %nformation Center+,os-v(r((-inde/.0sp
C%C" Transaction "erver v1.' %nformation Center+'-inde/.0sp
Web"phere M# v2 %nformation Center+
The instructions for 4art ( of the Mainframe Challenge contain many useful tips as ell!
I'd like you to test that you can use the CICS
transaction via WebSphere MQ to simulate
a payment on your credit card. Also I have
some questions for you to anser to check your
understandin!. "lease send your ansers to me
hen you've finished the testin!.
C%C" 5Customer %nformation Control "ystem6 Transaction "erver is %BM's general*purpose transaction
processing softare for ,-.". %t is a poerful application server that meets the transaction*processing
needs of both large and small enterprises. %t builds on ,-." and "ystem , facilities to provide high
availability and scalability at a lo cost per transaction7 it supports large transaction volumes ith a fast
and consistent response time.
Transaction processing is a style of computing$ typically performed by large server computers$ that
supports interactive applications. %n transaction processing$ ork is divided into individual$ indivisible
operations$ called transactions. 8or e/ample$ ithdraing cash from an 9TM and updating the balance
in a database. By contrast$ batch processing is a style of computing in hich one or more programs
processes a series of records 5a batch6 ith little or no action from the user or operator. 8or e/ample$
printing out bank statements for every account holder ready to send by mail.
Transaction processing middleare such as C%C" allos application programmers to concentrate on
riting code that supports the business$ by shielding application programs from the details of
transaction management+
%t manages the concurrent processing of transactions.
%t enables the sharing of data.
%t ensures the integrity of data
%t manages the prioriti,ation of transaction e/ecution.
When a transaction starts processing$ C%C" runs a program that is associated ith the transaction. That
program can transfer control to other programs in the course of the transaction$ making it possible to
assemble modular applications consisting of many C%C" programs.
9t any time$ in a C%C" system$ many instances of a transaction can run at the same time. %t ould be
inconvenient to have to &ueue and ait for thousands of other people hen buying something online.
!ebSphere M"
Web"phere M# is %BM's premier messaging product. %t can be used to send formatted data$ in the
form of messages$ beteen disparate applications via an asynchronous message delivery mechanism.
These applications might be ritten in different programming languages and be running on different
hardare and operating systems. Being able to connect these applications together can save customers
a lot of time and money.
Messages are placed on &ueues in storage$ so that programs can run independently of each other$ at
different speeds and times$ in different locations$ and ithout having a logical connection beteen
them. Web"phere M# allos multiple and interchangeable applications to access the same$ or
different$ &ueues$ hich can help customers to develop a fle/ible and scalable infrastructure that
includes redundancy and thus reduces the risk of failure.
Many of the largest companies in the orld have C%C" and Web"phere M# at the very heart of their
Before you can start this part of the contest you'll need to obtain the &uestions that you need to
anser along the ay.
These are available in a &uestion and anser sheet in the se&uential data set called
Using ISPF take a copy of this data set$ hich you can complete as you progress through
the tasks.
Call your se&uential data set <userid>.<userid>.ANSWERS
%t should be allocated in tracks 5TRKS6
%t should have a primary &uantity of 1 and secondary &uantity of 1
%t should have 3 directory blocks
The record format should be FB 5fi/ed block6 and the record length should be 80
The block si,e should be 32000
The data set name type should be blank
Ensure that the first TWO quaifiers of your data set are your user id otherise your
ansers may not be marked correctly.
You ill be advised hen you should be able to anser each of the &uestions$ but please read the
comments at the top of the anser sheet carefully before proceeding.
Fi in your z/OS user id in the space provided above &uestion (.
#o copy a data set$ use utility %.% from
the IS"& primary panel. '#ype =3.3 at
the command line in IS"&.(
)ou can also copy "*S+ members from
this panel$ by puttin! the member name
in brackets after the data set name.
If it all !oes ron!$ don't orry,
*elete the dataset by findin! it in utility 3.4$
and typin! in the command column
on the left. #hen try a!ain,
CICS Primer
:o's a good time to give you some guidance on using C%C".
You start a C%C" transaction by pressing the C!EAR; key to clear the screen$ and entering
the transaction identifier$ either by itself or folloed by data$ on the command line of the
screen. The command line is a single line$ usually at the top of the screen.
You can type the transaction identifier by itself and follo the prompts until a complete
transaction command is built up$ or you can type the complete transaction command on the
command line. %f you do not enter enough information$ or if the information you enter is
rong$ you are prompted to complete or correct your input.
8or e/ample$ in the folloing transaction$ CESF is the transaction identifier and the
additional data is "OON#"HT.
This transaction is used to log off C%C".
When the transaction starts$ it processes the additional data. 9t the completion of this
transaction$ you get the folloing message+
9fter a transaction has completed$ press the C!EAR; key to get a blank screen in readiness
for the ne/t transaction.
To end a transaction use the PF3 key.
; The special 1'23 C!EAR key is not on most keyboards. <oever$ 1'23 emulators either
provide this via a conte/t 5right*click6 menu or allo you to map it to a key of your choice$
often P'use(Bre') by default.
You can find more information on C%C" in the C%C" Transaction "erver v1.' %nformation Center.
Using CICS
.pen a second 1'23 session but instead of entering TSO at the SE!E"TIO# $$% prompt enter
!O"ON APP!#*C#CSZ0+,- instead.
You should then be presented ith the C%C" sign*on screen+
Enter your user id and pass&ord and press enter 5remember this is the C.r/ key6.
The screen should clear e/cept for the folloing message near the bottom+
FHCE3+40 Si12342 is 5467/e.e *!'21u'1e EN%-.
'ns&er questions ()* in your <userid>.<userid>.ANSWERS data set$ no that you have
successfully logged on to C%C".
%f you think about ho you might achieve any given task in the real orld$ you typically break it don
into one or more steps$ here each step completes a particular part of the bigger picture and typically
re&uires the use of different resources.
=ob Control >anguage 5=C>6 is ho you describe this information to ,-."$ hereby a 0ob represents a
8or every 0ob that you submit$ you need to tell ,-." here to find the appropriate input$ ho to
process that input 5that is$ hat program or programs to run6$ and hat to do ith the resulting
output. You use =C> to convey this information to ,-." through a set of statements knon as 0ob
control statements.
=C>'s set of 0ob control statements is &uite large$ enabling you to provide a great deal of information to
,-.". Most 0obs$ hoever$ can be run using a very small subset of these control statements.
Within each 0ob$ the control statements are grouped into 0ob steps. 9 0ob step consists of all the control
statements needed to run one program.
%f a 0ob needs to run more than one program$ the 0ob ould contain a different 0ob step for each of
those programs.
#ob Control Statements
?very 0ob must contain+
* 9 8OB statement to mark the beginning of a 0ob and assign it a name. This statement is
also used to provide certain administrative information$ including security$ accounting$ and
identification information. ?very 0ob has one and only one 8OB statement.
* 9t least one E9EC 5e/ecute6 statement$ marking the beginning of a 0ob step$ a name for
the 0ob step$ and the program or procedure to e/ecute. You can add various parameters to
the E9EC statement to customise the ay the program e/ecutes and the conditions under
hich the step should be run.
Most programs re&uire some input or generate some output and so usually also contain+
* .ne or more 5data definition6 statements$ to identify and describe the input and
output data to be used in the step. This statement may be used to re&uest a previously
created data set$ to define a ne data set$ to define a temporary data set$ or to define and
specify the characteristics of the output.
?ach 0ob control statement has five fields+
1. 9n identifier field$ hich is typically to forard slashes 5((6. The entire line is treated as
a comment if the to slashes are folloed by an asterisk 5((:6.
2. 9 name field$ identifying the statement so that it can be referred to later
3. 9n operation field identifying the type of statement$ i.e. 8OB$ E9EC$ .
4. 9 parameter field
5. 9nything folloing the parameter field is treated as a comment and ignored.
=C> statements can be coded only up to column 2(. You may &uestion hy =C> has this format but it
as historically input using punch cards that had @3 columns$ the last @ of hich ere used for line
8or more information on =C> you can look in the =C> Aeference section of the MB" book in the ,-."
%nformation Center.
-C.'s layout can look a bit confusin!
hen you see it for the first time.
.uckily the IS"& editor can display
-C. synta/ hi!hli!htin! if you type
H#!#TE 8C! 'or H#!#TE A%TO( hen
editin! 'not brosin!( a -C. member.
%n this section$ you may find yourself having to repeatedly sap beteen to different applications$ for
e/ample$ beteen the anser sheet data set in the editor$ and "!"8 to find out the ansers to the
&uestions. %t can get frustrating to keep having to go in and out of different applications and back
again$ so there is a better ay to do it+
4ressing PF2 ill cause the screen to CsplitC at your cursor$ shoing the to screens
separated by a hori,ontal dotted line. You can then press PF0 to sap beteen the to
screens. 4ress PF3 all the ay back to hat ould be the T". prompt to get rid of a
To ma/imise the available screen si,e$ put your cursor on the very top line of the screen
before pressing PF2.
You'll never kno ho you lived ithout it!
S$S% Primer
"ystem !isplay and "earch 8acility 5"!"86 provides information that you can use to monitor$
manage and control a ,-." system.
+ou can use S,SF to -ie& the system og and the status of .o/s that are running
in the system or ha-e finished running0 incuding any hed output of .o/s that
ha-e not yet /een purged 1discarded23 Use S,SF to -ie& the output of any .o/s
you su/mit3
You access "!"8 from the %"48 primary panel ith the command S.
8rom there$ A can be used to vie the active 5running6 0obs in the system$ including any
started tasks$ hich are a special type of 0ob.
ST can be used to vie the status of 0obs$ those that are active$ those yet to be processed$
and those that have completed.
.nce you are vieing a list of 0obs$ at the command input prompt you can filter the list of
0obs to 0ust those that you on by entering+
OWNER %K;;;;;
To revert back to shoing all 0obs enter+
"imilarly you can filter the list of 0obs by their name by entering+
hich ould sho only those 0obs hose names begin ith the letters 9BC.
To remove this filter enter+
PREF#9 :
You can use both the oner and the prefi/ filters at the same time.
These are particularly useful because they hide 0obs on the system that you are either not
interested in or not authorised to look at.
Be aare that "!"8 remembers the filters that you are using. %f you are not seeing a 0ob
that you e/pect to see$ set both filters to a single asterisk 5;6 so that all 0obs are displayed.
%n the A and ST panels you are presented ith a list of 0obs. Dse the PF, and PF8 keys to
page up and don.
To vie more information about a particular 0ob you can enter S in the left*hand column
5:46 and press C.r/.
This can provide a lot of data and so alternatively you can enter a &uestion mark 5<6 instead$
hich ill give a listing of the various sections of the output. You can then use S to select
these sections individually.
Dse the PF3 key to e/it the screen that you are on and return to the previous one.
#he prefi/ and oner filters aren't displayed
anyhere by default$ so if you leave the filters
on you mi!ht end up ith a blank 0ob list, IS"&
remembers your filters beteen sessions$ so
look in the O7.i42s menu at the top of the
screen and choose option + to display them.
'ns&er questions 4)5 no that you are familiar ith =C> and "!"8.
&unning the unit'test application
"reate a PDSE0 as in part one0 caed <userid>.PART2.8C!.
%t should be allocated in tracks 5TRKS6
%t should have a primary &uantity of 1 and secondary &uantity of 1
The record format should be FB 5fi/ed block6 and the record length should be 80
The block si,e should be 32000
"reate a mem/er in your 6"! data set caed PAYMENT$ copying it from the member of the
same name in the data set called ZOS.CONTEST3.PART2.8C!.
Su/stitute the pacehoders in the .o/ as described E you can use any monetary value and
description of your choice.
Su/mit the .o/ by typing S%B=#T on the command line hile editing it$ and ook at its
output using S,SF3
Fi7 the 6"! errors$ using the =C> Aeference section of the MB" book in the ,-." %nformation
Center to help you find out hat is rong and ho to fi/ it.
'ns&er question 83
1h no, It looks like the code isn't
ready yet 2 even
the -C. that tells 341S to run the
batch pro!ram didn't ork,
We've taken a detour around some other
mainframe facilities$ so it mi!ht be orth
reviein! the initial dia!ram to focus back on
task 2 testin! our payment processin! system.
#he unit5test application developed by your
collea!ues is desi!ned to be run via a
batch 0ob$ started usin! some -C..
&ecompiling the unit'test application
<aving completed the previous e/ercise and ansered &uestion F you ill have found that the unit*test
application is missing.
Before you can recompile it you need to create another 4!"? in hich the compiled program can be
stored and from hich it can be run.
"reate another P,SE named <userid>.PART2.!OA$ defining it ith the same attributes as
:o you need to copy another set of =C>$ hich you can use to compile the application$ to another
member in your =C> data set.
"opy the .o/ from the member called CO=PPA> in the data set ZOS.CONTEST3.PART2.8C!
Su/stitute the pacehoders in the .o/ as descri/ed and compie the unit test
appication * you should not encounter any errors this time.
The C.M4%>? step should have an AC of 3.
The 4>G?! step should have an AC of H.
The >G?! step should have an AC of 3.
The I. step should have an AC of (.
&erunning the unit'test application
:o you have recompiled the unit*test application$ you can try to run it again as before.
Update your 6"! so that the system looks for the program in your load library and rerun it.
:o is a good time to ans&er questions (9 and ((3
#he source code for the application
is in the data set ZOS.CONTEST3.PART2.C
It shouldn't take too lon! to compile and
run it ourselves usin! some different -C..
1h dear$ more problems, It found the
application and ran 16 this time$
but there's an error from WebSphere MQ.
%t looks like you might need to create 5define6 your reply &ueue.
Web"phere M# provides %"48 panels to help you administer &ueue managers * these can be found on
J?D" under #B= Pr4du5.s 3 We?S7@ere A =B. You should be presented ith a screen as belo+
The name of the &ueue manager 5the connect name6 can be found in the =C> you used to run the unit*
test application.
You can press the PF1 key on any panel to obtain conte/t sensitive help 5i.e. help for the field your
cursor is on6.
,efine your repy queue3
:o you have successfully defined your reply &ueue+
'ns&er question (:3
)our reply queue should be defined
like the S)S#+M.*+&A7.#..1CA..Q7+7+
1h$ and make sure you name it
<userid>.REP!> in 7""+8CAS+,
You should no find that you are able to successfully run the unit*test application.
To complete this part of the Mainframe Challenge you must+
Use the unit)test appication to record a transaction against your credit card so that
your current /aance is not zero3 +ou can record more than one transaction if you
&ish0 and the amounts and descriptions are your choice3
Submit (our answers
.nce you have recorded a transaction against your credit card+
;e-ie& your ans&ers and then su/mit them so that they can be marked.
To do this go to option C 5Command * ?nter T". or Workstation commands6 and enter+
9=#T ZOS10.=ATTK A*D<userid>.<userid>.ANSWERSD-
Con!ratulations, )ou've finished all the steps for
"art #o, #hanks to you$ e can deploy the
chan!es to our CICS system on time$ and our
customers can benefit.
)ou've achieved a lot so far$ but there's
still a ay to !o, "art #hree builds on
hat you've already learned$ and !ets
even more challen!in! 2 you'll be usin!
more advanced features of WebSphere
MQ and CICS, See you there,
I'm recommendin! you to our corporate credit card
#eam to carry on to "art #hree of the contest 2
you'll need access to their mainframe systems.
"lease send an email to your contest administrator
to request a ne user I*$ includin! in your
email your current user I*. :ood luck,