ES10BXSTUD
ES10BXSTUD
ES10BXSTUD
Intelligence
Data
Centre
Cloud
Mobility
Student Manual
Comunidad de Madrid
UNIN EUROPEA
FONDO SOCIAL EUROPEO
El Fondo Social Europeo invierte en tu futuro
EDUCATION
S
V8.0
cover
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Front cover
Student Exercises
pr
Ex
cl
ERC 11.0
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:
AIX
CICS
ESCON
HiperSockets
MVS
Parallel Sysplex
PR/SM
BookManager
DataPower
eServer
IMS
Open Class
Power
RACF
RMF
S/390
System x
System z9
WebSphere
z/VM
zSeries
System z
System/390
z/Architecture
z/VSE
z10
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
AIX/ESA
C/370
DB2
FICON
Language Environment
OS/390
POWER7
Resource Measurement
Facility
SecureWay
System z10
VTAM
z/OS
zEnterprise
z9
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
cl
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Ex
Java and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
pr
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 customers ability to evaluate and integrate them into the customers 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.
Student Exercises
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Other product and service names might be trademarks of IBM or other companies.
iii
z/OS Fundamentals
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
iv
z/OS Fundamentals
V8.0
Student Exercises
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Lab environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
2-1
2-2
2-2
2-2
2-2
6-1
6-2
6-2
6-3
cl
Ex
TOC
pr
Contents
9-1
9-2
9-2
9-2
9-3
9-3
Student Exercises
9-3
9-4
9-6
9-6
9-6
9-6
9-7
9-7
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
vi
z/OS Fundamentals
V8.0
Student Exercises
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.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
AIX/ESA
C/370
DB2
FICON
Language Environment
OS/390
POWER7
Resource Measurement
Facility
SecureWay
System z10
VTAM
z/OS
zEnterprise
z9
AIX
CICS
ESCON
HiperSockets
MVS
Parallel Sysplex
PR/SM
BookManager
DataPower
eServer
IMS
Open Class
Power
RACF
RMF
S/390
System x
System z9
WebSphere
z/VM
zSeries
System z
System/390
z/Architecture
z/VSE
z10
cl
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Ex
TMK
UNIX is a registered trademark of The Open Group in the United States and other
countries.
pr
Java and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
Other product and service names might be trademarks of IBM or other companies.
Trademarks
vii
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
viii
z/OS Fundamentals
V8.0
Student Exercises
Exercises description
These exercises require access to a z/OS system that supports TSO/E
and ISPF. The student user IDs need the authority to:
Create data sets whose names start with the user ID
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
Two versions of these instructions are available: one with hints and
one without. You can use either version to complete this exercise (or
flip back and forth between the two versions). In other words, use
these two versions of the exercise in whatever way best aids your
learning. Also, please do not hesitate to ask the instructor if you have
questions.
All hints are marked by a sign. In some cases, the answers given in
hints are examples only, and in other cases, answers are correct
answers.
pr
Ex
pref
Exercises description
ix
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
z/OS Fundamentals
V8.0
Student Exercises
Lab environment
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The purpose of this exec is to allocate all the students data sets, at
time of the first logon.
This edition of course notes supports the following systems:
WW Learning Services ESSMVS1 system
cl
The technique used in the exercises is to use the tools taught in the
preceding lecture session to build the work you wish to perform. This is
the same technique you use back at work, where you rarely build
anything from the start, but rather start by copying previous work.
You gain most from this course by the effort you put into the exercises.
The aim should not be to get the exercises right in the minimum time.
Rather, as your aim is to learn, you should experiment and try new
ideas. Surprisingly, you learn more if you make a few mistakes. If in
doubt, try it out. Also, use the manuals and online documentation, ask
other students, and ask your instructor as often as practical.
Do not worry it you cannot finish all of the exercises during the lab
period. Some exercises are marked as optional to emphasize this
point. The goal of each exercise is to prompt you to think through the
problem, and to apply the concepts you have learned. The instructor
covers solutions during the lab reviews, and you also have a set of
solutions in your Exercise Guide.
pr
Ex
pref
While you are doing the exercises, let your imagination be your guide.
If you have completed the required exercise, look for ways to go
Copyright IBM Corp. 2001, 2013
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Lab environment
xi
Student Exercises
Solutions
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
In the first exercise, you log on to the TSO user ID supplied for this
course. One user ID has been supplied for each student. Some
students find it best to work in teams, and some prefer to work
individually. This is entirely up to you. You are welcome to change
throughout the course.
There are currently ten sets of TSO IDs for production delivery:
TSOFS00-24, TSOFS50-74, and TSOFS75-99,
TSOFR00-24, and TSOFR25-49
For the IBM learning systems, the usual RACF rules apply, and you
have to change the password before you can log on. Note your new
password (and if working in a team, tell all the members of the team).
Your instructor has RACF authority to alter your password if you forget
it, and to resume your user ID if you exceed the password retry limit.
The password you create has to conform to the IBM internal rules, of
pr
Ex
cl
xii
z/OS Fundamentals
V8.0
Student Exercises
pref
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The exact procedure that you have to use varies with the location
where the course is being held. Your instructor shows you how to
navigate the IBM network to access the appropriate system. The
actual logon procedure is very standard.
Your instructor tells you how to access the TSO system. Your
terminals probably have access to hundreds to TSO systems, so one
of the errors you might make is to attempt to log on to the wrong
system. As all IBM systems are RACF-protected, there is no danger of
logging onto the wrong system.
Accessing TSO:
Make out the PCOM icon and double-click it. This opens up four
network sessions.
Choose one of the network sessions. This class normally runs on
ESSMVS1.
pr
Ex
cl
Lab environment
xiii
Student Exercises
Netid= USIBMES
IBM Training
Host = ESSCMC1
Terminal= SLIPA097
MOP CLPz
To Disc = LOGOFF
PAGE
06:49
APPLNAME STATUS
! APPLNAME STATUS
TSOE
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
-------------------------------------------------------------------------------UP
14:03
UP
12:26
ESSMVS1
UP
14:03
ESSMVS5
UP
16:51
MOPEDVM1
UP
12:36
MOPEDVM2
UP
12:26
ESSMVS7
UP
06:14
EDUCMVS
DOWN
13:44
A4OFS
DOWN
09:58
EDUCPLX1
UP
12:26
EDUCPLX2
UP
12:26
VM2
==>
pr
Ex
cl
Next, you should see the TSO Logon screen. (the standard TSO logon
panel with fields on the right hand column). If not, you are probably on
the wrong system, or have entered the wrong user ID. You can correct
the user ID on this panel, if necessary. If you are on the wrong system,
you have to return to the initial logon panel (PF3).
You have to enter the administrator assigned password once and your
new password twice (for confirmation). Enter the password and press
xiv
z/OS Fundamentals
V8.0
Student Exercises
Enter (this might be the Ctrl or Enter key depending on the keyboard
mapping).
pref
If your password fails the IBM rules, TSO does not tell you until you
have entered all three items (old/new/new again). Make sure you do
not forget your new password.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
===> TSOSF00
Password
===>
Group Ident
===>
===> 4096
Perform
===>
Command
cl
-Nonotice
-Reconnect
-OIDcard
You now have access to the z/OS system being used for the
interactive exercises in ES10.
You might receive the following messages on your screen:
pr
Ex
You may request specific help information by entering a '?' in any entry field.
Lab environment
xv
Student Exercises
You should see the ISPF Main Menu. If you see the READY prompt,
enter ISPF.
Password rules
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
IBM has installed a standard (to all IBM sites) RACF exit to enforce
additional password rules. The rules are:
Do not waste time here. If you have any difficulties, seek help from
your instructor or other students immediately.
pr
Ex
cl
Once you are into TSO, remember this rule: whenever you see three
red asterisks (***), all you can do is read the screen and press
Enter. Anything else you type is ignored.
xvi
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The instructor uses this exercise to walk you through your first logon to
the lab system. You do a (very quick) tour of logging on to TSO,
starting ISPF PDF and setting some basic ISPF options.
Requirements
pr
Ex
cl
1-1
Student Exercises
Exercise instructions
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The instructor walks the class through the steps in the following visuals. Depending on
where this course is being administered, the way to display this screen and log on to the
classs lab system varies. The instructor will provide the specific information for your
environment.
Netid= USIBMES
IBM Training
Terminal= SLIPA130
Host = ESSCMC1
MOP CLPz
PAGE 1
To Disc = LOGOFF
05:12 Tuesday - October 19, 2010
APPLNAME STATUS
! APPLNAME STATUS
! APPLNAME STATUS
-------------------------------------------------------------------------------TSOE
UP
06:39
!
!
VM2
UP
06:39
!
!
ESSMVS1
UP
06:39
!
!
ESSMVS5
DOWN 06:39
!
!
MOPEDVM1 UP
06:39
!
!
MOPEDVM2 UP
06:39
!
!
ESSMVS7
UP
06:39
!
!
EDUCMVS
DOWN 06:39
!
!
A4OFS
DOWN 06:39
!
!
EDUCPLX1 DOWN 06:39
!
!
EDUCPLX2 DOWN 06:39
!
!
!
!
!
!
!
!
-------------------------------------------------------------------------------Help Desk (001)404-238-6000 CLPHELPUS.IBM.COM (888)502-5511(TL 888-6000)
IBM Mgt Approved Usage Only
==>
PF1=Help PF2=ESSMVS1 PF3=Return PF4=VM2
PF5=ESSMVS5 PF7=Backward PF8=Forward
cl
Depending on where this course is being administered, the way to display this screen and
log on to the class's lab system varies. The way to get to this screen is:
Ex
_________________________________________________
_________________________________________________
_________________________________________________
pr
_________________________________________________
_________________________________________________
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
===> TSOFT98
Password
===>
Group Ident
===>
===> 4096
Perform
===>
Command
-OIDcard
cl
By now, you should have arrived at the TSO/E LOGON panel of our lab system ESSMVS1.
You are now required to provide your user ID (if not already done), and the corresponding
password.
__ 1. Enter both and press Enter.
Ex
The following is a short description of each of the fields as they appear on the logon
panel:
pr
User ID
Password
1-3
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Procedure
Size
Perform
Command
New Password
pr
Ex
cl
Acct Nmbr
Group Ident
1-4
z/OS Fundamentals
V8.0
Student Exercises
-Nomail
-Nonotice
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
EXempty
-OIDcard
pr
Ex
cl
-Reconnect
1-5
Student Exercises
Successful logon
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
-------------------------------------------------------%C12
========================================
***
What you see now depends upon how your installation has modified the logon process.
Some installations display one or more groups of messages at the top of the screen. In our
lab system, you should see messages similar to the ones displayed on the visual. You
should also see the word READY on the screen. It indicates that your logon was successful
and that TSO/E is now ready to process your command entry.
cl
(If you see *** rather than READY on your screen, press Enter to continue. TSO/E should
now display READY on your screen. If not, consult your instructor.)
Ex
pr
__ 2. To start ISPF/PDF, type ISPF or PDF (or an installation-defined alias) and press
Enter. Your terminal should now display the ISPF Primary Option Menu as shown
on the following page.
1-6
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Settings
View
Edit
Utilities
Foreground
Batch
Command
Dialog Test
LM Facility
Classes
ITS Menu
ITS Schedule
SDSF
SCLM
Workplace
User ID . :
Time. . . :
Terminal. :
Screen. . :
Language. :
Appl ID . :
TSO logon :
TSO prefix:
System ID :
MVS acct. :
Release . :
TSOFT98
05:33
3278
1
ENGLISH
ISR
STUDENT
TSOFT98
MVS1
1ES10G12
ISPF 5.9
Welcome to IBM Education and Training - Level II support systems .....If you
have any problems or questions regarding these systems, Please call our help
desk. Thank you in advance for your time, patience and understanding.
Have a great day ........ Tech Support
F10=Actions F12=Cancel
We already introduced the ISPF Primary Option Menu and its main choices in the previous
topic.
pr
Ex
cl
__ 3. Your first task is now to alter the settings for your ISPF/PDF session. Select the
proper panel option (0), and proceed to the next page.
1-7
Student Exercises
ISPF Settings
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
2. Std
Terminal Type
3
1. 3277
F1=Help
F2=Split
F3=Exit
F10=Actions F12=Cancel
3. Max
4. Part
2. 3277A
3. 3278
F7=Backward F8=Forward
4. 3278A
F9=Swap Nxt
__ 4. Perform the following panel modifications and press Enter after each selection to
see how changes affect panel display.
cl
__ b. Change the display of the long message, so that it appears in a pop-up window.
Ex
__ c. Enter an invalid selection on the Command ===>______ line and press Enter. A
short message reading Invalid command should now appear in the upper right
corner of your screen.
pr
__ d. Now press F1 to display the corresponding long message. The message ...is
undefined should now appear in a pop-up window. Press F1 again for
additional help. Return to ISPF Settings panel.
1-8
z/OS Fundamentals
V8.0
Student Exercises
EXempty
__ f.
Try the Tab key with and without Tab to action bar choices and Tab to
point-and-shoot fields selected.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
2. 3277A
3. 3278
F7=Backward F8=Forward
4. 3278A
F9=Swap Nxt
__ 5. Select the Function keys choice of the action bar and hide the function key display.
Now reset it, so that the function key settings are once again displayed.
Ex
cl
__ 6. Select the Function keys choice of the Action bar again and select Disable
Keylists. Notice the change to the function keys. This setting (keylists disabled) is
the recommended setting for most z/OS users.
__ 7. Select Identifier from the action bar and activate the panel identifier display. Check
your panel for the panel name in the upper left corner.
pr
Panels can be modified, and this tells us the panelid (member name) of the panel.
Reset the panel identification display to off. You can also display the system name
and your user ID on every panel by activating the corresponding option.
1-9
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
2. Std
Terminal Type
3
1. 3277
F1=HELP
F2=SPLIT
F3=END
F7=UP
F8=DOWN
F9=SWAP
3. Max
4. Part
2. 3277A
F4=RETURN
F10=LEFT
3. 3278
F5=RFIND
F11=RIGHT
4. 3278A
F6=RCHANGE
F12=RETRIEVE
F1 is always HELP.
pr
Ex
cl
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
. TSOFT98
. ES10
. CNTL
.
. . .
. . .
. . .
Workstation File:
File Name . .
Initial Macro . .
Profile Name . . .
Format Name . . .
Data Set Password
Record Length . .
F1=HELP
F7=UP
.
.
.
.
.
Options
Confirm Cancel/Move/Replace
Browse Mode
View on Workstation
/ Warn on First Data Change
Mixed Mode
View ASCII data
.
.
.
.
.
F2=SPLIT
F8=DOWN
F3=END
F9=SWAP
F4=RETURN
F10=LEFT
F5=RFIND
F11=RIGHT
F6=RCHANGE
F12=RETRIEVE
cl
__________________________________________________________________
pr
Ex
__________________________________________________________________
1-11
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Settings
View
Edit
Utilities
Foreground
Batch
Command
Dialog Test
LM Facility
Classes
ITS Menu
ITS Schedule
SDSF
SCLM
Workplace
User ID . :
Time. . . :
Terminal. :
Screen. . :
Language. :
Appl ID . :
TSO logon :
TSO prefix:
System ID :
MVS acct. :
Release . :
TSOFT98
05:56
3278
1
ENGLISH
ISR
STUDENT
TSOFT98
MVS1
1ES10G12
ISPF 5.9
F1=HELP
F7=UP
F2=SPLIT
F8=DOWN
F3=END
F9=SWAP
F4=RETURN
F10=LEFT
F5=RFIND
F11=RIGHT
F6=RCHANGE
F12=RETRIEVE
For the moment, our work with ISPF/PDF is done. We now want to end our ISPF/PDF
dialog and log off from our TSO session.
__ 11. To leave ISPF's Program Development Facility:
__ a. Enter X on the command line or
cl
__ b. Press F3 or
__ c. Select the corresponding Exit choice from the Menu pull-down menu.
pr
Ex
The heading of the next panel (as shown on the following visual) should read Specify
Disposition of Log Data Set.
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
F1=Help
F7=Up
F2=Split
F8=Down
F3=Exit
F9=Swap
F4=
F10=Right
F5=RFind
F11=Left
F6=RChange
F12=Cursor
ISPF maintains a log of significant user activities. This information can be useful, for
example, when diagnosing problems. The log data is stored in a data set named
userid.SPFLOGx.LIST, where userid is the user ID supplied by the instructor.
cl
__ 12. At the end of an ISPF session you, as the user, can specify what has to be done with
the log data set. Enter the selection of your choice.
pr
Ex
1-13
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Delete data set without printing or Keep data set - Same is the usual choice unless you
have had problems.
If you do want to print, then the printer class (SYSOUT class) or destination (local printer
ID) must be entered. Additionally, the four lines of Job statement information must be
entered if you use the SYSOUT option.
pr
Ex
cl
The line List Data Set Options not available indicates there is no list data set to
print. If we performed a print under ISPF, then a similar set of options are provided to
dispose of the list data set.
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Logoff
TSOFT98.SPFLOG1.LOG has been deleted.
READY
logoff
TSOFT98 LOGGED OFF TSO AT 05:59:32 ON OCTOBER 19, 2010
******
You now have ended the ISPF session and returned to the TSO command line mode. Your
TSO session is still running.
__ 13. To terminate your TSO session, enter the TSO command logoff on your terminal.
Ex
cl
TSO then replies with a message like userid LOGGED OFF TSO AT 17:42:12 ON
OCT 23, 2010 to indicate that your TSO session has been terminated.
pr
End of exercise
1-15
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
2-1
Student Exercises
Exercise instructions
Part 1: Allocate a physical sequential (PS) data set
__ 1. Allocate a new sequential data set named userid.ES10.PS according to the
following specifications:
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Note
Do not enter an expiration date; leave expiration date blank for all data sets that you
create in this class.
All other fields should be blank. Press the Enter key to allocate the file.
__ 2. To verify whether the data set has been allocated properly use the Data Set
Information panel.
Variable-length records
cl
Blocked records
Ex
pr
__ 4. To verify whether the data set has been allocated properly use the Data Set
Information panel.
z/OS Fundamentals
V8.0
Student Exercises
Fixed-length records
EXempty
Blocked records
Block size determined by system
Record length 80 bytes
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 6. To verify whether the data set has been allocated properly use the Data Set
Information panel.
Note
If you accidentally allocated the wrong data set, ask your instructor to delete it, so
you can start over again.
pr
Ex
cl
End of exercise
2-3
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
2-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
3-1
Student Exercises
Exercise instructions
Use ISPF editor primary commands
__ 1. Create a member called LITLGAME in the data set you created called
userid.ES10.PDS.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. Edit LITLGAME, and copy in a member called SKELEXEC from the partitioned data
set called D80WW.ES10V11.EXEC.
__ 3. Perform the following modifications:
__ d. Display the first line containing @@@ and overtype @@@ with SAY.
__ e. Use RFIND (F5) to find all further occurrences of @@@ and overtype them with
SAY as well.
__ f.
Show all lines on the display that might have been previously excluded.
__ g. The first line must contain a comment with the word REXX. REXX comments
start with a /* and end with an */. Put This is a little REXX-Exec (on
line 1) in comment signs /*...*/
__ h. Set the boundaries to 40-50 and change SAY to Y/N.
__ 5. Try starting your little REXX-Exec by entering the following on the command line:
TSO EX 'userid.ES10.PDS(LITLGAME)' EXEC
Note
Ex
cl
To abort a running exec, press PA1 on your keyboard (right-click to bring up the
keypad), and enter HI as instructed. If the exec does not run or does not run
properly, go back to Step 1 and perform all steps again, but with a different member
name (as LITLGAME already exists).
pr
When you have finished playing computer games, take a few minutes to inspect
LITLGAME.
LITLGAME is written in a procedural language called REXX.
REXX programs (or execs) can be compiled or not, as you choose. This program
has not been compiled, and so it is interpreted as the instructions are executed,
resulting in poorer performance, but less administrative work.
3-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
End of exercise
3-3
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
3-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
4-1
Student Exercises
Exercise instructions
Part 1: ISPF editor line commands
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Enter the PROFILE edit command, and make sure that BOUNDS setting is set to 1 80, if
not reset it by entering: BOUNDS (with no left and right BOUNDS operands). Enter HILITE
AUTO to enable the coloring options for language sensitive coloring in the ISPF editor.
__ 1. Edit userid.ES10.PDS and open a new member called TABLE.
__ 2. Set up a line which looks exactly like this:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-000001 |
|
|
|
|
Smith
Brown
Davis
Harrison
Spencer
Lawson
White
McDonald
Bush
Newman
John
Sam
Roger
Tony
Fred
Edward
Annie
Steve
Gary
William
JSMITH
SBROWN
RDAVIS
HARRISON
FSPENCER
EDLAWSON
AWHITE
STEVEM
GBUSH
WNEWMAN
31431
31721
31976
32423
31212
31791
32111
31623
31885
31655
__ 5. Use copy/overlay, that is c and oo, to copy line 1 over the first four lines you copied
in, so the result looks like:
|
|
|
|
|
Smith
Brown
Davis
Harrison
Spencer
Lawson
White
McDonald
Bush
Newman
|
|
|
|
|
John
Sam
Roger
Tony
Fred
Edward
Annie
Steve
Gary
William
|
|
|
|
|
JSMITH
SBROWN
RDAVIS
HARRISON
FSPENCER
EDLAWSON
AWHITE
STEVEM
GBUSH
WNEWMAN
|
|
|
|
|
31431
31721
31976
32423
31212
31791
32111
31623
31885
31655
|
|
|
|
|
pr
Ex
cl
000001
000002
000003
000004
000005
000006
000007
000008
000009
000010
000011
4-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
__ 6. Use move/overlay, that is m and oo, to move line 1 over the last six lines you copied
in, so the result looks like:
|
|
|
|
|
|
|
|
|
|
Smith
Brown
Davis
Harrison
Spencer
Lawson
White
McDonald
Bush
Newman
|
|
|
|
|
|
|
|
|
|
John
Sam
Roger
Tony
Fred
Edward
Annie
Steve
Gary
William
|
|
|
|
|
|
|
|
|
|
JSMITH
SBROWN
RDAVIS
HARRISON
FSPENCER
EDLAWSON
AWHITE
STEVEM
GBUSH
WNEWMAN
|
|
|
|
|
|
|
|
|
|
31431
31721
31976
32423
31212
31791
32111
31623
31885
31655
|
|
|
|
|
|
|
|
|
|
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
000001
000002
000003
000004
000005
000006
000007
000008
000009
000010
Note
Family Name
Given Name
USERID
Phone
=============================TOP OF TABLE========================
==========================BOTTOM OF TABLE========================
Do this the efficient/lazy way by copying the second line to the end of the table and
overtyping TOP with BOTTOM.
__ 9. Exclude only the detail lines from display and sort them by their last name. (Use the
online help function to find out about the proper syntax to sort only the excluded
lines.)
cl
Ex
| Cyrus
| Will
| WCYRUS
| 31823
| 31945
__ 12. Repeat entry Davis, and change the repeated line to:
| Davis
| Sarah
| SDAVIS
pr
__ 13. Insert a new line after Newman, and enter Claudia as first name.
__ 14. Use copy/overlay, that is c and o, to copy the old entry Newman over the new line.
4-3
Student Exercises
__ 18. Review sorted lines to very sort on primary and secondary names.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
End of exercise
4-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
5-1
Student Exercises
Exercise instructions
__ 1. Allocate two new data sets called userid.ES10.INDATA and
userid.ES10.OUTDATA. Allocate them like userid.ES10.PDS.
__ 2. Create a new member called A in serid.ES10.INDATA, and enter some test
data into it.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 3. Create nine new members called B through J which contain the same data as
member A.
pr
Ex
cl
End of exercise
5-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Understand the facilities provided by ISPF option 3.4, Data Set List
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
6-1
Student Exercises
Exercise instructions
Part 1: Data set lists
__ 1. Use the ISPF/PDF option Data Set List to perform the following tasks:
__ a. Display a list of all data set starting with your user ID.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
List all data sets residing on the same volume as data set userid.ES10.DATA
that start with TSOF.
i.
Select the data set userid.ES10.DATA from your list and display all
members in the data set.
pr
Ex
__ j.
6-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. Now on this new screen, Use the ISPF/PDF option UNIX Directory List (option 3.17)
to perform the following tasks:
__ a. Display a list of all entries in the pathname /u/es10/students.
i.
__ 4. Create a new regular UNIX file in your directory: name it file1 with permission bits
755.
__ 5. Once created, edit the file, add one line containing the value date, and save it.
__ 6. Now try to execute this UNIX file, by entering X in front of it, and specify a run
method of 2. Login Shell .
What is the purpose of this UNIX file (program) that you have created?
__________________________________________________
Ex
cl
__ 7. Change the permission bits to 444, and try to execute it again. Any success?
pr
End of exercise
6-3
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
6-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
SC34-4823
SC34-4820
pr
Ex
cl
SC34-4822
7-1
Student Exercises
Exercise instructions
Part 1: TSO commands
__ 1. Use the proper TSO/E command to display only the function of the ALLOCATE
command.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. Use the proper TSO/E command to display only the syntax of the ALLOCATE
command.
__ 3. Find out the purpose of the LIKE operand of the ALLOCATE command.
__ 4. Allocate a new data set called userid.ES10.TSOEPDS.
__ 6. Allocate a new sequential data set called userid.ES10.TSOEPS with the following
characteristics:
Filename ALLOCPS
__ 7. Verify whether the data set has been allocated with the right filename by displaying a
list of all currently allocated data sets.
Make sure you specify the right parameter to see a list of filenames.
Does your filename occur?
cl
__ 9. Display your TSO/E profile and change the prefix setting to HUGO.
__ 10. Enter the following command:
Ex
LISTDS ES10.TSOEPS
______________________________________________________________
pr
7-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LISTCAT LVL(userid)
listc cat('ICFCAT.MVS100.UCAT.STUD1')
Steps 19 through 35 are optional. At any time, you can skip to Step 36.
__ 20. Copy a member called CLIST from data set D80WW.ES10V11.EXEC into member
MYCLIST.
cl
Ex
Find the ISPPLIB ALLOC statement. Write the name of the first data set
here:___________________________________________________. We refer to
this as the ISPPLIB data set. Write the names of the other data sets
here:__________________________________________________.
pr
7-3
Student Exercises
__ 25. Enter the command PANELID, and the name of this panel appears in the top left
hand corner. Write the panel name here:________________________. We refer to
this as the POM panel.
__ 26. Go to the panel which gives you a BookManager option (option E).
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 28. Find the )PROC section and note the code used to invoke BookManager.
__ 29. Edit a new member with the name of the POM panel (ITMENU) in data set
userid.ES10.TSOEPDS.
__ 30. Copy in the POM panel (ITMENU) member from the ISPPLIB library.
__ 31. Inspect the panel code:
__ a. Find the )BODY section and the text of the POM panel, in the )AREA section,
repeat last line W WLM, and override it as instructed below.
__ b. Add the text for your version of BookManager.
__ c. Find the )PROC section, and add a new entry that invokes BookManager using
the option you specified in the )BODY section and the command you copied from
the Bookie panel.
__ 32. End and save the panel member and the POM panel if necessary.
__ 33. Exit ISPF to TSO READY mode.
ex userid.ES10.TSOEPDS(MYCLIST)
cl
Ex
__ 36. Erase all data sets that you have allocated during this exercise.
pr
__ 37. Notify your neighboring group (through TSO command) that you have finished the
exercises.
End of exercise
7-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Submit a job
Use SDSF to view job (or TSO) output on the spool
Purge output from the spool
Requirements
pr
Ex
cl
SA22-7597
SA22-7598
SA22-7535
SA22-7551
SA22-7782
SA22-7670
SC34-4822
SC34-4823
SC34-4820
8-1
Student Exercises
Exercise instructions
Part 1: LAB: Submit a job
Note
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Remember not to put single quotes around the data set name for batch JCL DD
statements.
Note
__ 2. Use option 3.3 to copy member LAB5#01 from data set D80WW.ES10V11.CNTL
into data set userid.ES10.CNTL.
__ 3. Edit member LAB5#01 in data set userid.ES10.CNTL.
cl
pr
Ex
Job name is useridA .... - (Yes, your user ID with an A at the end).
8-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 8. View its output with SDSF. Leave the output on the spool.
pr
Ex
cl
End of exercise
8-3
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
8-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
pr
Ex
cl
SA22-7597
SA22-7598
SA22-7670
SC26-7410
SC34-4822
SC34-4823
SC34-4820
9-1
Student Exercises
Exercise instructions
Part 1: Copy selected member of PDS
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Note
Do not create a job card; TSO creates a default job card for you.
Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
__ 2. Now tailor the copied JOBCARD member so that this job card can be copied into
each new JCL member.
Your JOBCARD should look something like the following:
Ex
cl
pr
The comment lines shown in the sample above are for documentation purposes so
that you will be able to trace from where the JCL was submitted.
9-2
z/OS Fundamentals
V8.0
Student Exercises
EXempty
__ 5. Copy the member JOBCARD into it and create a job step that copies the (input) data
set userid.ES10.CNTL into (output) data set userid.COPY.CNTL.
Since the output data set does not exist, allocate it during the copy step. The
characteristics are the same as for userid.ES10.CNTL.
(Use the LIKE parameter to allocate the new data set.)
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 6. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
__ 8. Copy the member JOBCARD into it and create a job step that copies member
JOBCARD from D80WW.ES10V11.CNTL into data set userid.COPY.CNTL with
the REPLACE option of IEBCOPY.
__ 9. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
__ 10. Remember to replace the existing member. Please check this thoroughly.
Create member LAB5#14 in data set userid.ES10.CNTL. Copy the member JOBCARD
into it and create job steps that do the following:
__ 11. Use the first step to allocate a data set named userid.COMPRESS.DATA like data
set userid.COPY.CNTL
__ 12. The second step should only run when the RC=0 in the previous step. Use the
IF/THEN/ELSE clause for this purpose.
Copy the entire data set userid.COPY.CNTL into userid.COMPRESS.DATA, thus
creating a backup of userid.COPY.CNTL.
Ex
cl
__ 13. Check that the above step was successful using the IF/THEN/ELSE clause. If the
above steps were executed with RC=0, go on to LAB 5 #15, else delete
userid.COMPRESS.DATA, remove the cause of the error, and rerun the job.
pr
__ 15. Copy the member JOBCARD into it and create a job step that compresses the data
set userid.COPY.CNTL inplace.
__ 16. Delete data set userid.COMPRESS.DATA, but only if previous step was executed
with RC=0.
__ 17. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
9-3
Student Exercises
__ b. DSORG:
PDS
__ c. RECFM:
FB
__ d. DIR:
1 directory block
__ e. LRECL:
80
__ f.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ a. Space:
BLKSIZE:
__ 19. Second, create data set userid.COPY.PDSE using ISPF option 3.2 with the
following characteristics:
__ a. Space:
__ b. DSORG:
PDSE
__ c. RECFM:
FB
__ d. DIR:
1 directory block
__ e. LRECL:
80
__ f.
BLKSIZE:
__ 21. Copy the member JOBCARD into it and create a job step that copies data set
userid.ES10.CNTL into data set userid.COPY.PDS.
ATTENTION!
Ex
cl
pr
__ 23. Copy the member JOBCARD into it and create a job step that copies data set
userid.ES10.CNTL into data set userid.COPY.PDSE.
ATTENTION!
9-4
z/OS Fundamentals
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__________________________________________________________________
pr
Ex
cl
End of exercise
9-5
Student Exercises
Optional exercises
Part 1: Copy instream data to PS
__ 1. Create member LAB5#21 in data set userid.ES10.CNTL.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. Code an IEBGENER job to copy data from instream data set to the newly allocated
data set userid.GENER.COPY#1.
The characteristics for the new data set are:
Space:
DSORG:
PS
RECFM:
FB
DIR:
0 directory block
LRECL:
80
BLKSIZE:
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
__ 3. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
cl
Ex
__ 5. Copy the member JOBCARD into it and create a job step that copies the (input) data
set userid.GENER.COPY#1 into (output data set userid.GENER.COPY#2.
Since the output data set does not exist yet, allocate it during the copy step. The
characteristics are the same as for userid.GENER.COPY#1. (Use the LIKE
parameter to allocate it.)
pr
__ 6. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
z/OS Fundamentals
V8.0
Student Exercises
EXempty
__ 9. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 12. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
__ 14. Copy the member JOBCARD into it and create a job step that creates member
TEST in data set userid.COPY.CNTL.
The contents of member TEST should be:
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
TEST
AAAA
BBBB
TEST
__ 15. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
pr
Ex
cl
End of exercise
9-7
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
9-8
z/OS Fundamentals
V8.0
Student Exercises
EXempty
Exercise 10.Procedures
What this exercise is about
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
pr
Ex
cl
SA22-7597
SA22-7598
SA22-7535
SA22-7551
SA22-7670
SC26-7527
SC26-7410
SC34-4822
SC34-4823
SC34-4820
10-1
Student Exercises
Exercise instructions
Part 1: Override DD-statements of an in-stream procedure
__ 1. Create member LAB5#31 in data set userid.ES10.CNTL and copy the same
member from data set D80WW.ES10V11.CNTL into it. It looks like:
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
As you can see, this job has an in-stream procedure that makes a secure
compress of data set userid.ES10.CNTL.
pr
__ 2. Your task is now to execute the job so that the data set userid.COPY.CNTL will be
compressed during the job's execution.
Do not change the in-stream procedure. Perform this task by overriding DD
statements.
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
Ex
As you can see, there are two variables needed to run this procedure without
problems. Furthermore, you see that this is also a secure compress like the one you
had as an in-stream procedure.
pr
10-3
Student Exercises
__ 7. Allocate a PDS named userid.ES10.PROC with the same attributes as data set
D80WW.ES10V11.PROC using ISPF/PDF function 3.2.
__ 8. Create the member COPY, which will hold the cataloged procedure. The procedure
should do the following:
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ c. The data set names should be variable so that they can vary from procedure call
to procedure call. Name their JCL symbols INDS and OUTDS.
__ d. The data set defined for SYSUT2 might be new. If this is the case, allocate it like
the input data set. Use the JCL symbol &LIKEDS to do this.
__ e. Do not specify any default values for the symbols except for PROG.
__ 9. Once you have created your own cataloged procedure, test it.
__ c. If the job fails, remove the cause of error and rerun the job.
cl
__ 11. Copy member JOBCARD into it and create a job step that copies member
SORTTEST from data set D80WW.ES10V11.CNTL into your CNTL data set using
the SELECT MEMBER= function of IEBCOPY.
Ex
__ 12. Now create a job step that calls program ICEMAN which is the sort program
DFSORT.
This program needs the following DD statements:
DD
DD
DD
DD
SYSOUT=
DISP=....,DSN=.....
DISP=....,DSN=.....
*
pr
SYSOUT
SORTIN
SORTOUT
SYSIN
V8.0
Student Exercises
EXempty
There are many input control statements, but you will need only the following ones:
SORT
FIELDS=(.........)
OPTION
SKIPREC=...
__ 13. Now that you have enough familiarity to create this sort step, do the following:
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Sort member SORTTEST of data set D80WW.ES10V11.CNTL and write the results
to userid.ES10.CNTL(SORTOUT1.
__ a. Sort the records by employee name, starting in column 4 until column 16.
Data type: character (CH)
Ascending order (A)
__ 14. Check the results of your job and edit member SORTOUT1 for the sorted output.
pr
Ex
cl
__ 15. In case of errors, remove the cause of errors and rerun the job.
10-5
Student Exercises
Optional exercise
Part 1: Create PS from in-stream
__ 1. Create member LAB5#41 in data set userid.ES10.CNTL.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. Copy the member JOBCARD into it and create a job step that copies in-stream data
to a new physical sequential (PS) data set with name userid.ES10.INPUT and
the following characteristics:
__ a. Space:
__ b. RECFM:
FB
__ c. LRECL:
80
__ d. BLKSIZE:
cl
__ 3. Check the results of your job. In case of error, remove the cause and rerun the job.
Ex
__ 5. Copy the member JOBCARD into it and create job steps that perform the following:
pr
__ a. Using IEBGENER, create a member named TEXT1 in the new data set
userid.ES10.DATA and copy in-stream data into it. The data should look like:
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
TEST
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ d. If the second step returns RC=0 then print data set userid.ES10.OUT to
SYSOUT=* using IEBGENER.
__ e. If the third step ends with RC=0, delete data set userid.ES10.OUT using
IEFBR14.
__ 7. Check the results of your job. In case of error, remove the cause of the error and
rerun the job.
__ 8. First, copy member LAB5#43 from data set D80WW.ES10V11.CNTL and tailor it to
your needs. It should look like:
//useridA JOB (ACCOUNT),'userid',MSGCLASS=X,MSGLEVEL=(1,1),
//
NOTIFY=&SYSUID,CLASS=B,REGION=6M
//********************************************************************
//*
JOB SUBMITTED THROUGH INTRDR BY JOB LAB5#44 ***
//*
DOC: SUBMIT JOB THROUGH SYSOUT=(,INTRDR)
***
//********************************************************************
//S1
EXEC PGM=IEFBR14
//DD1
DD
DISP=SHR,DSN=userids.ES10.CNTL
__ 10. Copy member JOBCARD into it and create a job step that performs the following:
cl
With the in-stream procedure PROC32, execute IEBGENER to route a job from any
input data set to SYSOUT=.
To define the input data set, use the symbol &DS, and for the SYSOUT= value, use
&OUT.
Ex
DS=userid.ES10.CNTL(LAB5#43),OUT=(,INTRDR)
pr
__ 11. Check the results of your job. In case of errors, remove the cause of error and rerun
the job.
10-7
Student Exercises
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
End of exercise
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Requirements
pr
Ex
cl
SA22-7597
SA22-7598
SA22-7535
SA22-7551
SC26-7410
SC34-4822
SC34-4823
SC34-4820
SA22-7801
SA22-7806
11-1
Student Exercises
Exercise instructions
Part 1: ISHELL introduction
__ 1. Log on to TSO.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 2. From the ISPF menu, choose the option to invoke the ISHELL or use the ISHELL
command (use the ISHELL TSO command to invoke the ISHELL).
There is also a panel option for the ISHELL on the ISPF menu, through
option E.7 (panel ITMENU).
__ 3. Use the pull-down menus from the action bar to see what actions can be performed.
The ISHELL screen is Common User Access (CUA) based. It has an
action bar at the top of the screen.
Placing the cursor under any of the actions listed on the action bar and
pressing the Enter key will result in a pop-up window (also called pop-up
menu or pull-down menu) for that action being displayed. The window
shows a list of actions that can be chosen.
Use the help key (PF1) on any field if you don't know what to do.
____________________________________________________________
Question: What does the asterisk on actions in the File_System and Setup
mean?
____________________________________________________________
Ex
cl
Do not do the next step before saving the pathname displayed on the UNIX System
Services ISPF Shell. This pathname is both your home directory and your current working
directory. Write it down or copy it to the clipboard for pasting later.
Home directory = _______________________________________________________
pr
If a / is not already specified on the ISH main panel, enter it like it is shown on
the following panel.
There are different methods for displaying the contents of a directory. See
if you can find one way of doing it.
V8.0
Student Exercises
EXempty
__ 5. List the contents of the directory bin in the root file system.
Find the directory bin on the root directory list and choose the option to
list its contents.
__ 6. Choose a file in this directory to browse.
The procedure is similar to the previous one, but the action is different.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Take notice that the short form of Browse is B. If you remember this you
can use B directly when you want to browse a file instead of prompting the
pop-up menu to choose actions from.
__ 7. List the contents of the directory dev in the root file system.
You can use the same way as you did to list the bin directory.
Suggestion: Try the action code for list instead of using the pop-up menu.
__ 8. Find out from the panels which type of files are located in the dev directory.
Try listing the attributes of a file.
____________________________________________________________
__ 9. List the actions that can be done for the files in this directory.
The pop-up menu contains a list of actions.
____________________________________________________________
To create a new file, you have to go back to the main ISHELL panel.
Use the default permission bits for this file.
__ 11. Display the contents of your home directory now to see the new file there.
cl
Ex
__ 12. Edit the new file and add a few lines of text in the file.
The editor is the ISPF editor.
pr
__ 13. Modify the display of the directory contents to include information about permission
bits, modification time, owner, and file size.
__ 14. Display a directory with the additional information.
__ 15. Check the default actions for files.
11-3
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
End of exercise
V8.0
Student Exercises
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Choose a file system to display from the list of mounted file systems.
Look for an action that will display information about the file system.
____________________________________________________________
__ 4. Use the ISHELL to allocate a new file system called userid.OMVS.HFS. Allocate
one cylinder for primary and one cylinder for secondary space. The instructor
supplies you with information you need for storage class, management class, and
data class specifications.
Use the action File_systems on the action bar.
__ 6. Copy members FILE1, FILE2, FILE3 from the z/OS PDS called
D80WW.ES10V11.OMVS.LABS, to your home directory. Specify these file
permissions when copying the files:
Ex
cl
pr
On the panel where you must specify the new pathname of the file,
change only the last part of the pathname (which is the file name).
11-5
Student Exercises
__ 9. Find the string test in the file file9, and call the output file findstr1 in your
home directory.
A panel is displayed where you can specify a pathname for the output file.
Another panel will be displayed where you can enter the text strings to be
searched for.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 10. Find the string test in your home directory and call the output file findstr2 in the same
directory.
The action for this is similar to the previous task, except that this is for a
directory.
What is the difference between the output from searching for a string in a file and
searching in a directory?
____________________________________________________________
__ 12. Browse the contents of file file2 in your home directory using a relative pathname
on the ISHELL main panel.
The working directory can be referred to by a dot (.).
____________________________________________________________
__ 13. Create a new directory in your home directory called labs. Use these permissions:
cl
__ 14. Try to create a new file called Lab2a in the labs directory.
Ex
____________________________________________________________
pr
____________________________________________________________
__ 15. Change the permission bits for the labs directory to allow the owner to list the
directory and add new files in it.
Edit the mode fields to change the permission bits.
Question: What is the permission expressed in octal value that allows this?
____________________________________________________________
11-6 z/OS Fundamentals
V8.0
Student Exercises
EXempty
__ 16. Try again to create a new file called Lab2a in the labs directory.
See previous instructions if you don't remember how to create a new file,
or use F1 to get help.
__ 17. Write a few lines of text in the new file.
Choose the Edit action to edit a file.
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 18. Copy members PROG1, PROG2, PROG3 from the z/OS PDS called
D80WW.ES10V11.OMVS.LABS and add the suffix c to the files.
On the panel where you specify the name of the PDS and some copy
options, you can also specify a suffix for the files that will be copied.
__ 21. If you have time, try any other action that you would like to try, or some actions you
would like to practice more.
pr
Ex
cl
__ 22. Below are some additional optional exercises to get you more familiar with the ISPF
UNIX shell environment.
11-7
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Placing the cursor under any of the actions listed on the action bar and pressing
the Enter key, results in a pop-up window (also called pop-up menu or pull-down
menu) for that action being displayed. The window shows a list of actions that
can be chosen.
Use the help key (PF1) on any field if you do not know what to do.
Which actions can be done for File?
_______________________________________________________________
How can you display the attributes for a file or directory?
____________________________________________________________
What does the asterisk (*) on actions in the File_System and Setup mean?
____________________________________________________________
pr
Ex
cl
V8.0
Student Exercises
If / (forward slash) is not already specified on the ISH main panel, enter it as
shown on the following panel.
EXempty
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
- Press Enter.
- Select an action bar choice.
- Specify an action code or command on the command line.
More:
/_______________________________________________________________
________________________________________________________________
________________________________________________________________
EUID=163770550
There are different methods for displaying the contents of a directory. See
if you can find one way of doing it.
_______________________________________________________________
__ 2. Display (list) the contents of the directory bin in the root file system.
__ a. Find the directory bin on the root directory list and choose the option to list its
contents.
- Did you do it the same way as above, for the root?
cl
____________________________________________________________
Ex
__ 3. Sort the directory list you just displayed. Sort items by size, then sort by last date.
For better viewing, make sure you enabled fields display in the directory list, by
going back to primary menu, then options, then dir list, and enable the fields to
display permission bits (octal display only), change time, owner, and size.
pr
__ a. Go back to root directory list (/); enter the command sort in the command line,
and select sort by size (or tab to Commands, then opt2s.
- Can you also sort by other criteria than size?
____________________________________________________________
11-9
Student Exercises
__ b. You can also put the cursor on any of the column titles to sort on the desired
criteria, and press Enter; try it for the Changed-GMT, Size, and Filename.
------Size
32768
8192
27
61440
184320
69632
172032
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
EUID=1
/bin/
Type Perm Changed-GMT
Owner
_ Dir
755 2006-06-28 20:20 OMVSKERN
_ Dir
755 2006-07-08 17:25 OMVSKERN
_ Syml
777 2006-02-14 20:59 OMVSKERN
_ File
755 2005-05-17 17:51 OMVSKERN
_ File
755 2005-05-17 17:51 OMVSKERN
_ File
755 2005-05-17 17:51 OMVSKERN
_ File
755 2005-05-17 17:51 OMVSKERN
Default sort sequence is file name mixed case. How can this default be
changed?
____________________________________________________________
__ a. Take note that the short form of Browse is B. If you remember this, you can use B
directly when you want to browse a file instead of prompting the pop-up menu to
choose actions from.
__ 5. Look at dev in the root file system.
__ a. Look at /dev.
____________________________________________________________
__ 6. If you want to display the content of /dev as a directory and not the content of the
symlink (it points to $SYSNAME/dev), you must append / (forward slash) after /dev,
and specify /dev/; try it now; it should display some special files like null, random,
console.
__ 7. Create some new files called newfile, newfile2.... in the /u/es10/students/tsofsxx
directory, where tsofsxx is your TSO user ID.
Ex
cl
__ a. To create a new file, you have to go back to the main ISHELL panel, input the file
name on the pathname (example: /u/es10/students/tsofsxx/newfile2), then press
Enter (or select option File, then 1 (New)).
__ b. Use filetype regular file, and set the permission bits to 755.
pr
____________________________________________________________
V8.0
Student Exercises
EXempty
__ 8. There is also another easier way to create a new file or directory using the ishell, by
entering n in front of the . special directory (see example below)
EUID=1
Type
n Dir
_ Dir
_ File
/u/tsa0001/
Filename
.
..
.sh_history
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
You are then prompted to create either a file (2) or directory (1) or else.
__ 9. Display the contents of your /u/es10/students/tsofsxx directory now to see the new
files there.
__ a. Do this the same way as you listed the root directory.
- Can you browse an empty file this way?
____________________________________________________________
__ 10. Edit one of the new files and add a few lines of text in the file.
The editor is the ISPF editor
PF3 saves the file and returns from editing the file.
______________________________________________________________
Note
The following items create three new files. Each create uses a different set of panels. This
demonstrates that there are frequently several ways to accomplish a task in the ISHELL.
__ 11. Create a new file called: /u/es10/students/tsofsxx/test1 using any method you want,
for instance:
cl
Ex
pr
__ c. Set permission bits to 755 and select option to create a regular file.
11-11
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ 14. Try to find in which filesystem all your UNIX files have been created.
__ c. You have a direct shortcut to any of the previously used directories, which you
can select using S or / (forward slash).
__ d. You can now use the ref command on any panel, to display the reference list.
Since z/OS 1.9, ISPF now provides a direct interface to edit/view/browse UNIX files and
directories. This interface is called UDLIST. In the VIEW (opt1) and EDIT (opt2) panels of
ISPF, you can now enter UNIX files and directory paths directly in the Other Partitioned,
Sequential or VSAM Data Set, or z/OS UNIX file, instead of specifying an MVS classical
non-UNIX data set.
__ 16. Go to ISPF primary option 2 (EDIT), and enter /u as the path name.
ISPF Library:
Project . .
Group . . .
Type . . .
Member . .
. TSOFT98
. ES10
. . .
. . .
. . .
. PDS
.
(Blank or pattern for member
pr
Ex
cl
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ISREDM01
Edit Entry Panel
Command ===>
Workstation File:
File Name . .
__ 17. Now select your own directory, by entering L in front of tsofsxx as the path name.
V8.0
Student Exercises
EXempty
Menu Utilities View Options Help
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ISRUUDL0
z/OS UNIX Directory List
Row 1 to 6 o
Command ===>
Scroll ===> C
Pathname . : /u/es10/students/tsoft98
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Command Filename
Message
Type Permission Audit Ext Fmat
--------------------------------------------------------------------------.
Dir rwxr-xr-x fff--..
Dir rwxr-xr-x fff--.sh_history
File rw------- fff--- --s- ---file1
File rwxr-xr-x fff--- --s- nl
file2
File r--r--r-- fff--- --s- nl
test1
File rwxr-xr-x fff--- --s- ----
The same UDLIST interface is available in ISPF option 3.17; go to ISPF 3.17; you
can use the REFLIST panel option to retrieve and work with one of the last used
UNIX directories, or specify a starting directory name in the Pathname; try it with
your home directory /u/es10/students/tsoft98.
Pathname . . . /u/es10/students/tsoft98
pr
Ex
cl
Note that in the Options you can change the column arrangement, as well as the
width of columns.
sssssss
o 8 of
==> PAG
Fmat
-------
-------
11-13
Student Exercises
__ 18. You can also run USS commands from TSO option 6 with the OSHELL and execute
TSO command OSHELL to run various shell commands with the OSHELL. Try the
following under TSO command option 6:
__ a. OSHELL ps -ef
__ b. OSHELL ls -al
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
__ c. OSHELL id
__ d. OSHELL df
__ e. and so forth.
Note
The UNIX shell environment (OMVS) is not covered in this course; Courses OP05 (intro)
and OP25 (advanced) are the classes to be attended to learn more about z/OS Unix
System Services (USS).
pr
Ex
cl
End of exercise
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#01
cl
LAB5#11
//***************************************************************
//* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#11) ***
//* DOC: JOBCARD automatically generated by SUBMIT Command ***
//***************************************************************
//STEP1 EXEC PGM=IEBCOPY
//IN DD DISP=SHR,DSN=D80WW.ES10V11.CNTL
//OUT DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
SELECT MEMBER=JOBCARD
pr
Ex
AP
A-1
Student Exercises
LAB5#12
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#13
pr
Ex
cl
A-2
z/OS Fundamentals
V8.0
Student Exercises
LAB5#14
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
A-3
Student Exercises
LAB5#15
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#16
pr
Ex
cl
A-4
z/OS Fundamentals
V8.0
Student Exercises
LAB5#17
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#21
cl
pr
Ex
AP
A-5
Student Exercises
LAB5#22
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#23
cl
LAB5#24
pr
Ex
A-6
z/OS Fundamentals
V8.0
Student Exercises
LAB5#25
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
A-7
Student Exercises
LAB5#31
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
A-8
z/OS Fundamentals
V8.0
Student Exercises
LAB5#32
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
A-9
Student Exercises
LAB5#33
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
................................................................
//*THE CATALOGUED PROCEDURE, COPY, SHOULD BE LIKE THE FOLLOWING //*
//COPY
PROC PROG=IEBCOPY,INDS=,DISPO=,OUTDS=,LIKEDS
//S1
EXEC PGM=&PROG
//SYSUT1
DD DISP=&DISPI,DSN=&INDS
//SYSUT2
DD DISP=&DISPO,DSN=&OUTDS,
//
LIKE=&LIKEDS
//SYSPRINT DD SYSOUT=*
//SYSIN
DD DUMMY
................................................................
V8.0
Student Exercises
LAB5#34
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
A-11
Student Exercises
LAB5#41
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
V8.0
Student Exercises
LAB5#42
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
A-13
Student Exercises
LAB5#43
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
LAB5#44
pr
Ex
cl
V8.0
Student Exercises
SORTOUT1
Johanna Josef 0976543 RZ
Zulupali Wolf 3131515 RZ
Zieglei Erich 1111123 VS
Aar Rolf 1131515 RZ
Bachlauf Josef 4011124 RZ
Barney Werner 3002511 RZ
Bausch Hugo 7002314 V8
Endrebex Werner 7239744 RZ
Aar Karl 1002000 V6
Albert Otto 1002222 V7
Binsen Josef 2002311 RZ
Bruckner Hugo 8002313 V3
Degenfest Ernst 6877777 V0
Duftnote Otto 6232323 RZ
Engadino Otto 1111222 RZ
Gretschg Otto 8822233 MZ
Grossauf Josef 1172922 RZ
Max Hugo 0974758 RZ
Ortgang Josef 1171819 RZ
Porter Ernst 4228645 AZ
Reichel Josef 0001010 AZ
Rockel Heinrich 1123456 RZ
Salfer Karl 0974365 BZ
Szab Gustav 1221022 BZ
Weiss Heinz 3345303 AZ
Wittmed Karl 0519751 RZ
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
5
4
3
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
pr
Ex
AP
A-15
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
SORT Examples
pr
Ex
AP
B-1
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Example:
//INFILE DD DSN=MY.DATASET.DATA,DISP=SHR
SEQUENTIAL
File is not present.
//ddname DD DUMMY,
//
DCB=(LRECL=rec-len,BLKSIZE=blk-size,RECFM=rec-format)
Example:
//INFILE DD DUMMY,
//
DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
cl
Ex
Example:
//INFILE DD DSN=MY.DATASET.DATA,DISP=SHR
pr
Example:
//INFILE DD DSN=MY.DATASET.DATA(0),DISP=SHR
B-2
z/OS Fundamentals
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Example:
//INFILE DD DSN=MY.DATASET.DATA(M1),DISP=SHR
or OLD,PASS
Example:
//INFILE DD DSN=&&TEMP,DISP=(OLD,DELETE)
VSAM
//ddname DD DSN=dataset-name,DISP=SHR
Example:
//INFILE DD DSN=MY.DATASET.DATA,DISP=SHR
SEQUENTIAL
cl
Example:
//INFILE DD DUMMY,
//
DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
Ex
AP
Spooled to printer
//ddname dd SYSOUT=printer-class
pr
Example:
//OUTFILE DD SYSOUT=*
B-3
Student Exercises
//
UNIT=diskunit,SPACE=(TRK,1)
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Example:
//OUTFILE DD DSN=MY.DATASET.DATA,DISP=(NEW,CATLG,DELETE),
//
UNIT=SYSDA,SPACE=(TRK,1)
Tape, non-gdg.
//ddname DD DSN=dataset-name,DISP=(NEW,CATLG,DELETE),
//
UNIT=tapeunit
//* other parameters may be required by your company
Example:
//ddname DD DSN=MY.DATASET.DATA,DISP=(NEW,CATLG,DELETE),
//
UNIT=TAPE
//* other parameters may be required by your company
Example:
//OUTFILE DD DSN=MY.DATASET.DATA(+1),DISP=(NEW,CATLG,DELETE),
//
UNIT=SYSDA,SPACE=(TRK,1),
//
DCB=MODEL.DSCB
optional at some companies. find its name
Ex
cl
Example:
//OUTFILE DD DSN=MY.DATASET.DATA(M1),DISP=SHR
pr
Temporary disk..
//ddname DD DSN=&&dataset-name,DISP=(NEW,PASS,DELETE),
//
UNIT=diskunit,SPACE=(TRK,1)
Example:
//OUTFILE DD DSN=&&TEMP,DISP=(NEW,PASS,DELETE),
//
UNIT=SYSDA,SPACE=(TRK,1)
B-4
z/OS Fundamentals
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Tape, gdg.
//ddname DD DSN=dataset-name(+1),DISP=(NEW,CATLG,DELETE),
//
UNIT=tapeunit,
//
DCB=model-dscb
optional at some companies
cl
Example:
//OUTFILE DD DSN=MY.DATASET.DATA(+1),DISP=(NEW,CATLG,DELETE),
//
UNIT=TAPE,
//
DCB=MODEL.DSCB
optional at some companies. find out it
pr
Ex
AP
B-5
Student Exercises
Defining VSAM
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//*
DEFINE A VSAM KSDS
//DEFKSDS EXEC PGM=IDCAMS
//SYSPRINT DD
SYSOUT=*
//SYSIN
DD
*
/* the trailing - is for continuation */
/* if delete fails there will be an error message which you can ignore */
DELETE (userid.VSAM.KSDS) CLUSTER
DEFINE CLUSTER NAME(userid.VSAM.KSDS) CYLINDERS(1,1)
KEYS(10,0) /* length displacement */ RECORDSIZE(80,80) /* avg max */
INDEXED) /* ksds */
/*
Some options for defining VSAM:
RECOVERY
SPEED
UNIQUE
SUBALLOCATE
REPLICATE
NOREPLICATE
REUSE
cl
NOREUSE
SHAREOPTIONS
pr
Ex
region means roughly this CICS (an MVS can have more than one CICS
running)
1
Many jobs can read at same time.
2
Many jobs can read, only one can write.
3
Many jobs can read, many jobs can update, you are on your own regarding data
integrity.
4
Many jobs can read, many jobs can update.
system means roughly this MVS
3
Many jobs can read, many jobs can update, you are on your own regarding data
integrity.
B-6
z/OS Fundamentals
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//*
DEFINE A VSAM ESDS
//DEFESDS EXEC PGM=IDCAMS
//SYSPRINT DD
SYSOUT=*
//SYSIN
DD
*
DELETE (userid.VSAM.ESDS) CLUSTER
DEFINE CLUSTER +
NAME(userid.VSAM.ESDS) CYLINDERS(1,1)
RECORDSIZE(80,80)
NONINDEXED)
//*
DEFINE A VSAM RRDS
//DEFRRDS EXEC PGM=IDCAMS
//SYSPRINT DD
SYSOUT=*
//SYSIN
DD
*
DELETE (userid.VSAM.RRDS) CLUSTER
DEFINE CLUSTER
NAME(userid.VSAM.RRDS) CYLINDERS(1,1)
RECORDSIZE(80,80)
NUMBERED)
/*
cl
Ex
AP
pr
/*
//INDD DD *
ELENA
LINDA
NADIA
SUSAN
/*
B-7
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
B-8
z/OS Fundamentals
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
Notes:
IDCAMS will copy any of the following types:
Sequential
PDS member
VSAM
ISAM
to any of the following:
Sequential
PDS member
VSAM
ISAM
This JCL will clobber any data that already exists in the output file.
However, if the output file is VSAM and you want to clobber it, you must add
the keyword REUSE, for example:
REPRO INFILE(INFILE) OUTFILE(OUTFILE) REUSE
and you must have defined the VSAM cluster with REUSE.
pr
Ex
AP
B-9
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
pr
Ex
AP
B-11
Student Exercises
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
The ISPF Search. Lower overhead, wont tie up your terminal during search.
cl
pr
Ex
AP
B-13
Student Exercises
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
V8.0
Student Exercises
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//
ELSE
//ERASE
EXEC PGM=IEFBR14,COND=(0,LE)
//OUTPDS
DD DSN=your-id.name-of-backup-lib,DISP=(MOD,DELETE),
//
UNIT=SYSDA,SPACE=(TRK,0)
//
ENDIF
pr
Ex
AP
B-15
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
V8.0
Student Exercises
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//SYSIN
DD
*
COPY INDD=((INPDS,R)),OUTDD=OUTPDS
SELECT MEMBER=MEM1
SELECT MEMBER=MEM2
/*
pr
Ex
AP
B-17
Student Exercises
IEFBR14
Using IEFBR14 to delete a file. If the file is not found,
there will be no error message and no high return code.
EXEC PGM=IEFBR14
DD DSN=your-id.name-of-backup-lib,DISP=(MOD,DELETE),
UNIT=SYSDA,SPACE=(TRK,0)
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//ERASE
//OUTPDS
//
//*
EXEC PGM=IEFBR14
DD
DSN=dsn-to-be-used-later-in-job,
UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(MOD,PASS),
LRECL=133,RECFM=FB,BLKSIZE=27930
pr
Ex
cl
//FINDPASS
//DD1
//
//
//*
V8.0
Student Exercises
SORT Examples
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
//* to sort
//SORTIT EXEC PGM=SORT,PARM=ABEND
//SYSOUT DD SYSOUT=*
//SORTIN DD * number in column 1, name in 10, state in 19
9283873 JOAN
CT
7023232 JANE
CN
8432343 MARIO
MA
5549023 JILL
CT
6998781 JENNIFER VT
8432343 MURIEL
RI
/*
//SORTOUT DD SYSOUT=*
//SYSIN
DD *
* sort by name
SORT FIELDS=(10,9,CH,A),DYNALLOC=(SYSDA,6),FILSZ=E2000
/*
//* END OF JOB
cl
pr
Ex
AP
B-19
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
9283873 JOAN
CT
7023232 JANE
CN
8432343 MARIO
MA
5549023 JILL
CT
/*
//SORTOUT DD SYSOUT=*
//SYSIN
DD *
SORT FIELDS=COPY
/*
//* END OF JOB
//*
COPY BUT SKIP 3 RECORDS
//SORTIT EXEC PGM=SORT,PARM=ABEND
//SYSOUT DD SYSOUT=*
//SORTIN DD * number in column 1, name in 10, state in 19
9283873 JOAN
CT
7023232 JANE
CN
8432343 MARIO
MA
5549023 JILL
CT
6998781 JENNIFER VT
8432343 MURIEL
RI
/*
//SORTOUT DD SYSOUT=*
//SYSIN
DD *
SORT FIELDS=COPY,SKIPREC=3
/*
cl
//*
COPY. START WITH 4TH RECORD. STOP AFTER PRINTING 2 RECORDS
//SORTIT EXEC PGM=SORT,PARM=ABEND
//SYSOUT DD SYSOUT=*
//SORTIN DD * number in column 1, name in 10, state in 19
9283873 JOAN
CT
7023232 JANE
CN
8432343 MARIO
MA
5549023 JILL
CT
6998781 JENNIFER VT
8432343 MURIEL
RI
/*
//SORTOUT DD SYSOUT=*
//SYSIN
DD *
SORT FIELDS=COPY,SKIPREC=3,STOPAFT=2 STOP AFTER PRINTING 2
/*
pr
Ex
AP
B-21
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
//*
COPY BUT NOT IF LITERAL CT IS IN COLUMN 19 OF INPUT
//SORTIT EXEC PGM=SORT,PARM=ABEND
//SYSOUT DD SYSOUT=*
//SORTIN DD * number in column 1, name in 10, state in 19
9283873 JOAN
CT
7023232 JANE
CN
8432343 MARIO
MA
5549023 JILL
CT
6998781 JENNIFER VT
8432343 MURIEL
RI
/*
//SORTOUT DD SYSOUT=*
//SYSIN
DD *
SORT FIELDS=COPY
COPY BUT
OMIT
COND=(19,2,CH,EQ,C'CT') NOT IF CT IN COL 19
/*
V8.0
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
pr
Ex
AP
B-23
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
cl
//*
//*syncsort to eliminate duplicates
//* in: seq
//* out: seq
//SYNCSORT EXEC PGM=SYNCSORT
//SYSOUT
DD
SYSOUT=*
//SORTIN
DD
DISP=SHR,
<-the input
//
DSN=the.input.dsn
//SORTOUT DD
DISP=(NEW,CATLG), <-the output
//
UNIT=SYSDA,LIKE=the.input.dsn,
//
SPACE=(TRK,(1,1),RLSE)
//SYSIN
DD *
SORT FIELDS=(1,80,CH,A)
SUM FIELDS=NONE
/*
//*
//*
//*
//*syncsort to include records on a condition
//*uses OUTREC to construct the output record
V8.0
Student Exercises
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
pr
Ex
AP
B-25
pr
Ex
cl
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
Student Exercises
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
backpg
pr
cl
Ex
V8.0
Back page
pr
u
oy si
ec vo
to fo
C rm
.F a
.T ci
.I. n
C
.
cl
Ex
CONTACTO
Telfono
91 761 21 78
Pngase en contacto con nuestro equipo y le
informaremos de cualquier duda o cuestin
que pueda surgirle.
Email
formacion@arrowecs.es
Mndenos un email y le atenderemos
enseguida.
Online
@Arrow_Edu_ES
O bien puede contactarnos a travs de
nuestro perfil en Twitter.
Vistenos
Arrow ECS Education Services
Avenida de Europa 21,
Parque Empresarial La Moraleja
28108 Alcobendas, Madrid
EDUCATION
S