You are on page 1of 9

CICS EXERCISES

Day - 1
1.

Develop a CICS application program(using PDF) having the following specifications :


The program starts with receiving the following message from the terminal :
TRnn nnnn
where TRnn is the transaction identifier (nn refers to your user-id) and nnnn is
the Employee Number.

Respond to the terminal user with the following message :

INQUIRY KEY RECEIVED FOR EMPLOYEE nnnn


Copy the JCL - IBMUSER.TEST.CICS(CICSJCL) into your PDS bearing the name
BMDnn.USER.CICS(CICSJCL), give the program identifier as PRnn, which is
created under the CICS region.
[NOTE : The program-ids are already associated with their respective transactionidentifiers. Eg., PR01 has its Tran-id as TR01, PR02 has its trans-id as TR02 etc.]
Logoff from TSO & Logon to the CICS region with your user-id and password.
Run the CEMT Transaction to point to the New Copy of the Load Module available under
the Name PR01
Now Run the transaction TR01, and do the needful.
On Successful completion, terminate the task.
2.

Code the program (dealing with display of date/time/terminal-id etc based on the input
received) discussed in the class and execute it.

Day - 2
1.

Develop the following screen. Compile it using the JCL IBMUSER.TEST.CICS(CMPMAP). Send this map to the terminal using CECI
transaction.
MAP1
METAMOR SCHOOL OF EXCELLENCE
STUDENT INFORMATION SYSTEM
MAIN MENU

B
C
D
I
X

Browse
Change
Delete
Inquiry
Exit

XX/XX/XX
XX:XX:XX

Add

ENTER THE FUNCTION : _


ERROR :____________________________________________________

2.

The following screen is going to be commonly used for Add, Delete, Change & Inquire
Menu selections of MAP1. Depending on the function selected, the Menu title and the
function field changes. Develop the screen and Compile it. Send this map to the
terminal using CECI transaction.
MAP2
METAMOR SCHOOL OF EXCELLENCE
STUDENT INFORMATION SYSTEM
________ MENU

XX/XX/XX
XX:XX:XX

FUNCTION : _
BATCH NO
STUDENT NO
STUDENT NAME

:
_____________
:
_____________
_____________

JCL MARKS
:
_____________
COBOL MARKS
METAMOR SCHOOL
:
OF _____________
EXCELLENCE
SYSTEM
DB2 MARKS STUDENT INFORMATION
:
_____________
CICS MARKS
:
_____________
BROWSE

XX/XX/XX
XX:XX:XX

FUNCTION : B
ERROR :____________________________________________________
3.

BATCH
STUDENT
STUDENT
DB2 for the
CICS
Develop
the following
browse
screen, assumingJCL
only one COBOL
line of display
details.
NO
NAME
MARKS
MARKS MARKS MARKS
Compile
it.NO
Send this map
to the terminal using CECI
transaction.
MAP3

ERROR :____________________________________________________

Day - 3
The programs developed henceforth must re-display the map with suitable error message on
encountering edit errors. The cursor should be placed on the field which has generated the edit
error, and the field is to be BRIGHTend to get the user attention. (HINT : Use symbolic cursor
positioning technique). [NOTE : After receiving the initial map, turn on the MDT field of each
field of the map where user entered some data. This is to eliminate re-entry of fields with correct
input].
1.
Write a small program which will send MAP1 and wait for user input. Ensure a correct
input into the function field, by receiving the map and validating the function. Valid Function
Options are A, B, C, D, I and X. If the function is a valid one, terminate the transaction
otherwise re-send the map with the appropriate error message. Repeat the whole process until a
correct function is entered. [NOTE : Develop this program using conversational technique and
run it in the CEDF mode]
2.
Convert the conversational program into pseudo conversational program, and run it in the
CEDF mode. Observe the difference in the executions of the conversational and the pseudo
conversational programs.

Day - 4
1.

.
Write a program to INQUIRE the details of the dataset and LINK this program to the MAIN
MENU program. Implement the following in this program

MAP NAME : MAP2


ENTER THE FIELDS : Batch Number and Student Number; VALIDATE them.
VALIDITY CHECKS :
Valid Batch Numbers : 01-12
Others : Error
Valid Student Numbers : 01-30
Others : Error
RETRIEVE THE REST FROM THE DATASET.
NOTE : Prior to the creation of the above mentioned program,
create a PS(Physical Sequential) data set having record size - 32, containing at least
three records the structure and sequence of fields of which should be as mentioned
below:
batch no - 2 bytes
student no - 2 bytes
student name - 20 bytes
jcl marks - 2 bytes
cobol marks - 2 bytes
db2 marks - 2 bytes
cics marks - 2 bytes
create a VSAM (KSDS) data set having the record size as 32 bytes, of which first 4
bytes(Batch Number - 2 Bytes; Student Number - 2 Bytes) form the key field; REPRO at
least 3 records into this VSAM data set from a PS created earlier.
2.

Write a program to ADD the details into the dataset and LINK this program to the MAIN
MENU program. Implement the following in this program
MAP NAME : MAP2
ENTER THE FIELDS : Batch Number, Student Number, Student Name
VALIDITY CHECKS :
Valid Batch Numbers : 01-12
Others : Error
Valid Student Numbers : 01-30
Others : Error
Valid Marks for all fields : 00-50
Others : Invalid
IN CASE ALL VALIDITY CHECKS ARE VALID, ADD THE RECORD.[NOTE : If a
particular Student Number for a particular batch already exists, display the rest of the details
and stop addition]

Day - 5
1.

