You are on page 1of 80

V2.0.0.

cover

 Front cover

iSeries System
Administration and Control

(Course Code OL19)

Student Exercises
ERC 7.0

IBM Certified Course Material


Student Exercises

Trademarks
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AS/400® C/400® DB2®
DB2 Universal Database™ Domino™ DRDA®
iSeries™ Lotus® Netfinity®
OfficeVision® OfficeVision/400™ Operating System/400®
OS/400® PowerPC® Redbooks™
ServerProven® Service Director™ System/36™
WebSphere® xSeries® 400®
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Intel and Pentium are trademarks of Intel Corporation in the United States, other countries,
or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Linux is a registered trademark of Linus Torvalds in the United States and other countries.
Other company, product and service names may be trademarks or service marks of others.

October 2003 Edition

The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.

© Copyright International Business Machines Corporation 1995, 2003. All rights reserved.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions
set forth in GSA ADP Schedule Contract with IBM Corp.
V2.0.0.3
Student Exercises

TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Exercises Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Exercise 1. Establishing a User Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

Exercise 2. Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

Exercise 3. Save/Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

Exercise 4. Journal Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

Exercise 5. Commitment Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1

Exercise 6. Problem Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

© Copyright IBM Corp. 1995, 2003 Contents iii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

iv iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

TMK Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AS/400® C/400® DB2®
DB2 Universal Database™ Domino™ DRDA®
iSeries™ Lotus® Netfinity®
OfficeVision® OfficeVision/400™ Operating System/400®
OS/400® PowerPC® Redbooks™
ServerProven® Service Director™ System/36™
WebSphere® xSeries® 400®
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Intel and Pentium are trademarks of Intel Corporation in the United States, other countries,
or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Linux is a registered trademark of Linus Torvalds in the United States and other countries.
Other company, product and service names may be trademarks or service marks of others.

© Copyright IBM Corp. 1995, 2003 Trademarks v


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

vi iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

pref Exercises Description


Exercise instructions - This section describes what you should
accomplish. There are no definitive details on how to perform the
tasks. You are given the opportunity to work through the exercise
given what you learned in the unit presentation.

© Copyright IBM Corp. 1995, 2003 Exercises Description vii


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

viii iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 1. Establishing a User Environment

What This Exercise is About


The purpose of this lab is to familiarize the student with the objects
that may need to be created, and/or authorizations that may need to
be granted, in order to make a new user productive on the iSeries
system.
You will be creating objects that a programmer would need in order to
be productive. In the case of an end user (one that will be performing
data entry and inquiry functions), such objects as a library, output
queue and job description need not be created new. A new end user
would likely use libraries, an output queue, a job description and other
objects that already exist on the system.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Create a library
• Create an output queue
• Create a job description
• Create a user profile
• Grant authority to the new profile to access certain objects
• Test the user profile to determine if a proper environment has been
established

Lab Setup Instructions


In all of the instructions in this workbook, replace lower case xx with
the team number assigned to you by the instructor.
User: OL50xx
Password: OL50xx
Current lib: OL50xx
Use your password each time you sign on to the system. You will then
receive the Main Menu.
Each team will have its own library, OL50xx. All objects created should
be placed in your team library. All output will be directed to an output
queue called OL50 in library OL50LIB.

© Copyright IBM Corp. 1995, 2003 Exercise 1. Establishing a User Environment 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Preliminary Information for lab exercises 1 and 2


In your own library you have five objects that have been already
created for you by the instructor. These are:
BUILD Program
USRENT Program
CUSMSI Physical file
CUSMST Physical file
MAINT Display file
Display your library.
Verify the five objects are in the library.

1-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise Instructions


Step 1: Creating objects
__ 1. Access the system using iSeries Navigator with your user id and OL50xx.
__ 2. From this panel, create a library named LIBxx, where xx is your two digit team
number. To create it open: system_name under My Connection, Database then right
click on Libraries, New Library and type the library name.
__ 3. Verify the type of the new library (Library). Look at Properties.
__ 4. Open a 5250 window and sign on to the system, using your user id and OL50xx.
__ 5. From the OS/400 Main Menu, change the library type of LIBxx from production
(*PROD) to test (*TEST). The control language command to use is CHGLIB, and
you may wish to use the F4 key to prompt you for the parameters.
What is the difference between a *TEST library and a *PROD library? (You may use
the HELP key to find the answer.)
____________________________________________________________
____________________________________________________________
__ 6. From iSeries Navigator window verify once again the type of LIBxx.
__ 7. Using a 5250 emulator session create an output queue named OUTQxx, and
specify LIBxx as the library with which it will be associated. The command is
CRTOUTQ. Specify that one job separator page is to be included between printed
jobs.
__ 8. Using an iSeries Navigator window, verify that OUTQxx is associated with that
library. To verify the output queue find LIBxx.LIB under: File System, Integrated File
System, Qsys.lib.
__ 9. From your 5250 session create a job description named JOBDxx. Type CRTJOBD,
then F4. Specify the LIBxx library as the library with which it will be associated.
Accept the default (supplied) values for all parameters except for the following:
Accounting code: PROGRAMMER
Initial library list: OL50xx, OL50LIB, QGPL, QTEMP. (You will have to key a + sign,
and enter one library per line.)
Log CL program commands: *YES
__ 10. After you have created the job description, display it (DSPJOBD) and answer these
questions:
Are jobs held on the job queue automatically? _____________________________
What priority will jobs have that are sent to the job queue? ____________________
What job queue does the job description use? _____________________________

© Copyright IBM Corp. 1995, 2003 Exercise 1. Establishing a User Environment 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

What output queue does the job description use? (Or where does the system look
for the name of the output queue?) ______________________________________
What libraries are in the initial library list? _________________________________
__ 11. From the iSeries Navigator panel create a user profile named PROGxx, where xx is
your team id. Specify the following:
- User class: specify a value appropriate for a programmer.
- Current library: LIBxx
- Initial menu: PROGRAM
- Job description: JOBDxx in LIBxx
- Accounting code: PROGRAMMER
- Output queue: OUTQxx in LIBxx
__ 12. After creating the user profile PROGxx, check that all the parameters have the
correct values. If you made a mistake, correct them.
__ 13. Next you are going to give permission to PROGxx to use certain objects. Four
different techniques are available:
- Group profile
- Authorization list
- Individual permission (one per object or group of objects)
- Grant using a referenced user
You already have some experience with group profile, authorization list, and
individual permission from the security lab. Group profile and authorization list are
usually preferable to the grant using referenced user technique. The first two
techniques continue to update the authority of the users as the group profile is
changed, or the authorization list is changed. The grant using referenced user
technique only grants authority one time. The grant, in essence, copies the
authorizations from one user to another. Any changes made to a particular user in
the future will not affect other users.
In this section, you will use the grant using a referenced user technique. Execute
the command DSPUSRPRF USRPRF(PROGxx) TYPE(*ALL). You will see several
screens of information displayed one at a time.
Press Enter until you see the Display Authorized Objects screen. How many objects
is PROGxx specifically authorized to use? _______
Press Enter until you see the Display Owned Objects screen. How many objects
does PROGxx own? __________
What is the total number of objects that PROGxx either owns or is specifically
authorized to use? __________

1-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 14. Execute the command DSPUSRPRF USRPRF(OL50xx) TYPE(*ALL).


Press Enter until you see the Display Authorized Objects screen. How many objects
is OL50xx specifically authorized to use? __________
Press Enter until you see the Display Owned Objects screen. How many objects
does OL50xx own? ___________________
The number of owned and authorized objects will vary according to what has been
done in previous exercises.
__ 15. You are going to grant authority to PROGxx using OL50xx as a referenced profile.
You are doing this because you wish PROGxx to have the same authority to the
objects as OL50xx. Normally, this function is performed by the system security
officer, QSECOFR. Since you need additional authority, your instructor has prepared
a program for you that will enable you to adopt the authority of QSECOFR
temporarily. The program is named GRTUSRAUT. You execute it by keying CALL
GRTUSRAUT. When it executes, you are prompted just as if you had keyed the
command GRTUSRAUT and pressed F4 for prompting.
Key the command CALL GRTUSRAUT and press Enter. When prompted, specify
PROGxx as the user, and OL50xx as the referenced user. Press Enter.
__ 16. Now it is time to test what you have accomplished.
Step 2: Test the New User Environment
__ 1. Execute the command DSPUSRPRF USRPRF(PROGxx) TYPE(*ALL).
Press Enter until you see the Display Authorized Objects screen. PROGxx should
be authorized to all of the objects that OL50xx either was authorized to or owned in
addition to those that PROGxx had authorization to before you granted authority
using OL50xx as a reference.
Press Enter until you see the Display Owned Objects screen. PROGxx should not
own any additional objects. Only one profile can own an object.
__ 2. Next you will test the job description and user profile that you created earlier. Use
command TFRSECJOB or the System Request key to display sign on for an
alternative job, and sign on as PROGxx. (Unless you specified a different one, the
password is PROGxx.)
__ 3. Display the job's library list (DSPLIBL).
Why is LIBxx in the list as the current library? (Where was that specified?)
_________________________________________________________________
__ 4. Return to the Programming menu, then select option 2 for the Programmer
Development Manager (PDM).
You are to compile (create) a program in order to test your PROGxx user profile and
JOBDxx job description. The source statements for TEST have already been keyed
by an instructor into the QCLSRC file in OL50LIB.

© Copyright IBM Corp. 1995, 2003 Exercise 1. Establishing a User Environment 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

__ 5. Fill in the values as follows:


a. Selection: 3 (Work with members), Enter
b. File: QCLSRC Library: OL50LIB
__ 6. Use F18=Change defaults and enter your job description JOBDxx in library LIBxx.
__ 7. On the next screen use F23=Move options if not displayed for member TEST select
option 14 and then F4 for prompting. Change the library for program from OL50LIB
to *CURLIB to put the compiled program (TEST) in LIBxx.
__ 8. When you have filled in the values, press Enter.
__ 9. When your message waiting light illuminates, display the message (DSPMSG).
What message do you see?
_________________________________________________________________
Does it say completed normally? ______
__ 10. Enter the CL command WRKSBMJOB.
__ 11. On the Work with Submitted Jobs screen, notice the status of the job submitted by
your profile, PROGxx. Select option 8 = Work with spooled files.
To what output queue did the system send the TEST job compile listing?
_________________________________________________________________
If you have created the JOBDxx job description and PROGxx user profile correctly,
the Device or Queue column should indicate OUTQxx. If you have made a mistake,
return to an earlier part in the exercise, and correct your error.
__ 12. Use F3 several times to return to the Programming menu (or key GO PROGRAM).
When at the Programming menu, key the command DSPLIB LIBxx.
Is the TEST program in the library? It will be, if your PROGxx user profile was
created properly. The current library parameter controls which library gets any
objects created by PROGxx.
Press Enter to return to the Programming menu.
__ 13. Key the command CALL TEST.
__ 14. Key the command SIGNOFF, once for each job; the lab is ended.

END OF LAB

1-6 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise Solutions


