Business Intelligence
Data Centre
Cloud
Mobility
Enterprise Computing Solutions
Student Manual
Dirección General de Formación CONSEJERÍA DE EMPLEO, TURISMO Y CULTURA
Comunidad de Madrid
EDUCATION S
E
R
V
I
C
E
S
UNIÓN EUROPEA FONDO SOCIAL EUROPEO El Fondo Social Europeo invierte en tu futuro
V8.0
cover
Front cover
Fundamental System Skills in z/OS (Course code ES10)
Student Exercises ERC 11.0
Student Exercises
Trademarks
IBM® is a registered r egistered 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/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
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Pentium is a trademark or registered r egistered trademark of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Windows is a trademark of Microsoft 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. Java and all Java-based trademarks and logos are trademarks t rademarks or registered trademarks of Oracle and/or its affiliates. June 2013 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 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, 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 2001, 2013. 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.
Student Exercises
Other product and service names might be trademarks of IBM or other companies.
i ii
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Exercises
iv
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
TOC
Contents Trademar Trademarks ks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Exercises description description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Lab environment environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Exercise 1. System familiarization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Exercise 2. Allocate new data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Part 1: Allocate a physical physical sequential (PS) data set . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Part 2: Allocate a partitioned data set (PDS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Part 3: Allocate a partitioned data set extended extended (PDS/E) . . . . . . . . . . . . . . . . . . . 2-2 Exercise 3. ISPF editor primary primary commands commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Exercise 4. ISPF editor line command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Part 1: ISPF editor line commands commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Exercise 5. Copy/move/rename/delete Copy/move/rename/delete data sets sets and members members . . . . . . . . . . . . . . . 5-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Exercise 6. Data set lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Part 1: Data set lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Part 2: UNIX directory list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Exercise 7. Using TSO/E commands commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Part 1: TSO commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Exercise 8. Submit a job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 Part 1: LAB: Submit a job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 Exercise 9. JCL exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 Part 1: Copy selected selected member of PDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 Part 2: Copy an entire data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 Part 3: Copy/replace a selected member member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3 Part 4: Perform a secure compress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
© Copyright IBM IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Contents
v
Student Exercises
Part 5: Compress a data set set inplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 6: Copy a PDS and a PDSE PDSE data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optional exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 1: Copy instream instream data to PS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 2: Copy a sequential sequential data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 3: Print a sequential sequential data set to SYSOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 4: Print a PDS member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Part 5: Create a PDS member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-3 9-4 9-6 9-6 9-6 9-6 9-7 9-7
Exercise 10. Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Part 1: Override DD-statements DD-statements of an in-stream procedure procedure . . . . . . . . . . . . . . . . 10-2 Part 2: Run cataloged procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Part 3: Create cataloged cataloged procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3 Part 4: Use of DFSORT (ICEMAN) (ICEMAN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4 Optional exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6 Part 1: Create PS from in-stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6 Part 2: Conditional processing processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6 Part 3: Route a Job to INTRDR INTRDR using IEBGENER . . . . . . . . . . . . . . . . . . . . . . . 10-7 Exercise 11. ISHELL and hierarchical file system . . . . . . . . . . . . . . . . . . . . . . . . . .11-1 Exercise instructions instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 Part 1: ISHELL introduction introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 Part 2: Introduction to the file system system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 Part 3: Customize ISHELL ISHELL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3 Part 1: Create a hierarchical file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5 Part 2: Step 2 (Managing (Managing files) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5 Optional exercises: exercises: Part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8 Part 1: Introduction to the file system system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8 Appendix A. TSOFS01, TSOFS02, TSOFS02, TSOFS03, exercise solutions solutions . . . . . . . . . . . . . . A-1 Appendix B. JCL: Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
vi
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 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 Machines Corporation. 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™
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in the United States, and/or other countries. Pentium is a trademark or registered r egistered trademark of Intel Corporation or its subsidiaries in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Windows is a trademark of Microsoft 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. Java and all Java-based trademarks and logos are trademarks tr ademarks or registered trademarks of Oracle and/or its affiliates. Other product and service names might be trademarks of IBM or other companies.
© Copyright IBM IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Trademarks
vii
Student Exercises
vi ii
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
pref
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 • Submit batch jobs - On the ESSMVS1 system, these data sets have names starting with D80WW.ES10V11.
The number of user IDs required r equired depends on the number of students or teams. Each exercise in this course is divided into sections as described below. Exercise Instructions — This section contains what it is you are to accomplish. There are guidelines on how to perform the tasks. You are given the opportunity to work through the exercise given what you learned in the unit presentation, using the unit Student Notebook , your past experience, and maybe a little intuition. Optional Exercise — This section gives you additional exercises to perform relating to the unit of discussion. It is strictly optional and should be performed when you have completed the required exercises. This section might help round out the hands-on experience for a related unit. Two versions of these instructions are available: one with hints and Two 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 t he answers given in hints are examples only, and in other cases, answers are correct answers.
© Copyright IBM IBM Corp. 2001, 2013
Exercises description
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
ix
Student Exercises
x
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
pref
Lab environment These labs are installed on the ESSMVS1 system in Montpellier (France). To To access them, a country must acquire user IDs appropriate for the course. For more information on connectivity, connectivity, and on scheduling systems, please contact Lloyd Cox or Hervé Bousquet. The interactive exercises for ES10 are designed for and supported by the z/OS system installed in Montpelier France. Currently,, the programming systems installed are: Currently z/OS - Version 1, Release 13. ISPF/PDF - Version 6, Release 3. TSO/E LOGON Command and LOGON EXECs: The Instructor/Developer and Student TSO User IDs are defined to invoke ES10 EXEC when the user signs on to TSO. The syntax of the LOGON Command is: %C12 ES10
The purpose of this exec is to t o allocate all the student’s data sets, at time of the first logon. This edition of course notes supports the following systems: • WW Learning Services ESSMVS1 system 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 i s 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 in the minimum time. Rather,, as your aim is Rather i s to learn, you should experiment and try new ideas. Surprisingly, 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 . 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 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
beyond the problem statement and add your own enhancements to the programs.
Solutions We do not regard it as cheating to look at the solutions. Try to do the exercises without looking at the solutions, but there is no point wasting time. If you get stuck, ask a classmate, ask the instructor, or look at the solutions. Remember that the solutions are not perfect. They are just one way to do the exercise, and pertain to the knowledge level of the part of the course the exercise is presented. In some cases, the same exercise is done at different stages in the course with different solutions. We do this to illustrate the advantages of different techniques. techniques. You find the solutions in the data set: • D80WW.ES10V11.SOLUTION .
TSO user IDs for the course 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 TSOFT00-24, TSOFT25-49, TSOFT50-74, and TSOFT75-99. Passwords for production student IDs are initialized prior to class using the standard PW assignment B4cccc4B, where cccc is the 4-digit class number. For the IBM learning systems, the usual RACF rules apply, 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 f orget it, and to resume your user ID if you exceed the password retry limit. The password you create has to conform to the IBM I BM internal rules, of
xii
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
which GOOD1DAY is an example. Note the integer, which is neither the first nor the last character.
pref
• __________ on the ESSMVS1 system The instructor provides the password. Do not change the password, unless the instructor directs you to change it.
Procedure for logging onto TSO 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 the IBM network to access the appropriate appropriate system. The actual logon procedure is very standard.
Initial logon procedure (ESS system) 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: To do exercise work, you must turn on your training PC connecting you to IBM's network. Turn on the power switch to your computer and to your screen. Wait for Windows to boot and ask you for your logon. In the logon dialog, press the Windows-Enter-key without changing the user's name or giving a password. You should now see the indicated Desktop. 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.
© Copyright IBM IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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
1
Wednesday - December 16, 2009 ! APPLNAME STATUS
---------------------------------------------------------------------------------------------------------------------------------------------------------TSOE
UP
14:03
!
!
UP
12:26 12:2 6
!
!
ESSMVS1
UP
14:03
!
!
ESSMVS5
UP
16:51
!
!
MOPE DVM1
UP
12:36 12:3 6
!
!
MOPE DVM2
UP
12:26 12:2 6
!
!
ESSMVS7
UP
06:14
!
!
EDUCMVS
DOWN
13:44
!
!
A4OFS
DOWN
09:58
!
!
EDUCPLX1
UP
12:26
!
!
EDUCPLX2
UP
12:26
!
!
!
!
!
!
!
!
VM2
--------------------------------------------------------------------------------------------------------------------------------------------------------- Help Desk Desk (001)404-238-6000 (001)404-238-6000
INSTHELPàUS.IBM.COM INSTHELPàUS.IBM.COM (888)502-5511(T (888)502-5511(TL L 888-6000)
IBM Mgt Approved Usage Only ==> PF1=Help PF2=ESSMVS1 PF3=Return PF4=VM2
PF5=ESSMVS5 PF5=ESSMVS5 PF7=Backward PF7=Backward PF8=Forward
Type in ESSMVS1 and press Enter or press PF2 to switch to ESSMVS1. 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 necessary.. If you are on the wrong system, you have to return to the initial logon panel (PF3). The message “IKJ56700A ENTER USERID - “on your your PCOM Session confirms connectivity to ESSMVS1. Enter your TSO User ID as prompted. When prompted with: IKJ56700A ENTER USERID -
enter your TSO/E user ID, as given by your instructor (TSOSFnn). You have to enter the administrator assigned password once and your new password twice (for confirmation). Enter the password and press x iv
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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. Starting a TSO-ISPF/PDF Session. ------------------------------- TSO/E LOGON -----------------------------------
Enter LOGON parameters below:
Userid
===> TSOSF00
Password
===>
RACF LOGON parameters:
New Password ===>
Procedure ===> STUDENT
Group Ident
===>
Acct Nmbr ===> 1ES26G12
Size
===> 4096
Perform
===>
Command
===> %C12 ES26
Enter an 'S' before each option desired below: -Nomail
PF1/PF13 ==> Help
-Nonotice
PF3/PF15 ==> Logoff
-Reconnect
PA1 ==> Attention
-OIDcard
PA2 ==> Reshow
You may request specific help information by entering a '?' in any entry field.
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: ICH70001I TSOSF00 LAST ACCESS AT 08:18:53 ON MONDAY, NOVEMBER 30, 2009 TSOSF00 LOGON IN PROGRESS AT 05:55:52 ON DECEMBER 16, 2009 ********************************************* *** THIS SYSTEM IS TO BE USED FOR *** *** IBM MANAGEMENT APPROVED PURPOSES ONLY *** *** USE IS SUBJECT TO AUDIT AT ANY TIME *** *** BY IBM MANAGEMENT *** ********************************************* ààààààààààààààààààààààààààààààààààààààààààààààààààààààà
© Copyright IBM IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Lab environment
xv
Student Exercises
You should see the ISPF Main Menu. If you see the READY prompt, enter ISPF.
Password rules IBM has installed a standard (to all IBM sites) RACF exit to enforce additional password rules. The rules are: • • • • •
Password must be at least eight characters in length Password must contain at least one numeric character Password must contain at least one alphabetic character Password must not be numeric in the first f irst or last position Password must not contain four consecutive characters of your current password • Password must not contain more than two consecutive repeating characters • Password must not contain your user ID Do not waste time here. If you have any difficulties, seek help from your instructor or other students immediately. immediately. Once you are into TSO, remember this rule: whenever you see three red asterisks (***), all you can do is read the screen and press i gnored. Enter. Anything else you type is ignored.
x vi
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 1. Sy Syste stem m famil familia iari riza zati tion on What this exercise is about The instructor uses this exercise to walk you through your first logon to the lab system. You You do a (very quick) tour t our of logging on to TSO, starting ISPF PDF and setting some basic ISPF options.
What you should be able to do At the end of the exercise, you should be able to: • Log on to your lab TSO user session session • Start Start up up the the ISPF ISPF dialog dialog
Requirements This Exercise Guide
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-1
Student Exercises
Exercise instructions 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 class’s lab system varies. The instructor will provide the specific information for your environment.
The MOP CLPz menu Netid= USIBMES IBM Training Terminal= SLIPA130 Host = ESSCMC1 MOP CLPz PAGE 1 To Disc = LOGOFF 05:12 Tuesday Tuesday - October 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 CLPHELPàUS.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
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure disclosure restricted by GSA ADP Schedule Contract with IBM Corp
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: _________________________________ ______________________ ________________ _____ • ______________________ _________________________________ ______________________ ________________ _____ • ______________________ _________________________________ ______________________ ________________ _____ • ______________________ _________________________________ ______________________ ________________ _____ • ______________________ _________________________________ ______________________ ________________ _____ • ______________________ Access ESSMVS1 by pressing PF2 or entering ESSMVS1. Your user ID is _______________________________ Your password is _____________________________ 1-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
The logon screen ------------------------------- TSO/E LOGON -----------------------------------
Enter LOGON parameters below: Userid
===> TSOFT98
Password Password
===>
RACF LOGON parameters:
New Password Password ===>
Procedure ===> STUDENT
Group Ident
===>
Acct Nmbr ===> 1ES10G12 Size
===> 4096
Perform
===>
Command
===> %C12 ES10
Enter an 'S' before each option desired below: -Nomail -Nonotice -Reconnect
-OIDcard
PF1/PF13 ==> Help PF3/PF15 ==> Logoff PA1 ==> Attention PA2 ==> Reshow You may request specific help information by entering a '?' in any entry field
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
By now, you should have arrived at the TSO/E LOGON panel 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. The following is a short description of each of the fields as they appear on the logon panel: User ID
A TSO user ID is 1 to 7 characters in length. It starts with an alphabetic or national character (A-Z, #, ¢, @). All following characters can be alphanumeric or national characters (A-Z, 0-9, #, ¢, @).
Password
The password is 1 to 8 alphanumeric or national characters (A-Z, 0-9, #, ¢, @). Any combination of these characters can be used in the password. Certain installation-specific rules might apply. apply. The password is not visible during logon.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-3
Student Exercises
1-4
Procedure
A logon procedure name is required to log on to TSO. If you have more than one logon procedure, the value LOGON ensures that the procedure name entered is valid for the account number that you might have also entered. The procedure name is up to eight characters in length. The first character has to be alphabetic. All following characters can be alphanumeric or national (A-Z, 0-9, #, ¢, @).
Acct Nmbr
If you have been provided an account number, you might be required to enter it in order to logon to TSO. If the account number is required and you omit it, you are prompted to enter it. The account number has a maximum of 40 characters.
Size
This entry allows you to specify a region size for your TSO session. A default region size is used if none is specified.
Perform
This field is reserved for your performance group. The value has to be an integer from 1 to 255. Your installation might have authorized performance group values for you. If not, entering a value has no effect on your TSO session.
Command
You can enter a TSO command at logon time. This is processed after any command the TSO/E administrator has entered in the PARM field on the EXEC statement of the logon procedure. TSO/E does not execute the command you enter in the COMMAND field if the command specified in the PARM field of the logon procedure fails.
New Password
If your user ID is defined to RACF, RACF, you might want to change your password, or you might be required to do so. To change your password, enter your current password in the PASSWORD field, and then enter your new password in this field. The same password rules as for the old password apply. When you enter a new password in this field, you are prompted to verify the password. Only then, the password is changed.
Group Ident
If your user ID is defined to RACF, RACF, you can enter a RACF Groupid. Your RACF Groupid can be up to eight characters in length. The first character must be alphabetic or national (A-Z, #, ¢ or @). The remaining characters, if any, can also contain numerics (0-9).
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
-Nomail
By entering S before this option, you choose not to display messages intended specifically for you during logon processing. If you do not select this option, all messages intended for you are displayed on your terminal during logon.
-Nonotice
By entering S before this option, you elect not to receive messages intended for all TSO users during logon processing. If you do not select this option, all messages intended for all TSO users are displayed on your terminal during logon.
-Reconnect
By entering s before this option, you indicate that you want to reconnect your logon session if the session was disconnected. If the session was not disconnected and your user ID does not currently have a session established, logon processing occurs.
-OIDcard
If your user ID is defined to RACF and you want to enter data through the Operator Identification Card (OIDCARD), you are prompted to do so during the logon process. To enter data, slide your OIDCARD through your OIDCARD reader attached to your terminal.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-5
Student Exercises
Successful logon ICH70001I TSOFT98 TSOFT98
LAST ACCESS AT 10:19:59 ON MONDAY, OCTOBER 18, 2010
TSOFT98 LOGON IN PROGRESS AT 05:32:08 ON OCTOBER 19, 2010 ********************************************* ***
THIS SYSTEM IS TO BE USED FOR
***
*** IBM MANAGEMENT APPROVED PURPOSES ONLY *** ***
USE IS SUBJECT TO AUDIT AT ANY TIME
***
BY IBM MANAGEMENT
*** ***
********************************************* -----------------------------------------------------------------------------------------------------------If you have not selected a curriculum environment, you will not be able to initialize ISPF/PDF. Enter the environment selection command in the TSO logon panel Command field.
It will appear below:
-----------------------------------------------------------------------------------------------------------%C12 ======================================== ***
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure disclosure restricted by GSA ADP Schedule Contract with IBM Corp
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. (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.) We work with the Interactive System Productivity Facility/Program Development Facility (ISPF/PDF) next. __ 2. To start ISPF/PDF, ISPF/PDF, type ISPF or PDF (or an installation-defined alias) and press Enter. Your Your terminal should now display the ISPF Primary Option Menu as shown on the following page.
1-6
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
ISPF Primary Option Menu Menu Utilities Compilers Options Status Help -----------------------------------------------------------------------------ISPF Primary Option Menu Location : Option ===> 0 1 2 3 4 5 6 7 8 C E S SD 10 11
Settings View Edit Utilities Foreground Batch Command Dialog Test LM Facility Facility Classes ITS Menu ITS Schedule SDSF SCLM Workplace
Terminal and user parameters Display source data or listings Create or change source data Perform utility functions Interactive language processing Submit job for language processing Enter TSO or Workstation commands Perform dialog testing Library Library administrat administrator or functions functions Menus for specific Classes ITS extended menu ITS schedules Syslog Display and Search Facility SW Configuration Library Manager ISPF Object/Action 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
Enter X to Terminate using log/list defaults
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
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
We already introduced the ISPF Primary Option Menu and its main choices in the previous topic. __ 3. Your first task is now to alter the settings for your your ISPF/PDF session. session. Select the proper panel option (0), and proceed to the next page.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-7
Student Exercises
ISPF Settings Log/List Function keys Colors Environ Workstation Identifier Help ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss ISPF Settings Command ===> More: + Options Print Graphics Enter "/" to select option option Family Family printer printer type 2 Command line at bottom Device name . . . . / Panel display display CUA mode Aspect Aspect ratio . . . 0 / Long message in pop-up / Tab to action bar choices Tab to point-and-shoot fields General / Restore Restore TEST/TRACE TEST/TRACE options options Input field pad . . B Session Session Manager Manager mode Command Command delimiter delimiter . ; / Jump from leader dots Edit PRINTDS Command / Always show split line Enable EURO sign Member list options Enter "/" to select option / Scroll member list Allow empty member list Allow empty member list (nomatch) / Empty member list for edit only Terminal Characteristics Screen format 2 1. Data
2. Std
Terminal Type 3 1. 3277 F1=Hel F1=Help p F2=Spl F2=Split it F3=Exi F3=Exit t F10=Actions F12=Cancel
3. Max
4. Part
2. 3277A 3. 3278 F7=Bac F7=Backwa kward rd F8=For F8=Forward ward
4. 3278A F9=Swa F9=Swap p Nxt
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure disclosure restricted by GSA ADP Schedule Contract with IBM Corp
Use this panel to familiarize yourself with the ISPF settings. __ 4. Perform the following panel panel modifications and press press Enter after each selection to see how changes affect panel display. __ a. Display the command command line at the top of the screen. screen. __ b. Change the display display of the long message, message, so that it appears in a pop-up window window.. __ c. Enter an invalid selection selection on on the Command ===>______ line and press Enter. A nvalid command should now appear in the upper right short message reading I nvalid corner of your screen. __ d. Now press F1 to display the corresponding long message. The message ...is undefined should now appear in a pop-up window. window. Press F1 again for additional help. Return to ISPF Settings panel. __ e. To continue, clear the command command line and press Enter again.
1-8
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
__ f.
Try the Tab Tab key with and without Tab to action bar choices and Tab to point-and-shoot fields selected.
ISPF Settings: Action bar choices Log/List Function keys Colors Environ Workstation Identifier Help sssssssss Esssssssssssssssss Esssssssssssssssssssssssssssssssssss ssssssssssssssssssN N sssssssssssssss ssssssssssssssssssssssssssssss sssssssssssssss e 9 1. Non-Keylist Non-Keylist PF Key settings settings e Command = e 2. Keylist settings... e e 3. Tailor function key display e More: + Options e *. Show all function keys e Graphics Enter " e 5. Show partial partial function function keys e ly printer printer type 2 Comm e 6. Remove function key display e ce name . . . . / Pane e *. Use private private and shared shared e ct ratio . . . 0 / Long e 8. Use only shared e / Tab e 9. Disable keylists e Tab e *0. Enable keylists e l / Rest Dsssssssssssssssss Dsssssssssssssssssssssssssssssssssss ssssssssssssssssssM M t field pad . . B Session Session Manager Manager mode Command Command delimiter delimiter . ; / Jump from leader dots Edit PRINTDS Command / Always show split line Enable EURO sign Member list options options Enter "/" to select option / Scroll member list Allow empty member list Allow empty member list (nomatch) / Empty member list for edit edit only
Terminal Type 3 1. 3277 F1=Hel F1=Help p F2=Spl F2=Split it F3=Exi F3=Exit t F10=Actions F12=Cancel
2. 3277A 3. 3278 F7=Bac F7=Backwa kward rd F8=For F8=Forwar ward d
4. 3278A F9=Swa F9=Swap p Nxt Nxt
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
__ 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. __ 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. 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. __ 8. Return to the ISPF Primary Option Menu. __ 9. Select the option View.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-9
Student Exercises
ISPF Settings: Function keys reset Log/List Function keys Colors Environ Workstation Identifier Help ----------------------------------------------------------------------------- MVS1 TSOFT98 ISPF Settings Command ===> More: + Options Print Graphics Enter "/" to select option option Family Family printer printer type 2 Command line at bottom Device name . . . . / Panel display display CUA mode Aspect Aspect ratio . . . 0 / Long message in pop-up / Tab to action bar choices Tab to point-and-shoot fields General / Restore Restore TEST/TRACE TEST/TRACE options options Input field pad . . B Session Session Manager Manager mode Command Command delimiter delimiter . ; / Jump from leader dots Edit PRINTDS Command / Always show split line Enable EURO sign Member list options Enter "/" to select option / Scroll member list Allow empty member list Allow empty member list (nomatch) / Empty member list for edit only Terminal Characteristics Screen format 2 1. Data
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
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure disclosure restricted by GSA ADP Schedule Contract with IBM Corp
F1 is always HELP. F3 is always END or EXIT.
SCREEN. F9 has been reset to SWAP SCREEN. F12 has been reset to RETRIEVE.
Others later, as needed.
1-10 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
View a data set Menu RefList RefMode Utilities Workstation Help ------------------------------------------------------------------------------ MVS1 TSOFT98 View Entry Panel Command ===> ISPF Library: Project . . Group . . . Type . . . Member . .
. TSOFT98 . ES10 . CNTL .
. . .
. . .
. . .
(Blank or pattern for member selection list)
Other Partitioned, Sequential or VSAM Data Set, or z/OS UNIX file: Name . . . . . 'TSOFT98.ES10.TEXT' Volume Serial (If not cataloged)
+
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
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
__ 10. Enter DATA SET NAME....'' userid .ES10.TEXT' .ES10.TEXT' ' as a data set name (including the apostrophes), press Enter, and follow the instructions in the data set. ______________________ __________________________________ _______________________ ______________________ _____________________ __________ ______________________ __________________________________ _______________________ ______________________ _____________________ __________ ______________________ __________________________________ _______________________ ______________________ _____________________ __________
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-11
Student Exercises
ISPF Primary Option Menu Menu Utilities Compilers Options Status Help ----------------------------------------------------------------------------- MVS1 TSOFT98 ISPF Primary Option Menu Location : Option ===> x 0 1 2 3 4 5 6 7 8 C E S SD 10 11
Settings View Edit Utilities Foreground Batch Command Dialog Test LM Facility Facility Classes ITS Menu ITS Schedule SDSF SCLM Workplace
Terminal and user parameters Display source data or listings Create or change source data Perform utility functions Interactive language processing Submit job for language processing Enter TSO or Workstation commands Perform dialog testing Library Library administrat administrator or functions functions Menus for specific Classes ITS extended menu ITS schedules Syslog Display and Search Facility SW Configuration Library Manager ISPF Object/Action 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
Enter X to Terminate using log/list defaults
F1=HELP F7=UP
F2=SPLIT F8=DOWN
F3=END F9=SWAP
F4=RETURN F10=LEFT
F5=RFIND F11=RIGHT
F6=RCHANGE F12=RETRIEVE
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure disclosure restricted by GSA ADP Schedule Contract with IBM Corp
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. 11. To leave ISPF's Program Development Development Facility: __ a. Enter X on the command line or __ b. Press F3 or __ c. Select the corresponding corresponding Exit choice from the Menu pull-down menu. The heading of the next panel (as shown on the following visual) should read Specify Disposition of Log Data Set.
1-12 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Log data set disposition Specify Disposition of Log Data Set Command ===> Log Data Set Disposition Proc Proces ess s opti option on . . . 2 1. Prin Print t dat data a set set and and del delet ete e 2. Delete data set without printing 3. Keep Keep data data set set - Same Same (allocate same data set in next session) 4. Keep Keep data data set set - New (allocate new data set in next session) SYSOUT class class . . . . A Local printer ID or writer-name . . . List Data Set Options not available Press ENTER key to complete ISPF termination. Enter END command to return to the primary option menu. Job statement statement information: (Required for system printer) ===> //USERID JOB (ACCOUNT),'NAME' ===> //* ===> //* ===> //*
F1=Help F7=Up
F2=Split F8=Down
F3=Exit F9=Swap
F4= F10=Right
F5=RFind F11=Left
F6=RChange F12=Cursor
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
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 is is the user ID supplied by the instructor. userid .SPFLOGx.LIST .SPFLOGx.LIST, where userid __ 12. At the end of 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. Print data set and delete
Prints the data set, then deletes it. You must specify an output class or a local printer ID. If you specify an output class, ISPF submits a background job to print and delete the data set. If you specify a local printer ID, ISPF uses TSO's PRINTDS command to route the data set to the printer and then deletes the data set.
Delete data set without printing
Just deletes the data set.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-13
Student Exercises
Keep data set - Same
This option closes and frees the data set and allocates the same data set in the next session.
Keep data set - New
This option closes and frees the data set but allocates a new data set when starting the next ISPF session.
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. The line List Data Set Options not available indicates there is no list data set to print. If we performed a print under ISPF, ISPF, then a similar set of options are provided to dispose of the list data set.
1-14 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Logoff TSOFT98.SPFLOG1.LOG has been deleted. READY logoff TSOFT98 LOGGED OFF TSO AT 05:59:32 ON OCTOBER 19, 2010 ******
© Copyright IBM Corporation 2001, 2001, 2013. All Rights Reserved. Reserved. US Government Users Restricted Rights - Use duplication or disclosure restricted restricted by GSA ADP Schedule Contract with IBM Corp
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. 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.
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 1. System familiarization familiarization
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-15
Student Exercises
1-16 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 2. 2. Allo Alloca cate te new new data data se sets ts What this exercise is about This exercise provides an opportunity to create commonly used data set types and to get familiar with ISPF panel types.
What you should be able to do At the end of the exercise, you should be able to: • Allocate Allocate data data sets sets using ISPF panels panels • Be familiar familiar with with the operation operation of some some ISPF panels panels
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 2. Allocate Allocate new data sets
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
2-1
Student Exercises
Exercise instructions Part Part 1: All Alloca ocate te a physi physical cal sequ sequent ential ial (PS) (PS) data data set set .ES10.PS .ES10.PS according to the __ 1. Allocate a new sequential sequential data set named userid following specifications:
• 2 tracks primary space and 1 track secondary space • Fixed-length records • Record length 80 bytes • 9 records per single block 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 set has been allocated properly properly use the Data Set Information panel.
Part Part 2: All Alloca ocate te a part partiti itione oned d data data set set (PDS) (PDS) __ 3. Allocate a new, new, partitioned organized data data set named userid.ES10.PDS according to the following specifications: • 10 blocks primary space and 5 blocks secondary space • Directory size 2 blocks • Variable-length records • Blocked records • Block size determined by system • Record length 255 bytes
__ 4. To verify whether the data set set has been allocated properly properly use the Data Set Information panel.
Part 3: Allocate Allocate a partitio partitioned ned data set extende extended d (PDS/E) (PDS/E) __ 5. Allocate a new partitioned organized data set set extended named userid.ES10.PDSE according to the following specifications: • 5 blocks primary space and 1 block secondary space • Directory size 5 blocks 2-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
• Fixed-length records • Blocked records • Block size determined by system • Record length 80 bytes
__ 6. To verify whether the data set set has been allocated 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.
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 2. Allocate Allocate new data sets
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
2-3
Student Exercises
2-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exerci Exercise se 3. ISPF ISPF edit editor or primar primary y comm command ands s What this exercise is about This exercise provides an opportunity to use ISPF editor primary commands and inspect a simple REXX exec or program.
What you should be able to do At the end of the exercise, you should be able to: • Use some some of the more more useful useful ISPF ISPF editor editor primary primary command commands s • Appreciat Appreciate e the advan advantage tages s of a REXX REXX program program
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 3. ISPF editor primary commands
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
3-1
Student Exercises
Exercise instructions Use ISPF editor primary commands __ 1. Create a member called LITLGAME LITLGAME in the data set set you created called userid .ES10.PDS .ES10.PDS. __ 2. Edit LITLGAME, and copy in a member member called SKELEXEC SKELEXEC from the partitioned data set called D80WW.ES10V11.EXEC . __ 3. Perform the following modifications: modifications: __ a. Set the boundaries to 1-8 1-8 and change all xxxxxxxx to ANSWER . __ b. Reset the boundaries boundaries to 1-80 and change change all xxxxxxxx to NUMBER. __ c. Exclude all lines from the display display.. __ d. Display the first line containing 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 display that might have been previously excluded. excluded.
__ g. The first line must contain a comment comment with the word REXX. 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 40-50 and change SAY to Y/N . __ 4. Save your changes changes by entering Save on the command line. __ 5. Try starting your your little REXX-Exec by entering entering the following on the command command line: TSO EX 'userid.ES10.PDS(LITLGAME)' EXEC
Note
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, properly, go back to Step 1 and perform all steps again, but with a different member name (as LITLGAME already exists).
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
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 3. ISPF editor primary commands
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
3-3
Student Exercises
3-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 4. 4. IS ISPF PF edi edito torr line line com comma mand nd What this exercise is about This exercise provides an opportunity to use ISPF editor line commands to move and copy text.
What you should be able to do At the end of the exercise, you should be able to: • Move Move and and cop copy y tex textt • Over Overla lay y text text
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 4. ISPF editor editor line command
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
4-1
Student Exercises
Exercise instructions Part Part 1: ISPF ISPF edi edito torr line line com comma mand nds s 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. editor. __ 1. Edit userid .ES10.PDS .ES10.PDS and open a new member called TABLE. __ 2. Set up a line which looks looks exactly like this: =COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-000001 | | | | |
__ 3. Copy member TABLE TABLE from D80WW.ES10V11.CNTL after line 1. __ 4. The data will look line this: 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011
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 copy/overlay,, that is c and oo, to copy line 1 over the first four lines you copied in, so the result looks like: 000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011
4-2
| | | | |
z/OS Fundamentals
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
| | | | |
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
move/overlay,, that is m and oo, to move line 1 over the last six lines you copied EXempty __ 6. Use move/overlay in, so the result looks like: 000001 000002 000003 000004 000005 000006 000007 000008 000009 000010
| | | | | | | | | |
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
| | | | | | | | | |
Note
The former line 1 has disappeared because because of the move.
__ 7. Insert the following heading lines lines at the top of the table: Family Name Given Name USERID Phone =============================TOP OF TABLE========================
__ 8. Insert the following trailing line at the bottom of the 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 only the detail lines from display and and sort them by their last name. (Use (Use the online help function to find out about the proper syntax to sort only the excluded lines.) __ 10. Delete the entries Harrison through McDonald. __ 11. 11. Add a new line after Bush, and add: | Cyrus
| Will
| WCYRUS
| 31823
|
| 31945
|
__ 12. Repeat entry Davis, and change the repeated line to: | Davis
| Sarah
| SDAVIS
__ 13. Insert a new line after Newman, and enter Claudia as first name. __ 14. Use copy/overlay, copy/overlay, that is c and o, to copy the old entry Newman over the new line. __ 15. Change the user ID to CNEWMAN and the phone to 31654. __ 16. Exclude the detail lines. __ 17. Resort the detail lines lines by last name as the primary sort sort field and use given given name as the secondary sort field. © Copyright IBM IBM Corp. 2001, 2013
Exercise 4. ISPF editor editor line command
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
4-3
Student Exercises
__ 18. Review sorted lines to very very sort on primary and secondary secondary names. names. __ 19. Save your changes changes by entering Save on the command line.
End of exercise
4-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exerci Exercise se 5. Copy/m Copy/move ove/re /renam name/d e/dele elete te data data sets sets and members What this exercise is about This exercise provides an opportunity to copy, copy, move, rename and delete members and data sets.
What you should be able to do At the end of the exercise, you should be able to: • Perform Perform some some standa standard rd housek housekeepin eeping g tasks tasks
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 5. Copy/move/rename/delete Copy/move/rename/delete data sets sets and members
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
5-1
Student Exercises
Exercise instructions .ES10.INDATA .ES10.INDATA and __ 1. Allocate two new data sets sets called userid userid .ES10.OUTDATA .ES10.OUTDATA. Allocate them like userid .ES10.PDS .ES10.PDS.
__ 2. Create a new member called A in serid .ES10.INDATA .ES10.INDATA , and enter some test data into it. __ 3. Create nine new members members called B through J which which contain the same data data as member A. .ES10.INDATA .ES10.INDATA into userid .ES10.OUTDATA. .ES10.OUTDATA. __ 4. Copy the entire data set set userid .ES10.INDATA .ES10.INDATA , and copy __ 5. Change the contents contents of members D and H in userid these members again to userid .ES10.OUTDATA .ES10.OUTDATA . Make sure to specify the proper COPY options.
__ 6. Verify whether the members D and H have been copied copied correctly by editing or or viewing them. __ 7. Delete userid .ES10.INDATA .ES10.INDATA . .ES10.OUTDATA .ES10.OUTDATA to userid .ES10.DATA .ES10.DATA . __ 8. Rename userid .ES10.DATA .ES10.DATA except members A, D, and H. __ 9. Delete all members in userid
__ 10. Rename these members members to DATA1, DATA2, DATA2, and DATA3. .ES10.PDS .ES10.PDS. __ 11. 11. Move members DATA1 DATA1 and DATA3 to userid .ES10.TEXT .ES10.TEXT and userid .ES10.PDSE .ES10.PDSE. __ 12. Delete userid
End of exercise
5-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 6. Data Data se sett lis lists ts What this exercise is about This exercise provides an opportunity to work with data set lists.
What you should be able to do At the end of the exercise, you should be able to: • Understan Understand d the facilities facilities provided provided by ISPF ISPF option option 3.4, Data Set Set List • Use several several of of the functions functions available available
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 6. Data set lists lists
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
6-1
Student Exercises
Exercise instructions Part Part 1: Da Data ta se sett lis lists ts __ 1. Use the ISPF/PDF option option Data Set List to perform the following tasks: __ a. Display a list of all data set starting with with your user ID. - What does the first entry user ID stand for? _____________________ ________________________________ _______________________ _______________________ ___________
__ b. Determine the record length length and block length of userid .ISPF.PROFILE .ISPF.PROFILE. - Record length: ____ - Block length: ____ .ES10.PDS .ES10.PDS and then do the following: __ c. Display a list of all members of of userid ,
i. Dele Delete te memb member er DATA DATA1. 1. ii. Renam Rename e memb member er DATA3 DATA3 to DATA. DATA. .ES10.DATA .ES10.DATA . iii. Move Move member member TABL TABLE E to data data set set userid .ES10.DATA. .ES10.DATA. __ d. Verify the move by displaying displaying a member list of userid .ES10.DATA .ES10.DATA. __ e. Delete member DATA2 of of data set userid
__ f.
Delete data set userid .ES10.PS. .ES10.PS.
__ g. Compress data set set userid .ES10.DATA. .ES10.DATA. __ h. Determine the volume on on which the data set userid .ES10.DATA .ES10.DATA resides. __ i.
Press PF11 as necessary and answer the following questions: .ES10.CNTL .ES10.CNTL ? - What is the number of allocated tracks of userid .ES10.CNTL .ES10.CNTL ? - What is the %Used of userid .ES10.CNTL .ES10.CNTL was created? - What is the date userid .ES10.DATA .ES10.DATA is cataloged? - What is the catalog in which userid
__ j.
.ES10.DATA .ES10.DATA List all data sets residing residing on the same volume as data set set userid that start with TSOF.
i. Sele elect the the dat data a se set userid .ES10.DATA .ES10.DATA from your list and display all members in the data set. .ES10.DATA .ES10.DATA . ii. ii. Dele Delete te data data set set userid
iii. Return Return to the the ISPF ISPF Primary Primary Option Option Menu. Menu.
6-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Part Part 2: UN UNIX IX dire direct ctor ory y lis list t Enter START on the Option command field, to start a new ISPF screen; you can now switch form one session screen to the other using PF9, or using command SWAP LIST and select the option screen you want to switch to. __ 2. Now on this new screen, Use Use the ISPF/PDF ISPF/PDF option UNIX Directory List (option 3.17) to perform the following tasks: __ a. Display a list of all entries in the pathname pathname /u/es10/students. i. On line line begi beginn nnin ing g wit with h Pathname type in /u/es10/students. ,
- What type of entries are listed? ______________________ __________________________________ _______________________ _____________________ __________
Check column labeled TYPE using F8 to scroll the list. - What is the size value for your directory TSOFS##? _______________ _______________
Check the column labeled SIZE. __ 3. Display the entries in your your directory TSOFS##. __ 4. Create a new regular UNIX file in your directory: name it file1 with permission bits 755 . __ 5. Once created, edit the file, file, add one line containing the value value date, and save it. __ 6. Now try to execute this UNIX file, by entering 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? _____________________ _________________________________ _______________________ _________________ ______
Execute the UNIX date command under the shell: __ 7. Change the permission permission bits to 444, and try to execute execute it again. Any success? success?
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 6. Data set lists lists
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
6-3
Student Exercises
6-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 7. 7. Usin Using g TSO TSO/E /E com comma mand nds s What this exercise is about This exercise provides an opportunity to execute TSO commands, modify an ISPF panel, and modify a CLIST.
What you should be able to do At the end of the exercise, you should be able to: • Use Use TSO TSO HELP HELP • Perform Perform minor modificat modifications ions to CLIST CLISTs and ISPF panels panels
Requirements SC34-4822
ISPF User’s Guide Vol I
SC34-4823
ISPF User’s Guide Vol II
SC34-4820
ISPF Edit and Edit Macros
© Copyright IBM IBM Corp. 2001, 2013
Exercise 7. Using TSO/E TSO/E commands
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
7-1
Student Exercises
Exercise instructions Part Part 1: TSO TSO comm comman ands ds __ 1. Use the proper TSO/E command command to display only the function of the ALLOCA ALLOCATE TE command. __ 2. Use the proper TSO/E command command to display only the syntax of the ALLOCA ALLOCATE TE command. __ 3. Find out the purpose of of the LIKE operand of the ALLOCA ALLOCATE TE command. .ES10.TSOEPDS .ES10.TSOEPDS . __ 4. Allocate a new data set set called userid
Allocate the data set with the same characteristics as D80WW.ES10V11.PROC . .ES10.TSOEPDS .ES10.TSOEPDS by using a TSO/E __ 5. Verify the proper allocation of userid command to display its characteristics as well as those of D80WW.ES10V11.PROC . .ES10.TSOEPS .ES10.TSOEPS with the following __ 6. Allocate a new sequential sequential data set called userid characteristics:
• Filename ALLOCPS • 2 tracks primary space, 1 track secondary • Fixed-length records of 80 bytes • Blocked records
__ 7. Verify whether whether the data set set has been allocated with the right filename 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?
__ 8. Enter the following command: command: LISTDS ES10.TSOEPS
__ 9. Display your TSO/E profile profile and change the prefix prefix setting to HUGO. __ 10. Enter the following command: command: LISTDS ES10.TSOEPS
• What happens and why?
______________________ ________________________________ ______________________ _______________________ __________________ _______ __ 11. 11. Reset the prefix to its previous previous value. __ 12. Enter the following command: command: LISTDS
__ 13. Change the profile setting to NOPROMPT. NOPROMPT.
7-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
command: EXempty __ 14. Enter the following command: LISTDS
What happens and why? _____________________ _________________________________ _______________________ _____________________ ___________________ _________ __ 15. Reset the profile to PROMPT. PROMPT. __ 16. Enter the following command: command: LISTCAT ENT(‘userid.ES10.TSOEPDS’) ALL
t he data set was allocated? • What is the volume on which the __ 17. Enter the following commands: commands: LISTCAT ENT(‘userid’) ALIAS ALL
• What is the purpose of this command, and what information is returned? • in which catalog is the alias defined? LISTCAT LVL(‘userid’)
• What is the purpose of this command, and what information is returned?
__ 18. Enter the following command: command: listc cat('ICFCAT.MVS100.UCAT.STUD1')
What is the purpose of this command, and what information is returned? ______________________ __________________________________ _______________________ _________________ ______ Steps 19 through 35 are optional. At any time, you can skip to Step 36. .ES10.TSOEPDS .ES10.TSOEPDS. __ 19. Create a new member called called MYCLIST in data set userid
__ 20. Copy a member called called CLIST from data set D80WW.ES10V11.EXEC into member MYCLIST. .ES10.TSOEPDS .ES10.TSOEPDS. __ 21. Edit MYCLIST in userid
Find the ISPPLIB ALLOC statement. Write the name of the first data set here:____________________ here:________________________________ ________________________ ___________________. _______. We refer to this as the ISPPLIB data set. Write the names of the other data sets here:____________________ here:________________________________ _______________________ __________________. _______. __ 22. Concatenate userid .ES10.TSOEPDS .ES10.TSOEPDS before all other libraries on the ISPPLIB allocate statement. __ 23. Save and exit when complete. __ 24. Go to the Primary Option Menu. Menu.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 7. Using TSO/E TSO/E commands
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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 gives you a BookManager BookManager option (option ‘E’). Write the name of the panel here:________________________ here:___________________________. ___. We call this the Bookie panel. __ 27. View the Bookie member member in the ISPPLIB data set SYS1.PPPLIB. __ 28. Find the )PROC section and and note the code used used to invoke BookManager BookManager.. Write the code here:__________________ here:_____________________________ _______________________ ___________________. _______. To save typing, you could cut this code and paste it later. __ 29. Edit a new member with the name name of the POM panel (àITMENU) (àITMENU) in data set userid .ES10.TSOEPDS .ES10.TSOEPDS. __ 30. Copy in the POM panel (àITMENU) (àITMENU) member from the ISPPLIB ISPPLIB library. library. __ 31. Inspect the panel code: 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. BookManager. __ c. Find the )PROC section, and add a new entry that invokes BookManager using section, the option you specified in the )BODY section and the command you copied from the Bookie panel. __ 32. End and save the panel panel member and the POM panel if necessary necessary.. __ 33. Exit ISPF to TSO READY mode. mode. __ 34. Invoke MYCLIST by by coding under TSO: ex ‘userid .ES10.TSOEPDS(MYCLIST) ‘ .ES10.TSOEPDS(MYCLIST)
__ 35. Invoke BookManager BookManager from your customized customized panel. Option ‘E.z’. __ 36. Erase all data sets that you you have allocated during during this exercise. __ 37. Notify your neighboring neighboring group (through TSO command) command) that you have finished the exercises.
End of exercise
7-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 8. Subm Submit it a job job What this exercise is about This exercise provides an opportunity to submit jobs and inspect their output.
What you should be able to do At the end of the exercise, you should be able to: • Subm ubmit a jo job • Use SDSF SDSF to view job job (or TSO) outpu outputt on the spool spool • Purge Purge outp output ut from from the spool spool
Requirements SA22-7597 SA22-7598 SA22-7535 SA22-7551 SA22-7782 SA22-7670 SC34-4822 SC34-4823 SC34-4820
© Copyright IBM IBM Corp. 2001, 2013
MVS JCL Reference MVS JCL User’s Guide JES2 Introduction JES3 Introduction TSO/E Command Reference SDSF Operation and Customization ISPF User’s Guide Vol I ISPF User’s Guide Vol II ISPF Edit and Edit Macros
Exercise 8. Submit a job
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
8-1
Student Exercises
Exercise instructions Part Part 1: LAB: LAB: Subm Submit it a jjob ob Note
Remember not to put single quotes around the data set name for batch JCL DD statements.
__ 1. Allocate a partitioned data data set named userid .ES10.CNTL .ES10.CNTL with the following characteristics: • 1 cylinder primary and secondary space • 10 blocks directory space • Record format fixed blocked • Logical record size 80 • Block size 0 Note .ES10.CNTL .ES10.CNTL already exists, and can be used as it is with no Data set TSOFSxx modifications to its allocation characteristics.
__ 2. Use option 3.3 to copy member LAB5#01 from data set D80WW.ES10V11.CNTL .ES10.CNTL .ES10.CNTL . into data set userid __ 3. Edit member LAB5#01 in data set userid .ES10.CNTL .ES10.CNTL . __ 4. Enter your JOB statement with the following specifications: ( Yes, your user ID with an A at the end). A .... - (Y • Job name is userid • Account# is ........(See member JOBCARD in D80WW.ES10V11.CNTL ). • Programmer's name is your name. • Message class is ......(See member JOBCARD in D8US.ES10V11.CNTL ). • Message level is 1,1. • You are to be informed when the job has completed execution. • Run the job in Class ........(See member JOBCARD in D80WW.ES10V11.CNTL ).
__ 5. Complete the EXEC statement by calling the program IEBCOPY. statement
8-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty __ 6. Complete the DD statements as follows: __ a. SYSUT1 is D80WW.ES10V11.PROC. .ES10.PROC .ES10.PROC __ b. SYSUT2 is a new data data set called userid to be allocated with the to same characteristics as D80WW.ES10V11.PROC.
__ 7. Submit the job. __ 8. View its output with SDSF SDSF. Leave the output on the the spool.
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 8. Submit a job
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
8-3
Student Exercises
8-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exer Ex erci cise se 9. JCL JCL exe exerc rcis ises es What this exercise is about This exercise provides an opportunity to create and submit JCL that performs standard tasks using common utility programs.
What you should be able to do At the end of the exercise, you should be able to: • Understan Understand d how to code code JCL JCL statements statements for for common common utility utility programs • Use SDSF SDSF to to inspec inspectt job outp output ut • Perform Perform common common tasks tasks using using standa standard rd utilities utilities
Requirements SA22-7597 SA22-7598 SA22-7670 SC26-7410 SC34-4822 SC34-4823 SC34-4820
© Copyright IBM IBM Corp. 2001, 2013
MVS JCL Reference MVS JCL User’s Guide SDSF Operation and Customization DFSMS Using Data Sets ISPF User’s Guide Vol I ISPF User’s Guide Vol II ISPF Edit and Edit Macros
Exercise 9. JCL exercises exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
9-1
Student Exercises
Exercise instructions Part Part 1: 1: Copy Copy sel selec ecte ted d memb member er of of PDS PDS .ES10.CNTL .ES10.CNTL and code an IEBCOPY __ 1. Create member LAB5#11 in data set userid job to copy member member JOBCARD from data set set D80WW.ES10V11.CNTL into data set userid .ES10.CNTL .ES10.CNTL . ,
Here is a little help. Your Your job should look like the following: f ollowing: //S1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSTOUT=* //SYSUT1 DD DISP=SHR,DSN= //SYSUT2 DD DISP=OLD,DSN= //SYSIN DD * COPY ....=......,.....=...... SELECT MEMBER......
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 JOBCARD member so that this this job card can be copied copied into each new JCL member. Your JOBCARD should look something like the following: //useridA JOB (ACCOUNT),'userid',MSGCLASS=_,MSGLEVEL=(1,1), // NOTIFY=userid,CLASS=B,REGION=6M //******************************************************************* * //* JOB SUBMITTED FROM userid.ES10.CNTL(LAB5#XX) *** //* DOC: WRITE THE PURPOSE OF YOUR JOB RIGHT HERE *** //******************************************************************* *
The comment lines shown in the sample above are for documentation purposes purposes so that you will be able to trace from where the JCL was submitted. __ 3. Save the changes changes to the member. member.
Part Part 2: Copy Copy an enti entire re data data se set t .ES10.CNTL .ES10.CNTL . __ 4. Create member LAB5#12 LAB5#12 in data set userid
9-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
member JOBCARD JOBCARD into it and create a job step step that copies the (input) data EXempty __ 5. Copy the member set userid .ES10.CNTL .ES10.CNTL into (output) data set userid .COPY.CNTL .COPY.CNTL . Since the output data set does not exist, allocate it during the copy step. The .ES10.CNTL .ES10.CNTL . characteristics are the same as for userid (Use the LIKE parameter to allocate the new data set.) __ 6. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job.
Part Part 3: 3: Copy/r Copy/repl eplace ace a sele selecte cted d memb member er __ 7. Create member LAB5#13 in data set userid .ES10.CNTL .ES10.CNTL . __ 8. Copy the member JOBCARD JOBCARD into it and create a job step step that copies member .COPY.CNTL .COPY.CNTL with JOBCARD from D80WW.ES10V11.CNTL into data set userid the REPLACE option of IEBCOPY. __ 9. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job. __ 10. Remember to replace the existing member. Please check this thoroughly.
Part Part 4: 4: Perfo Perform rm a se secu cure re com compr pres ess s .ES10.CNTL .ES10.CNTL . Copy the member JOBCARD Create member LAB5#14 in data set userid into it and create job steps that do the following:
__ 11. 11. Use the first step to allocate a data data set named userid .COMPRESS.DATA .COMPRESS.DATA like data .COPY.CNTL .COPY.CNTL set userid __ 12. The second step should should only run when the RC=0 in the previous step. step. Use the IF/THEN/ELSE clause for this purpose. .COPY.CNTL .COPY.CNTL into userid .COMPRESS.DATA .COMPRESS.DATA , thus Copy the entire data set userid creating a backup of userid .COPY.CNTL .COPY.CNTL . __ 13. Check that the above above step was successful successful using the IF/THEN/ELSE IF/THEN/ELSE clause. If the above steps were executed with RC=0, go on to LAB 5 #15, else delete userid .COMPRESS.DATA .COMPRESS.DATA , remove the cause of the error, and rerun the job.
Part Part 5: 5: Comp Compre ress ss a dat data a set set inpl inplac ace e __ 14. Create member LAB5#15 LAB5#15 in data set userid .ES10.CNTL .ES10.CNTL . __ 15. Copy the member JOBCARD JOBCARD into it and create create a job step that compresses compresses the data .COPY.CNTL .COPY.CNTL inplace. set userid .COMPRESS.DATA .COMPRESS.DATA , but only if previous step was executed __ 16. Delete data set userid with RC=0.
__ 17. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job. © Copyright IBM IBM Corp. 2001, 2013
Exercise 9. JCL exercises exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
9-3
Student Exercises
Part Part 6: 6: Copy Copy a PDS PDS and and a PDS PDSE E data data set set __ 18. First, create data set userid .COPY.PDS .COPY.PDS using ISPF option 3.2 with the following characteristics: __ a. Space:
1 TRK primary and 1 TRK TRK secondary allocation allocation
__ b. DSORG:
PDS
__ c. RECFM:
FB
__ d. DIR:
1 directory block
__ e. LRECL:
80
__ f.
0
BLKSIZE:
__ 19. Second, create data data set userid .COPY.PDSE .COPY.PDSE using ISPF option 3.2 with the following characteristics: __ a. Space:
1 TRK primary and 1 TRK TRK secondary allocation allocation
__ b. DSORG:
PDSE
__ c. RECFM:
FB
__ d. DIR:
1 directory block
__ e. LRECL:
80
__ f.
0
BLKSIZE:
.ES10.CNTL .ES10.CNTL . __ 20. Create member LAB5#16 LAB5#16 in data set userid
__ 21. Copy the member JOBCARD JOBCARD into it and create a job step step that copies data set set userid .ES10.CNTL .ES10.CNTL into data set userid .COPY.PDS .COPY.PDS .
ATTENTION! DO NOT SUBMIT THE JOB NOW.
.ES10.CNTL .ES10.CNTL . __ 22. Create member LAB5#17 LAB5#17 in data set userid
__ 23. Copy the member JOBCARD JOBCARD into it and create a job step step that copies data set set userid .ES10.CNTL .ES10.CNTL into data set userid .COPY.PDSE .COPY.PDSE .
ATTENTION! SAVE THE MEMBER AND SUBMIT BOTH JOBS.
9-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
of your jobs. EXempty __ 24. Check the results of What is the difference between the two jobs? ______________________ __________________________________ _______________________ ______________________ _____________________ __________ What causes the difference? ______________________ __________________________________ _______________________ ______________________ _____________________ __________
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 9. JCL exercises exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
9-5
Student Exercises
Optional exercises Part Part 1: 1: Copy Copy inst instre ream am data data to to PS PS .ES10.CNTL .ES10.CNTL . __ 1. Create member LAB5#21 LAB5#21 in data set userid
__ 2. Code an IEBGENER IEBGENER job to copy data from instream instream data set to the newly allocated allocated data set userid .GENER.COPY#1 .GENER.COPY#1. The characteristics for the new data set are: • Space:
1 TRK primary and 1 TRK secondary allocation
• DSORG:
PS
• RECFM:
FB
• DIR:
0 directory block
• LRECL:
80
• BLKSIZE:
0
The instream data could be like the following: //......
DD *
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
__ 3. Check the results of your your job. In case case of errors, remove the cause of error error and rerun the job.
Part Part 2: 2: Copy Copy a se sequ quen enti tial al data data set set .ES10.CNTL .ES10.CNTL . __ 4. Create member LAB5#22 LAB5#22 in data set userid
__ 5. Copy the member member JOBCARD JOBCARD into it and create a job step that copies copies the (input) data set userid .GENER.COPY#1 .GENER.COPY#1 into (output data set userid .GENER.COPY#2 .GENER.COPY#2. Since the output data set does not exist yet, allocate it during the copy step. The .GENER.COPY#1 .GENER.COPY#1 . (Use the LIKE characteristics are the same as for userid parameter to allocate it.) __ 6. Check the results of your your job. In case case of errors, remove the cause of error error and rerun the job.
Part Part 3: Print Print a sequen sequentia tiall data data set set to SYSOUT SYSOUT __ 7. Create member LAB5#23 in data set userid.ES10.CNTL. __ 8. Copy the member JOBCARD into it and create a job step that does the following: 9-6
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
• Print data set userid.GENER.COPY#1.
__ 9. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job.
Part Part 4: Prin Printt a PDS PDS memb member er .ES10.CNTL .ES10.CNTL . __ 10. Create member LAB5#24 LAB5#24 in data set userid
__ 11. 11. Copy the member JOBCARD JOBCARD into it and create a job step step that prints the member JOBCARD from userid .ES10.CNTL .ES10.CNTL to SYSOUT=*. __ 12. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job.
Part Part 5: Cr Crea eate te a PDS PDS mem membe ber r __ 13. Create member LAB5#25 LAB5#25 in data set userid .ES10.CNTL .ES10.CNTL . __ 14. Copy the member JOBCARD JOBCARD into it and create a job step that creates member .COPY.CNTL .COPY.CNTL. TEST in data set userid 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 your job. In case case of errors, remove remove the cause cause of error error and rerun the job.
End of exercise
© Copyright IBM IBM Corp. 2001, 2013
Exercise 9. JCL exercises exercises
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
9-7
Student Exercises
9-8
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exercise 10.Procedures What this exercise is about This exercise provides an opportunity to use procedures and the SORT utility.
What you should be able to do At the end of the exercise, you should be able to: • Use Use proc proced edur ures es • Make simple simple modifica modifications tions to procedu procedure re JCL JCL • Use Use the the SORT SORT util utility ity
Requirements SA22-7597 SA22-7598 SA22-7535 SA22-7551 SA22-7670 SC26-7527 SC26-7410 SC34-4822 SC34-4823 SC34-4820
© Copyright IBM IBM Corp. 2001, 2013
MVS JCL Reference MVS JCL User’s Guide JES2 Introduction JES3 Introduction SDSF Operation and Customization z/OS DFSORT Getting Started DFSMS Using Data Sets ISPF User’s Guide Vol I ISPF User’s Guide Vol II ISPF Edit and Edit Macros
Exercise 10. Procedures Procedures
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
10-1
Student Exercises
Exercise instructions Part Part 1: Overri Override de DD-sta DD-statem tement ents s of an in-strea in-stream m procedu procedure re .ES10.CNTL .ES10.CNTL and copy the same __ 1. Create member LAB5#31 LAB5#31 in data set userid member from data set D80WW.ES10V11.CNTL into it. It looks like: //userid1 JOB (ACCOUNT),'userid',MSGCLASS=X,MSGLEVEL=(1,1), // NOTIFY=userid,CLASS=B,REGION=6M //******************************************************************** //* JOB SUBMITTED FROM userid.ES10.CNTL(LAB5#31) *** //* DOC: Override DD-Statements on an Instream Procedure *** //******************************************************************** //COMP PROC //********************************************************** //********* MAKE BACKUP //********************************************************** //S1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=userid.ES10.CNTL //SYSUT2 DD DISP=(,CATLG),DSN=userid.ES10.BACK, // LIKE=userid.ES10.CNTL //SYSIN DD DUMMY //IFOK1 IF (S1.RC=0) THEN //********************************************************** //********* COMPRESS DATA SET //********************************************************** //S2 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=userid.ES10.CNTL //SYSUT2 DD DISP=OLD,DSN=userid.ES10.CNTL //SYSIN DD DUMMY //IFOKEND1 ENDIF //IFOK2 IF (S2.RC=0) THEN //********************************************************** //********* COMPRESS SUCCESSFUL, DELETE BACKUP //********************************************************** //S3 EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=userid.ES10.BACK //IFOKEND2 ENDIF // PEND //FINAL EXEC COMP
As you can see, this job has an in-stream procedure that makes a secure .ES10.CNTL .ES10.CNTL . compress of data set userid __ 2. Your task is now to execute execute the job so that the data set userid .COPY.CNTL .COPY.CNTL will be compressed during the job's execution. Do not change the in-stream procedure. Perform this task by overriding DD statements.
10-2 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Part Part 2: 2: Run Run cata catalo loge ged d proc proced edur ure e __ 3. Create member LAB5#32 LAB5#32 in data set userid .ES10.CNTL, .ES10.CNTL, and copy member JOBCARD into it. __ 4. Create a job step that runs a cataloged procedure stored in D80WW.ES10V11.PROC -member COMP. The procedure looks like: ***************************** Top of Data ***************************** //COMP PROC INDS=FORGOTTEN,BACK=FORGOTTEN //******************************************************************** //* DOC: COMPRESS DATA SETS SPECIFIED WITH VARIABLES. *** //******************************************************************** //********************************************************** //******** MAKE BACKUP //********************************************************** //S1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=&INDS. //SYSUT2 DD DISP=(,CATLG),DSN=&BACK., // LIKE=&INDS //SYSIN DD DUMMY //IFOK1 IF (S1.RC=0) THEN //********************************************************** //******** COMPRESS DATA SET //********************************************************** //S2 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=&INDS. //SYSUT2 DD DISP=OLD,DSN=&INDS. //SYSIN DD DUMMY //IFOKEND1 ENDIF //IFOK2 IF (S2,RC=0) THEN //********************************************************** //******** COMPRESS SUCCESSFUL, DELETE BACKUP //********************************************************** //S3 EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=&BACK. //IFOKEND2 ENDIF
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. __ 5. Run this procedure to compress compress data set userid .ES10.CNTL .ES10.CNTL and define userid .ES10.BACK .ES10.BACK as the backup of the t he secure compress.
Part Part 3: Cr Crea eate te cata catalo loge ged d proce procedu dure re __ 6. During this exercise, you will code a cataloged procedure procedure in your own data data set and test it. It allows you to copy any kind of PDS or sequential data set to another PDS or PS data set.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 10. Procedures Procedures
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
10-3
Student Exercises
.ES10.PROC .ES10.PROC __ 7. Allocate a PDS named named userid with the same attributes as data set with using ISPF/PDF function 3.2. D80WW.ES10V11.PROC
__ 8. Create the member COPY, which will hold the cataloged procedure. The procedure should do the following: __ a. Depending on the input variable, it calls IEBCOPY or IEBGENER. IEBGENER. Name the variable PROG. The default for this variable is IEBCOPY. __ b. The disposition of DD-statements DD-statements SYSUT1 and and SYSUT2 is defined as JCL JCL symbols. Name the symbols DISPI for input and DISPO for output. __ c. The data set names should be variable so that they can vary from procedure procedure call to procedure call. Name their JCL symbols INDS and OUTDS. __ d. The data set defined for 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 default values for the symbols symbols except for PROG. __ 9. Once you have created your own cataloged cataloged procedure, test it. .ES10.CNTL .ES10.CNTL and copy member __ a. Create member LAB5#33 LAB5#33 in data set userid into it. JOBCARD into
__ b. Create job steps that call call the new cataloged procedure procedure to copy: i. Data set userid . .ES10.CNTL .ES10.CNTL to the new data set userid .ES10. .ES10.XXXX ii. Data set userid . .GENER.COPY#1 .GENER.COPY#1 to the new data set userid .ES10. .ES10. YYYY __ c. If the job fails, remove the cause cause of error and rerun the job.
Part Part 4: 4: Us Use e of of DFS DFSOR ORT T (IC (ICEM EMAN AN) ) __ 10. Create member LAB5#34 LAB5#34 in data set userid .ES10.CNTL .ES10.CNTL . __ 11. 11. Copy member JOBCARD JOBCARD into it and create a job step step that copies member member SORTTEST from data set D80WW.ES10V11.CNTL into your CNTL data set using the SELECT MEMBER= function of IEBCOPY. __ 12. Now create a job step that that calls program ICEMAN which which is the sort program DFSORT. This program needs the following DD statements: SYSOUT SORTIN SORTOUT SYSIN
DD DD DD DD
10-4 z/OS Fundamentals
SYSOUT= DISP=....,DSN=..... DISP=....,DSN=..... *
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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 enough familiarity to create this sort sort step, do the following: Sort member SORTTEST of data set D80WW.ES10V11.CNTL and write the results to userid .ES10.CNTL(SORTOUT1 . .ES10.CNTL(SORTOUT1 __ a. Skip the first record. __ b. Sort by the number of years years in the company (columns (columns 1-3). • Data type is character (CH) • Descending order (D)
As the second sort criteria: __ a. Sort the records by employee employee name, starting in column column 4 until column 16. • Data type: character (CH) • Ascending order (A)
__ 14. Check the results of your your job and edit member SORTOUT1 SORTOUT1 for the sorted output. output. __ 15. In case of errors, remove the cause of errors and rerun the job. job.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 10. Procedures Procedures
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
10-5
Student Exercises
Optional exercise Part Part 1: 1: Cr Crea eate te PS from from in-s in-str trea eam m .ES10.CNTL .ES10.CNTL . __ 1. Create member LAB5#41 LAB5#41 in data set userid
__ 2. Copy the member JOBCARD JOBCARD into it and create a job step step that copies copies in-stream data to a new physical sequential (PS) data set with name userid .ES10.INPUT .ES10.INPUT and the following characteristics: __ a. Space:
1 track primary, primary, no secondary allocation allocation
__ b. RECFM:
FB
__ c. LRECL:
80
__ d. BLKSIZE:
0
Copy the in-stream data from member INSTREAM in data set D80¢¢.ES10V11.CNTL. The in-stream data looks like this: TEST1 TEST2 TEST3 TEST4 TEST5 TEST6 TEST7 TEST8 TEST9 TEST10 TEST11 TEST12 TEST13 TEST14 TEST15 TEST16
Use the //SYSUT1
DD DATA.... statement to define the input string.
__ 3. Check the results of your your job. In case of error, error, remove the cause and rerun rerun the job.
Part Part 2: 2: Cond Condit itio iona nall proc proces essi sing ng .ES10.CNTL .ES10.CNTL . __ 4. Create member LAB5#42 LAB5#42 in data set userid
__ 5. Copy the member JOBCARD JOBCARD into it and create job steps steps that perform the following: __ a. Using IEBGENER, create create a member named TEXT1 TEXT1 in the new data set userid .ES10.DATA .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
10-6 z/OS Fundamentals
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
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
.ES10.DATA .ES10.DATA must have the same characteristics as __ b. The data set userid userid .ES10.CNTL .ES10.CNTL .
__ c. If the first step returns RC=0, copy member member TEXT1 to a new PS data set named userid .ES10.OUT .ES10.OUT
(1 trk primary, 1 trk secondary; fixed blocked; record length 80; best blocksize). .ES10.OUT .ES10.OUT to __ d. If the second step returns RC=0 then print data set userid SYSOUT=* using IEBGENER.
__ e. If the third step ends with RC=0, delete delete data set userid .ES10.OUT .ES10.OUT using IEFBR14. __ 6. For all conditional JCL, use use the IF/THEN/ELSE clause. clause. __ 7. Check the results of your your job. In case of error, error, remove the cause of of the error and rerun the job.
Part Part 3: Route Route a Job Job to IN INTRD TRDR R using using IEBGEN IEBGENER ER __ 8. First, copy member LAB5#43 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
__ 9. Second, create member member LAB5#44 in data set set userid .ES10.CNTL .ES10.CNTL . __ 10. Copy member JOBCARD JOBCARD into it and create a job step that performs the following: 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. Run the in-stream procedure with the values: DS=userid.ES10.CNTL(LAB5#43),OUT=(,INTRDR)
__ 11. 11. Check the results of your your job. In case case of errors, remove remove the cause cause of error error and rerun the job.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 10. Procedures Procedures
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
10-7
Student Exercises
End of exercise
10-8 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Exercise 11.ISHELL and hierarchical file system What this exercise is about This exercise provides an opportunity to practice working with the hierarchical file system using the ISHELL.
What you should be able to do At the end of the exercise, students should be able to: • • • • • • • • • •
Invo Invoke ke the the ISH ISHEL ELL L Define Define functions functions that that can can be performe performed d using using the ISHELL ISHELL Describe Describe how to use use help help inform information ation Show how how to use use ISHELL ISHELL to list the the contents contents of of a directory directory Use the ISHE ISHELL LL to crea create te a new new file file Use the the ISHELL ISHELL to create create a hierarc hierarchical hical file file system system Copy members members in a PDS to the the file system system Change Change file permis permissio sion n bits bits Rename Rename and delete delete a file file Use the UDLI UDLIST ST func functio tion n (3.17) (3.17)
Requirements SA22-7597 SA22-7598 SA22-7535 SA22-7551 SC26-7410 SC34-4822 SC34-4823 SC34-4820 SA22-7801 SA22-7806
© Copyright IBM IBM Corp. 2001, 2013
MVS JCL Reference MVS JCL User’s Guide JES2 Introduction JES3 Introduction DFSMS Using Data Sets ISPF User’s Guide Vol I ISPF User’s Guide Vol II ISPF Edit and Edit Macros UNIX System Services User’s Guide Using REXX and z/OS UNIX System Services
Exercise 11. ISHELL and hierarchical file file system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-1
Student Exercises
Exercise instructions Part Part 1: ISHE ISHELL LL intro introdu duct ctio ion n __ 1. Log on to TSO. __ 2. From the ISPF menu, choose choose the option to invoke invoke the ISHELL or use the ISHELL 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 menus from the action bar to see see what actions can 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 r esult 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.
Which actions can be done for a file system? Question: Which ______________________ _________________________________ _______________________ _______________________ _______________ ____ What does the asterisk on actions in the File_System and Setup Question: What mean? ______________________ ________________________________ ______________________ _______________________ ________________ _____
Part Part 2: Introd Introduct uction ion to the the file file syst system em Note 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. directory. Write it down or copy it to the clipboard for pasting later.
Home directory = ______________________ __________________________________ ______________________ _____________________ ___________
__ 4. List the contents of the root root file system. • The name of the root file system is /.
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. directory. See if you can find one way of doing it. 11-2 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
directory bin in the root file system. EXempty __ 5. List the contents of the directory • 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. browse. • The procedure is similar to the previous one, but the action is different. • Take notice that the short form f orm 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 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 which type of files are located in the dev directory. • Try listing the attributes of a file.
What type of files are located in the dev directory? Question: What _____________________ _________________________________ ______________________ _____________________ _________________ ______ __ 9. List the actions that can be be done for the files in this directory directory.. • The pop-up menu contains a list of actions.
Which actions can be done for these files? Question: Which _____________________ _________________________________ ______________________ _____________________ _________________ ______ __ 10. Create a new file called newfile in your home directory. • To create a new file, you have to go back to the main ISHELL panel. • Use the default permission bits for this file.
__ 11. 11. Display the contents of of your home directory now now to see the new file there. • Do this the same way as you listed the root directory.
__ 12. Edit the new file and add a few few lines of text in the file. editor. • The editor is the ISPF editor. • F3 saves the file and return from editing the file.
Part Part 3: 3: Cust Custom omiz ize e ISHE ISHELL LL __ 13. Modify the display of the directory directory contents to include information information about permission permission bits, modification time, owner, and file size. __ 14. Display a directory with the the additional information. __ 15. Check the default actions actions for files.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file file system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-3
Student Exercises
Question: What What is the default action for character special files?
______________________ ________________________________ ______________________ _______________________ ________________ _____ __ 16. Specify that you want want the command line to be on top top of the ISHELL screen. __ 17. Change it back to be at at the bottom.
End of exercise
11-4 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
Optional exercises: Part 1 Part Part 1: Create Create a hiera hierarch rchica icall file file syst system em __ 1. Go into the ISHELL. __ 2. List file systems that are already already mounted. • Look under the action File_systems on the action bar.
__ 3. List the mount point of a mounted mounted file system. • 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.
What is the mount point of the root file system? Question: What _____________________ _________________________________ ______________________ _____________________ _________________ ______ .OMVS.HFS .OMVS.HFS . Allocate __ 4. Use the ISHELL to allocate allocate a new file system called userid 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.
__ 5. List the contents of your home home directory. directory. • How to list a directory was done in Exercise 1.
Part Part 2: 2: Step Step 2 (Man (Manag agin ing g file files) s) __ 6. Copy members FILE1, FILE1, FILE2, FILE3 from the z/OS PDS PDS called D80WW.ES10V11.OMVS.LABS, to your home directory. Specify these file permissions when copying the files: Owner: all permissions Group: read Other: none • Specify the copy options to select members from a member list, and to make names lowercase. • Edit the field Permissions to specify the file permission bits. __ 7. Rename file file1 to file9. • 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).
__ 8. Delete file file3. • When the panel to confirm the deletion is displayed, press the Enter key to confirm that you want to delete the file and the file will be deleted.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file file system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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.
__ 10. Find the string test in your home directory and and call the output output file findstr2 in the same 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? _____________________ ________________________________ _______________________ _______________________ ________________ _____ __ 11. 11. Set your working directory directory to your home directory. directory. bar. • Look under the action Directory on the action bar. __ 12. Browse the contents 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 (.).
How is the relative pathname specified? Question: How ______________________ ________________________________ ______________________ _______________________ ________________ _____ __ 13. Create a new directory in your home directory called labs. Use these permissions: Owner: read and write Group: read and search Other: read • Creating a new directory is similar to creating a new file. • Check the permission bits and set them according to the exercise instructions. Use the Help key to find out what the numbers mean. __ 14. Try to create create a new file called Lab2a in the labs directory. • Creating a new file was done in a previous step.
Explain what happens and why. Question: Explain ______________________ ________________________________ ______________________ _______________________ ________________ _____ ______________________ ________________________________ ______________________ _______________________ ________________ _____ __ 15. Change the permission 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.
What is the permission expressed in octal value that allows this? Question: What ______________________ ________________________________ ______________________ _______________________ ________________ _____ 11-6 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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 new file. • Choose the Edit action to edit a file.
__ 18. Copy members PROG1, PROG1, PROG2, PROG3 from the z/OS 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.
__ 19. Create a new directory called called newdir in your home directory. • Set the permissions value to 755.
__ 20. Compare the contents of directories labs and newdir. __ 21. If you have time, try any other other action that you would like to try, try, or some actions you would like to practice more. __ 22. Below are some additional additional optional exercises exercises to get get you more familiar with the ISPF ISPF UNIX shell environment.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file file system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-7
Student Exercises
Optional exercises: Part 2 __ 1. Use the pull-down menus menus from the action bar to see see what actions can can be performed. • The ISHELL screen is CUA (Common User Interface) based. It has an action bar at the top of the screen. Note the use of PF10 and tab. (Make sure you have enabled PFKEYS display with command PFSHOW ON.)
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 li st 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? ______________________ ________________________________ ______________________ _______________________ ________________ _____
Part Part 1: Introd Introduct uction ion to the the file file syst system em __ 1. List the contents of the root root file system. • The name of the root file system is / (forward slash).
11-8 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty
If / (forward slash) is not already specified on the ISH main panel, enter it as shown on the following panel. File Directory Special_file Tools File_systems Options Setup Help ------------------------------------------------------------------------------------------------------------------------------------------UNIX System Services ISPF Shell Enter a pathname and do one of these: - Press Enter. - Select an action bar choice. - Specify an action code or command on the command line. Return to this panel to work with a different pathname. pathname. More More: : /______________________ /__________________________________ ________________________ _________________________ _________________ ____ ____ ______ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ ____ ______ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
+
EUID=163770550
Command ===> _______________________ ___________________________________ _________________________ _________________________ ____________ F1=Help F3=Exit F5=Retrieve F6=Keyshelp F7=Backward F8=Forward F10=Actions F11=Command F12=Cancel
directory. See • There are different methods for displaying the contents of a directory. if you can find one way of doing it. • How did you do it?
_____________________ _________________________________ _______________________ _____________________ ___________________ _________ __ 2. Display (list) the contents of the directory directory bin in the root file system. __ a. Find the directory bin on the root directory list and choose choose the option to list its contents. - Did you do it the same way as above, for the root?
_____________________ _________________________________ _______________________ ______________________ ________________ _____ __ 3. Sort the directory list you just displayed. displayed. Sort items by size, 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 to display permission bits (octal display only), change time, owner, and size. __ 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?
_____________________ _________________________________ _______________________ ______________________ ________________ _____
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file file system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-9
Student Exercises
__ b. You can also put the cursor cursor on any of the column titles titles to sort on the desired criteria, and press Enter; try it for the Changed-GMT, Size, and Filename. Filename. EUID=1 Type _ Dir Dir _ Dir Dir _ Syml Syml _ File File _ File File _ File File _ File File
/bin/ Perm Changed-GMT 755 755 2006 2006-0 -066-28 28 20:2 20:20 0 755 755 2006 2006-0 -077-08 08 17:2 17:25 5 777 777 2006 2006-0 -022-14 14 20:5 20:59 9 755 755 2005 2005-0 -055-17 17 17:5 17:51 1 755 755 2005 2005-0 -055-17 17 17:5 17:51 1 755 755 2005 2005-0 -055-17 17 17:5 17:51 1 755 755 2005 2005-0 -055-17 17 17:5 17:51 1
Owner OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN OMVS OMVSKE KERN RN
------Size 3276 32768 8 8192 8192 27 6144 61440 0 1843 184320 20 6963 69632 2 1720 172032 32
Filename . .. acl_ acl_ed edit it alia alias s ar asa asa at
Row 1 of 353
• Default sort sequence is file name mixed case. How can this default be changed?
______________________ __________________________________ _______________________ ______________________ _______________ ____ -
__ 4. Choose a file in /bin directory to browse. browse. __ a. Take note that the short short form of Browse is B. If you remember this, you can use 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. /dev. - Is it a file or directory? Or something else?
______________________ __________________________________ _______________________ ______________________ _______________ ____ __ 6. If you want to display the content content of /dev as a directory and 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 called newfile, newfile2.... in the /u/es10/students/tsofsxx /u/es10/students/tsofsxx directory, directory, where tsofsxx is i s your TSO user ID. __ a. To create a new file, you have to go back back to the main ISHELL panel, input input the file name on the pathname (example: ( example: /u/es10/students/tsofsxx/newfile2) /u/es10/students/tsofsxx/newfile2), then press Enter (or select option File, then 1 (New)). __ b. Use filetype regular file, and set set the permission bits to 755. 755. __ c. Select file source for regular file as edit. - Can you create an empty file this way?
______________________ __________________________________ _______________________ ______________________ _______________ ____
11-10 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
ishell, by EXempty __ 8. There is also another easier way to create a new file or directory using the ishell, entering n in front of the . special directory (see example example below) EUID=1 /u/tsa0001/ Type Filename n Dir . _ Dir Dir .. _ File File .sh_ .sh_hi hist stor ory y
You are then prompted to create either a file (2) or directory (1) or else. __ 9. Display the contents of of your /u/es10/students/tsofsxx /u/es10/students/tsofsxx directory now to see see the new files there. __ a. Do this the same way as you listed the root directory directory.. - Can you browse an empty file this way?
_____________________ _________________________________ _______________________ ______________________ ________________ _____ __ 10. Edit one of the new files and add 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. • Can you use another editor in this ISHELL environment?
_____________________ _________________________________ _______________________ ______________________ __________________ _______ 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. 11. Create a new file called: /u/es10/students/tsofsxx/test1 /u/es10/students/tsofsxx/test1 using using any method method you want, for instance: __ a. Enter the absolute pathname pathname on the pathname pathname line: /u/es10/students/tsofsxx/test1
__ b. On the Action bar, bar, select File. __ c. On the pull-down menu, menu, select New. __ d. Set permission bits to: to: 755. __ 12. Create a new file called: /u/es10/students/tsofsxx/tes /u/es10/students/tsofsxx/test2. t2. __ a. Enter the absolute pathname pathname on the pathname pathname line: /u/es10/students/tsofsxx/test2
__ b. Press the Enter key. __ c. Set permission bits to 755 and select option to create a regular file.
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file system system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-11
Student Exercises
__ 13. Create a new file called: /u/es10/students/tsofsxx/tes /u/es10/students/tsofsxx/test3. t3. __ a. Enter the absolute pathname pathname on the pathname pathname line: /u/es10/students/tsofsxx/test3.
__ b. On the command line, enter: enter: n (the action code for creating a new file). __ c. Set permission bits to 755 and select option to create a regular file. __ 14. Try to find in which which filesystem all your UNIX UNIX files have been created. created. __ a. In your /u/es10/students/tsofsxx, /u/es10/students/tsofsxx, select any file, and enter U Filesystem, or tab to File, then select opt15 (U). ___________________________________ ________ - What is the filesystem name? ___________________________ - Under which mount point was it mounted?________________________ mounted?_________________________ _ __ 15. Enable directory list reference. reference. __ a. Go back to Options on primary menu, then option 5 Advanced, then select / Enable directory reference list. __ b. Now go to Tools, then select option 4. Reference list(REF)... __ c. You have a direct shortcut shortcut to any of the previously used used directories, which you can select using S or / (forward slash). __ d. You can now use the 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. UDLIST. In the VIEW (opt1) and EDIT (opt2) panels of ISPF, ISPF, you can now enter UNIX files and directory paths directly in the t he 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. ssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssss ssssssssssssssssssssssss ssssssssssssss ss ISREDM01 Edit Entry Panel Command ===> ISPF Library: Project . . Group . . . Type . . . Memb Member er . .
. TSOFT98 . ES10 . PDS .
. . .
. . .
. . .
(Bla (Blank nk or patt patter ern n for for memb member er
Other Partitioned, Sequential or VSAM Data Set, or z/OS UNIX f Name . . . . . /u/es10/students /u/es10/students Volu Volume me Seri Serial al (If (If not not cata catalo loge ged) d) Work Workst stat atio ion n File File: : File Name . .
__ 17. Now select your own directory, by entering L in front of tsofsxx as the path name.
11-12 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
EXempty Menu Menu Util Utilit itie ies s View View Opti Option ons s Help Help ssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssss sssssssssssssssssssssssss sssssssssssssssssssssssss ssssssssssssss ss ISRUUDL0 z/OS UNIX Directory List Row 1 to 6 o Command ===> Scroll ===> C Pathname . : /u/es10/students/tsoft98 /u/es10/students/tsoft98 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 t he last used UNIX directories, or specify a starting directory name in the Pathname; try it with your home directory /u/es10/students/tsoft98.
Menu Menu RefL RefLis ist t RefM RefMod ode e Util Utilit itie ies s Opti Option ons s Help Help ssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssss sssssssssssssssssssssssss sssssssssssssssssssssssss sssssssssssssssss sssss z/OS UNIX Directory List Utility Option ===> blan blank k Disp Displa lay y dire direct ctor ory y list list
P Prin Print t dire direct ctor ory y list list
Pathname . . . /u/es10/students/tsoft98 /u/es10/students/tsoft98
Enter "/" to select option / Confirm File Delete / Confirm Non-empty Directory Delete
Note that in the Options you can change the column arrangement, as well as the width of columns.
Menu Menu Util Utilit itie ies s View View Opti Option ons s Help Help ssssssssssssssssssssss ssssssssssssssssssssss Essssssssssssssssssssss Essssssssssssssssssssssssssssssssss ssssssssssssssssssssssN ssssssssssN sssssss e 1 1. Directory List Options... e o 8 of Command ===> e 2. Directory List Column Arrangement... Arrangement... e ==> PAG e 3. Enable superuser mode(SU) e Pathname . : /u/tsa000 e 4. Refresh List e e 5. Save List e Command Filename e 6. Reset e Fmat ------------------------------------------- Dssssssssssssssssssssss Dssssssssssssssssssssssssssssssssss ssssssssssssssssssssssM ssssssssssM ------. Dir rwxr-xr-x fff--.. Dir rwxr-xr-x fff--.ishell-reflist .ishell-reflist File r-------- fff--- --s- ---.sh_history File rw------- fff--- --s- ----
© Copyright IBM IBM Corp. 2001, 2013
Exercise 11. ISHELL and hierarchical file system system
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
11-13
Student Exercises
__ 18. You can also run USS commands 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 __ 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).
End of exercise
11-14 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Append Appendix ix A. TSOFS0 TSOFS01, 1, TSOFS TSOFS02, 02, TSOF TSOFS03 S03,, exercise solutions JOBCARD //TSOFSXXA JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#XX) *** //* DOC: WRITE THE PURPOSE OF YOUR JOB RIGHT HERE *** //***************************************************************
LAB5#01 //TSOFSXXA JOB (5820),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#01) *** //* DOC: ALLOCATE TSOFSXX.ES10.PROC AND COPY ENTIRE DATA SET*** //* D80WW.ES10V11.PROC. *** //*************************************************************** //STEP1 EXEC PGM=IEBCOPY //SYSUT1 DD DSN=D80WW.ES10V11.PROC,DISP=SHR //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.ES10.PROC, // LIKE=D80WW.ES10V11.PROC //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
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
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-1
Student Exercises
LAB5#12 //TSOFSXX2 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //**************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#12) *** //* DOC: ALLOCATE TSOFSXX.COPY.CNTL AND COPY ENTIRE DATA SET *** //* TSOFSXX.ES10.CNTL. *** //**************************************************************** //STEP1 EXEC PGM=IEBCOPY //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.COPY.CNTL, // LIKE=TSOFSXX.ES10.CNTL //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
LAB5#13 //TSOFSXX3 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //***************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#13) *** //* DOC: COPY MEMBER JOBCARD FROM D80WW.ES10V11.CNTL WITH REP *** //***************************************************************** //STEP1 EXEC PGM=IEBCOPY //IN DD DISP=SHR,DSN=D80WW.ES10V11.CNTL //OUT DD DISP=SHR,DSN=TSOFSXX.COPY.CNTL //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY OUTDD=OUT,INDD=IN SELECT MEMBER=((JOBCARD,,R))
A-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#14 //TSOFSXX4 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#14) ** //* DOC: DOES A SECURE COMPRESS. ** //* 1.STEP: ALLOCATE A TEMPORARY DATA SET ** //* 2.STEP: IF STEP1 RUNS WITH RC=0 ** //* ALLOCATE TSOFSXX.COMPRESS.DATA ** //* COPY TSOFSXX.COPY.CNTL INTO TSOFSXX.COMPRESS.DATA ** //* 3.STEP: IF STEP2 RUNS WITH RC=0 ** //* DELETE TSOFSXX.COMPRESS.DATA ** //*************************************************************** //STEP1 EXEC PGM=IEFBR14 //DD1 DD DISP=(,CATLG),DSN=TSOFSXX.COMPRESS.DATA, // LIKE=TSOFSXX.COPY.CNTL //TESTS1 IF (STEP1.RC=0) THEN //STEP2 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.COPY.CNTL //SYSUT2 DD DISP=SHR,DSN=TSOFSXX.COMPRESS.DATA //SYSIN DD DUMMY //ENDIFS1 ENDIF //TESTS12 IF ((STEP1.RC NE 0) OR (STEP2.RC NE 0)) THEN //DELETE EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=TSOFSXX.COMPRESS.DATA //ENDIFS12 ENDIF
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-3
Student Exercises
LAB5#15 //TSOFSXX5 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#15) ** //* DOC: COMPRESS DATA SET TSOFSXX.COPY.CNTL INPLACE ** //*************************************************************** //STEP1 EXEC PGM=IEBCOPY //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.COPY.CNTL //SYSUT2 DD DISP=SHR,DSN=TSOFSXX.COPY.CNTL //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //TESTS1 IF ((STEP1.RC=0) THEN //DELETE EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=TSOFSXX.COMPRESS.DATA //ENDIFS1 ENDIF
LAB5#16 //TSOFSXX6 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //**************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#16) *** //* DOC: COPY DATA SET TSOFSXX.ES10.CNTL INTO DATA SET *** //* TSOFSXX.COPY.PDS *** //**************************************************************** //STEP1 EXEC PGM=IEBCOPY //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSUT2 DD DISP=SHR,DSN=TSOFSXX.COPY.PDS //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
A-4
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#17 //TSOFSXX7 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //**************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#17) *** //* DOC: COPY DATA SET TSOFSXX.ES10.CNTL INTO DATA SET *** //* TSOFSXX.COPY.PDSE *** //**************************************************************** //STEP1 EXEC PGM=IEBCOPY //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSUT2 DD DISP=SHR,DSN=TSOFSXX.COPY.PDSE //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
LAB5#21 //TSOFSXX1 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#21) ** //* DOC: COPY INSTREAM DATA INTO NEW ALLOCATED DATA SET ** //* TSOFSXX.GENER.COPY#1 ** //*************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DATA,DLM=## TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST ## //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.GENER.COPY#1, // SPACE=(CYL,(1,1,0)),LRECL=80,BLKSIZE=0,RECFM=FB //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-5
Student Exercises
LAB5#22 //TSOFSXX2 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#22) ** //* DOC: COPY DATA SET TSOFSXX.GENER.COPY#1 ** //* INTO NEW ALLOCATED DATA SET TSOFSXX.GENER.COPY#2 ** //*************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.GENER.COPY#1 //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.GENER.COPY#2, // LIKE=TSOFSXX.GENER.COPY#1 //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
LAB5#23 //TSOFSXX3 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#23) *** //* DOC: PRINT DATA SET TSOFSXX.GENER.COPY#1. *** //*************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.GENER.COPY#1 //SYSUT2 DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
LAB5#24 //TSOFSXX4 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //**************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#24) *** //* DOC: PRINT MEMBER "JOBCARD" FROM DSET TSOFSXX.ES10.CNTL. *** //**************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL(JOBCARD) //SYSUT2 DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
A-6
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#25 //TSOFSXX5 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#25) *** //* DOC: CREATE MEMBER "TEST" IN PDS "TSOFSXX.COPY.CNTL" FROM*** //* INSTREAM DATA. *** //**************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DATA,DLM=## TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB BBBB TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST ## //SYSUT2 DD DISP=OLD,DSN=TSOFSXX.COPY.CNTL(TEST) //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-7
Student Exercises
LAB5#31 //TSOFSXX1 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#31) *** //* DOC: OVERWRITE DD STATEMENTS ON A INSTREAM PROCEDURE *** //*************************************************************** //COMP PROC //************************************************************ //***** MAKE BACKUP //************************************************************ //S1 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.ES10.BACK, // LIKE=TSOFSXX.ES10.CNTL //SYSIN DD DUMMY //************************************************************ //***** COMPRESS DATA SET //************************************************************ //IFOK1 IF (S1.RC=0) THEN //S2 EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSUT2 DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL //SYSIN DD DUMMY //IFOKEND1 ENDIF //************************************************************ //***** COMPRESS SUCCESSFUL, DELETE BACKUP //************************************************************ //IFOK2 IF (S2.RC=0) THEN //S3 EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=TSOFSXX.ES10.BACK // ELSE //IFOKEND2 ENDIF // PEND //FINAL EXEC COMP //S1.SYSUT1 DD DSN=TSOFSXX.COPY.CNTL //S1.SYSUT2 DD DSN=TSOFSXX.ES10.BACK,LIKE=TSOFSXX.ES10.CNTL //S2.SYSUT1 DD DSN=TSOFSXX.COPY.CNTL //S2.SYSUT2 DD DSN=TSOFSXX.COPY.CNTL //S3.DD1 DD DSN=TSOFSXX.ES10.BACK
A-8
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#32 //TSOFSXX2 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#32) *** //* DOC: OVERWRITE CATALOGUED PROCEDURE *** //*************************************************************** //SEARCH JCLLIB ORDER=(D80WW.ES10V11.PROC) //START EXEC PROC=COMP, // INDS=TSOFSXX.ES10.CNTL, // BACK=TSOFSXX.ES10.BACK
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-9
Student Exercises
LAB5#33 //TSOFSXX3 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#33) *** //* DOC: OVERWRITE OWN CATALOGUED PROCEDURE *** //*************************************************************** //SEARCH JCLLIB ORDER=(D80WW.ES10V11.PROC) //IEBCOPY EXEC PROC=COPY, // PROG=IEBCOPY, // DISPI=SHR, // INDS=TSOFSXX.ES10.CNTL, // DISPO='(,CATLG)', // OUTDS=TSOFSXX.ES10.XXXX, // LIKEDS=TSOFSXX.ES10.CNTL //IEBGENER EXEC PROC=COPY, // PROG=IEBGENER, // DISPI=SHR, // INDS=TSOFSXX.GENER.COPY#1, // DISPO='(,CATLG)', // OUTDS=TSOFSXX.ES10.YYYY, // LIKEDS=TSOFSXX.GENER.COPY#1 //* END OF JOB ................................................................ //*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 ................................................................
A-10 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#34 //TSOFSXX1 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#34) ** //* DOC: COPY MEMBER "SORTTEST" FROM "D80WW.ES10V11.CNTL" THEN** //* USE ICEMAN (DFSORT) TO SORT DATA FROM DATA SET ** //* "TSOFSXX.ES10.CNTL(SORTTEST) ** //*************************************************************** //COPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //IN1 DD DISP=SHR,DSN=D80WW.ES10V11.CNTL //OUT1 DD DISP=OLD,DSN=TSOFSXX.ES10.CNTL //SYSIN DD * COPY OUTDD=OUT1,INDD=IN1 SELECT MEMBER=(SORTTEST) //SORT EXEC PGM=ICEMAN //SYSOUT DD SYSOUT=* //SORTIN DD DISP=SHR,DSN=TSOFSXX.ES10.CNTL(SORTTEST) //SORTOUT DD DISP=OLD,DSN=TSOFSXX.ES10.CNTL(SORTOUT1) //SYSIN DD * SORT FIELDS=(1,3,CH,D,4,12,CH,A) OPTION SKIPREC=1
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-11
Student Exercises
LAB5#41 //TSOFSXX1 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#41) *** //* DOC: CREATE TEST DATA IN PS "TSOFSXX.ES10.INPUT" FROM *** //* INSTREAM DATA. *** //*************************************************************** //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD DATA,DLM=## TEST1 TEST2 TEST3 TEST4 TEST5 TEST6 TEST7 TEST8 TEST9 TEST10 TEST11 TEST12 TEST13 TEST14 TEST15 TEST16 ## //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.ES10.INPUT, // SPACE=(TRK,(1,0)),RECFM=FB,LRECL=80,BLKSIZE=0 //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
A-12 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
LAB5#42 //TSOFSXX1 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#42) * //* DOC: CREATE PDS "TSOFSXX.ES10.DATA" * //* FILL MEMBER TEXT1 WITH INSTREAM DATA * //* COPY MEMBER TEXT1 TO NEW PS "TSOFSXX.ES10.OUT" * //* PRINT PS "TSOFSXX.ES10.OUT" TO SYSOUT=* * //* IF RC=0 DELETE PS "TSOFSXX.ES10.OUT" * //*************************************************************** //S1 EXEC PGM=IEBGENER //SYSUT1 DD DATA,DLM=## 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 ## //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.ES10.DATA(TEXT1), // LIKE=TSOFSXX.ES10.CNTL //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //IFS1OK IF (S1.RC=0) THEN //S2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.DATA(TEXT1) //SYSUT2 DD DISP=(,CATLG),DSN=TSOFSXX.ES10.OUT, // SPACE=(TRK,(1,1)),RECFM=FB,LRECL=80,BLKSIZE=0 //SYSIN DD DUMMY //ENDIFS2 ENDIF //IFS2OK IF (S2.RC=0) THEN //S3 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=TSOFSXX.ES10.OUT //SYSUT2 DD SYSOUT=* //SYSIN DD DUMMY //ENDIFS3 ENDIF //IFS3OK IF (S3.RC=0) THEN //S4 EXEC PGM=IEFBR14 //DD1 DD DISP=(OLD,DELETE),DSN=TSOFSXX.ES10.OUT //ENDIFS4 ENDIF
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-13
Student Exercises
LAB5#43 //TSOFSXXA JOB (ACCOUNT),'ES100',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=&SYSUID,CLASS=B,REGION=6M //*************************************************************** //* JOB SUBMITTED THROUGH INTRDR by LAB5#44 *** //* DOC: SUBMIT JOB THROUGH SYSOUT=(,INTRDR) *** //************************************************************* //S1 EXEC PGM=IEFBR14 //DD1 DD DISP=SHR,DSN=D80WW.ES10V11.CNTL
LAB5#44 //TSOFSXX2 JOB (ACCOUNT),'TSOFSXX',MSGCLASS=Q,MSGLEVEL=(1,1), // NOTIFY=TSOFSXX,CLASS=B,REGION=6M //**************************************************************** //* JOB SUBMITTED FROM TSOFSXX.ES10.CNTL(LAB5#44) *** //* DOC: USE IEBGENER TO ROUTE ANY JOB TO INTRDR *** //* will submit LAB5#43 JOB TO INTRDR *** //**************************************************************** //PROC32 PROC DS=FORGOTTEN,OUT=* //S1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=&DS. //SYSUT2 DD SYSOUT=&OUT. //* LIKE=TSOFSXX.ES10.CNTL //SYSIN DD DUMMY // PEND //RUNPROC EXEC PROC=PROC32, // DS=TSOFSXX.ES10.CNTL(LAB5#43), // OUT=(,INTRDR)
A-14 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
SORTOUT1 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
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
© Copyright IBM IBM Corp. 2001, 2013
Appendix A. TSOFS01, TSOFS01, TSOFS02, TSOFS03, TSOFS03, exercise solutions
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
A-15
Student Exercises
A-16 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Appe Append ndix ix B. JCL: JCL: Ex Exam ampl ples es JCL -useful sample JCLs for any use • JCL Examples of DD Statements for Existing data • Sample DD Statements for Creating data • Defining VSAM • Examples of IDCAMS to Print • Examples of IDCAMS to copy • Examples of Running TSO in batch, running REXX • Examples of ISPF Compare in batch • Example of a Safe Compress • Example of Copying a PDS • IEFBR14 • AMBLIST - Show Load Module Attribute • SORT Examples
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-1
Student Exercises
JCL Examples of DD Statements for Existing data Open for INPUT to READ. Open for OUTPUT to completely replace VSAM //ddname DD DSN=dataset-name,DISP=SHR 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)
In-stream data. 80 characters, fixed format //ddname DD * data goes here /* Example: //INFILE DD * Linda Ellen /*
Disk or Tape non-gdg, non-pds member. //ddname DD DSN=dataset-name,DISP=SHR Example: //INFILE DD DSN=MY.DATASET.DATA,DISP=SHR
Disk or tape, gdg. //ddname DD DSN=dataset-name(0),DISP=SHR Example: //INFILE DD DSN=MY.DATASET.DATA(0),DISP=SHR
B-2
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Disk, existing PDS member. //ddname DD DSN=dataset-name(member-name),DISP=SHR Example: //INFILE DD DSN=MY.DATASET.DATA(M1),DISP=SHR
Temporary disk. Previously Passed //ddname DD DSN=&&dataset-name,DISP=(OLD,DELETE)
or OLD,PASS
Example: //INFILE DD DSN=&&TEMP,DISP=(OLD,DELETE)
Sample DD Statements for Creating data Open for OUTPUT only VS VSAM //ddname DD DSN=dataset-name,DISP=SHR Example: //INFILE DD DSN=MY.DATASET.DATA,DISP=SHR
“SEQUENTIAL” Throw away the file. //ddname DD DUMMY, // DCB=(LRECL=rec-len,BLKSIZE=blk-size,RECFM=rec-format) Example: //INFILE DD DUMMY, // DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
Spooled to printer //ddname dd SYSOUT=printer-class Example: //OUTFILE DD SYSOUT=*
Disk, non-gdg, non-pds member. //ddname DD DSN=dataset-name,DISP=(NEW,CATLG,DELETE),
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-3
Student Exercises
//
UNIT=diskunit,SPACE=(TRK,1)
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
Disk, sequential gdg. //ddname DD DSN=dataset-name(+1),DISP=(NEW,CATLG,DELETE), // UNIT=diskunit,SPACE=(TRK,1), // DCB=model-dscb optional at some companies 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
Disk, new or existing PDS member. Existing member will be overwritten //ddname DD DSN=dataset-name(member-name),DISP=SHR Example: //OUTFILE DD DSN=MY.DATASET.DATA(M1),DISP=SHR
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
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Temporary disk. Not used again in same job. A work file. //ddname DD UNIT=diskunit,SPACE=(TRK,1) Example: //OUTFILE DD
UNIT=SYSDA,SPACE=(TRK,1)
Tape, gdg. //ddname DD DSN=dataset-name(+1),DISP=(NEW,CATLG,DELETE), // UNIT=tapeunit, // DCB=model-dscb optional at some companies Example: //OUTFILE DD DSN=MY.DATASET.DATA(+1),DISP=(NEW,CATLG,DELETE), // UNIT=TAPE, // DCB=MODEL.DSCB optional at some companies. find out it
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-5
Student Exercises
Defining VSAM //* 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 REPLICATE NOREPLICATE REUSE NOREUSE SHAREOPTIONS
Allow a restart of a load. Opposite of recovery. The cluster will not be part of a dataspace containing other clusters. Opposite of unique. Copy each index record on the track as many times as it will fit. Opposite of unique. If there is data in the cluster, cluster, a repro or load will clobber the existing data. Can do only one repro or load on this cluster. cluster. region system
region means roughly “this CICS” (an MVS can have more than one CICS running)
1 2 3 4
Many jobs can read at same time. Many jobs can read, only one can write. Many jobs can read, many jobs can update, you are on your own regarding data integrity. Many jobs can read, many jobs can update.
system means roughly “this MVS”
3
B-6
Many Many jobs jobs can can rea read, d, many many jobs jobs can can upd updat ate, e, you you are are on your your own own reg regar ardi ding ng data data integrity.
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
4
Many jobs can read, ma many jobs can update.
//* 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) /*
-
//* LOAD A VSAM DATASET (KSDS, ESDS, RRDS) THEN PRINT IT //LOADVSAM EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(INDD) OUTDATASET(userid.VSAM.xxxx) PRINT INDATASET(userid.VSAM.xxxx) CHARACTER /* //INDD ELENA LINDA NADIA SUSAN /*
DD *
for KSDS, records must be in order
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-7
Student Exercises
Examples of IDCAMS to Print General JCL to print a file (sequential, VSAM, PDS member) //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INFILE DD DSN=name of file to be printed,DISP=SHR //SYSIN DD * PRINT INFILE(INFILE) CHARACTER /* Example of JCL to print the file ABCCO.TEST.DATA (could be sequential, VSAM, PDS member) //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INFILE DD DSN=ABCCO.TEST.DATA,DISP=SHR //SYSIN DD * PRINT INFILE(INFILE) CHARACTER /* Notes:change CHARACTER to DUMP in order to print in both character and hex Change CHARACTER to HEX in order to print in hex
B-8
z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Examples of IDCAMS to copy General JCL to copy a file (sequential, VSAM, PDS member) to an existing file (sequential, VSAM, PDS member) //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INFILE DD DSN=name of file to be copied,DISP=SHR //SYSIN DD * REPRO INFILE(INFILE) OUTFILE(OUTFILE) /* //OUTFILE DD DSN=name of file to be replaced,DISP=SHR
Example of JCL to copy the file ABCCO.TEST.DATA (could be sequential, VSAM, PDS member) to the existing file ABCCO.SAMPLE.DATA //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INFILE DD DSN=ABCCO.TEST.DATA,DISP=SHR //SYSIN DD * REPRO INFILE(INFILE) OUTFILE(OUTFILE) /* //OUTFILE DD DSN=ABCCO.SAMPLE.DATA,DISP=SHR Notes: IDCAMS will copy any of the following types: Sequential PDS member VS VSAM ISAM to any of the following: Sequential PDS member VS 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.
Using IDCAMS to delete a file. If the file is not found, © Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-9
Student Exercises
there will be an error message and high return code. //* delete with idcams //DELETE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* DELETE dataset-name
Using IDCAMS to shorten a file by copying it with the skip or count parameter.
//* shorten a file //SHORT01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(INDD) OUTFILE(OUTDD) SKIP(0001000) COUNT(0001000) /* //INDD DD DSN=input-file,DISP=OLD //OUTDD DD DSN=output-file, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(5,2),RLSE), // DCB=(RECFM=FB,LRECL=xx) //*
B-10 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Examples of Running TSO in batch, running REXX You can execute TSO commands, CLISTS, REXX programs. //* Run TSO in batch //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200 //SYSPROC DD DSN=your-id.clist,DISP=SHR optional //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(your-id) LISTCAT LEVEL(your-id) /*
Using TSO in batch to delete a file. //* Run TSO in batch //* also IKEFFT01, IKJEFT1B //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200 //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(your-id) DELETE ‘dataset-name’
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-11
Student Exercises
Running a REXX program in batch Obtain the name of your REXX library and fill it in. If your REXX program reads a file, you can put in a DD for the file and avoid having to do an ALLOC in the program. //RUNREXX EXEC PGM=IKJEFT1A,DYNAMNBR=200 //SYSEXEC DD DSN=dsn-of-rexx-library,DISP=SHR //INFILE DD DISP=SHR,DSN=dsn-of-input-file //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //* //SYSTSIN DD * PROFILE PREFIX(O054) %MYREXX
B-12 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
Examples of ISPF Compare in batch //*SPF compare in batch //SUPER1 EXEC PGM=ISRSUPC, // PARM=(DELTAL,LINECMP,'','') //OLDDD DD DSN=old-dataset, // DISP=SHR //NEWDD DD DSN=new-dataset, // DISP=SHR //OUTDD DD SYSOUT=* //*
The ISPF Search. Lower overhead, won’t tie up your terminal during search. //* spf search option 3.14 //SEARCH EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC') //NEWDD DD DSN=library-to-be-searched, // DISP=SHR //OUTDD DD SYSOUT=* //SYSIN DD * SRCHFOR 'character-string-to-be-searched-for' SELECT MEMBER1,MEMBER2 optional select. restricts search to these members SELECT MEMBER3,MEMBER4 /*
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-13
Student Exercises
Example of a Safe Compress The world’s safest compress for PDS’s. Can’t destroy destroy your library. Creates a ba backup first. If the compress works, it deletes the backup. If the compress fails, it keeps the backup. //* the ultimate batch compress //* creates a backup library first. //* then deletes the backup last, if all worked //ERASE EXEC PGM=IEFBR14 //OUTPDS DD DSN=your-id.name-of-backup-lib,DISP=(MOD,DELETE), // UNIT=SYSDA,SPACE=(TRK,0) //* //COPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY INDD=INPDS,OUTDD=OUTPDS /* //INPDS DD DSN=library-to-be-compressed,DISP=SHR //OUTPDS DD DSN=your-id.name-of-backup-lib,REFDD=*.INPDS, // UNIT=SYSDA, or your disk unit, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(100,10,50),RLSE) //* //* produce jcl error if the previous step failed //JCLOUT EXEC PGM=IEFBR14,COND=(0,EQ,COPY) //DD1 DD DSN=NOT.THERE,DISP=SHR //* //* this will do the compress //COMPRESS EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY INDD=INPDS,OUTDD=INPDS /* //INPDS DD DSN=library-to-be-compressed,DISP=SHR //* //* if compress fails, send tso message // IF (RC GT 0) THEN //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200,COND=(0,LT) //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(your-id) SEND 'COMPRESS FAILED library-to-be-compressed' USER(your-id) LOGON WAIT B-14 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
// //ERASE //OUTPDS // //
ELSE EXEC PGM=IEFBR14,COND=(0,LE) DD DSN=your-id.name-of-backup-lib,DISP=(MOD,DELETE), UNIT=SYSDA,SPACE=(TRK,0) ENDIF
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-15
Student Exercises
Example of Copying a PDS //* COPY ONE PDS TO ANOTHER DO NOT REPLACE LIKE-NAMED MEMBERS //LIBCOPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(3,3)) //SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(3,3)) //SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(3,3)) //INLIB DD DSN=library-containing-members,DISP=SHR //OUTLIB DD DSN=library-to-put-members-in,DISP=SHR //SYSIN DD * COPY INDD=INLIB,OUTDD=OUTLIB /* //* OPTIONAL THINGS: //* //* TO COPY BUT EXCLUDE TWO MEMBERS: //* COPY INDD=INLIB,OUTDD=OUTLIB //* EXCLUDE MEMBER=(m1,m2) //* //* TO COPY AND REPLACE: //* COPY INDD=((INLIB,R)),OUTDD=OUTLIB //*iebcopy to copy a pds //*in: pds //*out: pds //*copy only members named MEM1 and MEM2 //*do not replace those members if they exist in the output pds //IEBCOPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY INDD=(INPDS),OUTDD=OUTPDS SELECT MEMBER=MEM1 SELECT MEMBER=MEM2 /* //* //* //* //*iebcopy to copy a pds //*in: pds //*out: pds //*copy only members named MEM1 and MEM2 //*replace those members if they exist in the output pds //IEBCOPY EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* B-16 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
//SYSIN DD * COPY INDD=((INPDS,R)),OUTDD=OUTPDS SELECT MEMBER=MEM1 SELECT MEMBER=MEM2 /*
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
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. //ERASE //OUTPDS // //*
EXEC PGM=IEFBR14 DD DSN=your-id.name-of-backup-lib,DISP=(MOD,DELETE), UNIT=SYSDA,SPACE=(TRK,0)
Using IEFBR14 to avoid deleting and reallocating a file. If you run a job frequently, and it needs the same output dataset each time, you can use this JCL. It finds the dataset, if it already exists. Then it clobbers it, avoiding the overhead of reallocating. Note that the disposition on the step that actually uses the file, later in the job, must be (OLD,CATLG) If the dataset doesn't exist, it is created. //FINDPASS //DD1 // // //*
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
B-18 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
SORT Examples //* 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 //* sort and do totals //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 state * sum phone number SORT FIELDS=(19,2,CH,A),DYNALLOC=(SYSDA,6),FILSZ=E2000 SUM FIELDS=(1,7,ZD) * ZD is zoned decimal. signed or unsigned * PD packed decimal. BI Binary /* //* END OF JOB
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-19
Student Exercises
//* to sort and shift fields //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 /* //SORTOUT DD SYSOUT=* //SYSIN DD * number in column 1, name in 10, state in 19 * sort by name (name is now in 1) SORT FIELDS=(01,09,CH,A),DYNALLOC=(SYSDA,6),FILSZ=E2000 INREC FIELDS=(01:10,09, move name from 10 to 1 10:01,07) move number from 1 to 10 * inrec moves data before sorting starts /* //* END OF JOB
//* to sort and shift fields //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 /* //SORTOUT DD SYSOUT=* //SYSIN DD * * sort by name SORT FIELDS=(10,09,CH,A),DYNALLOC=(SYSDA,6),FILSZ=E2000 OUTREC FIELDS=(01:10,09, move name from 10 to 1 10:01,07) move number from 1 to 10 * outrec moves data after sorting ends /* //* END OF JOB
//* PLAIN COPY //SORTIT EXEC PGM=SORT,PARM=’ABEND’ //SYSOUT DD SYSOUT=* //SORTIN DD * number in column 1, name in 10, state in 19
B-20 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
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 /*
//* 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 /*
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-21
Student Exercises
//* COPY BUT ONLY IF LITERAL CT IS IN COLUMN 19 OF DATA //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 INCLUDE COND=(19,2,CH,EQ,C'CT') ONLY IF CT IN COL 19 /*
//* 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 /*
//* COPY. INCLUDE RECORDS WITH LITERAL CT IN COLUMN 19, //* OR LITERAL J IN COLUMN 10 //SORTIT EXEC PGM=SORT,PARM=’ABEND’ //SYSOUT DD SYSOUT=*
B-22 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
//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 USING AN OR * COPY IF CT IN COL 19 * OR J IN COL 10 INCLUDE COND=(19,2,CH,EQ,C'CT',OR,10,1,CH,EQ,C'J') * AND WORKS TOO. ALSO X'C1' FOR A /*
//* COPY INPUT FILE TO OUTPUT FILE BUT MOVE AS FOLLOWS //* PUT THIS IN OUTPUT COLUMN 20: 9 CHARACTERS STARTING IN COLUMN 1 //* COLUMN 40: 16 CHARACTERS STARTING IN COLUMN 10 //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 * * COPY INPUT FILE TO OUTPUT FILE BUT MOVE AS FOLLOWS * PUT THIS IN OUTPUT COLUMN 20: 9 CHARACTERS STARTING IN COLUMN 1 * COLUMN 40: 16 CHARACTERS STARTING IN COLUMN 10 SORT FIELDS=COPY INREC FIELDS=(20:1,09,40:10,16) /* //* COPY INPUT FILE TO OUTPUT FILE BUT MOVE AS FOLLOWS //* PUT THIS IN OUTPUT COLUMN 20: 9 CHARACTERS STARTING IN COLUMN 1 //* COLUMN 40: 16 CHARACTERS STARTING IN COLUMN 10
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-23
Student Exercises
//* include only records from CT //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 * * COPY INPUT FILE TO OUTPUT FILE BUT MOVE AS FOLLOWS * PUT THIS IN OUTPUT COLUMN 20: 9 CHARACTERS STARTING IN COLUMN 1 * COLUMN 40: 16 CHARACTERS STARTING IN COLUMN 10 SORT FIELDS=COPY INREC FIELDS=(20:1,09,40:10,16) INCLUDE COND=(19,2,CH,EQ,C'CT') only if CT in column 19 * include condition looks at input columns before INREC or OUTREC work /*
//* //*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
B-24 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0 Student Exercises
AP
//*from fields on the input record //* 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) INCLUDE COND=((51,7,CH,EQ,C'STRING1'),OR, (51,7,CH,EQ,C'STRING2')) OUTREC FIELDS=(01:11,08, 20:51,19) * a literal may be used in the outrec: * OUTREC FIELDS=(C'!', * 20:C'ABCD') SUM FIELDS=NONE /* //* //*
© Copyright IBM IBM Corp. 2001, 2013
Appendix B. JCL: JCL: Examples
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
B-25
Student Exercises
B-26 z/OS Fundamentals
© Copyright IBM Corp. 2001, 2013 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V8.0
backpg
Back page
CONTACTO Teléfono
91 761 21 78 Póngase en contacto con nuestro equipo y le informaremos informaremos de cualquier duda o cuestión que pueda surgirle. Email
[email protected] Mándenos un email y le atenderemos enseguida. Online
@Arrow_Edu_ES O bien puede contactarnos a través de nuestro perfil en Twitter. Visítenos
Arrow ECS Education Services Avenida de Europa 21, Parque Empresarial La Moraleja 28108 Alcobendas, Madrid
EDUCATION S
E
R
V
I
C
E
S