Write a program to CHANGE the details in the dataset and LINK this program to the
MAIN MENU program. Before Changing, Inquire the record and then update. Do not allow
the change of the key. Implement the following in this program
MAP NAME : MAP2
ENTER THE FIELDS : Batch Number, Student Number, retrieve rest of the details after
validation of the Batch Number and Student Number.
VALIDITY CHECKS :
Valid Batch Numbers : 01-12
Others : Error
Valid Student Numbers : 01-30
Others : Error
Valid Marks for all fields : 00-50
Others : Invalid
IN CASE ALL VALIDITY CHECKS ARE VALID AFTER THE CHANGES, UPDATE THE
RECORD.[NOTE : Only Student Name and marks can be changed. Validate Marks during
change.]

2.

Write a program to DELETE the details in the dataset and LINK this program to the MAIN
MENU program. Before DELETING, Inquire the record and then DELETE.
Implement the following in this program :
MAP NAME : MAP2
ENTER THE FIELDS : Batch Number, Student Number
VALIDITY CHECKS :
Valid Batch Numbers : 01-12
Valid Student Numbers : 01-30

Others : Error
Others : Error

IN CASE ALL VALIDITY CHECKS ARE VALID, RETRIVE THE RECORD AND
DELETE IT.

Day - 6
1.
Modify MAP3 to have a maximum of 5 lines of detail. Compile it and test it using CECI.
Now, develop a program using MAP3, for Browsing. On selection of the Browse option in the
Main Menu Program, it has to be XCTLed to this program
MAP NAME : MAP3
ENTER THE FIELDS : No fields to be entered.
VALIDITY CHECKS : No Validity Checks

Day - 7
1.

Modify the earlier INQUIRE program to


incorporate the SET Option instead of the INTO Option
implement the attention identifiers PF12 to Cancel.

TSO EXERCISES
EXERCISE - 1
1.

Logon to the system, by entering TSO as the Application Name. When the system prompts
for the userid with the message : ENTER USERID, give your userid as BMDxx and at
the password prompt, enter the password as BMDTRGxx, where, xx represents the ID
number allocated to you.
[NOTE : When the password expires, RACF displays the message indicating the expiry
of the password, and, asks for a new password to be entered.]

2.

From the Primary Menu Panel, enter the edit Panel, selecting the appropriate option from the
selection panel.

3.

Jump to the View Panel directly from the Edit Panel.

4.

Enter the Project as BMDxx; Group as USER; Type as TSO and press carriage return.

5.

From the Member List Panel, select the member TEST1 for viewing.

6.

Exit from the Member List panel and in the View Panel, enter TEST1 as the Member. Steps
4 through 6 allow you to know the different approaches to open a member of a dataset.

7.

Make any modifications in the file content and give the SAVE command on the command
line. What is it that you observe?
___________________________________________________

8.

Create a new Member TEMP, and enter the details from page 41 of your TSO Student Note
Book. Follow all the instructions from page 41 to page 113 to implement the Line
Commands and Command Line Commands.

9.

Exit from the ISPF panel and logoff.


[NOTE : Please DO NOT use the WINDOWS CLOSE button/menu item to Exit the S390
Operations]

TSO EXERCISES
EXERCISE - 2
1.

Create a Partitioned dataset with the name BMDxx.USER.TSO-EX with the following
specifications :
The Volume Serial as TSO001, Generic Unit as 3380, Space as Blocks, Primary
Quantity - 1, Secondary Quantity - 1, Directory Blocks - 1 (Note : Directory block is 0
for a Sequential dataset), Record Format - FB (F-Fixed, V-Variable, FB-Fixed Block,
VB-Variable Block), Record Length - 80 and Block Size - 800.

2.

Create a copy of BMDxx.USER.TSO(TEST) as BMDxx.USER.TSO(TEST1).

3.

Record the dataset information for the PDSs BMDxx.USER.TSO and


BMDxx.USER.TSO-EX

4.

Copy the members TEST and TEST1 from BMDxx.USER.TSO to BMDxx.USER.TSO-EX


selecting the member from the Member list panel displayed when the copy operation is
specified only with the PDS name specified(Member name not specified).

5.

Copy the member TEMP from BMDxx.USER.TSO to BMDxx.USER.TSO-EX, giving the


member name in the MOVE/COPY utility panel along with the PDS name. (Steps 2-4
enable you to know the various approaches in a COPY operation

6.

Move the members TEMP2 and TEMP3 from BMDxx.USER.TSO to


BMDxx.USER.TSO-EX.

7.

Delete the member TEST1 from the PDS BMDxx.USER.TSO.

8.

Compress the dataset BMDxx.USER.TSO and compare the dataset information with the
information recorded earlier. Do you find any difference? If yes, what is it ?
______________________________

9.

In BMDxx.USER.TSO-EX(TEST1) use the COPY Command Line Command to append


the contents of TEMP3 to the contents in TEST1.

10. Rename BMDxx.USER.TSO-EX(TEST1) to BMDxx.USER.TSO-EX(MERGE).


11. Rename BMDxx.USER.TSO-EX to BMDxx.USER.NEWTSO.
12. After all the above operations are over, Delete the entire dataset BMDxx.USER.NEWTSO.
13. Copy IBMUSER.TEST.CICS(TESTJCL) into the PDS BMDxx.USER.TSO.
14. Edit TESTJCL in BMDxx.USER.TSO, replacing all xx with your user-id number.
15. Enter the SUBMIT Command on the Command Line.
16. Split the screen using PF2 or the SPLIT Command Line command. [NOTE : to toggle
between the two screens, use PF9].
17. Invoke the SDSF Panel & give the command PRE BMDxx* where xx represents your Userid Number(to view the Jobs submitted by you). Try the ? as well as S option to browse
through the JOB Log.
18. Exit from both the panels and logoff.

You might also like