Step 1: Creating Objects
__ 1. Access the system. Open the iSeries Navigator window and double click on
system_name under My Connections:
User ID: OL50xx
Password: OL50xx
__ 2. Create Library:
Open (or double click) Database
Right click Libraries
Select New Library
LIBxx
Click OK
__ 3. Verify the new library:
Open (or double click) Libraries
Right click LIBxx (either on left or right pane)
Select Properties
__ 4. 5250 window Sign on:
User..............OL50xx
Password.....OL50xx
__ 5. CHGLIB LIB(LIBxx) TYPE(*TEST):
While using debug, a program may not update data files in a *PROD library, unless
that option is specified. Files in a *TEST library may be updated without any special
specification.
__ 6. Verify the new library once again:
Open (or double click) File Systems
Open (or double click) Integrated File Systems
Open (or double click) QSYS.LIB
Right click LIBxx (either on left or right pane)
Select Properties
Now Type is: Library - Test
__ 7. CRTOUTQ OUTQ(LIBxx/OUTQxx) JOBSEP(1)
__ 8. Double click on LIBxx and observe the associated objects on right pane
__ 9. CRTJOBD JOBD(LIBxx/JOBDxx) ACGCDE(PROGRAMMER) INLLIBL(OL50xx
OL50LIB QGPL QTEMP) LOGCLPGM(*YES)
__ 10. DSPJOBD JOBD(LIBxx/JOBDxx)
No, jobs are not held on the job queue.

© Copyright IBM Corp. 1995, 2003 Exercise 1. Establishing a User Environment 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Job priority on the job queue is 5.


The job queue used is QBATCH in QGPL.
The output queue used is not specified in the job description. The system looks at
the user profile of the user submitting the job.
These libraries are in the initial library list: OL50xx, OL50LIB, QGPL, QTEMP
__ 11. Create user profile:
Right-click Users an Groups
Select New User....
PROGxx
Select Capabilities and Privilege Class: PROGRAMMER
Select Jobs and type other required inputs
Select ADD button
__ 12. Check or modify an User Profile:
Open (or double-click) Users an Groups
Double click All Users
Right-click PROGxx on right pane
Select Properties
No special authorities are granted.
__ 13. Self-explanatory:
DSPUSRPRF USRPRF(PROGxx) TYPE(*ALL)
PROGxx is specifically authorized to one object, its own profile
PROGxx owns one object, message queue PROG01.
The total is two objects.
__ 14. DSPUSRPRF USRPRF(OL50xx) TYPE(*ALL)
OL50xx is specifically authorized to many objects.
OL50xx owns many objects.
The total will vary depending upon what has been done in previous exercises.
__ 15. CALL GRTUSRAUT
USER(PROGxx) REFUSER(OL50xx)
__ 16. Self-explanatory.
Step 2: Test the New User Environment
__ 1. DSPUSRPRF USRPRF(PROGxx) TYPE(*ALL)
__ 2. SYS REQ; option 1; User....PROGxx; Password...PROGxx
__ 3. DSPLIBL
LIBxx was specified as current library in the PROGxx user profile.

1-8 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 4. F3 from the DSPLIBL display should return you to the Programming menu. If not,
key GO PROGRAM.
__ 5. Self-explanatory.
__ 6. Self-explanatory.
__ 7. Self-explanatory.
__ 8. The compile of member TEST was submitted to batch.
__ 9. Job xxxxxx/PROGxx/TEST completed normally on (date) at (time). Use DSPMSG.
__ 10. Self-explanatory
__ 11. Device or Queue: OUTQxx
__ 12. GO PROGRAM
DSPLIB LIBxx
__ 13. CALL TEST
__ 14. SIGNOFF: SIGNOFF
END OF LAB

© Copyright IBM Corp. 1995, 2003 Exercise 1. Establishing a User Environment 1-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

1-10 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 2. Security

What This Exercise is About


The purpose of this exercise is to assist the student in gaining
familiarity with the security facilities of the system.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Create, change, and delete a user profile
• Grant and revoke object authority
• Make a user profile a group profile
• Create and change an authorization list
• Work with adopting a user profile

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Instructions

PART A - USER PROFILES


Step 1: Create a user profile
__ 1. Access the system using iSeries Navigator with your user id and OL50xx.
__ 2. Create a user profile. Specify the following:
- Profile name: USRxx where xx is your team number
- Password: your choice
- Text: enter some meaningful text
- User class: programmer
- Current library: OL50xx, where xx is your team number
- Limited capabilities: Yes
- Initial menu: USER in library QSYS
__ 3. Observe the permissions for user profile USRxx (find USRxx into QSYS.LIB
Integrated File System) to answer these questions:
- What permission does OL50xx have to the profile? _________
- What permission does USRxx have? _________
- Can USRxx change his profile? _________
- What permission does (Public) have? _________
__ 4. Change (Public) permission from Exclude to Use
__ 5. Examine the object rights and data rights (press Detail button). How many bullets do
you count? _________
__ 6. Confirm your change and exit Permission panel by Clicking OK Button
__ 7. Open a 5250 session and sign on to the system, using the new profile and enter
PROBLEM as the menu name.
Because you specified a limited capability for this user, you cannot change the menu
from the one which is named in the user profile. If the PROBLEM menu is accepted
during sign on, you need to correct how you specified limited capabilities. Write the
error message here: __________________________
__ 8. Remove the menu name, rekey the password, and you should be allowed to sign
on.
The USER TASKS menu will be displayed. Because the user profile has limited
capability, you will only be able to enter certain commands. Test out the following
commands to see if you are allowed to execute them:

2-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty
COMMAND EXECUTABLE?
Actual Result Expected Result
CHGPWD(menu #8) Yes
CHGPWD (keyed) No
DSPJOB Yes
CRTUSRPRF No
CRTJRNRCV No
WRKOUTQ No

Note: Because this user has limited capability, only a few commands can be
executed. Any menu options can be taken.
__ 9. Sign off and you will be returned to Sign-on menu.
Step 2: Change a user profile
__ 1. Now you are going to change the user profile that you created earlier. Go to the your
iSeries Navigator window.
Open Users an Groups, double-click All Users and double-click (or select
Properties) USRxx on right pane.
- Change the initial program parameter to QCMD
- Change the limited capability value to Do not limit
__ 2. After the user profile has been changed, go to the 5250 session and sign on as
USRxx. Do not specify a menu or program at sign on.
You should now see the Command Entry display. (Any initial program specified in
the user profile will be executed before the initial menu is displayed.)

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

PART B - GROUP PROFILE AND AUTHORIZATION LIST


Step 1: Group Profile
__ 1. On a 5250 session (should be already signed on as USRxx) key the command
CALL OL50LIB/LAB1. Write the error message you receive:
USRxx does not have authority to the program LAB1. LAB1 is owned by QSECOFR,
and the public is excluded from using it. A user profile, OL50GROUP, has Use
permission to the program. You will use the group profile technique to allow USRxx
access to program LAB1.
__ 2. Sign off from the system ad go to your iSeries Navigator window.
Add the USRxx user profile to the OL50GROUP group profile.
Open Users and Groups>Groups>OL50GROUP Properties and add the user
profile to the group. Alternatively open Users and Groups>All Users, select USRxx
Properties on right pane, press Groups and add OL50GROUP.
__ 3. Go back to 5250 session and sign on as USRxx. When signed on, CALL
OL50LIB/LAB1.
You should be allowed to call the program.
__ 4. When a user's profile has specific authority to an object, the group profile is ignored.
Go to your iSeries Navigator window and give permission Exclude for USRxx to
program LAB1 in library OL50LIB. (Find the program on the following path: File
System > Integrated File System > QSYS.LIB > OL50LIB, Select Permissions,
add USRxx, confirm).
__ 5. Return to 5250 session where you are USRxx. CALL OL50LIB/LAB1.
What happens?
The specific permission Exclude overrides the group permission.
Step 2: Create and change an authorization list
__ 1. Go to your iSeries Navigator window and create an authorization list. To do so open
(or double-click) Security, right-click Authorization List, select New Authorization
List. The name of the authorization list is to be AUTLxx, where xx is your team
number and specify that the public is to be excluded from the objects on the list. (Do
not change anything on the second panel that appears, press either OK or Cancel).
__ 2. After the authorization list has been created, verify that in your library (OL50xx) you
still have the program BUILD and the file CUSMSI. (Path: File System > Integrated
File System > QSYS.LIB > OL50.LIB)
__ 3. Secure the program BUILD with your authorization list, and make sure that the
permission of the (Public) to the program is Exclude. To do so, select Permissions,
press Authorization List and select the appropriate list on pop-up menu.

2-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 4. Secure the file CUSMSI with your authorization list, and give the (Public) Exclude
permission.
__ 5. Open Security, Authorization List and AUTLxx (on right pane). Write the names of
the users, and their permissions, here:
_________________________________________________________________
_________________________________________________________________
__ 6. Press Secured Objects.
You should see that BUILD and CUSMSI are secured by your authorization list.
__ 7. Close the two panels.
How many authorization lists are listed on right pane? _________
Which Permissions do the authorization lists that you see, besides your own, have?
(How is it you can display them?)
____________________________________________________________
__ 8. Open a second 5250 session and sign on to the system, using the OL50xx profile.
__ 9. Key the command CRTCLPGM PGM(TIME) AUT(AUTLxx), where xx is your team
number. You are creating a control language program, owned by you, and secured
by your authorization list.
__ 10. Go to the your iSeries Navigator window and find the objects secured by your
authorization list. TIME should be on the list.
__ 11. Use the appropriate selection to display the list. Which users are on the list and what
authority do they have?
____________________________________________________________
__ 12. Go to the first 5250 session (USRxx should be already signed-on) and CALL TIME.
You should not be authorized.
__ 13. Go to the your iSeries Navigator window and add USRxx to your Authorization list
(AUTLxx) with the Use permission.
__ 14. Go to the first 5250 session (signed on as USRxx), and CALL TIME. You should be
authorized.

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

PART C - OBJECT AUTHORITY AND ADOPTED AUTHORITY


Step 1: Grant object authority
__ 1. Go to the second 5250 session (signed on as OL50xx), and create a message
queue named MSGQxx, where xx is your team number, by keying the command
CRTMSGQ OL50xx/MSGQxx.
__ 2. Go to the your iSeries Navigator window and observe the Permissions of the
message queue you just created (File > Integrated File System >.......).
What permission does (Public) have to the object? __________
__ 3. Go to the first 5250 session (signed on as USRxx), and display the message queue
by prompting the command DSPMSG and supplying the name of the message
queue.
Where does USRxx get the authority to do this? _________
__ 4. Run the command GO USER.
__ 5. Send a message to the queue using the menu option provided.
Note: You'll have to press F10 in order to specify the message Queue name.
__ 6. Return to your iSeries Navigator window and change the permissions that USRxx is
excluded from the MSGQxx message queue. Leave the authority of (Public) alone.
__ 7. Go to the first 5250 session (signed on as USRxx), and try again to display the
queue.
Are you allowed to do so? ________________
What error message do you receive? _______________
Are you allowed to send a message to the queue? _____________
__ 8. Return to your iSeries Navigator window and change the permissions that USRxx
has to the message queue from Exclude to Use. You want USRxx to be able to see
messages on the queue but not to be able to send messages to it.
__ 9. Go to the first 5250 session5250 session (signed on as USRxx), and try again to
display the queue.
Are you allowed to use DSPMSG to display the messages in the queue? ____
Are you allowed to use CLRMSGQ to delete the messages in the queue? ____
Are you allowed to use SNDMSG to send a message to the queue? ____
Are you allowed to use DLTMSGQ to delete the message queue? The command is
DLTMSGQ. ____
Note: If you have established security properly, the answer to the first question is
YES and the next three answers are NO.

2-6 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 10. Return to your iSeries Navigator window and, assign Change Permission for USRxx
to MSGQxx to allow USRxx to delete messages from the queue, send messages to
it, but NOT DELETE the message queue.
__ 11. Go to the first 5250 session (signed on as USRxx), and attempt to delete the
message queue.
Are you allowed to delete the message queue? The command is DLTMSGQ.
Are you allowed to display the messages in the queue? The command is DSPMSG
____
Are you allowed to delete the messages in the queue? The command is CLRMSGQ
____
Are you allowed to send a message to the queue? The command is SNDMSG ____
Note: If you have established security properly, the answer to the first question is
NO and the next three answers are YES.
__ 12. Return to your iSeries Navigator window and assign USRxx permission All to
MSGQxx, to allow USRxx to delete the message queue.
__ 13. Go to the first 5250 session (signed on as USRxx), and attempt to delete the
message queue.
Are you allowed to delete the message queue? ____ The command is DLTMSGQ.
Step 2: Work with adopting a user profile
By adopting a user profile, a user can temporarily gain authority to objects that usually are
not available to him or her. In this section, you will first determine that USRxx is unable to
access certain of your objects. You will then have USRxx adopt your profile, and thereby
gain authority to your objects.
__ 1. Go to your iSeries Navigator window, and remove the CUSMSI file from the control
of the authorization list. To do so select CUSMSI.FILE and Permissions on right
pane, press Authorization List, select (none) from pop-up menu and confirm.
__ 2. Go to the first 5250 session (signed on as USRxx), and CALL BUILD and enter N
and N when prompted.
Are you allowed to run the program? __________
Note: The message about file open errors. ____________
You are authorized to the program but not the files used by the Program.
__ 3. Go to your iSeries Navigator window, and remove the BUILD program from the
control of the authorization list.
__ 4. Scan thoroughly the authorization list objects (Security > Authorization List).
To verify you have removed BUILD and CUSMSI from the authorization list's control.
This has been done to prevent the adopted authority activity you are about to
commence from appearing to you to require the use of an authorization list.

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

How many objects are secured by your authorization list? ____


__ 5. Go to the first 5250 session (signed on as USRxx), and CALL BUILD. What
happens? You should get a message saying you are not authorized to build.
__ 6. Go to the second 5250 session (signed on as OL50xx).
The BUILD program uses two files: CUSMSI and MAINT. CUSMSI is a physical file
MAINT is the display file that contains the screens used by the BUILD program. You
will work with BUILD more extensively in the Journaling Lab.
Execute the command DSPUSRPRF USRPRF(USRxx) TYPE(*OBJAUT).
Is USRxx specifically authorized to BUILD, CUSMSI, and/or MAINT?
____________________________________________________________
__ 7. Return to the SECURITY menu an go to the your iSeries Navigator window.
__ 8. Earlier, you revoked any Permission (Public) had to BUILD and CUSMSI. You may
verify this by editing permissions for each of these objects. Make sure that the
authority to CUSMSI is Exclude. Do not worry about BUILD since you are going to
delete it and recreate it.
__ 9. Delete the BUILD program from your library.
Right-click BUILD, select Delete and confirm.
__ 10. Go to the second 5250 session (signed on as OL50xx) and key this command:
CRTRPGPGM PGM(OL50xx/BUILD) USRPRF(*OWNER) AUT(*EXCLUDE)
The owner will be OL50xx and this profile has authority to CUSMSI.
What is the significance of USRPRF(*OWNER)? _________
What is the significance of AUT(*EXCLUDE)? _________
Do you think USRxx can get access to your BUILD program now?
__ 11. Key the command SIGNOFF to end this job.
__ 12. Go to the first 5250 session (signed on as USRxx), and CALL BUILD.
What happens? _________ You should not be authorized.
__ 13. Go to your iSeries Navigator window and give Use permission for the BUILD
program to USRxx. Do not change permissions for the CUSMSI and MAINT files.
__ 14. Go to the first 5250 session in your iSeries Navigator window (signed on as USRxx),
and CALL BUILD. Specify N and N when prompted.
Add a record to the file and then delete the same record.
Why can USRxx access MAINT and CUSMSI without specific authorization, and
with the public excluded?
____________________________________________________________

2-8 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 15. Use the appropriate function key to end the BUILD program.
__ 16. Key the command SIGNOFF to end this job.
Step 3: Deleting a user profile
Now you are going to delete the user profile that you created earlier, USRxx.
__ 1. Go to the your iSeries Navigator window and verify that the profile does not own any
objects.
Open Users and Groups, double-click All Users, right-click USRxx on right pane,
select User Objects and Scan for Owned Objects.......and confirm.
Does the USRxx profile own objects?
The USRxx message queue will be deleted automatically when you delete the
profile.
__ 2. Delete the USRxx user profile. Right-click USRxx, select Delete......; if the profile
owns any other objects, delete them.
__ 3. Close all the three windows. This concludes the security lab.

END OF LAB

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Solutions
The commands in this exercise may be executed in the following ways:
• By keying the appropriate command directly
• By using the SECURITY menu (GO SECURITY)

PART A
Step 1: Create a user profile
__ 1. Access the system
Open the your iSeries Navigator window and double-click on system_name under
My Connections
User ID: OL50xx
Password: OL50xx
__ 2. Create a user profile:
- Right-click Users and Groups
- Select New User....
- USRxx
- Press Capabilities
- On Privileges panel select Privilege Class PROGRAMMER from pop-up
menu and confirm (OK)
- Press Jobs
- On the available panels type other required inputs and confirm
- Press ADD button
__ 3. Observe Permission for the user profile:
- Open File System
- Open Integrated File System
- Double-click (Explore) QSYS.LIB
- Find (you can use Edit... Find...) USRxx.USRPRF on right pane
- Right-click USRxx and select Permissions
- Observe Basic and Details
- OL50xx has permission All
- USRxx has Custom permissions: Operational, Management, Read, Add,
Update, Delete, Execute
- USRxx CAN change his profile.
- (Public) has Use permission.
__ 4. Change (Public) Permission
Press Basic and check first row, first column (Public) - Use) radio button
__ 5. 20 bullets

2-10 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 6. Self explaining


__ 7. User.......USRxx
Password...yyyyy
Menu.......PROBLEM
Error message: CPF1122 - Menu cannot be specified
__ 8. Commands executable?
CHGPWD (menu #8)yes
CHGPWD (keyed)no
DSPJOByes
CRTUSRPRFno
CRTJRNRCVno
WRKOUTQno
__ 9. Sign off
Step 2: Change a user profile
__ 1. Self explanatory
__ 2. Signing as USRxx
User.........USRxx
Password.....yyyyy

PART B
Step 1: Group profile
__ 1. Error message: Not authorized to program LAB1 in library OL50LIB.
__ 2. Sign off.
__ 3. See below:
- Open Users and Groups
- Open Groups
- Right-click OL50GROUP and select Properties
- Add USRxx and confirm (OK)
__ 4. User....USRxx; Password....yyyyy
Access to LAB1 by USRxx is granted.
__ 5.
- Find LAB1 program (self explanatory - same as previous)
- Right-click LAB1 and select Permissions
- Press ADD and open All Users

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

- Select USRxx and confirm (OK)


- Check radio button ON for USRxx Exclude and confirm (OK)
__ 6. Access to LAB1 by USRxx is denied.
Step 2: Create and change an authorization list
__ 1. Create authorization list
- Open Security
- Right-click Authorization Lists and select New Authorization List
- Type the name (AUTLxx)
- Check radio button Exclude for Public Authority
- Confirm (OK) on this panel and confirm again on next panel
__ 2. Self explanatory
__ 3. Secure program with Authorization List
- Find the program (File System >,......)
- Right-click and select Permissions
- Press Authorization List
- Open pop-up menu and select AUTLxx
- Confirm (OK)
- Make radio button ON (Public) - Exclude and confirm (OK)
__ 4. Secure program with Authorization List
Same as previous step.
__ 5. See below:
- Open Security
- Double-click (Explore) Authorization Lists
- Double-click (Open) AUTLxx on right pane
OL50xx All
(Public) Exclude
__ 6. Press Secured Objects
Two objects: BUILD and CUSMSI
__ 7. Press OK and Cancel
The number displayed depends on the number created and their authority.
To be viewed, lists must have permissions Use, Change, All.
__ 8. Signon as OL50xx
User.........OL50xx
Password.OL50xx
__ 9. CRTCLPGM PGM(TIME) AUT(AUTLxx)

2-12 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty - Open Security


- Double-click (Explore) Authorization Lists
- Double-click (Open) AUTLxx on right pane
- Press Secured Objects
__ 10. Yes, TIME is on the list.
__ 11. from previous step
OL50xx has All Permissions and (Public) has Exclude Permission.
__ 12. CALL TIME
Error message - Not authorized to program TIME in library *LIBL.
__ 13. Add USRxx to AUTLxx
- Open Security
- Double-click (Explore) Authorization Lists
- Double-click (Open) AUTLxx on right pane
- Press Add
- Open All Users, click USRxx and confirm (OK)
- Check radio button ON for USRxx - Use and confirm (OK)
__ 14. CALL TIME
The time and date is displayed.

PART C
Step 1: Grant object authority
__ 1. CRTMSGQ OL50xx/MSGQxx
__ 2. Observe Permission for the message queue
- Open File System
- Open Integrated File System
- Open QSYS.LIB
- Double-click (Explore) OL50xx.LIB
- Find (you can use Edit... Find...) MSGQxx.MSGQ on right pane
- Right-click MASGQxx and select Permissions
(Public) has Change permission.
__ 3. Display the message queue
DSPMSG MSGQ(MSGQxx)
USRxx gets the authority because (Public) has Change permission.
__ 4. GO USER
__ 5. Send a message
SNDMSG MSG(text) TOMSGQ(MSGQxx)

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

__ 6. Change Permissions
- Press ADD
- Open All Users
- Select USRxx and confirm (OK)
- Check radio button ON for USRxx - Exclude and confirm (OK)
__ 7. Display the message queue: DSPMSG MSGQ(MSGQxx)
Not allowed to do so.
Error message - Not authorized to message queue MSGQxx.
Not allowed to do so.
__ 8. Change permissions
- Right-click MSGQxx and select Permissions
- Check radio button ON for USRxx - Use and confirm (OK)
USRxx now has Use permission to the message queue.
__ 9. Using the message queue
USRxx MAY DISPLAY messages in the queue.
USRxx MAY NOT DELETE messages in the queue.
USRxx MAY NOT SEND messages to the queue.
USRxx MAY NOT DELETE the message queue.
__ 10. Change permissions
- Right-click MSGQxx and select Permissions
- Check radio button ON for USRxx - Change and confirm (OK)
USRxx now has Change permission to the message queue.
__ 11. Using the message queue
USRxx MAY NOT DELETE the message queue.
USRxx MAY DISPLAY messages in the queue.
USRxx MAY DELETE messages in the queue.
USRxx MAY SEND messages to the queue.
__ 12. Change permissions
- Right-click MSGQxx an select Permissions
- Check radio button ON for USRxx - All and confirm (OK)
USRxx now has All permission to the message queue.
__ 13. Using the message queue
USRxx MAY DELETE the message queue.

2-14 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Step 2: Work with adopting a user profile


__ 1. Remove object from the control of the Authorization list
- Right-click CUSMSI.FILE and select Permissions
- Press Authorization List
- Open pop-up menu and select (none)
- Confirm on this panel and confirm again on next panel
__ 2. CALL BUILD (with parameters N and N).
No
CPF4104 - appeared during OPEN
__ 3. Remove object from the control of the Authorization list
- Right-click BUILD.PGM and select Permissions
- Press Authorization List
- Open pop-up menu and select (none)
- Confirm on this panel and confirm again on next panel
__ 4. Verify the authorization list
- Open Security
- Double-click Authorization Lists
- Double-click AUTLxx on right pane
- Press Secured Objects
TIME is the only object secured by the list.
- Close the two panels.
__ 5. CALL BUILD
Error message - Not authorized to program BUILD in library *LIBL.
__ 6. Display a user profile
USRxx IS NOT specifically authorized to BUILD, CUSMSI, and/or MAINT.
__ 7. GO SECURITY
__ 8. Observe Permission for the file
- Open File System
- Open Integrated File System
- Open QSYS.LIB
- Double-click (Explore) OL50LIB.LIB
- Find (you can use Edit... Find...) CUSMSI.FILE on right pane
- Right-click CUSMSI an select Permissions
- Close this panel.
__ 9. Delete object
- Right-click BUILD.PGM on right pane

© Copyright IBM Corp. 1995, 2003 Exercise 2. Security 2-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

- Select Delete an confirm


__ 10. Create RPG program
USRPRF(*OWNER) signifies that while the program is in the job's program stack,
the caller of the program temporarily adopts the user profile of the program's owner.
AUT(*EXCLUDE) signifies that *PUBLIC may NOT call the program.
USRxx CANNOT get access to the program, because USRxx has no specific
authority to the program and the public is excluded.
__ 11. SIGNOFF
__ 12. CALL BUILD
Error message - Not authorized to program BUILD in library *LIBL.
__ 13. Press F5 (refresh)
- Right-click BUILD.PGM an select Permissions
- Press ADD
- Open All Users
- Select USRxx and confirm (OK)
- Check radio button ON for USRxx - Use and confirm (OK)
__ 14. CALL BUILD (with parameters N and N)
USRxx can access the program, and access the CUSMSI and MAINT files as well.
USRxx has adopted the user profile (and authority) of OL50xx.
__ 15. Self-explanatory
__ 16. Self-explanatory
Step 3: Deleting a user profile
__ 1. User profile owned objects
- Open Users and Groups
- Double-click (Explore) on All Users
- Right-click USRxx on right pane and select User Objects, Scan for Owned
Objects
USRxx owns one object: the USRxx message queue in QUSRSYS.
- Close the panel.
__ 2. Delete User Profile
Right-click USRxx on right pane, select Delete...... and confirm.
__ 3. Close the windows.
END OF LAB

2-16 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 3. Save/Restore

What This Exercise is About


The purpose of the first part of this lab is to demonstrate how locks on
objects can cause problems with the save commands and how to
avoid these problems.
The purpose of the second part of this lab is to give you the
opportunity to save and restore your class library.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Create a save file
• Save a library using both yes and no in the PRECHK keyword
• Save the class library

© Copyright IBM Corp. 1995, 2003 Exercise 3. Save/Restore 3-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Instructions
Part 1: Using The PRECHK Keyword
This portion of the lab simulates a user staying late to finish some work while the operator
is saving the library:
• Does your Availability Plan provide for this situation?
• Does it collect documentation so that you can look it the following day to see if there
was an error?
__ 1. Sign on to the system, using their user ID and password (OL51xx) where xx is your
user ID.
Important
For the remainder of the labs your User ID and password are
OL51xx and the class library is OL51LIB.

__ 2. Create a save file in your library OL51xx. Name the save file OL51xxSAV1, where
xx is your user ID.
__ 3. Save the library named OL51LIBSAV to your newly created save file. Use
F10=Additional parameters and specify OUTPUT(*PRINT) to get a report of the
save operation.
__ 4. You should receive a message that seven objects were saved and one object was
not saved.
__ 5. Use the WRKSPLF command to find the report (QPSAVOBJ) of the save operation.
Use option 5=Display to view the report. Find the object that was not saved. It
should be file DATAFILE.
If you can not find the report(QPSAVOBJ) use the DSPJOBLOG command, F10
Display detailed information. The joblog also contains information about the used
save operation.
__ 6. Clear the save file OL51xxSAV1, where xx is your user ID, using command
CLRSAVF.
__ 7. Save the library named OL51LIBSAV just as you did before only say *YES for the
PRECHK keyword. You should get another message.
Answer the following questions:
• How many objects were saved? _____________________________________
• Is this better than the save you did in step 5? ____________________________

3-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Part 2: Backing Up Your Lab Projects


__ 1. Clear the save file named OL51xxSAV1, if you have not already done so in Part 1.
__ 2. Use the SAVLIB command to save your library OL51xx to this save file.
__ 3. Display the save file and make sure all objects have been saved.
__ 4. This completes the save restore lab. Please sign off.

END OF LAB

© Copyright IBM Corp. 1995, 2003 Exercise 3. Save/Restore 3-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Solutions
Part 1: Using The PRECHK Keyword
__ 1. Sign on using User ID and password.
__ 2. CRTSAVF FILE(OL51xx/OL51xxSAV1)
__ 3. SAVLIB LIB(OL51LIBSAV)
DEV(*SAVF)
SAVF(OL51xxSAV1)
OUTPUT(*PRINT)
__ 4. Message = 7 objects were saved; 1 objects was not saved.
__ 5. WRKSPLF, Option 5 on file QPSAVOBJ, page through the report. In the SAVED
column, you should see a NO for *FILE DATAFILE.
__ 6. CLRSAVF FILE(OL51xx/OL51xxSAV1)
__ 7. SAVLIB LIB(OL51LIBSAV)
DEV(*SAVF)
SAVF(OL51xxSAV1)
PRECHK(*YES)
You should get this message, Objects from library OL51LIBSAV not saved because
the save command could not lock all the objects in the library.
Part 2: Backing Up Your Lab Projects
__ 1. CLRSAVF FILE(OL51xx/OL51xxSAV1)
__ 2. SAVLIB LIB(OL51xx)
DEV(*SAVF)
SAVF(OL51xxSAV1)
PRECHK(*YES)
__ 3. DSPLIB LIB(OL51xx)
__ 4. DSPSAVF FILE(OL51xxSAV1)
END OF LAB

3-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 4. Journal Management

What This Exercise is About


In this exercise the students will establish journaling for physical files,
observer the entries put in the journal receiver during a typical
application, and use the journal entries to practice forward and
backout recovery.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Use the Create Journal Receiver and Create Journal commands to
create two objects with which to perform journaling
• Use an instructor-supplied maintenance program to perform
additions, deletions, and updates to files being journaled
• Use the Change Journal command to change journal receivers and
the Display Journal command to:
- Display journal entries from a chain of receivers
• Use the Work with Journal Attributes screen to display:
- Journal receiver attributes
- Journaled fields
- Journal receiver directory
• Use the contents of journal entries to determine:
- Which file members were opened and what options (input,
output, update, delete) were specified
- Interpret user program operations issued against the file
- The use of the COUNT/RRN and FLAG fields
- The date, time and media used for physical file saves

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Instructions
CUSMSI is the file you will be journaling and BUILD is the program that will reference
OL51xx/CUSMSI.
The various journal commands in the following exercise may be executed in any of the
following ways:
• By keying the appropriate command
• By using the menu Journal Commands (GO CMDJRN, GO CMDJRNRCV)
• By using the WRKJRN (Work with Journals) command and from the resulting menu
selecting an appropriate option
Step 1: Initiating Journal Management
__ 1. Create a Journal Receiver, OL51xxR0001, in your team library OL51xx. Write the
command here:
_________________________________________________________________
__ 2. Create a Journal, named OL51xxJ, in your team library OL51xx and specify
OL51xxR0001 as the journal receiver. Write the command here:
_________________________________________________________________
__ 3. Issue the Start Journal Physical File command to start journaling the file
OL51xx/CUSMSI to your journal. Specify IMAGES(*BOTH). Write the used
command here:
_________________________________________________________________
__ 4. Use the Save Library command to save your library OL51xx to your save file
OL51xxSAV1. If you get a message saying that the save file already contains data,
take the G reply to Clear file and continue processing.
Note: If you did not create save file OL51xxSAV1 in the previous lab, do so now.
Write the used command(s) in the lines after.
_________________________________________________________________
_________________________________________________________________
__ 5. Use the Display Save File command to verify that the file was saved. Write the date
and time of the save here:
_________________________________________________________________
__ 6. Use the DSPJRN command to display your journal.
Key in a 5 for the MS (member saved) entry and press Enter.
See how the date and time show up under Entry-specific data.

4-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Step 2: Examining Journal Entries


Before you begin this step, look in the journal lab solutions for a description of how to use
the BUILD program.
Initially, the customer file has the following valid customer numbers:
12345 23456 34567 45678

__ 1. Run the command CALL BUILD.


__ 2. On the initial prompt specify N for commit and N for user entries.
__ 3. Add a new customer to OL51xx/CUSMSI.
Write the customer number here:
_________________________________________________________________
__ 4. Delete an existing record.
Write the customer number of the record you intend to delete here:
_________________________________________________________________
__ 5. Update a customer record without changing the key field (customer number).
Write the customer number of that record here:
_________________________________________________________________
__ 6. End the program using F3.
Note: There is a query fast path command you can use to look at any data base file.
Use it to see the changes the build program is making to your file. The command is:
RUNQRY QRY(*NONE) QRYFILE(CUSMSI)
To get a printout of the above, add parameter OUTTYPE(*PRINTER)
__ 7. Display your journal and look at the various entries.
What is the sequence number of your last entry?
_________________________________________________________________
__ 8. Key the Change Journal command. Have the system automatically generate a new
journal receiver name by keying *GEN on the first Journal receiver input line. Read
the three messages at the bottom of the display.
__ 9. Use the DSPJRN command to look at all the entries in both journal receivers.
Specify your first journal receiver as the starting journal receiver.
__ 10. Examine the details of the entries after the sequence number you recorded above.
These will be the J/NR and J/PR entries. You should see how the two journal
receivers point to each other, forming a chain.

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Step 3: Recovery Using a Saved Version of a File


In this step, you will simulate a disaster by deleting a file, then recover it by restoring a
saved version of the file and applying journaled changes to reconstruct the activity against
the file from the time of the save up to the time of the failure.
You will use Query to print a listing of the file before the disaster and after recovery so that
you can confirm that the file was recovered correctly.
__ 1. Print a listing of the file before the disaster:
RUNQRY QRY(*NONE) QRYFILE(CUSMSI) OUTTYPE(*PRINTER)
If you would like to see the listing on your terminal, run the command again without
the OUTTYPE parameter.
__ 2. Delete the file OL51xx/CUSMSI. This simulates the loss of the file through system or
user error.
DLTF FILE(OL51xx/CUSMSI)
__ 3. Execute the WRKJRN command, press enter and enter the name of your journal
and library when prompted.
a. Enter 2 for Forward recovery. This will cause a display of the WORK WITH
FORWARD RECOVERY screen.
b. You will see a screen without the file CUSMSI. This is due to the fact that you
have deleted that file previously. Choose the option to ADD MEMBER TO
LIST. Fill in the name of the file and your library. The member name is the
same as the file name. Press the enter key.
c. Once you have pressed the Enter key, you will get the Work With Forward
Recovery screen, showing the file CUSMSI with a status of NOT FOUND.
d. Select the option to restore your file. On the prompted RSTOBJ command
specify DEVICE(*SAVF) and the save file name, OL51xxSAV1. Write the
used command here:
_________________________________________________________________
The Work With Forward Recovery screen will be displayed again, but this time
under the field STATUS should be RESTORE COMPLETE.
e. You can now select the option to Apply Journaled Changes.
The defaults for the range of journal receivers and journal entries is from the last
save to the last restore.
You should get an error message. Page through all your messages. Write the
journal sequence number that caused the failure:
_________________________________________________________________

4-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty f. Since you deleted the member between the last save and the restore, there is
a member deleted entry (journal code F, entry type MD) in the journal receiver
that will cause APYJRNCHG to terminate with an error message.
Display the journal. Is the sequence number of the F/MD entry for file CUSMSI the
same as you recorded above?
_________________________________________________________________
__ 4. This step will show you the number of journal entries applied by the APYJRNCHG
command.
a. Use the DSPJRN command (specify a receiver range that starts with your
first receiver, OL51xxR0001) to display your journal receiver entries. Use the
Help key on the CODE and TYPE fields.
b. The journal entry you recorded above should have been for a F/MD (member
deleted) entry. Starting at that entry, key in 5 for all the remaining entries and
press Enter.
c. Read the CODE and TYPE fields for each entry. Press Enter to move to the
next journal receiver entry. Keep doing this until you get to an entry that reads
Code F Type AY.
d. At the F/AY entry, find the COUNT/RRN field. (You may need to use F10 to
display the part of the journal receiver entry that has this field.) Move the
cursor to the COUNT/RRN field and press the Help key. Page forward until
you see F/AY and read the text.
e. While still at the F/AY entry, use the appropriate function key to display the
Entry Specific Data. The first ten columns contain the starting sequence
number and the next ten columns contain the ending sequence number of the
journal entries that the APYJRNCHG command used to update the CUSMSI
file. Now read these journal entries to see what journaled entries were
applied.
The entries that were applied recovered the changes you made to file CUSMSI. The
apply failed because you asked it to go past the F/MD entry.
__ 5. Print another listing of the file after recovery:
RUNQRY QRY(*NONE) QRYFILE(CUSMSI) OUTTYPE(*PRINTER)
Compare this listing to the listing you made before the disaster. They should be the
same.

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Step 4: Recovery From a User Error


The next few steps simulate recovery from a user error. In this case, the error is the
erroneous deletion of a record by a user.
__ 1. CALL BUILD (specify N for commit and N for user entries) and delete one of the
records in the file.
Write the customer number here:
_________________________________________________________________
End the program with F3.
__ 2. Query the file to confirm that the record was deleted.
RUNQRY QRY(*NONE) QRYFILE(CUSMSI)
__ 3. Use the display journal command to find the sequence number of the entry for the
record you just deleted. Write it here:
_________________________________________________________________
__ 4. Use the RMVJRNCHG command to rebuild the deleted record. You do NOT have to
restore the file, just remove the appropriate entry or entries.
Note: If the RMVJRNCHG command removes too many records because the
ending sequence is wrong, APYJRNCHG can be used to apply the entries that were
mistakenly removed.
__ 5. Use Query to verify that the deleted record is back in the file.
RUNQRY QRY(*NONE) QRYFILE(CUSMSI)

END OF LAB

4-6 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise Solutions


The various journal commands in this exercise may be executed in the following ways:
• By keying the appropriate command directly
• By using the menu 'Journal commands' (GO CMDJRN) with all the journal commands
• By using the WRKJRN (Work with Journals) commands and from the resulting menu
choosing an appropriate option
Step 1: Initiating Journal Management
1. CRTJRNRCV JRNRCV(OL51xx/OL51xxR0001)
TEXT('Receiver for Team xx')
2. CRTJRN JRN(OL51OL51xx/OL51xxJ)
JRNRCV(OL51xx/OL51xxR0001)
TEXT('Journal for Team xx')
3. STRJRNPF FILE(OL51xx/CUSMSI)
JRN(OL51xx/OL51xxJ)
IMAGES(*BOTH)
4. SAVLIB LIB(OL51xx)
DEV(*SAVF)
SAVF(OL51xxSAV1)
5. DSPSAVF FILE(OL51xxSAV1)
OUTPUT(*)
6. DSPJRN JRN(OL51xx/OL51xxJ)
Read the description of the BUILD program below.
Normally, a file maintenance program would update only one file and would not give the
user a choice as to whether or not entries were sent to a journal receiver. However, this
program was written for educational purposes.
When BUILD is called, the first panel will ask two questions:
1. Do you wish to use Commit?
If you answer N, file CUSMSI will be opened.
If you answer Y, file CUSMST will be opened.
2. Do you wish to use User Journal Entries?
If you answer Y, user entries will be sent to your journal. A Y response requires that you
followed the lab naming convention and named your journal OL51xxJ.

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

This program allows the user to perform file maintenance on a file named CUSMSI in the
team library OL51xx. When BUILD is called you will see this screen.
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: __

Customer Number: _____ Customer Name: _________________________________


Customer Address Fields: _______________________________________________
City: __________________ State: __ Zip: _____ A/R Balance ___________
Shipping Instructions: _________________________________________________

F3=Exit program F5=Cancel the update or delete

This program allows you to perform add, update, and delete operations on the file named
CUSMSI.
When you start the file contains the four records listed below.
Table 1:
CUSTOMER FILE LISTING - ABBREVIATED PAGE

CUSTOMER CUSTOMER CUSTOMER


NUMBER NAME ACCTS. REC.
BALANCE

12345 ACME PRODUCTS INC. 54,321.00


23456 WILLIAM JONES 65,432.00
34567 BRONSON PRODUCTS & MFG. 76,543.00
45678 JACKSON MFG INC. 87,654.00

4-8 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty TO ADD A NEW RECORD, key in a minimum of A for ADD and Customer Number. Key as
much of the additional information as you wish, to make the record meaningful:
Table 2:
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: A

Customer Number: 11111 Customer Name: DOUG'S DRIVING RANGE_____________


Customer Address Fields: 500 GERMANTOWN PIKE___ _______________________
City: PHILADELPHIA______ State: PA Zip: 19102 A/R Balance 54247______
Shipping Instructions: AIR______________________________________________

F3=Exit program F5=Cancel the update or delete

TO DELETE AN EXISTING RECORD is a two-step process. For example, to delete


customer 12345, enter a D for DELETE and the customer number:
Table 3:
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: D

Customer Number: 12345 Customer Name: _________________________________


Customer Address Fields: ______________________ _______________________
City: __________________ State: __ Zip: _____ A/R Balance ___________
Shipping Instructions: _________________________________________________

F3=Exit program F5=Cancel the update or delete

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

The program then verifies that the customer number exists and asks, through the message
on the bottom of the screen, whether or not you really do wish to delete the record:
Table 4:
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: D

Customer Number: 12345 Customer Name: ACME PRODUCTS INC._______________


Customer Address Fields: ACME GROUP BUILDING___ 210 S. WABASH AVE._____
City: CHICAGO___________ State: IL Zip: 60603 A/R Balance 999,999.99_
Shipping Instructions: GET CASH_________________________________________

Confirm the displayed Customer Information & use Enter Key to Delete or
F5 not to Delete

F3=Exit program F5=Cancel the update or delete

To delete the record shown on the screen press Enter.


TO UPDATE AN EXISTING RECORD is a two step process. For example, to update
customer 45678, enter a U for UPDATE and the customer number:
Table 5:
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: U

Customer Number: 45678 Customer Name: _________________________________


Customer Address Fields: ______________________ _______________________
City: __________________ State: __ Zip: _____ A/R Balance ___________
Shipping Instructions: _________________________________________________

F3=Exit program F5=Cancel the update or delete

4-10 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty The program then verifies that the customer number exists and shows the existing
information for that customer. Key any changes you wish to make and press Enter or F5 to
cancel the update.
Table 6:
Customer Master File Maintenance

Enter Customer Number for Update & Delete, Enter all Information for Add
Enter Code Type, A=Add, D=Delete, U=Update: U

Customer Number: 45678 Customer Name: JACKSON MFG. INC.________________


Customer Address Fields: INDUSTRIAL SUBDIVISION 867 FORD AVENUE________
City: WESTMONT__________ State: IL Zip: 60987 A/R Balance 87,654.00_
Shipping Instructions: NO DELIVERIES AFTER 11:30 PM CAN BE ACCEPTED_____

Perform Update of Displayed Information & use Enter Key or


F5 not to Update

F3=Exit program F5=Cancel the update or delete

You can update any field in this display including the customer number. For all of the
updates you do you will use the Enter key from this display.

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Step 2: Examining Journal Entries


1. CALL PGM(BUILD)
2. Self explanatory, see description of program BUILD above.
3. Self explanatory, see description of program BUILD above.
4. Self explanatory, see description of program BUILD above.
5. Self explanatory, see description of program BUILD above.
6. Self explanatory, see description of program BUILD above.
7. DSPJRN JRN(OL51xx/OL51xxJ)
8. CHGJRN JRN(OL51xx/OL51xxJ)
JRNRCV(*GEN)
Once you have pressed the Enter key you will see the following messages:
- Journal Receiver OL51xxR0002 created in library OL51xx
- Journal Receivers OL51xxR0001 and *N detached
- Sequence number not reset. First sequence number is xx
9. DSPJRN JRN(OL51xxJ) RCVRNG(OL51xx0001)
10. Self explanatory
Step 3: Recovery Procedure
Recovery Using a Saved Version of the File
1. RUNQRY QRY(*NONE) QRYFILE(CUSMSI) OUTTYPE(*PRINTER) or RUNQRY
QRY(*NONE) QRYFILE(CUSMSI)
2. DLTF FILE(OL51xx/CUSMSI)
3. WRKJRN
Table 7:
Work With Journals

Type options, press enter


2=Forward recovery 3=Backout recovery 5=Display journal status
6=Recover damaged journal 7=Recover damaged journal receivers
9=Associate receivers with journal

Opt Journal Library Text


___ OL51xxJ OL51xx

Bottom
Command
===>__________________________________________________________________
F3=Exit F4=Prompt F9=Retrieve F12=Cancel

4-12 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty a. By selecting option 2 you will get the screen below:


Table 8:
Work With Forward Recovery

Journal .........: OL51xxJ Library ..........: OL51xx

Position to ....... ___________


Library ......... ___________

Type options, press enter


1=Add member to list 2=Apply journaled changes 3=Restore
4=Remove member from list

Opt File Library Member Status


___ __________ __________ __________

(No journaled file members in recovery list)

Bottom
F3=Exit F12=Cancel

b. Key in the following:


Opt=1
File=CUSMSI
Library=OL51xx
Member=CUSMSI
c. Once you have pressed Enter you will get the Work With Forward Recovery
screen, showing the file CUSMSI under a status of NOT FOUND.
d. Take Opt 3 and press Enter.
On the prompted RSTOBJ command specify DEVICE(*SAVF) SAVF(OL51xxSAV1)
You will now have the same display as before on your screen but this time with a
STATUS=RESTORE COMPLETE.
e. Take Opt 2, and accept the defaults after reading what they are.
f. The sequence number of the F/MD entry for CUSMSI should be the sequence
number of the entry that caused the APYJRNCHG to terminate.
g. DSPJRN JRN(OL51xx/OL51xxJ) RCVRNG(OL51xx/OL51xxR0001)
COUNT/RRN contains a value of X, indicating that X entries were applied.
4. RUNQRY QRY(*NONE) QRYFILE(CUSMSI) OUTTYPE(*PRINTER)
a. CALL BUILD

© Copyright IBM Corp. 1995, 2003 Exercise 4. Journal Management 4-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

b. RUNQRY QRY(*NONE) QRYFILE(CUSMSI)


5. DSPJRN JRN(OL51xxJ)
Find the D entry and use its sequence number to fill in the TOENT(yy) keyword below.
6. RMVJRNCHG JRN(OL51xx/OL51xxJ)
FILE(OL51xx/CUSMSI)
TOENT(yy)
7. RUNQRY QRY(*NONE) QRYFILE(CUSMSI)
END OF LAB

4-14 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 5. Commitment Control

What This Exercise is About


In this exercise, the students will establish a commitment control
definition and use a variation of the program in the journaling exercise
that uses commitment control. They will examine how journal entries
and recovery are simplified with commitment control.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Analyze entries made as a result of commit operations
• Analyze entries made as a result of rollback operations
• Determine the name of the program that rolls back incomplete
operations when the operator cancels a job immediately, in the
middle of a commit cycle
• Analyze user journal entries
• Display and interpret the commitment control status for a job that is
in the middle of an incomplete commit cycle
• Use the Apply Journaled Changes command, APYJRNCHG, to
recover from a damaged or unusable file
• Use the Remove Journaled Changes command, RMVJRNCHG, to
selectively back out erroneous changes (updates, adds or deletes)
to a file

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Instructions
Getting Started
Sign on at your workstation, if you have not already done so, using your user name and
password:
User: OL51xx
Password OL51xx
In this lab you will be using a different version of the customer file, CUSMST, not CUSMSI.
Initially file CUSMST has the following valid customer numbers:
12345
23456
45678
63110
Step 1: Work with Journals
__ 1. Execute the Change Journal command and generate a new receiver. This will give
you a clean receiver for this lab.
_________________________________________________________________
__ 2. Issue the Start Journal Physical File command to start journaling the
OL51xx/CUSMST file to your journal. Specify IMAGES(*BOTH).
_________________________________________________________________
__ 3. Use the SAVLIB command to save your library, OL51xx, to your save file,
OL51xxSAV1. If you get an inquiry message saying that the save file already
contains data, take the G response.
__ 4. Use the Display Save File command and the Display Journal command to verify that
the file was saved.
__ 5. Start a commitment definition by executing the Start Commitment Control command.
Specify LCKLVL(*CHG).
_________________________________________________________________
__ 6. Call program BUILD. Specify Y for Commit and N for User Journal entries.
Perform the following operations:
a. Add a new customer to CUSMST.
Write the new number here: __________
Reply C for Commit.
b. Delete an existing customer record.
Write the new number here: __________
Reply C for Commit.

5-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty c. Update a customer record without changing the key field (customer number).
Write the new number here: __________
Reply C for Commit.
d. End the program using the F3 key.
__ 7. Issue the End Commitment Control command, ENDCMTCTL, to end your
commitment definition.
__ 8. Display your journal (DSPJRN) and answer the following questions:
a. What program caused the F/JM Journal Member entry?
_________________________________________________________________
b. What program caused the C/BC Start Commitment Control entry to occur?
_________________________________________________________________
c. What program caused the C/SC Start Commit Cycle entry to be made?
_________________________________________________________________
d. Examine the commit cycle ID field for all the journal entries in two commit
cycles. Notice when it changes. Compare the commit cycle ID to the journal
sequence numbers. From where does the commit cycle ID come?
_________________________________________________________________
e. What program caused the C/EC End Commitment Control entry?
_________________________________________________________________
Step 2: Forward Recovery
__ 1. Print a Query listing of your file OL51xx/CUSMST:
RUNQRY *N CUSMST *PRINTER
The file reflects the changes you made previously using the program BUILD under
commitment control.
__ 2. Delete file OL51xx/CUSMST. This simulates a failure that requires the file to be
rebuilt using forward recovery.
__ 3. Use the Display Journal command, DSPJRN, to find the range of entries that should
be applied. They will be bracketed by a C/BC (start commitment control) and a C/EC
(end commitment control) resulting from executing program BUILD under
commitment control.
Record those two sequence numbers here:
C/BC __________
C/EC __________

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

__ 4. Recover the file, either using the WRKJRN command or the RSTOBJ and
APYJRNCHG commands.
Apply Journaled Changes to your CUSMST file to bring it back to a point that
includes all the changes made previously.
_________________________________________________________________
__ 5. Display the journal and examine the last F/AY entry to see how many entries were
applied.
__ 6. Print a Query listing of OL51xx/CUSMST:
RUNQRY *N CUSMST *PRINTER
Compare this listing to the one you made before you deleted the file. They should be
the same.
Step 3: Backout Recovery and User Journal Entries
__ 1. Start another commit definition with the STRCMTCTL command.
__ 2. Call program BUILD.
Enter Y for commit and Y for user journal entries.
__ 3. Add a new record to the file.
Record the customer number: __________
Reply C for commit.
__ 4. Delete a record from the file.
Record the customer number: __________
Reply C for commit.
__ 5. End the program using F3.
__ 6. Display the journal and answer the following questions:
a. What is the sequence number of the code R, type PT, that did the add?
_________
b. What is the sequence number of the code R, type DL, that did the delete?
_______
c. What is the entry specific data for the user generated entries?
_________________________________________________________________
d. Were the user generated entries that occurred within a commit cycle given a
commit cycle ID?
_________________________________________________________________

5-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty __ 7. Execute the Remove Journaled Changes command, RMVJRNCHG, specifying the
sequence number of the R/PT Record Added for both the FROMENT and TOENT
parameter. Specify that commit boundaries should be honored: CMTBDY(*YES).

What message do you receive?


_________________________________________________________________
_________________________________________________________________
__ 8. Correct the FROMENT and TOENT parameters to include an entire commit cycle
and try the RMVJRNCHG command again. Was the remove successful?
Step 4: Immediate termination in a commit cycle
__ 1. Call program BUILD.
Answer Y and Y on the first prompt.
__ 2. Committed Add, Update, Delete
a. Perform an ADD of a single record.
Reply C to the commit/rollback question.
Write the customer number here: __________
b. Perform an UPDATE of a single record.
Reply C to the commit/rollback question.
Write the customer number here: __________
c. Perform a DELETE of a single record.
Reply C to the commit/rollback question.
Write the customer number here: __________
__ 3. Rolled Back Add, Update, Delete:
a. Perform an ADD of a single record.
Reply R to the commit/rollback question.
Write the customer number here: __________
b. Perform an UPDATE of a single record.
Reply R to the commit/rollback question.
Write the customer number here: __________
c. Perform a DELETE of a single record.
Reply R to the commit/rollback question.
Write the customer number here: __________
d. DO NOT END THE BUILD PROGRAM!

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

__ 4. Examination of Job Using the System Request Function:


a. Use the System Request key. On some PC displays to access the system
request menu, select the Assist menu from the menu bar, then select Display
Popup Keypad, then select SysRq. When the separator line appears on the
bottom of the screen, press Enter to get the system request menu. Select the
option to Display current Job.
b. On the Display Job menu, select the option for Commitment Control Status.
c. Enter 5 to Display the Job Commitment Definition Status.
d. Press F6=Display Resource Status.
e. Select Record level on the pop-up screen to display record level status.
f. Which file has all the changes?
g. Are there any pending changes?
h. End the System Request and Display Job functions by pressing Enter several
times until you have returned to the BUILD program.
i. DO NOT END THE BUILD PROGRAM.
__ 5. Interrupted Transaction with Locked Record:
a. Update a single record until you get to the Commit/Rollback question. DO
NOT respond to the question.
b. Use the System Request key to go to the System Request menu. Select the
option to Display current Job.
c. On the Display Job menu, select the option for Commitment Control Status.
d. Enter 5 to Display the Job Commitment Definition.
e. Press F6=Display resource status.
f. Select record level on the pop up screen to display record level status.
g. Are there any pending changes now?
_________________________________________________________________
h. Back out to the display job menu. Pick option 12 to display locks.
i. Use F10=Display job record locks to determine which relative record is
locked.
j. Use Option 5=Display member record locks for more details.
__ 6. Abnormal End of a Job with Automatic Rollback:
a. Use the System Request key again to begin a secondary interactive job.
b. From your secondary job, use the WRKACTJOB command to find your
primary job. You will need to use F14 to see the suspended jobs.

5-6 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty c. End your primary interactive job with *IMMED option. Type a 4 next to the job,
and prompt with F4 to do this.
__ 7. Verification of Roll Back of Uncommitted Changes:
Display your journal. Examine the journal entries that have been put in the journal as
a result of your recent activity against the file. Answer the following questions:
a. When the job was cancelled with the *IMMED option, what entries were put in
the journal?
_________________________________________________________________
b. Were these entries put there by BUILD or a system program?
_________________________________________________________________
c. Where did the entries get their commit cycle ID?
_________________________________________________________________
d. What is the purpose of the following entries:
R/DR _______________________________
R/UR _______________________________
R/BR _______________________________
__ 8. SIGNOFF, the lab exercise is ended.

END OF LAB

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-7


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Solutions
The commands in this exercise may be executed in the following ways:
• Key the appropriate command on a command line.
• Use the menu Journal Commands (GO CMDJRN).
• Use the WRKJRN (Work with Journals) command and, from the resulting menu,
selecting an appropriate option.
Step 1 Work with Journals
__ 1. CHGJRN OL51xxJ *GEN
__ 2. STRJRNPF FILE(CUSMST) JRN(OL51xxJ) IMAGES(*BOTH)
__ 3. SAVLIB LIB(OL51xx) DEV(*SAVF) SAVF(OL51xxSAV1)
__ 4. DSPSAVF FILE(OL51xxSAV1)
DSPJRN JRN(OL51xxJ) should show a F/MS entries for files CUSMST and
CUSMSI.
__ 5. STRCMTCTL LCKLVL(*CHG)
__ 6. CALL BUILD. Respond Y N
__ 7. ENDCMTCTL
__ 8. To answer the questions for this step you must use the DSPJRN command to
display your journal entries. See next page:

5-8 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty
Display Journal Entries

Journal ........: OL51xxJ Library .......:OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 38 F OP CUSMST OL51xx DSPxx
_ 40 C BC DSPxx
_ 41 C SC DSPxx
_ 43 R PT CUSMST OL51xx DSPxx
_ 44 C CM DSPxx
_ 45 C SC DSPxx
_ 47 R DL CUSMST OL51xx DSPxx
_ 48 C CM DSPxx
_ 49 C SC DSPxx
_ 51 R UB CUSMST OL51xx DSPxx
_ 52 R UP CUSMST OL51xx DSPxx
_ 53 C CM DSPxx
_ 54 F CL CUSMST OL51xx DSPxx
_ 55 C EC DSPxx

a. Display the F/JM entry and find the value for the program field. The program that
caused the F/JM entry was QCMD.
b. The program should be BUILD. Though STRCMTCTL occurred before you called
BUILD, the C/BC entry was not put in the journal until the BUILD program ran.
c. The C/SC Start Commit entry was made by program BUILD. A C/SC entry is put in
the journal receiver when a program performs one the following to a file opened for
commitment control:
read a record for update
add a record
delete a record
d. Examination of a sequence of two commit cycles of journal entries, will show that the
commit cycle ID comes from the journal sequence number of the C/SC entry.
e. The program that caused the C/EC entry is QCMD.

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-9


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Step 2: Forward Recovery


__ 1. RUNQRY *N CUSMST *PRINTER
__ 2. DLTF OL51xx/CUSMST
__ 3. The DSPJRN will give you the range of entries to apply:
Table 9:
Display Journal Entries

Journal ........: OL51xxJ Library .......: OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 38 F OP CUSMST OL51xx DSPxx
_ 40 C BC DSPxx
_ 41 C SC DSPxx
_ 43 R PT CUSMST OL51xx DSPxx
_ 44 C CM DSPxx
_ 45 C SC DSPxx
_ 47 R DL CUSMST OL51xx DSPxx
_ 48 C CM DSPxx
_ 49 C SC DSPxx
_ 51 R UB CUSMST OL51xx DSPxx
_ 52 R UP CUSMST OL51xx DSPxx
_ 53 C CM DSPxx
_ 54 F CL CUSMST OL51xx DSPxx
_ 55 C EC DSPxx

In this example the range of entries to be applied should be between 40 and 55


__ 4. If you use WRKJRN command, refer to the Journal Management lab for a
description of how to recover using WRKJRN.
If you key the RSTOBJ and APYJRNCHG commands yourself, the commands are
as follows:
• RSTOBJ OBJ(CUSMST) SAVLIB(OL51xx) DEV(*SAVF) SAVF(OL51xxSAV1)
• APYJRNCHG JRN(OL51xxJ) FILE(CUSMST) RCVRNG(OL51xxRnnnn)
FROMENT(40) TOENT(55)
Your sequence numbers may be different.
__ 5. DSPJRN JRN(OL51xxJ).

5-10 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty
Table 10:
Display Journal Entries

Journal ........: OL51xxJ Library .......: OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 57 F SA CUSMST OL51xx DSPxx
_ 58 F AY CUSMST OL51xx DSPxx

Use Option 5 to display the F/AY entry for the CUSMST file. The Count field has the
number of entries applied and the entry specific data has the range of entries
applied.
__ 6. RUNQRY *N CUSMST *PRINTER
This listing and the one you printed before you deleted the file should show the
same records.
Step 3: Backout Recovery and User Journal Entries
1. STRCMTCTL LCKLVL(*CHG)
2. CALL BUILD (Y Y.)
3. Self-explanatory.
4. Self-explanatory.
5. Self-explanatory.
6. DSPJRN JRN(OL51xx/OL51xxJ)

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-11


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Table 11:
Display Journal Entries

Journal ........: OL51xxJ Library .......: OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 95 F OP CUSMST OL51xx DSPxx
_ 97 C BC DSPxx
_ 98 C SC DSPxx
_ 100 R PT CUSMST OL51xx DSPxx
_ 101 U AD DSPxx
_ 102 C CM DSPxx
_ 103 C SC DSPxx
_ 105 R DL CUSMST OL51xx DSPxx
_ 106 U DE DSPxx
_ 107 C CM DSPxx
_ 108 F CL CUSMST OL51xx DSPxx

a. In this example the sequence number that did the add is '100'.
b. In this example the sequence number that did the delete is'105'.
c. The entry specific data for the user generated entries includes the operation type
(such as ADD) and the customer number.
d. No, the commit cycle ID is 0 for user entries.
7. RMVJRNCHG JRN(OL51xxJ/OL51xx)
FILE(CUSMST)
RCVRNG(OL51xxR0002)
FROMENT(100)
TOENT(100)
CMTBDY(*YES)
The message you will receive is:
FROMENT option not valid. Commit boundary violation.
8. RMVJRNCHG JRN(OL51xxJ/OL51xx)
FILE(CUSMST)
RCVRNG(OL51xxR0002)
FROMENT(102)
TOENT(98)

5-12 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty CMTBDY(*YES)
The system will give you the following message:
1 entries removed from member CUSMST.
Step 4: Immediate Termination in a Commit Cycle
1. CALL OL51xx/BUILD (Y Y)
2. Committed Add, Update, Delete
Self-explanatory.
3. Rolled Back Add, Update, Delete
Self-explanatory
4. Examination of Job Using the System Request Function
Table 12:
Display Commitment Control Status
System: STL 40DEV1
Job: DSPxx User: OL51xx Number: 001131

Type option, press Enter.


5=Display

Commitment
Opt Definition Description
5 *DFTACTGRP Default activation group

Bottom
Press Enter to continue.

F3=Exit F5=Refresh F12=Cancel F16=Job menu F17=Top F18=Bottom

Select 5=Display Commitment Definition Status

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-13


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Table 13:
Display Commitment Definition Status STL
01/12/95 18:09:3040DEV1
Job: DSPxx User: OL51xx Number: 001131

Commitment definition . . . . . . . . : *DFTACTGRP


Activation group . . . . . . . . . . . : 2
Logical unit of work ID . . . . . . . : USIBMES,STL,X'16F9ED441418'.
Job active . . . . . . . . . . . . . . : YES
Server job . . . . . . . . . . . . . . :
Resource location . . . . . . . . . . : LOCAL
Default lock level . . . . . . . . . . : *CHG
Role . . . . . . . . . . . . . . . . . :
State . . . . . . . . . . . . . . . . : RESET
Date/time stamp . . . . . . . . . . :
Resync in progress . . . . . . . . . . :NO
Number of commits . . . . . . . . . . : 5
Number of rollbacks . . . . . . . . . : 3
More...
Press Enter to continue.

F3=Exit F5=Refresh F6=Display resource status F9=Command line


F12=Cancel F16=Job menu

Press F6=Display resource status


Table 14:
Display Commitment Definition Status STL
01/12/95 18:09:30 40DEV1
Job: DSPxx User: OL51xx Number: 001131

--------------------------------------------------------------
| Display Resource Status |
| |
| Type option, press Enter. |
| 1=Select |
| |
| Opt Resource |
| -- Record level |
| -- Object level |
| -- Conversation |
| -- Remote file |
| -- Remote RDB |
| -- API | Bottom
| Bottom |
|F5=Refresh F12=Cancel |
--------------------------------------------------------------

5-14 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Select 1=Record Level Status


Table 15:
Display Record Level Status
System: STL 40DEV1
Job: DSPxx User: OL51xx Number: 001131

Commitment definition . . . . . . . . : *DFTACTGRP

-------------Changes--------------
File Library Member Commit Rollback Pending
CUSMST OL51xx CUSMST 3 3 0

Bottom
Press Enter to continue.

F3=Exit F5=Refresh F6=Display resource status F9=Command line


F11=Display status F12=Cancel F16=Job menu

The file that has all the changes is CUSMST, and there are no pending changes.

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

5. Interrupted Transaction with Locked Record


Table 16:
Display Record Level Status
System: STL 40DEV1
Job: DSPxx User: OL51xx Number: 001131

Commitment definition . . . . . . . . : *DFTACTGRP

-------------Changes--------------
File Library Member Commit Rollback Pending
CUSMST OL51xx CUSMST 3 3 1

Bottom
Press Enter to continue.

F3=Exit F5=Refresh F6=Display resource status F9=Command line


F11=Display status F12=Cancel F16=Job menu
As is shown on the above display there is one pending change now.

5-16 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty From the Display Job menu, using Option 12 (Display Locks, if active), you will get the
following screen:
Table 17:
Display Job Locks

Job: DSPxx User: OL51xx Number: 001131

Job status: ACTIVE

Type options, press Enter


5=Display job member locks

Object Member
Opt Object Library Type Lock Status Locks
CUSMST OL51xx *FILE-PHY *SHRRD HELD YES
DSPxx QSYS *DEVD *EXCLRD HELD
*EXCLRD HELD
*EXCLRD HELD
*EXCLRD HELD
*EXCLRD HELD
*EXCLRD
*EXCLRD
MAINT OL51LIB *FILE-DSP *SHRNUP HELD
QCBL QSYS *LIB *SHRRD
More...

F3=Exit F5=Refresh F10=Job record locks F12=Previous F16=Job menu

As you can see you have a member lock on the file CUSMST.
6. Abnormal End of a Job with Automatic Rollback
Self explanatory.
7. Verification of Roll Back of Uncommitted Changes. See next page:

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-17


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

DSPJRN OL51xxJ
Table 18:
Display Journal Entries

Journal ........: OL51xxJ Library .......: OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 111 F OP CUSMST OL51xx DSPxx
_ 112 C SC DSPxx
_ 114 R PT CUSMST OL51xx DSPxx
_ 115 U AD DSPxx
_ 116 C CM DSPxx
_ 117 C SC DSPxx
_ 119 R UB CUSMST OL51xx DSPxx
_ 120 R UP CUSMST OL51xx DSPxx
_ 121 U UP DSPxx
_ 122 C CM DSPxx
_ 123 C SC DSPxx
_ 125 R DL CUSMST OL51xx DSPxx
_ 126 U DE DSPxx
_ 127 C CM DSPxx
_ 128 C SC DSPxx
_ 130 R PT CUSMST OL51xx DSPxx
_ 131 U AD DSPxx
_ 132 R DR CUSMST OL51xx DSPxx
_ 134 C SC DSPxx
_ 136 R UB CUSMST OL51xx DSPxx
_ 137 R UP CUSMST OL51xx DSPxx
_ 138 U UP DSPxx
_ 139 R BR CUSMST OL51xx DSPxx
_ 140 R UR CUSMST OL51xx DSPxx
_ 141 C RB DSPxx
_ 142 C SC DSPxx
_ 144 R DL CUSMST OL51xx DSPxx
_ 145 U DE DSPxx
_ 146 R UR CUSMST OL51xx DSPxx
_ 147 C RB DSPxx
_ 148 C SC DSPxx
_ 150 R UB CUSMST OL51xx DSPxx
_ 151 R UP CUSMST OL51xx DSPxx
_ 152 U UP DSPxx
_ 153 F CL CUSMST OL51xx DSPxx
_ 154 R BR CUSMST OL51xx DSPxx
_ 155 R UR CUSMST OL51xx DSPxx
_ 156 C RB DSPxx
_ 157 C EC DSPxx

5-18 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty a.
Table 19:
Display Journal Entries

Journal ........: OL51xxJ Library .......: OL51xx

Type option, press Enter.


5=Display entire entry

Opt Sequence Code Type Object Library Job Time


_ 153 F CL CUSMST OL51xx DSPxx
_ 154 R BR CUSMST OL51xx DSPxx
_ 155 R UR CUSMST OL51xx DSPxx
_ 156 C RB DSPxx
_ 157 C EC DSPxx

b. The entries were put in the journal by a system program. The program name starts
with a letter Q.
c. The entries put in the journal as a result of the job being cancelled all have the same
commit cycle ID. This commit cycle ID comes from the C/SC at the beginning of the
commit cycle.
Table 20:
Display Entire Journal Entry

Journal .......... :OL51xxJ Library ......... :OL51xx

Sequence ......... : 148


Code ............. : C - Commitment control operation
Type ............. : SC - Start of commit cycle

Object ........... : Library ...... :


Member ........... : Flag ......... : 0
Date ............. : 02/17/88 Time ......... : 17:32:00
Count/RRN ........ : 0 Program ...... : BUILD

Job ............................ : 001263/OL51xx/DSPxx


Commit cycle ID ................. : 148
Entry specific data ............. :
*...+....1....+.... 2....+....3....+....4....+....5
No entry specific data

F3=Exit F11=Hexadecimal format


F12=Previous F14=Display previous entry

d. The purpose of the entries is as follows:


R/DR: Record deleted for rollback

© Copyright IBM Corp. 1995, 2003 Exercise 5. Commitment Control 5-19


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

R/UR: Update, after-image for rollback


R/BR: Update, before-image for rollback
8. SIGNOFF

END OF LAB

5-20 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Exercise 6. Problem Determination

What This Exercise is About


The purpose of this lab is to familiarize the student with the methods of
analyzing a problem on the system, determining the cause, and
effecting an appropriate solution.

What You Should Be Able to Do


At the end of the lab, students should be able to:
• Use the Copy Screen Image facility
• Display and change attributes of an active job
• Create and view a spool file
• Display the job log for a batch job
• Work with status displays
• Display the history log
• Analyze and correct a problem with a job

© Copyright IBM Corp. 1995, 2003 Exercise 6. Problem Determination 6-1


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Exercise Instructions
Step 1: Use the Copy Screen Image facility
__ 1. Sign on to the system, using your OL51xx user ID and password.
__ 2. From the AS/400 Main Menu, use menu navigation to arrive at the Copy Screen
Commands menu (problem handling - more problem handling options - copy screen
image).
Coordinate the next several steps with a team at a display station near you.
__ 3. One team should execute the Start Copy Screen command, specifying the second
team's display as the source device. Output device is *REQUESTER.
__ 4. The second team should answer the break message that arrives.
__ 5. The second team should execute various commands, and both teams should
observe the activity that results. You should attempt to simulate a problem handling
scenario, in which the second team is having a problem, and the first team is
providing direction and help.
__ 6. The first team should attempt to key a command in order to verify their inability to do
so.
__ 7. When you have exercised the scenario sufficiently, the second team should end
copy screen by SIGNOFF or execution of the End Copy Screen command.
__ 8. These steps should be repeated, with the teams reversing rolls. After both teams
have performed all the functions involved with Copy Screen Image, each team
should continue with the lab.
Step 2: Display and change attributes of an active job
__ 1. Sign on to the system, using your user ID and password, if you have not yet done
so.
__ 2. Go to the USER TASKS menu and select the option to display or change your job.
Record:
Job name _______
User name _______
Job number_______
__ 3. Select the option to display status attributes. Record the following items:
Status _______
Subsystem _______
Pool ID _______
Type of job _______
__ 4. Press Enter to return to the Work with Job display, and then select the option to
display your job's definition attributes.

6-2 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty Notice the date format used by your job. You are going to change this, in a moment.
Record job date
From this display use the function key which will allow you to change your job.
__ 5. Change the run priority for your job to 15. Do not press Enter. What effect will this
change have? __________________________________________________
__ 6. Change the date format for your job. The prompt for this does not appear on the first
screen. You must use a function key to display additional parameters and then roll to
the next screen.
When you see the prompt for the date format, change the value so that a Julian date
is used (hint: Use the HELP facility to find out the correct value to key).
Press Enter, and your job will be changed.
__ 7. Return to the Work with Job display and then display your job's definition attributes.
Record the new job date: _________ and format _________
__ 8. Return to the Work with Job screen and then display your job's run attributes.
What is the run priority? ________
How many milliseconds of CPU time has your job used? _______
How much temporary storage has your job used? _______
Return to the USER TASKS menu.
Step 3: Create and view a spool file
__ 1. Key the command DSPLIB OL51xx *PRINT, where xx is your team number, and
press Enter. The DSPLIB command will execute and your output will be spooled.
__ 2. From the USER TASKS menu take the option to work with your spooled files.
What is the file name of your spooled output? _______
Select the option to display your spool file.
What is the size of your library in bytes? _______
Return to the USER TASKS menu.
Step 4: Display the job log for a batch job
__ 1. From the USER TASKS menu take the option to submit a job. The Submit Job
display will be presented.
__ 2. On the Command to run prompt, key the command DSPLIB OL51xx, where xx is
your team number. Do not press Enter. Specify a job name of LAB7xx, where xx is
your team number. Use the appropriate function key to display additional
parameters and insure that the job will be HELD ON THE JOB QUEUE. You will
need to roll forward two pages to find the prompt screen with the correct parameter.
Specify message logging text of *SECLVL. This will cause the job log to be written to
a spool file.

© Copyright IBM Corp. 1995, 2003 Exercise 6. Problem Determination 6-3


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Press Enter to submit your job.


Write the text of the message that appears:
____________________________________________________________
__ 3. Take the option from the USER TASKS menu which will allow you to work with your
batch jobs.
What is the STATUS of the job you just submitted? _______
__ 4. Select the option to work with it.
__ 5. Select the option to display the job log.
What is in the job log? _______________
Return to the Work with Submitted Jobs screen.
__ 6. Select the option to release the job, and use F5 repeatedly to watch the status
change from HELD to ACTIVE to EOJ and then to OUTQ.
__ 7. When the job has completed, a message will arrive at your workstation. Key the
command DSPMSG, and press Enter. Remove the message after you have read it.
__ 8. From the Work with Submitted Jobs display, select the option dealing with spool files
for the job you just released, and press Enter.
__ 9. Display the contents of the QPJOBLOG spool file for this batch job.
What REQUEST did the job complete? _______
What is the ending code of the job? _______
The job completion message is CPF1164. The SEV of this message is the
completion code. Read the description for completion codes in the text of the
message.
__ 10. Display the other spool file of the job, and verify that it is similar to the spool file from
your earlier interactive command.
__ 11. Return to the USER TASKS menu.
Step 5: Work with status displays
__ 1. Key the command GO STATUS, and press Enter.
__ 2. Take the option which allows you to work with jobs and specify that you wish to work
with only your own jobs. The Work with User Jobs display is presented. Notice the
Type, Status, and Function entries associated with each job on the display.
How many jobs are listed? ______________________
When you have finished, return to the STATUS menu.
__ 3. Select the option to work with jobs, but this time look at the jobs for all users. Look
again at the different types of jobs and notice the entries in the Status and Function
columns.

6-4 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V2.0.0.3
Student Exercises

EXempty How many jobs are listed? _______________________


How many jobs are ACTIVE? _____________________
Return to the STATUS menu.
__ 4. Select the option which allows you to work with active job statistics and the Work
with Active Jobs display will be presented.
What is the name of the subsystem within which your user job is running?
_________
What is the function associated with your job? _________
Notice the functions performed by the jobs of your classmates.
Notice the interactive jobs (type INT). How many batch jobs are currently active?
_______
Notice the spooling subsystem; how many writers are active?
__ 5. Refresh the display with the appropriate function key.
What is the percentage of CPU utilization? _______
What is the elapsed time? _______
How many jobs are active? _______
__ 6. Display elapsed data using the appropriate function key. How many auxiliary
input/output operations has your job performed? ________
Return to the STATUS menu.
__ 7. Select the menu option which will allow you to work with active subsystems. The
Work with Subsystems display will appear. Notice the names of the active
subsystems.
__ 8. Display system data using the appropriate function key. Notice how many jobs are
active in each of the listed subsystems. Return to the STATUS menu.
__ 9. Select the menu option which will allow you to determine the names of the printers.
Notice the names and status of the printers on the system. Return to the STATUS
menu.
Step 6: Display the history log
__ 1. Execute the GO PROBLEM command.
__ 2. Select the option to display the history log. When prompted for parameters specify a
beginning time of four hours ago, and *CURRENT for beginning date. When ready,
press Enter.
Look at the type of information which is held in history log. Use the roll down (or
page up) key to view previous entries.
__ 3. When you have finished looking at the history log go to the USER TASKS menu (GO
USER).

© Copyright IBM Corp. 1995, 2003 Exercise 6. Problem Determination 6-5


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises

Step 7: Analyze and correct a problem with a job


__ 1. Use the WRKSPLF command.
__ 2. Delete any unprinted output you have.
__ 3. Go to the User Tasks menu and select the option to Submit a Job.
__ 4. When prompted for the submit job command, specify that the command to run is
CALL LAB7. Also specify a name of your choice for the job.
__ 5. This job should read information from a file, do some computations and generate a
printed report.
__ 6. Use WRKSPLF to look for the printed output. If you correctly deleted your unprinted
spooled files, as directed to do above, you should see that there are no new ones,
signifying that your batch job did not complete.
__ 7. Enter the WRKACTJOB command to find the status of your batch job.
__ 8. You should see that the status is MSGW. Select Option 7=Display messages and
respond to the message.
__ 9. Return to the WRKACTJOB display and update the display by depressing the PF5
key. The job should now have a run status of run.
What is the CPU% of your batch job? ___________
Press the PF5 key and notice that it changes.
__ 10. This job will never end. Select Option 4=End, F4=Prompt and specify that the job
should end immediately (*IMMED vs. *CNTRLD). Press PF5 key until you see the
status change to end. Display the message sent to you.
You would have to make a determination if the job had been run correctly and try it
again. If you could not correct the problem you would need to get with the
programmer or supplier of the program to determine what was going wrong.
__ 11. Sign off.
END OF LAB

6-6 iSeries System Administration and Control © Copyright IBM Corp. 1995, 2003
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V3.0

backpg
Back page
®

You might also like