JCL User Guide
JCL User Guide
SA22-7598-04
z/OS
SA22-7598-04
Note Before using this information and the product it supports, be sure to read the general information under Appendix E, Notices, on page E-1.
Fifth Edition, September 2004 This is a major revision of SA22-7598-03. This edition applies to Version 1 Release 6 of z/OS (5694-A01) and to all subsequent releases and modifications until otherwise indicated in new editions. IBM welcomes your comments. A form for readers comments may be provided at the back of this document, or you may address your comments to the following address: v International Business Machines Corporation v Department 55JA, Mail Station P384 v 2455 South Road v Poughkeepsie, NY 12601-5400 v United States of America v v FAX (United States & Canada): 1+845+432-9405 v FAX (Other Countries): v Your International Access Code +1+845+432-9405 v v IBMLink (United States customers only): IBMUSM10(MHVRCFS) v Internet e-mail: [email protected] v World Wide Web: www.ibm.com/servers/eserver/zseries/zos/webqs.html If you would like a reply, be sure to include your name, address, telephone number, or FAX number. Make sure to include the following in your comment or note: v Title and order number of this document v Page number or topic related to your comment When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1988, 2004. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About This Book . . . . . . . . . . . . . Who Should Use This Book . . . . . . . . . Where to Find More Information . . . . . . . . Programs . . . . . . . . . . . . . . . Hardware . . . . . . . . . . . . . . . Accessing z/OS licensed documents on the Internet Using LookAt to look up message explanations . . Summary of Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv xv xv xv xv xvi xvi
. . . . . . . . . . . . . . . . . . . . . xix
Part 1. Introduction
Chapter 1. Introduction - Job Control Statements . . . . . . . . . . . 1-1 JCL Statements . . . . . . . . . . . . . . . . . . . . . . . . 1-1 JECL Statements . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Chapter 2. Introduction - Job Control Language (JCL) . . . Understanding JCL . . . . . . . . . . . . . . . . . Chez MVS. . . . . . . . . . . . . . . . . . . How This Relates to JCL . . . . . . . . . . . . . . Job Control Statements . . . . . . . . . . . . . . Required Control Statements . . . . . . . . . . . . Exercise: Creating and Entering a Job . . . . . . . . . . Before You Begin . . . . . . . . . . . . . . . . . Step 1. Allocate a Data Set to Contain Your JCL . . . . . Step 2. Edit the JCL Data Set and Add the Necessary JCL . Step 3. Submit the JCL to the System as a Job . . . . . Step 4. View and Understand the Output from the Job . . . Step 5. Make Changes to Your JCL . . . . . . . . . . Step 6. View and Understand Your Final Output . . . . . More Complex Jobs . . . . . . . . . . . . . . . . In-Stream and Cataloged Procedures . . . . . . . . . Input Streams . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . Installation Conventions Worksheet. . . . . . . . . . Using ISPF to Allocate and Edit a Data Set . . . . . . . Using SDSF to View Held Output from a Job . . . . . . Helpful Utilities . . . . . . . . . . . . . . . . . Chapter 3. Job Control Entering Jobs . . . . Processing Jobs . . . Requesting Resources . Task Charts . . . . . Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2-1 2-1 2-1 2-2 2-3 2-3 2-3 2-4 2-4 2-6 2-7 2-8 2-9 2-11 2-11 2-12 2-13 2-13 2-13 2-15 2-17 3-1 3-1 3-2 3-2 3-2
. . . . .
iii
Identification of Job . . . . . Identification of Step . . . . Identification of Procedure . . Identification of INCLUDE Group Identification of Account . . . For Local Execution . . . . For Remote Execution . . . Identification of Programmer . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4-1 4-2 4-2 4-3 4-3 4-3 4-4 4-4 5-1 5-1 5-2 5-2 5-2 5-3 5-3 5-4 5-4 5-4 5-4 5-6 5-7 6-1 6-1 6-2 6-2 6-3 6-3 6-4 7-1 7-1 7-2 7-2 7-2 7-2 7-3 7-3 7-3 7-4 7-5 7-5 7-5 7-6 7-6 7-7
Chapter 5. Entering Jobs - Execution . . . . . . . . . Execution of Program . . . . . . . . . . . . . . . . Execution of Procedure . . . . . . . . . . . . . . . Execution when Restarting and with Checkpointing (non-APPC) Restarting after Abnormal Termination . . . . . . . . . Restarting When the System Failed in a JES2 System . . . Restarting When the System Failed in a JES3 System . . . Deadline or Periodic Execution in a JES3 System . . . . . . Use of Deadline Scheduling . . . . . . . . . . . . . Use of Periodic Scheduling . . . . . . . . . . . . . Execution when Dependent on Other Jobs in a JES3 System . Execution at Remote Node (non-APPC) . . . . . . . . . Considerations when Submitting a Remote Job. . . . . . Chapter 6. Entering Jobs - Job Input Control . . . . . Job Input Control by Holding Job Entrance (Non-APPC) . . Job Input Control by Holding Local Input Reader (Non-APPC) Job Input Control by Copying Input Stream (Non-APPC) . . Job Input Control from Remote Work Station . . . . . . JES2 Remote Job Entry . . . . . . . . . . . . . JES3 Remote Job Processing . . . . . . . . . . . Chapter 7. Entering Jobs - Communication . . . . . . Communication from JCL to System (Non-APPC) . . . . . Communication from JCL to Operator (Non-APPC) . . . . Communication from JCL to Programmer . . . . . . . . Communication from JCL to Program . . . . . . . . . PARM Values for IBM-Supplied Programs . . . . . . . Communication from System to Operator . . . . . . . . Messages during Volume Mounting . . . . . . . . . Messages When Job Exceeds Output Limit . . . . . . Communication from System to Userid . . . . . . . . . Job Completion . . . . . . . . . . . . . . . . Print Completion . . . . . . . . . . . . . . . . Communication from Time Sharing Userid to a JES3 System Communication from Functional Subsystem to Programmer . Communication through Job Log . . . . . . . . . . . Printing Job Log and Sysout Data Sets Together . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 8. Entering Jobs - Protection . . . . . . . . . . . . . . . 8-1 Protection through RACF . . . . . . . . . . . . . . . . . . . . . 8-1 Chapter 9. Entering Jobs - Resource Control Resource Control of Program Library . . . . System Library. . . . . . . . . . . . Private Library . . . . . . . . . . . . Temporary Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1 9-1 9-1 9-2 9-4
iv
Resource Control of Procedure Library . . . . . . . . Retrieving a Procedure Library . . . . . . . . . . Updating a Procedure Library . . . . . . . . . . Resource Control of INCLUDE Group . . . . . . . . Retrieving an INCLUDE Group . . . . . . . . . . Resource Control of Address Space . . . . . . . . . Types of Storage . . . . . . . . . . . . . . . Requesting Amount and Type of Storage . . . . . . Resource Control of the Processor . . . . . . . . . Selecting a Processor Using A Scheduling Environment Selecting a Processor in JES2 . . . . . . . . . . Selecting a Processor in JES3 . . . . . . . . . Resource Control of Spool Partitions in a JES3 System .
. 9-4 . 9-5 . 9-5 . 9-6 . 9-6 . 9-6 . 9-6 . 9-7 . 9-8 . 9-8 . 9-9 . . . . . . . . 9-10 . . . . . . . . 9-11
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
Identification as TCAM Message Data Set . . . . . . . . . . . . . 12-10 Identification as Data Set from or to Terminal (Non-APPC) . . . . . . . . 12-10 Chapter 13. Data Set Resources Description of Status . . . . . Data Set Integrity Processing . Description of Data Attributes . . In Data Control Block (DCB) . Migration and Backup (with SMS) - Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1 13-1 13-2 13-4 13-4 13-7 14-1 14-1 14-1 14-2 14-2 14-2 14-3
Chapter 14. Data Set Resources - Protection . . Protection through RACF . . . . . . . . . . Protection with the PROTECT Parameter . . . Protection with the SECMODEL Parameter . . . Protection for ISO/ANSI/FIPS Version 3 Tapes . . Protection by Passwords . . . . . . . . . . Protection of Access to BSAM or BDAM Data Sets .
Chapter 15. Data Set Resources - Allocation . . . . . . . . . . . Allocation of Device . . . . . . . . . . . . . . . . . . . . . Device Allocation for SMS-Managed Data Sets . . . . . . . . . . Device Allocation for Non-SMS-Managed Data Sets . . . . . . . . Device Allocation in a JES3 System . . . . . . . . . . . . . . Allocation of Volume . . . . . . . . . . . . . . . . . . . . . Volume Allocation for SMS-Managed Data Sets . . . . . . . . . Volume Allocation for Non-SMS-Managed Data Sets . . . . . . . . Volume Allocation for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume . . . . . . . . . . . . . . Interactions Between Device and Volume Allocation . . . . . . . . . Relationship of the UNIT and VOLUME Parameters (Non-SMS-Managed Data Sets) . . . . . . . . . . . . . . . . . . . . . . Relationship of the UNIT and VOLUME Parameters (SMS-Managed Data Sets) . . . . . . . . . . . . . . . . . . . . . . . . Unit and Volume Affinity for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume . . . . . . . . . . . Stacking Data Sets . . . . . . . . . . . . . . . . . . . . . Examples of Data Set Stacking. . . . . . . . . . . . . . . . Data Set Stacking and Tape Mount Management . . . . . . . . . Allocation of Direct Access Space . . . . . . . . . . . . . . . . Requesting System Assigned Space . . . . . . . . . . . . . . Requesting Specific Tracks . . . . . . . . . . . . . . . . . Allocation of Virtual I/O . . . . . . . . . . . . . . . . . . . . Backward References to VIO Data Sets . . . . . . . . . . . . Allocation with Volume Premounting in a JES2 System . . . . . . . . Dynamic Allocation . . . . . . . . . . . . . . . . . . . . . Chapter 16. Data Set Resources - Processing Control Processing Control by Suppressing Processing . . . . Processing Control by Postponing Specification . . . . Processing Control with Checkpointing . . . . . . . Processing Control by Subsystem . . . . . . . . . Requesting Subsystem . . . . . . . . . . . . Program Control Statements for a Subsystem . . . . Processing Control by TCAM Job or Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. 15-17 . 15-24 . 15-24 . 15-28 . . . . . . . . . . . 15-29 15-37 15-38 15-40 15-42 15-43 15-47 15-47 15-49 15-50 15-50 . . . . . . . . 16-1 16-1 16-2 16-4 16-4 16-4 16-4 16-5
vi
Unallocation End Processing . . . . . . . . . . . . Disposition End Processing of Data Set . . . . . . . . Disposition Controlled by DISP Parameter . . . . . . Disposition Controlled by Time . . . . . . . . . . Release of Unused Direct Access Space in End Processing Disposition End Processing of Volume . . . . . . . . Disposition of Removable Volumes . . . . . . . . Volume Retention . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 19. Sysout Resources - Description . . . . . . . . . . . . 19-1 Description of Data Attributes . . . . . . . . . . . . . . . . . . . 19-1 Chapter 20. Sysout Resources - Protection . . . . . . . . . . . . . 20-1 Protection of Printed Output . . . . . . . . . . . . . . . . . . . 20-1 Chapter 21. Sysout Resources - Performance Control . . . . . . . . 21-1 Performance Control by Queue Selection (non-APPC). . . . . . . . . . 21-1 Chapter 22. Sysout Resources - Processing Control . . . . . . . . . 22-1 Processing Control with Additional Parameters . . . . . . . . . . . . 22-2 Adding Parameters from OUTPUT JCL Statement . . . . . . . . . . 22-2 Adding Parameters from JES2 /*OUTPUT Statement . . . . . . . . . 22-4 Adding Parameters from JES3 //*FORMAT Statement . . . . . . . . . 22-4 Processing Control by Segmenting . . . . . . . . . . . . . . . . . 22-4 Processing Control with Other Data Sets . . . . . . . . . . . . . . 22-5 Using Output Class . . . . . . . . . . . . . . . . . . . . . 22-5 Using Sysout Data Set Size in a JES3 System . . . . . . . . . . . 22-5 Using Groups in a JES2 System. . . . . . . . . . . . . . . . . 22-6 Processing Control by External Writer . . . . . . . . . . . . . . . . 22-6 Processing Control by Mode . . . . . . . . . . . . . . . . . . . 22-7 Processing Control by Holding . . . . . . . . . . . . . . . . . . 22-7 Holding Using the DD Statement . . . . . . . . . . . . . . . . 22-7 Holding Using the OUTPUT JCL Statement . . . . . . . . . . . . 22-7 Processing Control by Suppressing Output . . . . . . . . . . . . . . 22-8 Using Dummy Status to Suppress Output . . . . . . . . . . . . . 22-8 Using Class to Suppress Output in a JES2 System . . . . . . . . . . 22-9 Using the OUTPUT JCL Statement to Suppress Output in a JES2 System 22-9 Processing Control with Checkpointing . . . . . . . . . . . . . . . 22-10 Processing Control by Print Services Facility . . . . . . . . . . . . . 22-10 Identifying a Library to PSF . . . . . . . . . . . . . . . . . . 22-11 Chapter 23. Sysout Resources - End Processing . . . . . . . . . . 23-1 Unallocation End Processing . . . . . . . . . . . . . . . . . . . 23-1 Chapter 24. Sysout Resources - Destination Control . . Destination Control to Local or Remote Device or to Another Multiple Destinations . . . . . . . . . . . . . . Controlling Output Destination in a JES2 Network . . . Controlling Output Destination in a JES3 Network . . . . . Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-1 24-1 24-2 24-2 24-4
Contents
vii
to Another Processor in a JES3 System to Internal Reader . . . . . . . . to Terminal . . . . . . . . . . . to Assist in Sysout Distribution . . . . . . . . . a . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . . . . . . .
. . . . . . . . .
Chapter 25. Sysout Resources - Output Formatting . Output Formatting to Any Printer. . . . . . . . . . Output Formatting to 3800 Printing Subsystem . . . . Copy Modification . . . . . . . . . . . . . . Character Arrangements. . . . . . . . . . . . Output Formatting to 3211 Printer with Indexing Feature in Output Formatting to Punch . . . . . . . . . . . Interpretation of Punched Cards . . . . . . . . . Output Formatting of Dumps on 3800 Printing Subsystem
. . . . . . . . . . JES2 . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . System . . . . . . . . . . . . . . . . . . . . . . . .
25-1 25-1 25-2 25-3 25-3 25-4 . . 25-4 . . 25-5 . . 25-5 . . . . . 26-1 26-1 26-1 26-2 26-2
Chapter 26. Sysout Resources - Output Limiting . . . Output Limiting . . . . . . . . . . . . . . . . . Limiting Output in an APPC Scheduling Environment . . Limiting Output in a Non-APPC Scheduling Environment . Actions when Limit Exceeded . . . . . . . . . . .
. . . . .
Chapter 27. Sysout Resources - USERDATA OUTPUT JCL Keyword 27-1 References . . . . . . . . . . . . . . . . . . . . . . . . . 27-1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 27-1
Part 6. Examples
Chapter 28. Example - Assemble, Linkedit, and Go . . . . . . . . . . 28-1 Chapter 29. Example - Multiple Output . . . . . . . . . . . . . . 29-1 . . . . . . 30-1 . . . . . . 31-1 . . . . . . 32-1
Chapter 30. Example - Obtaining Output in a JES2 System Chapter 31. Example - Obtaining Output in a JES3 System Chapter 32. Example - Identifying Data Sets to the System
Part 7. Appendixes
Appendix A. Indexed Sequential Data Sets . . . . Creating an Indexed Sequential Data Set . . . . . . Procedure when Allocation Error Occurs . . . . . Area Arrangement of an Indexed Sequential Data Set Retrieving an Indexed Sequential Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A-1 A-4 A-4 A-5
Appendix B. Generation Data Sets . . . . . . . . . . . . Building a GDG Base Entry . . . . . . . . . . . . . . . . Defining Attributes for SMS-Managed Generation Data Sets . . . . Creating an SMS-Managed Generation Data Set . . . . . . . Disposition of SMS-Managed Generation Data Sets . . . . . . Defining Attributes for Non-SMS-Managed Generation Data Sets . Creating a Non-SMS-Managed Generation Data Set. . . . . . Retrieving a Generation Data Set . . . . . . . . . . . . . Deleting and Uncataloging Generation Data Sets . . . . . . . Submitting a Job for Restart . . . . . . . . . . . . . .
. B-1 . B-2 . B-2 . B-3 . B-3 . B-4 . B-5 . B-6 . B-9 . . . . B-10
viii
Appendix C. VSAM Data Sets . . . . . . . . . VSAM Data Sets - With SMS . . . . . . . . . . Creating a VSAM Data Set - With SMS . . . . . Retrieving an Existing VSAM Data Set - With SMS . Migration Consideration for SMS . . . . . . . . DD Statement Parameters - With SMS. . . . . . VSAM Data Sets - Without SMS . . . . . . . . . Creating a VSAM Data Set - Without SMS . . . . Retrieving an Existing VSAM Data Set - Without SMS DD Statement Parameters - Without SMS . . . . Appendix D. Data Sets with SMS . SMS Constructs . . . . . . . . Existing JCL . . . . . . . . Default Unit . . . . . . . . . Specifying Constructs . . . . . . Overriding Attributes Defined in the Overriding Attributes Defined in the Overriding Attributes Defined in the Protecting Data Sets with RACF . . Modeling Data Set Attributes . . .
. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
C-1 C-1 C-1 C-1 C-1 C-1 C-4 C-4 C-4 C-5 D-1 D-1 D-2 D-2 D-2 D-3 D-3 D-3 D-4 D-4
Contents
ix
Figures
2-1. 2-2. 2-3. JCL-Related Actions (User and MVS) . . . . . . . . . . . . . . . . . . . . . . 2-2 Output from Job Invoking IEFBR14 Program . . . . . . . . . . . . . . . . . . . 2-8 Output from Job Invoking SORT Program . . . . . . . . . . . . . . . . . . . . 2-10
xi
xii
Tables
1-1. 1-2. 2-1. 2-2. 2-3. 2-4. 2-5. 3-1. 3-2. 3-3. 3-4. 4-1. 5-1. 6-1. 7-1. 8-1. 9-1. 10-1. 11-1. 12-1. 13-1. 13-2. 14-1. 14-2. 15-1. 15-2. 15-3. 15-4. 15-5. 15-6. 15-7. 15-8. 16-1. 17-1. 18-1. 19-1. 20-1. 21-1. 22-1. 23-1. 24-1. 25-1. 26-1. A-1. A-2. C-1. C-2. C-3. C-4. MVS Job Control Language (JCL) Statements . . . . . . . . . . . . . . . . . . 1-1 Job Entry Control Language (JECL) Statements . . . . . . . . . . . . . . . . . . 1-2 In-Stream Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Cataloged Procedure: Member MYPROC in SYS1.PROCLIB. . . . . . . . . . . . . 2-12 Job that Executes Cataloged Procedure MYPROC . . . . . . . . . . . . . . . . 2-12 Job Boundaries in a Three-Job Input Stream . . . . . . . . . . . . . . . . . . 2-12 Tasks and Utility Programs . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Tasks for Entering Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Tasks for Processing Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Tasks for Requesting Data Set Resources . . . . . . . . . . . . . . . . . . . . 3-5 Tasks for Requesting Sysout Data Set Resources . . . . . . . . . . . . . . . . . 3-6 Identification Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . . . 4-1 Execution Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . . . . 5-1 Input Control Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . . . 6-1 Communication Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . . 7-1 Protection Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . . . . 8-1 Resource Control Task for Entering Jobs . . . . . . . . . . . . . . . . . . . . 9-1 Processing Control Task for Processing Jobs . . . . . . . . . . . . . . . . . . 10-1 Performance Control Task for Processing Jobs . . . . . . . . . . . . . . . . . . 11-1 Identification Task for Requesting Data Set Resources . . . . . . . . . . . . . . . 12-1 Description Task for Requesting Data Set Resources . . . . . . . . . . . . . . . 13-1 Data Set Integrity Processing . . . . . . . . . . . . . . . . . . . . . . . . 13-3 Protection Task for Requesting Data Set Resources . . . . . . . . . . . . . . . . 14-1 Processing with DD LABEL Subparameter IN or OUT . . . . . . . . . . . . . . . 14-3 Allocation Task for Requesting Data Set Resources . . . . . . . . . . . . . . . . 15-1 Effect of Device Status on Allocation . . . . . . . . . . . . . . . . . . . . . . 15-3 JES3 Job Setup (SETUP=JOB) . . . . . . . . . . . . . . . . . . . . . . . 15-13 JES3 High Watermark Setup (SETUP=HWS) . . . . . . . . . . . . . . . . . . 15-14 JES3 Explicit Setup (SETUP=ddname) . . . . . . . . . . . . . . . . . . . . 15-15 Unit-Affinity Examples of Tape Library Requests . . . . . . . . . . . . . . . . . 15-31 Unit and Volume Affinity (Non-SMS-Managed Data Sets) . . . . . . . . . . . . . . 15-33 IBM-Recommended Parameters for Data Set Stacking . . . . . . . . . . . . . . 15-37 Processing Control Task for Requesting Data Set Resources. . . . . . . . . . . . . 16-1 End Processing Task for Requesting Data Set Resources . . . . . . . . . . . . . . 17-1 Identification Task for Requesting Sysout Data Set Resources . . . . . . . . . . . . 18-1 Description Task for Requesting Sysout Data Set Resources . . . . . . . . . . . . . 19-1 Protection Task for Requesting Sysout Data Set Resources . . . . . . . . . . . . . 20-1 Performance Control Task for Requesting Sysout Data Set Resources . . . . . . . . . 21-1 Processing Control Task for Requesting Sysout Data Set Resources . . . . . . . . . . 22-1 End Processing Task for Requesting Sysout Data Set Resources . . . . . . . . . . . 23-1 Destination Control Task for Requesting Sysout Data Set Resources . . . . . . . . . . 24-1 Output Formatting Task for Requesting Sysout Data Set Resources . . . . . . . . . . 25-1 Output Limiting Task for Requesting Sysout Data Set Resources . . . . . . . . . . . 26-1 Area Arrangement of ISAM Data Sets . . . . . . . . . . . . . . . . . . . . . A-5 DD Parameters for Retrieving or Extending an ISAM Data Set . . . . . . . . . . . . A-7 With SMS, DD Parameters to Use when Processing VSAM Data Sets . . . . . . . . . C-2 With SMS, DD Parameters to Avoid when Processing VSAM Data Sets . . . . . . . . . C-3 Without SMS, DD Parameters to Use when Processing VSAM Data Sets . . . . . . . . C-5 Without SMS, DD Parameters to Avoid when Processing VSAM Data Sets . . . . . . . . C-6
xiii
xiv
Programs
Short Title Used in This Book ACF/TCAM Installation Reference ISPF/PDF Guide and Reference PSF/MVS System Programming Guide PSF/MVS Application Programming Guide Title Advanced Communications Function for TCAM, Version 2 Installation Reference ISPF/PDF Guide and Reference V3.4 for MVS PSF/MVS System Programming Guide PSF/MVS Application Programming Guide Order Number SC30-3133 SC34-4258 S544-3672 S544-3673
Hardware
Short Title Used in This Book 2821 Component Description None 3540 Programmers Reference 3800 Programmers Guide Title IBM 2821 Control Unit Component Description IBM 3340 Disk/Storage - Fixed Head Feature Users Guide OS/VS2 IBM 3540 Programmers Reference IBM 3800 Printing Subsystem Programmers Guide Order Number GA24-3312 GA26-1632 GC24-5111 GC26-3846
xv
Short Title Used in This Book Forms Design Reference Guide for the 3800
Title Forms Design Reference Guide for the IBM 3800 Printing Subsystem
Licensed documents are available only to customers with a z/OS license; access to these documents requires an IBM Resource Link user ID and password, and a key code. Based on which offering you chose (ServerPac, CBPDO, SystemPac), information concerning the key code is available in the Installation Guide that is delivered with z/OS and z/OS.e orders as follows: v ServerPac Installing Your Order v CBPDO Memo to Users Extension v SystemPac Installation Guide To obtain your IBM Resource Link user ID and password, log on to:
http://www.ibm.com/servers/resourcelink
To register for access to the z/OS licensed documents: 1. Sign in to Resource Link using your Resource Link user ID and password. 2. Select User Profiles located on the left-hand navigation bar. Note: You cannot access the z/OS licensed documents unless you have registered for access to them and received an e-mail confirmation informing you that your request has been processed. Printed licensed documents are not available from IBM. You can use the PDF format on either z/OS Licensed Product Library CD-ROM or IBM Resource Link to print licensed documents.
xvi
v Your Microsoft Windows workstation. You can install code to access IBM message explanations on the z/OS Collection (SK3T-4269), using LookAt from a Microsoft Windows command prompt (also known as the DOS command line). v Your wireless handheld device. You can use the LookAt Mobile Edition with a handheld device that has wireless access and an Internet browser (for example, Internet Explorer for Pocket PCs, Blazer, or Eudora for Palm OS, or Opera for Linux handheld devices). Link to the LookAt Mobile Edition from the LookAt Web site. You can obtain code to install LookAt on your host system or Microsoft Windows workstation from a disk on your z/OS Collection (SK3T-4269), or from the LookAt Web site (click Download, and select the platform, release, collection, and location that suit your needs). More information is available in the LOOKAT.ME files available during the download process.
xvii
xviii
Summary of Changes
Summary of Changes for SA22-7598-04 z/OS Version 1 Release 6 The book contains information previously presented in SA22-7598-03, which supports z/OS Version 1 Release 5. This document contains terminology, maintenance, and editorial changes, including changes to improve consistency and retrievability. Technical changes or additions to the text and illustrations are indicated by a vertical line to the left of the change. Starting with z/OS V1R2, you may notice changes in the style and structure of some content in this documentfor example, headings that use uppercase for the first letter of initial words only, and procedures that have a different look and format. The changes are ongoing improvements to the consistency and retrievability of information in our documents. Summary of Changes for SA22-7598-03 z/OS Version 1 Release 5 The book contains information previously presented in SA22-7598-02, which supports z/OS Version 1 Release 4. This document contains terminology, maintenance, and editorial changes, including changes to improve consistency and retrievability. Summary of Changes for SA22-7598-02 z/OS Version 1 Release 4 as updated October, 2003 The book contains information previously presented in SA22-7598-01, which supports z/OS Version 1 Release 2. The XMIT statement is now supported by JES2 - previously, it was supported only by JES3. This document contains terminology, maintenance, and editorial changes, including changes to improve consistency and retrievability. Summary of Changes for SA22-7598-01 z/OS Version 1 Release 2 The book contains information previously presented in SA22-7598-00, which supports z/OS Version 1 Release 1. This book contains terminology, maintenance, and editorial changes. Technical changes or additions to the text and illustrations are indicated by a vertical line to the left of the change.
xix
You may notice changes in the style and structure of some content in this book for example, headings that use uppercase for the first letter of initial words only, and procedures that have a different look and format. The changes are ongoing improvements to the consistency and retrievability of information in our books. Summary of Changes for SA22-7598-00 z/OS Version 1 Release 1 The book contains information also presented in OS/390 MVS JCL Users Guide.
xx
Part 1. Introduction
For your program to execute on the computer and perform the work you designed it to do, your program must be processed by your operating system. Your operating system consists of a base control program (BCP) with a job entry subsystem (JES2 or JES3) and DFSMSdfp installed with it. For the operating system to process a program, programmers must perform certain job control tasks. These tasks are performed through the job control statements, which are listed in the first chapter. The job control tasks and introductory information about JCL are introduced in the second chapter. The charts in the third chapter divide these tasks into detailed subtasks. The tasks are: v Entering jobs v Processing jobs v Requesting resources
Part 1. Introduction
JCL Statements
Table 1-1. MVS Job Control Language (JCL) Statements Statement // command Name JCL command Purpose Enters an MVS system operator command through the input stream. The command statement is used primarily by the operator. Use the COMMAND statement instead of the JCL command statement. Specifies an MVS or JES command that the system issues when the JCL is converted. Use the COMMAND statement instead of the JCL command statement. Contains comments. The comment statement is used primarily to document a program and its resource requirements. Marks the beginning of one or more program control statements. Identifies and describes a data set. Indicates the end of data placed in the input stream. Note: A user can designate any two characters to be the delimiter. // ENDCNTL // EXEC end control execute Marks the end of one or more program control statements. Marks the beginning of a job step; assigns a name to the step; identifies the program or the cataloged or in-stream procedure to be executed in this step.
// COMMAND
command
//* comment
comment
// CNTL // DD /*
// IF/THEN/ELSE/ENDIF IF/THEN/ELSE/ENDIF Specifies conditional execution of job statement construct steps within a job. // INCLUDE include Identifies a member of a partitioned data set (PDS) or partitioned data set extended (PDSE) that contains JCL statements to be included in the job stream. Identifies the libraries that the system will search for: v INCLUDE groups v Procedures named in EXEC statements.
// JCLLIB
JCL library
1-1
Introduction - Statements
Table 1-1. MVS Job Control Language (JCL) Statements (continued) Statement // JOB // // OUTPUT Name job null output JCL Purpose Marks the beginning of a job; assigns a name to the job. Marks the end of a job. Specifies the processing options that the job entry subsystem is to use for printing a sysout data set. Marks the end of an in-stream or cataloged procedure. Marks the beginning of an in-stream procedure and may mark the beginning of a cataloged procedure; assigns default values to parameters defined in the procedure. Defines and assigns initial values to symbolic parameters used when processing JCL statements. Changes or nullifies the values assigned to symbolic parameters. Transmits input stream records from one node to another.
// PEND // PROC
// SET
set
// XMIT
transmit
JECL Statements
Table 1-2. Job Entry Control Language (JECL) Statements Statement Purpose
Job Entry Subsystem 2 (JES2) Control Statements /*$command /*JOBPARM /*MESSAGE /*NETACCT /*NOTIFY /*OUTPUT /*PRIORITY /*ROUTE /*SETUP /*SIGNOFF /*SIGNON /*XEQ /*XMIT Enters JES2 operator commands through the input stream. Specifies certain job-related parameters at input time. Sends messages to the operator via the operator console. Specifies an account number for a network job. Specifies the destination of notification messages. Specifies processing options for sysout data set(s). Assigns a job queue selection priority. Specifies the output destination or the execution node for the job. Requests mounting of volumes needed for the job. Ends a remote job stream processing session. Begins a remote job stream processing session. Specifies the execution node for a job. Indicates a job or data stream to be transmitted to another JES2 node or eligible non-JES2 node.
Job Entry Subsystem 3 (JES3) Control Statements //**command //*DATASET //*ENDDATASET Enters JES3 operator commands, except *DUMP and *RETURN, through the input stream. Begins an input data set in the input stream. Ends the input data set that began with a //*DATASET statement.
1-2
Introduction - Statements
Table 1-2. Job Entry Control Language (JECL) Statements (continued) Statement //*ENDPROCESS //*FORMAT //*MAIN //*NET //*NETACCT //*OPERATOR //*PAUSE //*PROCESS //*ROUTE /*SIGNOFF /*SIGNON Purpose Ends a series of //*PROCESS statements. Specifies the processing options for a sysout or JES3-managed print or punch data set. Defines selected processing parameters for a job. Identifies relationships between predecessor and successor jobs in a dependent job control net. Specifies an account number for a network job. Sends messages to the operator. Halts the input reader. Identifies a nonstandard job. Specifies the execution node for the job. Ends a remote job stream processing session. Begins a remote job stream processing session.
1-3
Introduction - Statements
1-4
Understanding JCL
To get your MVS system to do work for you, you must describe to the system the work you want done and the resources you will need. You use Job Control Language (JCL) to provide this information to MVS.
Chez MVS
One way of thinking about JCL is to compare it to a menu in a restaurant. If you are a customer at a restaurant, you and the other customers dont just walk into the kitchen and start cooking your own dinnersthat would defeat the very purpose of going to a restaurant. Instead, from a menu describing all the restaurant has to offer, you select items to make up an order, specifying which entrees you want, which salad dressing you prefer, and any other special requests you have. You then ask the waiter to take your order to the kitchen. In the kitchen, a team of chefs divides up the work and the appropriate ingredients in order to prepare each dish as quickly and efficiently as possible. While the meals are being prepared, you and your friends can ignore whats going on in the kitchen, engaging instead in dinner conversation, catching up on the latest news. When the waiter brings your meal out, you concentrate on your enjoyment of the meal.
2-1
USER ACTIONS
System Messages
2-2
2-3
Step 2. Edit the JCL Data Set and Add the Necessary JCL
Use ISPF (or equivalent function) to edit the data set that you just allocated. Enter the following JCL statements into the data set. Note that all JCL statements start with the special identifier //.
2-4
In the JCL code above: 1 Replace accounting_data with the appropriate security classification and identification information, according to the information you filled in on Installation Conventions Worksheet on page 2-13. Replace user_name with your name. NOTIFY= tells the system where to send job complete information. &SYSUID tells the system to automatically insert your user ID here, so the information will be sent to you. MSGCLASS= tells the system what to do with messages the system sends you as it processes your job; for example, use a held output class to allow reviewing the messages later. Replace message_class with the appropriate message class value. Check your Installation Conventions Worksheet on page 2-13. for the appropriate value. MSGLEVEL=(1,1) tells the system to reproduce this JCL code in the output, and to include allocation messages. CLASS=n indicates the system resource requirements for the job. Check your Installation Conventions Worksheet on page 2-13. for the appropriate value. The EXEC statement invokes the program IEFBR14 and identifies the first (and only) job step in this job. You are arbitrarily naming it STEP1. All of the control statements that follow the EXEC statement (until the next EXEC statement, if any) are part of this job step. IEFBR14 is the name of a program within your MVS system. It does not actually process any data, but it enables you to run this job as a test to verify the JCL statements, and to create the input data. Later in the exercise you will replace IEFBR14 with the name of another program that sorts data. 8 9 SORTIN is the name you have given the DD statement that describes the input data. NEPTUNE through JUPITER are the items to be sorted. This method of providing data to the program is referred to as in-stream data, an alternative to providing the input in a separate allocated data set. /* indicates the end of the input data stream.
Chapter 2. Introduction - Job Control Language (JCL)
2 3
5 6
10
2-5
12
For detailed information on each of the JCL statements and syntax requirements, refer to z/OS MVS JCL Reference.
(YES or NO)
Note: When entering the command from the TSO command line or after a READY message, you must surround the data set name with single quotation marks if you include your user ID. However, you can also enter the command without specifying your user ID and without using single quotation marks, as shown below:
SUBMIT SORT.JCL
When you do not specify the user ID and do not include single quotes, the system automatically inserts your user ID before the data set name. (The insertion of the user ID is for the duration of the current job; it is not a permanent change to the data set name.) After entering the command, you should receive the following message indicating that your job was submitted successfully:
2-6
(YES or NO)
When the job ends, you will receive a message indicating one of three conditions: job successful, JCL error, or program abend. If the message indicates the error or abend condition, review Steps 2 and 3 of this exercise to make sure that you followed the instructions exactly, then re-submit the job. If the job fails again, consult the appropriate manual as indicated below: If the message begins with HASP, the job was failed by JES2. For more information, refer to z/OS JES2 Messages If the message begins with IAT, the job was failed by JES3. For more information, refer to z/OS JES3 Messages.
2-7
----| 15.21.28 JOB17653 IRR010I USERID userid IS ASSIGNED TO THIS JOB. | 15.21.28 JOB17653 ICH70001I userid LAST ACCESS AT 15:21:28 ON WEDNESDAY, OCTOBER 13, 1996 | 15.21.28 JOB17653 $HASP373 SORT STARTED - INIT 9 - CLASS 5 - SYS AQTS | 15.21.28 JOB17653 IEF403I SORT - STARTED - TIME=15.21.28 | 15.21.28 JOB17653 - ============================================================================================================== | 15.21.28 JOB17653 REGION --- STEP TIMINGS ------PAGING COUNTS---|--- 1 15.21.28 JOB17653 - STEPNAME PROCSTEP PGMNAME CC USED CPU TIME ELAPSED TIME EXCP SERV PAGE SWAP VIO SWAPS | 15.21.28 JOB17653 - STEP1 IEFBR14 00 4K 00:00:00.01 00:00:00.03 1 211 0 0 0 0 | 15.21.28 JOB17653 IEF404I SORT - ENDED - TIME=15.21.28 | 15.21.28 JOB17653 - ============================================================================================================== | 15.21.28 JOB17653 - NAME-user_name TOTALS: CPU TIME= 00:00:00.01 ELAPSED TIME= 00:00:00.05 SERVICE UNITS= 21 | 15.21.28 JOB17653 - ============================================================================================================== | 15.21.28 JOB17653 $HASP395 SORT ENDED ----| 0------ JES2 JOB STATISTICS ---------| - 13 OCT 1996 JOB EXECUTION DATE | 20 CARDS READ | 45 SYSOUT PRINT RECORDS |--- 2 0 SYSOUT PUNCH RECORDS | 3 SYSOUT SPOOL KBYTES | 0.00 MINUTES EXECUTION TIME ----| 1 //SORT JOB 662282,D58,9211064,S=C, JOB17653 ----| // user_name, | // NOTIFY=userid, | // MSGCLASS=H, 00280009 | // MSGLEVEL=(1,1), 00430010 |--- 3 // CLASS=5 00430010 | 2 //STEP1 EXEC PGM=IEFBR14 | 3 //SORTIN DD * | 4 //SORTOUT DD SYSOUT=* | 5 //SYSIN DD * GENERATED STATEMENT ----| ICH70001I userid LAST ACCESS AT 15:21:28 ON WEDNESDAY, OCTOBER 13, 1996 ----| IEF236I ALLOC. FOR SORT STEP1 | IEF237I JES2 ALLOCATED TO DATAIN | IEF237I JES2 ALLOCATED TO SYSIN | IEF142I SORT STEP1 - STEP WAS EXECUTED - COND CODE 0000 4 | IEF285I userid.SORT.JOB17653.D0000101.? SYSIN IEF285I userid.SORT.JOB17653.D0000103.? SYSOUT IEF285I userid.SORT.JOB17653.D0000102.? SYSIN IEF373I STEP /STEP1 / START 1996286.1521 IEF374I STEP /STEP1 / STOP 1996286.1521 CPU 0MIN 00.01SEC SRB 0MIN 00.00SEC VIRT IEF375I JOB /SORT / START 1996286.1521 IEF376I JOB /SORT / STOP 1996286.1521 CPU 0MIN 00.01SEC SRB 0MIN 00.00SEC |--| | | 9424K | | ----| 5
4K SYS
180K EXT
4K SYS
Figure 2-2 contains an example of the held output for this exercise. Each part of this output is explained below: 1 is installation-specific and may differ on your system. 2 contains JES messages about the job. 3 contains the JCL statements that resulted from the job. 4 condition code 0000 tells you that the program ran successfully. You receive one condition code for each step in the job. If a condition code is non-zero, see the documentation for the specific program you invoked. 5 contains the system output messages resulting from processing the job. For more information on IEFBR14, see Using IEFBR14 Program for Testing on page 10-16.
2-8
1 2
Replace the program name with the name of your sort program. In this job, SORT will sort the input data identified by the SORTIN DD statement. Add the SYSIN control statement. SYSIN specifies how you want the sort to be done. In this case, you are indicating that you want to sort the fields from column 1 to column 75 as characters in ascending sequence. Add the SYSOUT control statement. SYSOUT specifies the data set to which SORT will write its messages. A SYSOUT data set is a system-handled output data set. This data set is placed temporarily on direct access storage. Later, the system prints it or sends it to a specified location.
When you have finished entering the JCL into the data set, submit the job as you did in Step 3. Submit the JCL to the System as a Job on page 2-6.
2-9
----| 13.40.27 JOB06572 IRR010I USERID userid IS ASSIGNED TO THIS JOB. | 13.40.27 JOB06572 ICH70001I userid LAST ACCESS AT 13:39:20 ON MONDAY, NOVEMBER 15, 1996 | 13.40.27 JOB06572 $HASP373 SORT STARTED - INIT 9 - CLASS 5 - SYS AQTS | 13.40.27 JOB06572 IEF403I SORT - STARTED - TIME=13.40.27 | 13.40.28 JOB06572 - ============================================================================================================== | 13.40.28 JOB06572 REGION --- STEP TIMINGS ------PAGING COUNTS---|--13.40.28 JOB06572 - STEPNAME PROCSTEP PGMNAME CC USED CPU TIME ELAPSED TIME EXCP SERV PAGE SWAP VIO SWAPS | 13.40.28 JOB06572 - STEP1 SORT 00 576K 00:00:00.03 00:00:00.15 20 1614 0 0 0 0 | 13.40.28 JOB06572 IEF404I SORT - ENDED - TIME=13.40.28 | 13.40.28 JOB06572 - ============================================================================================================== | 13.40.28 JOB06572 - NAME-user name TOTALS: CPU TIME= 00:00:00.03 ELAPSED TIME= 00:00:00.16 SERVICE UNITS= 1614 | 13.40.28 JOB06572 - ============================================================================================================== | 13.40.28 JOB06572 $HASP395 SORT ENDED ----| 0------ JES2 JOB STATISTICS ---------| - 15 NOV 1996 JOB EXECUTION DATE | 25 CARDS READ | 81 SYSOUT PRINT RECORDS |--0 SYSOUT PUNCH RECORDS | 4 SYSOUT SPOOL KBYTES | 0.00 MINUTES EXECUTION TIME ----| 1 //SORT JOB accounting data, JOB06572 ----| // userid, | // NOTIFY=&SYSUID, | // MSGCLASS=H, | // MSGLEVEL=(1,1), | // CLASS=5 |--2 //STEP1 EXEC PGM=SORT | 3 //SYSIN DD * | 4 //SYSOUT DD SYSOUT=* | 5 //SORTIN DD * | 6 //SORTOUT DD SYSOUT=* | /* ----| ICH70001I userid LAST ACCESS AT 13:39:20 ON MONDAY, NOVEMBER 15, 1996 ----| IEF236I ALLOC. FOR SORT STEP1 | IEF237I JES2 ALLOCATED TO SYSIN | IEF237I JES2 ALLOCATED TO SYSOUT | IEF237I JES2 ALLOCATED TO SORTIN | IEF237I JES2 ALLOCATED TO SORTOUT | IEF142I SORT STEP1 - STEP WAS EXECUTED - COND CODE 0000 5 | IEF285I userid.SORT.JOB06572.D0000101.? SYSIN | IEF285I userid.SORT.JOB06572.D0000103.? SYSOUT | IEF285I userid.SORT.JOB06572.D0000102.? SYSIN | IEF285I userid.SORT.JOB06572.D0000104.? SYSOUT | IEF373I STEP /STEP1 / START 1996319.1340 | IEF374I STEP /STEP1 / STOP 1996319.1340 CPU 0MIN 00.03SEC SRB 0MIN 00.00SEC VIRT 576K SYS 188K EXT 4096K SYS 9444K | IEF375I JOB /SORT / START 1996319.1340 | IEF376I JOB /SORT / STOP 1996319.1340 CPU 0MIN 00.03SEC SRB 0MIN 00.00SEC | 1ICE143I 0 BLOCKSET SORT TECHNIQUE SELECTED |--ICE000I 1 --- CONTROL STATEMENTS/MESSAGES ---- 5740-SM1 REL 12.0 ---- 13.40.28 NOV 15, 1996 -| 0 SORT FIELDS=(1,75,CH,A) | ICE088I 1 SORT .STEP1 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = F | ICE093I 0 MAIN STORAGE = (MAX,4194304,4194304) | ICE156I 0 MAIN STORAGE ABOVE 16MB = (3624960,3624960) | ICE128I 0 OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT | ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG | ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB1 | ICE131I 0 OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=65536,EXCPVR=NONE ,CINV=Y,CFW=Y | ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N | ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL ,DSPSIZE=MAX | ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT | ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN | ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = F | ICE080I 0 IN MAIN STORAGE SORT | ICE055I 0 INSERT 0, DELETE 0 | ICE054I 0 RECORDS - IN: 9, OUT: 9 | ICE134I 0 NUMBER OF BYTES SORTED: 720 | ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES | ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES | ICE052I 0 END OF DFSORT ----| EARTH ----| JUPITER | MARS | MERCURY | NEPTUNE |--PLUTO | SATURN | URANUS | VENUS ---|
1 2 3 4
is installation-specific and may differ on your system. contains JES messages about the job. contains the JCL listing that resulted from the job. contains the system messages resulting from processing the job.
2-10
In-Stream Procedures
An in-stream procedure is a named set of job control statements in a job that can be re-executed within that job, simply by invoking the name of the procedure. This enables you to execute the set of control statements more than one time in the same job without having to repeat the statements. Table 2-1 shows a job that contains an in-stream procedure. Its name is PTEST, and it ends with a PEND statement.
Table 2-1. In-Stream Procedure Job Control Statement //JOB1 JOB CT1492,JIM MOSER //PTEST PROC //PSTA EXEC PGM=CALC //DDA DD DSNAME=D.E.F,DISP=OLD //DDB DD DSNAME=DATA1,DISP=(MOD,PASS) //DDOUT DD SYSOUT=* //PSTB EXEC PGM=PRNT //DDC DD DSNAME=*.PSTA.DDB,DISP=OLD //DDREP DD SYSOUT=A // PEND //STEP1 EXEC PROC=PTEST //PSTA.IN DD * . (data) . /* Explanation Starts job Starts in-stream procedure Identifies first step in procedure Request 3 data sets for first procedure step
Identifies second step in procedure Request 2 data sets for second procedure step Ends in-stream procedure First step in JOB1, executes procedure Adds in-stream data to procedure step PSTA
Note: The maximum number of in-stream procedures you can code in any job is 15.
Cataloged Procedures
A cataloged procedure, like an in-stream procedure, is a named set of job control statements. However, these control statements are placed, or cataloged, in a partitioned data set (PDS) or partitioned data set extended (PDSE) known as a procedure library. This enables a cataloged procedure to be invoked by any job. Cataloged procedures can be placed in the system procedure library SYS1.PROCLIB or in any user-specified procedure library (for example JCLLIB). For additional information on procedure libraries, refer to z/OS MVS JCL Reference.
Chapter 2. Introduction - Job Control Language (JCL)
2-11
Table 2-3. Job that Executes Cataloged Procedure MYPROC Job Control Statement //JOB2 JOB ,JACKIE DIGIAN //STEPA EXEC PROC=MYPROC //MY2.MYDDC DD DISP=(OLD,DELETE) Explanation Starts job First step in JOB2, executes procedure Modifies DD statement MYDDC in procedure step MY2
Input Streams
Just as you can group several steps into one job, you can group several jobs together into one input stream. Any time jobs are placed in a series and entered through one input device, the series is considered an input stream. The input device can be a terminal, a magnetic tape device, or a direct access device. Table 2-4 shows a data set containing an input stream of three jobs.
Table 2-4. Job Boundaries in a Three-Job Input Stream Job Control Statement Job 1 //JOB1 //STEP1 //DDA //DDB //JOB2 //STEPA //DD1 JOB AT45,GARY PUCHKOFF EXEC PGM=A33 DD DSNAME=CATDS,DISP=OLD DD SYSOUT=A JOB AT87,JAN BUSKIRK EXEC PGM=REP DD * . (data) . //DD2 DD SYSOUT=C //JOB3 JOB 1726,MARK LAMAN //ST1 EXEC PGM=ADDER //DDIN DD DATA . (data) . /* //DDOUT DD SYSOUT=A Explanation First job
Job 2
Second job
Job 3
Third job
2-12
2-13
---------------------------OPTION == A
-----------------------------
A - Allocate new data set R - Rename entire data set D - Delete entire data set blank - Data set information ISPF LIBRARY: PROJECT ===> GROUP ===> TYPE ===>
C U S M
Catalog data set Uncatalog data set Data set information (short) Enhanced data set allocation
OTHER PARTITIONED OR SEQUENTIAL DATA SET: DATA SET NAME ===> userid.SORT.JCL VOLUME SERIAL ===> (If not cataloged, required for option "C) DATA SET PASSWORD ===> (If password protected)
3. On the Allocate New Data Set menu, fill in the fields indicated in the example below, replacing volser, unit, and size with appropriate values according to the information you filled in on Installation Conventions Worksheet on page 2-13.
---------------------COMMAND ===> ALLOCATE NEW DATA SET --------------------------------
DATA SET NAME: userid.SORT.JCL VOLUME SERIAL GENERIC UNIT SPACE UNITS PRIMARY QUANTITY SECONDARY QUANTITY DIRECTORY BLOCKS RECORD FORMAT RECORD LENGTH BLOCK SIZE EXPIRATION DATE ===> ===> ===> ===> ===> ===> ===> ===> ===> ===> volser unit 1 1 0 FB 80 size (Blank for authorized default volume) * (Generic group name or unit address) * (BLKS, TRKS, or CYLS) (In above units) (In above units) (Zero for sequential data set)
(YY/MM/DD, YYYY/MM/DD YY.DDD, YYYY.DDD in Julian form DDDD for retention period in days or blank)
4. Note that message DATA SET ALLOCATED indicates that the allocation has been completed.
---------------------------DATA SET UTILITY ----------- DATA SET ALLOCATED
5. Use ISPF to edit the allocated data set and enter the JCL control statements into the data set.
2-14
EDIT ---- userid.SORT.JCL ------------------------------------ COLUMNS 001 072 COMMAND ===> SCROLL ===> CSR ****** ***************************** TOP OF DATA ****************************** ****** **************************** BOTTOM OF DATA ****************************
6. If you are currently working on the exercise for creating and entering a JCL job, return to Step 2. Edit the JCL Data Set and Add the Necessary JCL on page 2-4 now.
Type an option or command and press Enter. DA I O H ST TUTOR END Display Display Display Display Display active users of the system jobs in the JES2 input queue jobs in the JES2 output queue jobs in the JES2 held output queue status of jobs in the JES2 queues
Licensed Materials - Property of IBM 5665-488 (C) Copyright IBM Corp. 1981, 1993. All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
2. To view an individual data set: a. On the SDSF Held Output Display All Classes panel, enter a question mark (?) next to the job whose output data sets you want to view.
2-15
SDSF HELD OUTPUT DISPLAY ALL CLASSES 174 LINES LINE 1-2 (2) COMMAND INPUT ===> SCROLL ===> PAGE PREFIX=* DEST=(ALL) OWNER=userid NP JOBNAME JOBID OWNER PRTY C ODISP DEST TOT-REC TOT-P ? jobname JOB20482 userid 7 H HOLD LOCAL 87 jobname JOB20517 userid 7 H HOLD LOCAL 87 . . .
b. On the SDSF Job Data Set Display panel, enter the letter S next to the name of the data set you want to display.
SDSF JOB DATA SET DISPLAY - JOB useridS (JOB20482) COMMAND INPUT ===> PREFIX=* DEST=(ALL) OWNER=userid NP DDNAME STEPNAME PROCSTEP DSID OWNER C DEST S JESMSGLG JES2 2 userid H LOCAL JESJCL JES2 3 userid H LOCAL JESYSMSG JES2 4 userid H LOCAL SYSOUT SORT 103 userid H LOCAL SORTOUT SORT 104 userid H LOCAL LINE 1-5 (5) SCROLL ===> REC-CNT 22 6 28 22 9
Note: On the above panel: v JESMSGLG contains system messages. v JESJCL contains JCL with procedures expanded, overrides applied, and symbolics resolved. v JESYSMSG contains MVS system messages. v SYSOUT contains messages produced by the program (in this case, SORT) executed in this job. v SORTOUT contains the output produced by the program (in this case, SORT) executed in this job. c. The system displays the selected data set (in this case, JESMSGLG):
1 0 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 15.21.28 211 15.21.28 15.21.28 J E S 2 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 JOB17653 J O B L O G -S Y S T E M A Q T S -N O D E P L P S C
IRR010I USERID userid IS ASSIGNED TO THIS JOB. ICH70001I userid LAST ACCESS AT 15:21:28 ON WEDNESDAY, OCTOBER 13, 1993 $HASP373 SORT STARTED - INIT 9 - CLASS 5 - SYS AQTS IEF403I SORT - STARTED - TIME=15.21.28 - ============================================================================================================== REGION --- STEP TIMINGS ------PAGING COUNTS---- STEPNAME PROCSTEP PGMNAME CC USED CPU TIME ELAPSED TIME EXCP SERV PAGE SWAP VIO SWAPS - STEP1 IEFBR14 00 4K 00:00:00.01 00:00:00.03 1 211 0 0 0 0 IEF404I SORT - ENDED - TIME=15.21.28 - ============================================================================================================== - NAME-user_name TOTALS: CPU TIME= 00:00:00.01 ELAPSED TIME= 00:00:00.05 SERVICE UNITS= - ============================================================================================================== $HASP395 SORT ENDED
3. To view the entire output: a. On the SDSF Held Output Display All Classes panel, enter the letter S next to the job whose output you want to see.
SDSF HELD OUTPUT DISPLAY ALL CLASSES 174 LINES LINE 1-2 (2) COMMAND INPUT ===> SCROLL ===> PAGE PREFIX=* DEST=(ALL) OWNER=userid NP JOBNAME JOBID OWNER PRTY C ODISP DEST TOT-REC TOT-P S jobname JOB20482 userid 7 H HOLD LOCAL 87 jobname JOB20517 userid 7 H HOLD LOCAL 87 . . .
b. You will be presented with one view of the entire output (as shown in Figure 2-3 on page 2-10).
2-16
Helpful Utilities
Table 2-5 lists some common tasks that manage data sets, as well as utilities IBM provides that you can use to perform the tasks. For additional information on these utilities, see: v v v v ISPF/PDF Guide and Reference z/OS DFSMS Access Method Services for Catalogs z/OS DFSMSdfp Utilities z/OS TSO/E Users Guide
Other utility programs may be available to perform these and other system tasks.
Table 2-5. Tasks and Utility Programs Task Allocate data sets Utility Name v TSO/E ALLOCATE command v ISPF/PDF Data Set Utility v Access Method Services ALLOCATE command v JCL DD statement, DISP=NEW parameter v TSO/E DELETE command v ISPF/PDF Data Set Utility v Access Method Services DELETE command v JCL DD statement, DISP=OLD,DELETE parameter IEBCOMPR (DFSMSdfp) IEBCOPY (DFSMSdfp) IEBUPDTE (DFSMSdfp) IEBPTPCH (DFSMSdfp) IEBUPDTE (DFSMSdfp) IEBCOPY (DFSMSdfp) IEBUPDTE (DFSMSdfp) IEBPTPCH (DFSMSdfp) IEBCOPY (DFSMSdfp) IEHPROGM (DFSMSdfp)
Compare data sets Copy data sets Delete records in data sets Edit/print/punch data sets Insert records into data sets Merge data sets Modify data sets Print data sets Rename members/data sets Scratch data sets
2-17
2-18
Entering Jobs
Job Steps You enter a program into the operating system as a job step. A job step consists of the job control statements that request and control execution of a program and request the resources needed to run the program. A job step is identified by an EXEC statement. The job step can also contain data needed by the program. The operating system distinguishes job control statements from data by the contents of the records. Jobs A job is a collection of related job steps. A job is identified by a JOB statement. Input Streams Jobs placed in a series and entered through one input device form an input stream. The operating system reads an input stream into the computer from an input/output (I/O) device or an internal reader. The input device can be a card reader, a magnetic tape device, a terminal, or a direct access device. An internal reader is a buffer that is read from a program into the system as though it were an input stream. Cataloged and In-Stream Procedures You often use the same set of job control statements repeatedly with little or no change, for example, to compile, assemble, link-edit, and execute a program. To save time and prevent errors, you can prepare sets of job control statements and place, or catalog, them in a partitioned data set (PDS) or partitioned data set extended (PDSE) known as a procedure library. The data set attributes of a procedure library should match SYS1.PROCLIB (record length of 80 and record format of FB). Such a set of job control statements in the system procedure library, SYS1.PROCLIB (or an installation-defined procedure library), is called a cataloged procedure. To test a procedure before placing it in the catalog, place it in an input stream and execute it; a procedure in an input stream is called an in-stream procedure. The maximum number of in-stream procedures you can code in any job is 15.
Copyright IBM Corp. 1988, 2004
3-1
Tasks
Steps in a Job A job can be simple or complex; it can consist of one step or of many steps that call many in-stream and cataloged procedures. A job can consist of up to 255 job steps, including all steps in any procedures that the job calls. Specification of a greater number of steps produces a JCL error.
Processing Jobs
The operating system performs many job control tasks automatically. You can influence the way your job is processed by the JCL and JES2 or JES3 parameters you code. For example, the job entry subsystem selects jobs for execution, but you can speed up or delay selection of your job by the parameters you code.
Requesting Resources
Data Set Resources To execute a program, you must request the data sets needed to supply data to the program and to receive output records from the program. Sysout Data Set Resources A sysout data set is a system-handled output data set. This data set is placed temporarily on direct access storage. Later, at the convenience of the system, the system prints it, punches it, or sends it to a specified location. Because sysout data sets are processed by the system, the programmer can specify many parameters to control that processing.
Task Charts
The following charts list the job control tasks, which are described in the z/OS MVS JCL Users Guide, in four groups: v Entering jobs in Table 3-1 on page 3-3 v Processing jobs in Table 3-2 on page 3-4 v Requesting data set resources in Table 3-3 on page 3-5 v Requesting sysout data set resources in Table 3-4 on page 3-6 For each task, the charts list the parameters and statements that can be used to perform it. In many cases, the same task can be performed using different parameters on different statements. Where a parameter can appear on both a JOB and EXEC statement, it applies to the entire job when coded on the JOB statement but only to a step when coded on an EXEC statement. The system is designed to enable users to perform many types of job control in many ways. To allow this flexibility, only two job entry tasks are required: v Identification: The job must be identified in the jobname field of a JOB statement. v Execution: The program or procedure to be executed must be named in a PGM or PROC parameter on an EXEC statement. Therefore, the following statements are the minimum needed to perform a job control task:
3-2
Tasks
//jobname JOB // EXEC
of programmer
ROOM on /*JOBPARM
Execution of program of procedure when restarting and with checkpointing deadline or periodic when dependent on other jobs at remote node Job Input Control by holding job entrance by holding local input reader by copying input stream (JES2 only) from remote work station Communication from JCL to system from JCL to operator from JCL to programmer from JCL to program from system to operator WARNING on BYTES, CARDS, LINES, and PAGES Comment field unless no parameter field Comment field //*comment, also comment field on all statements but null COMMAND Command /*$command /*MESSAGE //**command //*OPERATOR Comment field on //*ENDPROCESS and //*PAUSE TYPRUN CLASS /*SIGNON /*SIGNOFF /*SIGNON /*SIGNOFF TYPRUN CLASS HOLD, UPDATE, or CLASS on //*MAIN //*NET //*PAUSE XMIT JCL /*ROUTE XEQ /*XEQ /*XMIT RESTART RD PGM PROC RD SYSCHK DD RESTART on /*JOBPARM FAILURE and JOURNAL on //*MAIN DEADLINE on //*MAIN //*NET //*ROUTE XEQ
PARM FETCH on //*MAIN WARNING on BYTES, CARDS, LINES, and PAGES on //*MAIN /*NOTIFY NOTIFY on OUTPUT JCL statement ACMAIN on //*MAIN with JOB NOTIFY USER on //*MAIN PIMSG on OUTPUT JCL
from system to userid -of job completion -of print completion from TSO/E userid to system from functional subsystem to programmer
NOTIFY
3-3
Tasks
Table 3-1. Tasks for Entering Jobs (continued)
TASKS FOR ENTERING JOBS STATEMENTS AND PARAMETERS JCL Statements JOB through job log MSGCLASS MSGLEVEL log in JOB JES2 accounting information EXEC Other JCL JESDS on OUTPUT JCL NOLOG on /*JOBPARM JES2 Statements JES3 Statements
Protection through RACF Resource Control of program library JOBLIB DD, STEPLIB DD, DD defining PDS or PDSE member JCLLIB JCLLIB REGION ADDRSPC REGION ADDRSPC SYSAFF on /*JOBPARM PROCLIB on /*JOBPARM PROCLIB on /*JOBPARM PROC and UPDATE on //*MAIN PROC and UPDATE on //*MAIN LREGION on //*MAIN SYSTEM on //*MAIN SPART and TRKGRPS on //*MAIN GROUP PASSWORD SECLABEL USER
TIME on /*JOBPARM
PGM=IEFBR14
SYSMDUMP DD SYSUDUMP DD SYSABEND DD To format dump on 3800 Printing Subsystem, FCB=STD3 and CHARS=DUMP on dump DD
Performance Control by job class assignment by selection priority by performance group assignment by I/O-to-processing ratio CLASS PRTY PERFORM PERFORM IORATE on //*MAIN /*PRIORITY CLASS on //*MAIN
3-4
Tasks
Table 3-3. Tasks for Requesting Data Set Resources
TASKS FOR REQUESTING DATA SET RESOURCES Identification of data set of in-stream data set of data set on 3540 Diskette Input/Output Unit through catalog through label by location on tape as TCAM message data set from or to terminal Description of status of data attributes - by modeling DISP DCB AMP DATACLAS KEYLEN DSNTYPE KEYOFF LRECL RECFM RECORG LIKE REFDD of data for ISO/ANSI Version 4 tapes of migration and backup Protection through RACF for ISO/ANSI/FIPS Version 3 tapes and ISO/ANSI Version 4 tapes by passwords PROTECT SECMODEL ACCODE CCSID MGMTCLAS DSNAME * or DATA SYSIN DD DLM DSID /* or xx delimiter UPDATE on //*MAIN //*DATASET //*ENDDATASET STATEMENTS AND PARAMETERS FOR TASK JCL Statements DD OUTPUT JCL Other JCL JES2 Statements JES3 Statements
of access to BSAM and BDAM data sets Allocation of device of tape or direct access volume of direct access space of virtual I/O
UNIT STORCLAS VOLUME STORCLAS SPACE AVGREC DATACLAS UNIT DSNAME= temporary data set DEFER on UNIT
3-5
Tasks
Table 3-3. Tasks for Requesting Data Set Resources (continued)
TASKS FOR REQUESTING DATA SET RESOURCES with volume pre-mounting dynamic Processing Control by suppressing processing by postponing specification with checkpointing by subsystem by TCAM job or task End Processing unallocation disposition of data set FREE DISP RETPD EXPDT release of unused direct access space disposition of volume RLSE on SPACE RETAIN and PRIVATE on VOLUME OUTDISP on /*OUTPUT DUMMY NULLFILE on DSNAME DDNAME CHKPT SYSCKEOV DD SYSCHK DD SUBSYS CNTL QNAME RESTART on JOB RD on EXEC CNTL ENDCNTL DYNAMNBR on EXEC STATEMENTS AND PARAMETERS FOR TASK JCL Statements DD OUTPUT JCL Other JCL /*SETUP JES2 Statements JES3 Statements
of data set on 3540 Diskette Input/Output Unit Description of data attributes Protection of printed output Performance Control by queue selection Processing Control with additional parameters by segmenting with other data sets by external writer by mode by holding
DSID
DCB
DPAGELBL SYSAREA
PRTY
DEFAULT
CLASS OUTDISP
3-6
Tasks
Table 3-4. Tasks for Requesting Sysout Data Set Resources (continued)
TASKS FOR REQUESTING DATA SET RESOURCES by suppressing output with checkpointing STATEMENTS AND PARAMETERS FOR TASK JCL Statements DD DUMMY class on SYSOUT OUTPUT JCL OUTDISP=PURGE on OUTPUT CKPTLINE CKPTPAGE CKPTSEC AFPSTATS COLORMAP COMSETUP DUPLEX FORMDEF FORMLEN INTRAY OFFSETXB OFFSETXF OFFSETYB OFFSETYF OVERLAYB OVERLAYF PAGEDEF PRTERROR RESFMT USERLIB USERPATH FSSDATA MAILBCC MAILCC MAILFILE MAILFROM MAILTO PORTNO PRTOPTNS PRTQUEUE REPLYTO RETAINF RETAINS RETRYL RETRYT CKPLNS and CKPPGS on /*OUTPUT Other JCL JES2 Statements JES3 Statements
|
by Infoprint Server
End Processing unallocation Destination Control to local or remote device or to another node to another processor to internal reader INTRDR as writer-name on SYSOUT TERM ADDRESS BUILDING DEPT NAME ROOM TITLE ROOM on /*OUTPUT /*EOF /*DEL /*PURGE /*SCAN DEST class on SYSOUT DEST COMPACT /*ROUTE PRINT /*ROUTE PUNCH ORG on //*MAIN FREE SPIN
ACMAIN on //*MAIN
Output Formatting to any printer COPIES FCB form-name on SYSOUT UCS COPIES FCB FORMS LINECT (JES2 only) UCS CONTROL forms, copies, and linect on JOB JES2 accounting information COPIES, FORMS, COPIES and FORMS and LINECT on on //*FORMAT PR /*JOBPARM COPIES, FCB, and FORMS on /*OUTPUT
3-7
Tasks
Table 3-4. Tasks for Requesting Sysout Data Set Resources (continued)
TASKS FOR REQUESTING DATA SET RESOURCES to an AFP printer in addition to most of printer parameters STATEMENTS AND PARAMETERS FOR TASK JCL Statements DD BURST CHARS FLASH MODIFY DCB= OPTCD=J OUTPUT JCL BURST CHARS FLASH MODIFY TRC Other JCL BURST on /*JOBPARM CHARS, FLASH, and BURST on /*OUTPUT INDEX (JES2 LINDEX only) COPIES FCB form-name on SYSOUT DCB=FUNC=I CHARS=DUMP FCB=STD3 COPIES FCB FORMS CHARS=DUMP FCB=STD3 CHARS and FLASH on //*FORMAT PR JES2 Statements JES3 Statements
OUTLIM
lines and cards on JOB JES2 accounting information BYTES, CARDS, LINES, and PAGES on JOB
3-8
JES2 Statements
JES3 Statements
of programmer
ROOM on /*JOBPARM
Identification of Job
Each job must be identified in the jobname field of the JOB statement. This identification is required and is coded:
//jobname JOB
The next JOB statement or the end of the input stream identifies the end of a job. A null statement can identify the end of a job or input stream. Examples
//MYJOB //MCS167 //R#123 //@5AB //
Copyright IBM Corp. 1988, 2004
4-1
Identification of Step
A step name is required on only certain EXEC statements. In practice, name all steps. The system uses the step name in messages. If you omit the step name, the system leaves this field blank in messages, making it difficult to decide what step caused each message. A step name is coded:
//stepname EXEC
Examples
//STEP1 EXEC PGM=A . . //CHECK EXEC PROC=MHB15 . . //A$9 EXEC PGM=RPTWRT . . //MYPROGRM EXEC PGM=CALC .
Identification of Procedure
For an in-stream procedure, identify the beginning with a PROC statement and the end with a PEND statement. Code a name on the PROC statement. The name for a TSO/E logon procedure should not be the same as the name of any subsystem. For a cataloged procedure, PROC and PEND statements are optional. A PROC statement does not identify a cataloged procedure; the procedure is called by its member name or alias in the procedure library. However, use the PROC statement to assign default values for all symbolic parameters in the procedure. Then, if the calling EXEC statement or a SET statement does not assign a value to or nullify all the symbolic parameters, the step will not fail. Examples For in-stream procedures:
//PAYROLL PROC . . // PEND //DESK3 //ENDING PROC . . PEND A=NEWYORK,F=3350,C=(OLD,CATLG,DELETE) THIS STATEMENT ENDS IN-STREAM PROCEDURE DESK3.
4-2
After the system executes the step, the JCL stream appears as follows:
//STEP2 //SYSPRINT //INOUT4 // //INOUT5 // //SYSUT3 //SYSUT4 COPYOPER EXEC DD DD DD DD DD COPY PGM=IEBCOPY SYSOUT=A DSNAME=DS4,UNIT=3380,VOL=SER=111112, DISP=(NEW,KEEP),SPACE=(TRK,(5,1,2)) DSNAME=DS5,UNIT=3380,VOL=SER=111113, DISP=SHR UNIT=SYSDS,SPACE=(TRK,(1)) UNIT=SYSDS,SPACE=(TRK,(1)) OUTDD=INOUT1
If a subparameter contains special characters: //GHI //JKL JOB (12A75,DEPT/D58,921) . . JOB 12A75,DEPT/D58,921
4-3
Identification of Programmer
In JES initialization parameters, the installation specifies if a programmers-name parameter is required on the JOB statement. The installation decides what the parameter must contain. Examples
//ABC //DEF //GHI //JKL JOB . . JOB . . JOB . . JOB ,L.GORDON ,L GORDON ,SP/4 L. GORDON ,DEPT. 7202
The USER parameter can be coded on the JOB statement to identify the person submitting the job. Example
//MNO JOB ACCT15,DON PIZZUTO,USER=ID32DBP
4-4
JES2 Statements
JES3 Statements
Execution of Program
All programs to be executed must reside in a library, which is a partitioned data set (PDS) or partitioned data set extended (PDSE). The installation should maintain a list of programs available in its libraries. Libraries are of three types: v System libraries: such as SYS1.LINKLIB v Private libraries: specified in a JOBLIB or STEPLIB DD statement v Temporary libraries: created in a previous step of the job. For information about libraries, see Resource Control of Program Library on page 9-1 Execute a program in a system or private library by coding:
//stepname EXEC PGM=program-name
Examples
//ST1 EXEC //DSPROG DD //ST2 EXEC PGM=MYPROG DSNAME=PDS1(MEMP),DISP=SHR PGM=*.ST1.DSPROG
5-1
Execution of Procedure
A procedure to be executed must be a: v In-stream procedure, located in the input stream before the EXEC statement that calls it. v Cataloged procedure, defined in the system procedure library concatenation SYS1.PROCLIB, an installation-defined procedure library, or a private library. Execute an in-stream or cataloged procedure by coding:
//stepname //stepname EXEC EXEC PROC=procedure-name procedure-name
Examples
//ST1 //STEP9 EXEC EXEC PROC=PROCA PROC=DAILY
5-2
5-3
The syntax changes slightly if you specify a date on or after the year 2000.
5-4
Give the network a name: XMP1. This is the //*NET statement NETID parameter. Then list each job and its predecessors and successors:
jobname JOBA JOBB JOBC JOBD JOBE Predecessors //*NET NHOLD 0 0 2 1 1 Successors //*NET RELEASE JOBC JOBC JOBD, JOBE none none
5-5
Example 2 This example shows two networks. JOB3 in network XMP3 depends on JOBC in network XMP2.
XMP2 JOBA JOBB | | JOBC <--| | JOBD ---> jobname JOBA JOBB JOBC JOBD JOB1 JOB2 JOB3 XMP3 JOB1 | JOB2 | JOB3 Successors //*NET RELEASE JOBC JOBC JOB3 none JOB2 JOB3 none
5-6
v And received by a VM system with an MVS system running as a guest, code one of the following: |
//name XMIT DEST=node,DLM=xx /*ROUTE XEQ node.vmguestid /*XEQ node.vmguestid /*XMIT node.vmguestid
When Entered through a JES2 or JES3 System: v And received by a system other than a VM system, code:
//name //name XMIT XMIT DEST=node,DLM=xx DEST=node.vmuserid,DLM=xx
| | | | | | |
Use of XMIT JCL Statement with a JES system When writing new JCL, IBM recomends using the XMIT JCL (//name XMIT form) since this statement is not dependent on using a particular JES subsystem (provided you do not need to use the SUBCHARS= operand, which is not supported by JES2). In addition, the XMIT JCL is prefered because it allow transmission of records that a //*ROUTE XEQ, /*ROUTE XEQ or a /*XEQ statement does not allow. For example, a JOB statement for the receiving node must immediately follow a //*ROUTE XEQ statement. This requirement means that a //*ROUTE XEQ statement cannot be used to transmit records beginning with $$ POWER control statements to a VSE node; however, an XMIT JCL statement can transmit such records.
5-7
v Job MYJOB is processed by the submitting JES3 location v XMIT TRANS sends the following job to FARSYS v THEIRJOB is sent as JOB statement; processed by FARSYS
5-8
by holding local input reader by copying input stream (JES2 only) from remote work station
6-1
6-2
Job Input Control from Remote Work Station JES2 Remote Job Entry
JES2 remote job entry (RJE) allows a remote work station to submit a job to a distant system and have the job processed by the systems JES2. Your installations security product can control RJE stations. The output can be retained at the host system, sent to the work station, or sent to another location. JES2 processes a remote job as if it had been submitted locally. The remote station becomes a logical extension of the computer system that processes its jobs. JES2 supports two ways of communicating with RJE remote stations: v Through systems network architecture synchronous data link control (SNA/SDLC) protocol. SNA stations gain access to JES2 through VTAM. v Through binary synchronous communication (BSC) protocol. Communication between the local processor and a BSC RJE station uses a JES2 facility called multi-leaving. Multi-leaving allows transmission of multiple print and punch streams at the same time and allows JES2 to receive multiple console messages and input streams. For more information, see remote job entry in z/OS JES2 Initialization and Tuning Guide and z/OS Communications Server: SNA Programming. JES2 expects the remote station to be under the control of a remote operator. The RJE stations can consist of two types of devices: v Remote terminal, which does not have a processor. A remote terminal, for example a 2780 or 2770, can be used to enter jobs into and receive data from JES2. v Remote work station, which has a processor. A processor, for example a System/370 or System/390, executes a JES2-generated program that allows the processor to send jobs to and receive data from JES2. The remote work station may also include printers, card readers and punches, and a console. Remote Job Entry Stations During JES2 initialization, installations can configure remote lines as dedicated or nondedicated. For nondedicated remote lines, use the following to notify JES2 that you wish to begin and end a remote job stream processing session: v For SNA remote work stations: the LOGON command to begin and either the LOGOFF command or the JES2 /*SIGNOFF control statement to end.
Chapter 6. Entering Jobs - Job Input Control
6-3
6-4
from system to userid -of job completion -of print completion from TSO/E userid to system from functional subsystem to programmer through job log
USER on //*MAIN PIMSG on OUTPUT JCL MSGCLASS MSGLEVEL log in JOB JES2 accounting information JESDS on OUTPUT JCL NOLOG on /*JOBPARM
7-1
7-2
7-3
The following examples illustrate the use of the JES3 //*MAIN statement in a non-APPC scheduling environment to warn the operator when output for a job has exceeded a limit.
//*MAIN //*MAIN //*MAIN //*MAIN BYTES=(50,WARNING) CARDS=(120,WARNING) LINES=(200,WARNING) PAGES=(,WARNING)
7-4
Job Completion
When you execute a background or batch job, you can ask the system to notify your time sharing userid or another userid when the job completes. Under TSO/E, a background job is one that is entered from a terminal by a SUBMIT command or by executing a step to run TSO/E in the background. For more information, see z/OS TSO/E Command Reference. A batch job is one that is entered through an input stream. To request automatic notification, code in your JCL for the job one of the following: v In a TSO/E background job in a JES2 or JES3 system, specify a userid (and optionally a node) in the JOB statement NOTIFY parameter. If you specify a node, the userid must be attached to that node. If you do not specify a node, the userid must be attached to the node from which the job originated. v In a TSO/E background job or a batch job in a JES2 system, specify a userid in a JES2 /*NOTIFY statement and, if the userid is attached to another node, the node. v In a batch job in a JES3 system, specify a userid (and optionally a node) in the JOB statement NOTIFY parameter and the processor for the userid in the ACMAIN parameter of the JES3 //*MAIN statement. Examples
In a JES2 or JES3 system: //MYJOB JOB ,I. BUTLER,NOTIFY=DN62PSS //MYJOB JOB ,I. BUTLER,NOTIFY=FARNODE.DN62PSS In a JES2 system: /*NOTIFY DN62PSS4 /*NOTIFY FARNODE.DN62PSS In a JES3 system: //MYJOB JOB ,I. BUTLER,NOTIFY=DN62PSS //*MAIN ACMAIN=2
| | |
Print Completion
You can receive notification that your output has completed printing by coding the NOTIFY parameter on the OUTPUT JCL statement. NOTIFY allows you to send the print completion message to up to 4 users. The message identifies the output that has completed printing, and indicates whether the printing was successful. Example
//OUT1 OUTPUT NOTIFY=(PLPSC.ARNOLD,SMYTHE)
7-5
Example 2
//JOBF JOB (,,,,,,,N) /*JOBPARM NOLOG
Example 3
//J1 //O1 //O2 //S1 JOB OUTPUT OUTPUT EXEC 1518,SECT. E98 JESDS=ALL JESDS=ALL,WRITER=JCLOGGER PGM=REPORT
7-6
This example creates four different output groups. Group SYSPROG will contain a copy of all three system-managed data sets. Group OPER will also contain a copy of all three system-managed data sets. Group USER will contain a copy of all three system-managed data sets plus a copy of the data set for DD statement SYSPRINT: group USER is processed locally. The system creates a fourth group with a system-generated group name. This group contains a copy of the three system-managed data sets plus a copy of the data set for DD statement SYSPRINT; this group is processed remotely at destination REMOTE.
7-7
Example 2
//SYSDS //OUT1 //STEP1 //REQPRT JOB OUTPUT EXEC DD ,J. HIGGINS, MSGCLASS=A JESDS=ALL,GROUPID=JOINT,DEFAULT=YES PGM=REPORT SYSOUT=A
This example shows how to combine sysout data sets and system-managed output data sets in one output group. The system prints sysout data set REQPRT and all three system-managed data sets in the same group.
7-8
JES2 Statements
JES3 Statements
For RACF protection, the user must supply a userid and a password to RACF. The group name and security label for the job are optional. Depending on the installations RACF options, the group name and security label can be supplied in the USER, PASSWORD, GROUP, and SECLABEL parameters on the JOB statement. For jobs submitted by a TSO/E user, these items can be obtained from the TSO/E logon. The security environment of started tasks is defined using a RACF class, not through the USER, PASSWORD, GROUP, and SECLABEL parameters. If these parameters are specified, the started task will fail. In any RACF installation, the USER and the PASSWORD are required, and the GROUP and the SECLABEL are optional parameters on JOB statements for the following: v Batch jobs submitted through an input stream, such as a card reader: if the job requires access to RACF-protected resources, or if the installation requires that all jobs have RACF identification. v Jobs submitted by one RACF-defined user for another user. In this case, the JOB statement must specify the other users userid and might need a password. The group id and security label are optional. v Jobs that execute at another network node that uses RACF protection. Examples
//MYJOB //YOURS //RAJOB JOB JOB JOB D58,SUE,USER=D58STW,PASSWORD=41168X D58,DON,USER=DSCHOF,PASSWORD=404632,GROUP=D58DISK D58,ALE,USER=D59AFG,PASSWORD=3316YX,SECLABEL=CONF
8-1
8-2
JES2 Statements
JES3 Statements
JCLLIB
System Library
Unless a job or step specifies a private library, the system searches for a program in the system libraries when you code:
//stepname EXEC PGM=program-name
The system looks in the libraries for a member with a name or alias that is the same as the specified program-name. The most used system library is SYS1.LINKLIB, which contains executable programs that have been processed by the linkage editor.
Copyright IBM Corp. 1988, 2004
9-1
Private Library
Each executable, user-written program is a member of a private library. To tell the system that a program is in a private library, code a DD statement defining that library in one of the following ways: v To define a private library to be used throughout a job, place a DD statement with the ddname JOBLIB after the JOB statement and before the first EXEC statement in the job. v To define a library to be used in only one step, place a DD statement with the ddname STEPLIB in the step. To execute a program from a private library, code:
//stepname EXEC PGM=program-name
When you code JOBLIB or STEPLIB, the system searches for the program to be executed in the library defined by the JOBLIB or STEPLIB DD statement before searching in the system libraries. If an earlier DD statement in the job defines the program as a member of a private library, refer to that DD statement to execute the program:
//stepname EXEC PGM=*.stepname.ddname
Use of Private Libraries Private libraries are particularly useful for programs used too seldom to be needed in a system library. For example, programs that prepare quarterly sales tax reports are good candidates for a private library. Creating a Private Library To create a private library, code a JOBLIB or STEPLIB DD statement and add one or more members to it in the job. The JOBLIB library is more convenient than the STEPLIB, because the JOBLIB is available to every step in the job in order to add members or to execute already added members. The STEPLIB DD must be passed or redefined in each step that uses it. Adding Members to a Private Library To add members to a library, code a DD statement that defines the library and names the member to be added to the library. Example of Creating and Adding to a Private Library
//EG //JOBLIB // // //STEP1 //ADDPGMD // //STEP2 JOB 5328,MARGARET NONNSEN DD DSNAME=GROUPLIB,DISP=(NEW,CATLG), UNIT=3350,VOL=SER=727104, SPACE=(CYL,(50,3,4)) EXEC PGM=FIND DD DSNAME=GROUPLIB(RATE),DISP=MOD, VOL=REF=*.JOBLIB EXEC PGM=RATE
9-2
v In STEP1, the system searches the library named LIB5.GRP4, defined on the JOBLIB DD statement, for the program named FIND. v In STEP2, the system searches the library named ACCOUNTS, defined on the STEPLIB DD statement, for the program named GATHER. Concatenating Private Libraries If a job uses programs from several libraries, you can concatenate these libraries to a JOBLIB DD statement or a STEPLIB DD statement; all the libraries being concatenated must be existing libraries. Omit the ddname from all the DD statements for the libraries, except the first. The system searches the libraries for the program in the same order as the DD statements. Example of Concatenated Libraries
9-3
Temporary Library
Temporary libraries are partitioned data sets created to store a program until it is used in a later step of the same job. A temporary library is created and deleted within a job. When testing a newly written program, a temporary library is particularly useful for storing the load module from the linkage editor until it is executed by a later job step. Because the module will not be needed by other jobs until it is fully tested, it should not be stored in a system library. While the system assigns the module a name in the temporary library, the name cannot be predicted. Therefore, use the PGM parameter to identify the program by location rather than by name. Code a backward reference to the DD statement that defines the temporary library:
//stepname EXEC PGM=*.stepname.ddname
Creating a Temporary Library In the step that produces the program, code a DD statement that creates a partitioned data set and place the program in it. A later step can then retrieve this program. Alternatively, you can use the virtual I/O (VIO) facilities to define a temporary library. See Allocation of Virtual I/O on page 15-47 for details. Example
//STEP2 EXEC PGM=IEWL . . . DD DSNAME=&&PARTDS(PROG),UNIT=3350, DISP=(NEW,PASS),SPACE=(1024,(50,20,1)) EXEC PGM=*.STEP2.SYSLMOD
//SYSLMOD // //STEP3
STEP2 calls the program IEWL, which link edits object modules to form a load module that can be executed. STEP2 places the module in the library defined in the SYSLMOD DD statement. STEP3 calls the program by naming the step that created the library and the DD statement that defines the program as a member of a library. If STEP2 had called a procedure and the DD statement named SYSLMOD was included in PROCSTEP3 of the procedure, you would code PGM=*.STEP2.PROCSTEP3.SYSLMOD.
The name of the cataloged procedure is its member name or alias in the library.
9-4
In a JES2 system:
//JOB87 JOB ,S. WENDALL /*JOBPARM PROCLIB=PROC15 //S1 EXEC PROC=ALEG //INDS DD * . (data) . /*
In a JES3 system:
//JOB87 JOB ,S. WENDALL //*MAIN PROC=15 //S1 EXEC PROC=ALEG //INDS DD * . (data) . /*
Chapter 9. Entering Jobs - Resource Control
9-5
The system replaces the INCLUDE statement with the JCL statements contained in the INCLUDE group.
Example
//IDLIB //INCGRP JCLLIB ORDER=(PRILIB.INCL.ONE,PRILIB.INC.TWO) INCLUDE MEMBER=OUTSTMTS
9-6
9-7
This example shows how to request storage for a program that must not be paged and for a program that can be paged. Step S1 executes in central (real) storage, without paging, while step S2 executes in virtual storage, with paging. Example 2
//STEPA // EXEC PROC=MYPROC8,REGION.FIRST=750K, REGION.SECOND=700K
This EXEC statement assigns space requests to two procedure steps, FIRST and SECOND, of a procedure named MYPROC8. OS/390 UNIX System Services Considerations In OS/390 UNIX System Services, callable service BPX1SRL lets a program modify its REGION size. Note that only superusers can increase their REGION size. See z/OS UNIX System Services Programming: Assembler Callable Services Reference for more information on the BPX1SRL callable service.
9-8
A specified system processes the jobs JCL and executes the job. The output from the job can be processed by any system in the multi-access spool configuration. You should request a specific system when a job has special processing requirements not available on all systems in the configuration. For example, an emulation job might need to run on a particular system. You can provide a SCHENV default in a JES2 environment via a JOBCLASS(c) specification. For more information on the JES2 multi-access spool configuration, see z/OS JES2 Initialization and Tuning Guide. Independent Mode If the job needs to be processed by a system in independent mode, code:
/*JOBPARM SYSAFF=(cccc,IND) /*JOBPARM SYSAFF=(,IND) /*JOBPARM SYSAFF=(ANY,IND)
Chapter 9. Entering Jobs - Resource Control
9-9
Relationship to Other Parameters The requested processor must be consistent with other parameters specified in the job control statements: v CLASS parameter on the JOB statement or //*MAIN statement. A processor or processors are defined for each valid job class during JES3 initialization. If the SYSTEM parameter specifies a processor that does not execute jobs of the specified class, JES3 abnormally terminates the job. v DD statement UNIT parameter that specifies a device-number for a device that is JES3-managed or jointly JES3/MVS managed. The specified device must be attached to the requested processor. Also, because a specific device is requested, the SYSTEM parameter is required. v The TYPE parameter on the //*MAIN statement must specify the system running on the requested processor. v The processing requests made in JES3 //*PROCESS statements. Any dynamic support programs called in //*PROCESS statements must be able to be executed on the requested processor. Examples
//*MAIN SYSTEM=(PRS1,PRS3)
9-10
Example 1
//ONE //*MAIN //S1 //OUT1 //OUT2 JOB ,PAT EGAN SYSTEM=SY2 EXEC PGM=ABC DD SYSOUT=N DD SYSOUT=S
During initialization, the installation assigned spool partitions as follows: v PARTD is assigned to output class S. v PARTC is assigned to processor SY2. v PARTA is the default partition. v No partition is assigned to output class N. The jobs input spool data sets are allocated to the default spool partition, PARTA. Because the job executes on processor SY2 and no partition is assigned for output class N, the sysout data set OUT1 is allocated to partition PARTC. Sysout data set OUT2 is allocated to PARTD. Example 2
//TWO //*MAIN //S1 //OUT1 //OUT2 JOB ,LEE BURKET CLASS=IMSBATCH,SYSTEM=SY2 EXEC PGM=DEF DD SYSOUT=N DD SYSOUT=S
During initialization, the installation assigned spool partitions as for job ONE, with the following addition: v PARTB is assigned to job class IMSBATCH.
9-11
During initialization, the installation assigned spool partitions as for job TWO. The sysout data set OUT1 is allocated to partition PARTE, as specified in the SPART parameter. Note that the SPART parameter overrides the processors partition and the job classs partition.
9-12
TIME on /*JOBPARM
PGM=IEFBR14 PGM=JCLTEST PGM=JSTTEST (JES3 only) SYSMDUMP DD SYSUDUMP DD SYSABEND DD To format dump on 3800 Printing Subsystem, FCB=STD3 and CHARS=DUMP on dump DD.
10-1
The relational expression consists of: v Comparison operators v Logical operators v Not () operators v Relational expression keywords. Comparison operators compare a relational expression keyword to a numeric value. The comparison results in a true or false condition. Use the logical operators & (AND) and | (OR) in complex relational expressions, to indicate that the system evaluates the Boolean result of two or more relational expressions. The (NOT) operator reverses the testing of the relational expression. Relational expression keywords indicate that you are evaluating a return code, abend condition, or abend completion code. Either the THEN clause or ELSE clause must contain at least one EXEC statement. The EXEC statement indicates a job step that the system executes based on its evaluation of the relational expression. A THEN or ELSE clause that does not contain an EXEC statement is a null clause. You can nest IF/THEN/ELSE/ENDIF statement constructs up to 15 levels of nesting.
Compatible Return Code Tests: The system applies the return code tests on the IF/THEN/ELSE/ENDIF statement construct to the return code, if any, produced by a job, step, or procedure step in the job. To take advantage of this statement construct, the return codes for each step should have compatible meanings. For example, the COBOL compiler and the linkage editor have compatible return codes:
10-2
To continue processing in spite of small errors, code the return code test as follows:
//NOTBAD IF (RC > 4) THEN //BADERR EXEC PGM=ERRRTN //NOGOOD ELSE //NEXTSTEP EXEC // ENDIF
When a previous job step has a return code greater than 4, step BADERR executes an error routine procedure called ERRRTN. When the return code on all previous job steps is less than or equal to 4, the ELSE statement allows processing to continue with step NEXTSTEP.
Job and Step Level Evaluation Using the IF/THEN/ELSE/ENDIF Statement Construct
The way you code the IF/THEN/ELSE/ENDIF statement construct determines whether the statement construct tests all job steps, a single job step, or a procedure step. Job Level Evaluation: If you do not code a stepname, the IF/THEN/ELSE/ENDIF statement construct evaluates the return code, abend condition, or run condition of every previous step in the job. If the condition (return code, abend condition, or run condition) is satisfied based on the steps in the job that have executed thus far, the system executes the THEN clause. Step Level Evaluation: To test a single step, code the stepname of the step you want to test. To test a procedure step, code the stepname.procstepname of the procedure step you want to test. If the step or procedure step that you are evaluating did not execute, was cancelled or ended abnormally, the result of the evaluation is false.
10-3
The system executes step ERROR only when one or more of the preceding steps abnormally terminates. Testing for an Abend Completion Code: To execute a step based on the evaluation of an abend completion code, code:
//IFABEND //ABNDSTEP // //NEXTSTEP IF (ABENDCC=S0C4) EXEC PGM=CLEANUP ENDIF EXEC THEN
The system executes the program CLEANUP when a previous step has the system abend completion code 0C4.
10-4
The relational expression tests that an abend did not occur in procedure LINK, called by the EXEC statement in STEP4. If the relational expression is true, no abend occurred. The null THEN statement passes control to step NEXTSTEP. If the relational expression is false, an abend occurred. The ELSE clause passes control to the program called ERRTN. Example 3: This example tests for a user abend completion code in the job.
//CCTEST IF (ABENDCC = U0100) //GOAHEAD EXEC PGM=CONTINUE //NOCC ELSE //EXIT EXEC PGM=CLEANUP // ENDIF THEN
If any job step produced the user abend completion code 0100, the EXEC statement GOAHEAD calls the procedure CONTINUE. If no steps produced the completion code, the EXEC statement EXIT calls program CLEANUP.
If an EXEC statement COND parameter causes a step to be bypassed, only that step is not executed; the following steps are executed or not, depending on their COND parameters. If a JOB statement COND parameter causes a step to be bypassed, the system bypasses all remaining job steps. Bypassing a step because of an EXEC COND parameter is not the same as abnormally terminating the step. Bypassing permits the following steps to be executed; abnormally terminating causes all following steps to be bypassed, unless they contain EVEN or ONLY in their EXEC COND parameters.
Chapter 10. Processing Jobs - Processing Control
10-5
The step is to be executed even if one or more of the preceding steps abnormally terminates. That is, the step will always be executed, whether or not a preceding step abnormally terminates.
//stepname EXEC PGM=x,COND=ONLY
10-6
Code the return code as follows: COND=(4,LT) if you want to continue processing despite the minor errors. The job terminates only if the return code of any step is greater than 4. COND=(4,LE) if you want to continue processing only if no errors occur. The job terminates if the return code of any step is greater than or equal to 4.
This example asks Is 10 greater than the return code or is 20 less than the return code?. If either is true, the system skips all remaining job steps. If both are false after each step executes, the system executes all job steps. For example, if a step returns a code of 12, neither test is satisfied. The next step is executed. However, if a step returns a code of 25, the first test is false, but the second test is satisfied: 20 is less than 25. The system bypasses all remaining job steps. Example 2:
//J2 JOB ,D WEISKOPF,COND=((50,GE),(60,LT))
10-7
This example shows seven return code tests. The job continues only if the return codes are: 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 18, 20, or 22.
This example says Bypass this step if 20 is greater than the return code STEP1 issues, or if STEP2 issues a return code of 60. Example 2:
//S4 EXEC PGM=V,COND=((20,GT,STEP1),(60,EQ))
This example says Bypass this step if 20 is greater than the return code STEP1 issues, or if any preceding step issues a return code of 60. Example 3:
//T7 EXEC PGM=B15,COND=(10,LT) //STEP8 EXEC PGM=MYPROG,COND=(15,NE,STEP5)
This example says Bypass this step if 7 is less than the return code issued by a procedure step named LINK in the cataloged procedure called by the EXEC statement named STEP4. Example 5:
//RCERROR EXEC PGM=ABEND,COND=(4,GE)
This example shows a single return code test. When you do not code a stepname, the step RCERROR will execute only when the return codes of all previous steps do not satisfy the test specified by COND.
10-8
This example says Execute program CLEANUP even if one or more of the preceding steps abnormally terminated. Example 3:
//LATER EXEC PGM=SCRUB,COND=((10,LT,STEPA),(20,EQ),ONLY)
This example says Execute this step only if one of the preceding steps terminated abnormally; but bypass it if 10 is less than the return code STEPA issues or if any of the steps that terminated normally issued a return code of 20. Example 4:
//LATEST EXEC PGM=FIX,COND=((10,LT,STEPA),(20,EQ),EVEN)
This example says Bypass this step if 10 is less than the return code STEPA issues, or if any of the preceding steps issues a return code of 20; otherwise execute this step even if one of the preceding steps terminated abnormally. Example 5:
//EXG EXEC PGM=A1,COND=(EVEN,(4,GT,STEP3)) //EXH EXEC PGM=A2,COND=((8,GE,STEP1),(16,GE),ONLY) //EXI EXEC PGM=A3,COND=((15,GT,STEP4),EVEN,(30,EQ,STEP7))
No.
Before STEP3: 1. Is 10 less than 2 or 6? No. 2. Did one or more of the preceding steps terminate abnormally? No. Bypass STEP3. Before STEP4: 1. Is 10 less than 2 or 6? No. 2. Is 5 greater than 6? No. 3. Is one of the preceding return codes equal to 2? Yes. Bypass STEP4. Before STEP5: 1. Is 10 less than 2 or 6? Execute STEP5.
No.
Before STEP6: 1. Is 10 less than 9, 2, or 6? No. 2. Is 8 greater than 9? No. 3. Did one of the preceding steps terminate abnormally? No. Execute STEP6.
10-9
12
Before STEP8: 1. Is 10 less than 12, 10, 9, 2, or 6? Bypass STEP8 and STEP9.
Yes.
EXEC PGM=A
EXEC PGM=B,COND=(7,LT)
ABEND
Before STEP3: 1. Is EVEN or ONLY specified in STEP3? Yes. 2. Is 5 equal to 4? No. 3. Is 20 greater than 4? Yes. Bypass STEP3. Before STEP4: 1. Is EVEN or ONLY specified in STEP4? Yes. 2. Is 5 equal to 4? No. 3. Are any preceding return codes equal to 3? No. Execute STEP4. Before STEP5: 1. Is EVEN or ONLY specified in STEP5? No. Bypass STEP5. Before STEP6: 1. Is EVEN or ONLY specified in STEP6? No. Bypass STEP6. Before STEP7: 1. Is EVEN or ONLY specified in STEP7? Yes. 2. Is 5 equal to 6 or 4? No. 3. Is 6 equal to the return code of STEP5? STEP5 was bypassed and did not produce a return code so this test evaluates as FALSE. Execute STEP7.
EXEC PGM=D,COND=((3,EQ),ONLY)
EXEC PGM=E,COND=(2,LT,STEP3)
EXEC PGM=F
10-10
Yes.
In this example, the EXEC statement that calls procedure PROC4 passes COND parameters to two steps, STEP4 and STEP6, Example 2:
//TEST EXEC PROC=MYPROC,COND=((7,LT,STEP1),(5,EQ))
This EXEC statement establishes a COND parameter for all steps in the called procedure. It overrides any COND parameters in the procedure, if coded. Example 3:
//PS3 EXEC PGM=ADD3,COND=(5,EQ,STEP2)
In this EXEC statement in a procedure, STEP2 in the COND parameter can be the name of either a preceding step in the procedure or of a preceding step in the job. Example 4:
Your job contains . . //TWO . . . . . . //THREE . . . . Cataloged Procedure PRA . //EDIT EXEC . .
EXEC PROC=PRA
EXEC PROC=PRB,COND.SP3=(10,LT,TWO.EDIT)
10-11
To direct the system to bypass all steps in procedure PRB, code the COND parameter without the SP3 qualifier, as follows:
//THREE EXEC PRB,COND=(10,LT,TWO.EDIT)
In this example, you force step CLEANUP to execute if step S1 executes but issues a return code of 12 to indicate that data sets might contain invalid records. The program FIX would clean up the invalid records.
10-12
Use in Testing
One use for the output limit is during program testing. You can cancel a program that is in an endless loop containing instructions that send records to a sysout data set. Examples: The following examples illustrate the use of the JCL JOB statement, in either an APPC or non-APPC scheduling environment, to warn the operator when the output for a job has exceeded a limit in any JES system:
//JOB1 //JOB2 //JOB3 //JOB4 JOB JOB JOB JOB ACCT01,D. PIKE,BYTES=(50,CANCEL) 1542,RWALLIN,CARDS=(120,CANCEL) ,ZOBES,LINES=(200,CANCEL) ACCT27,S M SHAY,PAGES=(,CANCEL)
The following examples illustrate the use of the JES3 //*MAIN statement in a non-APPC scheduling environment to warn the operator when output for a job has exceeded a limit.
//*MAIN //*MAIN //*MAIN //*MAIN BYTES=(50,CANCEL) CARDS=(120,CANCEL) LINES=(200,CANCEL) PAGES=(,CANCEL)
10-13
In this example, the job is allowed 2 minutes of execution time and each step is allowed 1 minute. Should either step try to execute beyond 1 minute, the job will terminate beginning with that step. Example 2:
//SECOND JOB //STEP1 EXEC //STEP2 EXEC ,M. CARLO,TIME=3 PGM=C,TIME=2 PGM=D,TIME=2
In this example, the job is allowed 3 minutes of execution time. Each step is allowed 2 minutes of execution time. Should either step try to execute beyond 2 minutes, the job will terminate beginning with that step. If STEP1 executes in 1.74 minutes and if STEP2 tries to execute beyond 1.26 minutes, the job will be terminated because of the 3-minute time limit specified on the JOB statement. Example 3:
//THIRD JOB ,A. DOMENICK,TIME=2 //STEP1 EXEC PGM=E,TIME=3
In this example, the job is allowed 2 minutes of execution time. Since the time specified on the JOB statement is less than the time on the EXEC statement, STEP1 is only allowed 2 minutes of execution time. If STEP1 attempts to execute beyond 2 minutes, the job will terminate in that step. Example 4:
//AAA EXEC PROC=PROC5,TIME=20
10-14
In this example, the EXEC statement sets a time limit for two steps, ABC and DEF, of the called cataloged procedure.
Both of these statements specify that the job cannot use the processor for more than 3 minutes.
v For a job in a JES2 system, where x is a class defined during JES2 initialization to force job control statement scanning:
//jobname JOB acct,progname,CLASS=x
10-15
The system does not check for misplaced statements, for invalid syntax in JCL subparameters, or for parameters and/or subparameters that are inappropriate together. Examples:
//JB16 //TG //S1 //S2 JOB JOB EXEC EXEC ,M. CARLO,TYPRUN=SCAN RK988,SMITH,CLASS=S PGM=JCLTEST PGM=JSTTEST
Considerations when Using IEFBR14: Although the system allocates space for data sets, it does not initialize the data sets. Therefore, any attempt to read from one of these data sets will produce unpredictable results. Also, IBM does not recommend allocation of multi-volume data sets while executing IEFBR14. If you created a data set when testing with IEFBR14, the data sets status in the DD DISP parameter is old when you execute the actual program. Because IEFBR14 does not open any data sets, a DD DISP parameter of CATLG does not make the system catalog a data set, if one of the following is true: v The DD statement requested a nonspecific tape volume. v The DD statement requested a tape volume with dual density options, but the DCB DEN subparameter did not specify the density. v The DD statement was allocated to a tape volume with dual recording mode options, but you did not code the DCB TRTCH subparameter. When executing IEFBR14, if a DD DISP parameter specifies CATLG or UNCATLG, the system issues an operator message to mount the volume. If it is not necessary to mount the volume, code DEFER on the UNIT parameter of the DD statement. Examples:
10-16
PGM=IEFBR14,COND=(8,LE),TIME=2
/*
This example asks for only the converter/interpreter service, CI. The converter/interpreter scans the jobs syntax for errors. The program will not be executed or the jobs output processed. However, the job will be purged from the system.
10-17
/*
If the first step exceeds 50,000 lines of output, JES3 cancels the job but does not write a dump because the first step does not contain a dump DD statement. If the combined output from S1 and S2 exceeds 50,000 lines, JES3 cancels the job and writes a SYSUDUMP dump to the sysout data set for class D. Example 3:
//JOB1 JOB ,W. BAILEY,MSGCLASS=B,BYTES=(30,DUMP) //STEP1 EXEC PGM=TESTPGM //SYSUDUMP DD SYSOUT=D . . .
If the first step exceeds 30,000 lines of output, the system cancels the job and writes a SYSUDUMP dump to the sysout data set for class D.
10-18
| | |
by I/O-toprocessing ratio
11-1
Note that in a JES2 environment the CLASS parameter is ignored for started tasks. In a JES3 system, assign a job to a job class, which is part of a job class group, by coding either of the following:
//jobname JOB acct,progname,CLASS=x //*MAIN CLASS=x
Note that for started tasks in a JES3 environment all class related attributes and functions are ignored except device fencing, SPOOL partitioning, and track group allocation. Refer to the z/OS JES3 Initialization and Tuning Guide for more information about class attributes and functions. Examples
//MYJOB //*MAIN JOB ACCT24,BIRDSALL,CLASS=F CLASS=H
JES2 also uses the execution time and output amount to monitor job execution time and output. If you do not code these estimates, JES2 assumes installation defaults. If your job exceeds the coded or assumed estimates, JES2 issues warning messages to the operator or cancels the job, with or without a dump. Use of Priority An installation can specify that jobs with shorter execution times and less output should be assigned higher priorities. To make sure that programmers specify correct times and output, the installation can instruct the operator to cancel jobs that exceed the estimates.
11-2
The operator can change a jobs priority; see z/OS JES3 Commands. Example
//JOB10 JOB ,FLO JONES,PRTY=14
Priority Aging
JES2 increases the priority of a job as it waits to be executed in the system. JES2 keeps raising the jobs priority until it is executed. JES3 increases a jobs priority based on the number of times the job is passed over for selection. A job can be passed over because not enough devices are available or because another job has a needed volume or data set or because not enough storage is available. The installation defines priority aging; you cannot specify it using JCL. |
The IORATE parameter indicates if the job contains a low, medium, or high number of I/O instructions compared to the number of processing instructions. JES3 uses this value to determine the mix of jobs assigned to a processor: using this parameter, JES3 balances processor-bound processing with I/O-bound processing. A correct balance improves throughput. Examples
//*MAIN IORATE=HIGH //*MAIN IORATE=LOW //*MAIN IORATE=MED
11-3
11-4
12-1
Example (PDSE)
//SMSDS // DD DSNAME=RPRT(WEEK1),DATACLAS=DCLAS1,STORCLAS=SCLAS1, DISP=(NEW,KEEP) DSNAME=RPRT(WEEK2),DISP=OLD
//ADDSMS DD
12-2
in a non-SMS environment as a temporary data set. Only the job that creates a temporary data set has access to it to read and write data and to scratch the data set. SMS manages a temporary data set if (1) you specify a storage class (via the DD STORCLAS parameter) or (2) an installation-written automatic class selection (ACS) routine selects a storage class for the temporary data set. The system generates a qualified name for the temporary data set. For details about the format of the name the system generates, see the description of the DSNAME parameter in z/OS MVS JCL Reference. The time in the system-generated qualified name is the same for all temporary data sets in a job. Therefore, if the same temporary data set name appears more than once in a job, the system might create duplicate data set names. This would be a JCL error, unless the data set is passed from one job step to another.
12-3
12-4
Example
//COPYDS DD DSNAME=*.MYDS
A step can contain more than one in-stream data set. Use the DD DATA statement when the data contains JCL statements. If the statement that begins the data set contains a DLM parameter, end the in-stream data set with a statement containing the two characters in the DLM parameter. Otherwise, end the in-stream data set with either of the following delimiters:
/* Another JCL statement, if begun with a DD * statement
Naming an In-Stream Data Set Code the DSNAME parameter on the DD * or DATA statement to assign the last qualifier of the system-generated name to an in-stream data set. Example 1
//DSIN DD * . . (data) . //INSET DD DATA .
Chapter 12. Data Set Resources - Identification
12-5
Example 2
//DDIN DD DATA,DSNAME=&&PAYIN1 . . (data) .
/*
To merge associated data sets into the job input stream, the stream containing the DD statements for the associated data sets must be processed by the diskette reader program. JES2 and JES3 do not support the DSID parameter. For more information on the 3540 diskette, see 3540 Programmers Reference. Example
//ASSTDS DD DATA,DSID=3254,VOLUME=SER=778356
12-6
12-7
The label types are: SL: IBM standard labels SUL: both IBM standard and user labels For data sets on direct access, only SL or SUL can be specified. For SL or SUL, or when the label type subparameter is omitted because the data set has IBM standard labels, the system ensures that the correct tape or direct access volume is mounted. AL: ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels AUL: ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels, and ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 user labels For AL or AUL, the system ensures that the correct tape volume is mounted; the tape must have an ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 label.
12-8
Label Type for Cataloged or Passed Data Sets For cataloged and passed data sets, the system does not keep label type information. Therefore, when referring to a cataloged or passed data set that has other than standard labels, code the LABEL type subparameter. Nonspecific Volume Request The label type subparameter can be specified for a nonspecific tape volume request, that is, a DD statement with no volume serial numbers. If the operator mounts a tape volume with a different label type, the system requests that the operator mount another volume. But, if the specified label type is NL or NSL for the nonspecific volume request and the operator mounts a volume with standard labels, the system uses the volume if both of the following are true: 1. The expiration date of the existing data set on the volume is passed. 2. The existing data set on the volume is not password protected. If you specify SL on a nonspecific volume request, but the operator mounts a tape volume that contains other than IBM standard labels, the system asks the operator to identify the volume serial number and the volumes new owner before writing the IBM standard labels. If the tape volume has ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels, the system asks the operator for permission to destroy the labels. Specific Volume Request If you specify SL on a specific volume request, that is, a DD statement that specifies volume serial numbers, but the volume does not contain IBM standard labels: v If the mounted volume contains labels, the system rejects the volume and asks the operator to mount the specified tape volume. v If the mounted volume is not labeled, the system asks the operator whether to reject the volume or write standard labels on it. Examples
//DSF // //DSJ DD DSNAME=ALLAB,LABEL=(,AL),UNIT=3420, VOLUME=SER=223344,DISP=(NEW,CATLG) DD DSNAME=CATDS,DISP=OLD,LABEL=(,SUL)
12-9
Data-Set-Sequence-Number with BLP If you specify BLP for the label type, the system treats anything between tapemarks as a data set. Therefore, if the tape actually has labels, code the data-set-sequence-number subparameter to position the tape properly; the subparameter must reflect all labels and data sets that precede the desired data set. z/OS DFSMS: Using Magnetic Tapes illustrates where tapemarks appear. Examples
//DDEX1 // //DDEX2 // DD DSNAME=TAPEDS3,DISP=(NEW,KEEP),UNIT=3420, LABEL=(3,SL),VOLUME=SER=666555 DD DSNAME=TAPEDS4,DISP=(NEW,KEEP),UNIT=3420, LABEL=(8,BLP),VOLUME=SER=223344
The QNAME parameter refers to a TPROCESS macro instruction that defines a destination queue for the messages. The parameter can also name a TCAM job to process the messages. Example
//EX1 DD QNAME=MACRO1.TJOB
In a background or batch job, the system treats the TERM=TS parameter as a SYSOUT=* parameter if no other parameters are coded. Example
//MYTSODS DD TERM=TS
12-10
of data attributes - DCB by modeling AMP DATACLAS KEYLEN DSNTYPE KEYOFF LRECL RECFM RECORG LIKE REFDD of migration and backup MGMTCLAS
Description of Status
The process of securing control of data sets for a job is called data set integrity processing. Data set integrity processing avoids conflict between two or more jobs that request use of the same data set. For example, two jobs, one named READ and another named MODIFY, both request data set FILE. v READ wants only to read and copy certain records v MODIFY deletes some records and changes other records If both jobs use FILE concurrently, READ cannot be certain of the integrity of FILE because MODIFY is changing records in the data set. MODIFY should have exclusive control of the data set. Indicate the type of control needed by coding the data sets status:
//ddname //ddname //ddname //ddname DD DD DD DD DISP=(NEW,... DISP=(OLD,... DISP=(MOD,... DISP=(SHR,...
For exclusive use of a data set, code: v NEW: the data set is being created in this job step. v OLD: the data set existed before this job step. v MOD: the system first assumes that the data set exists. For an existing sequential data set, MOD causes the read/write mechanism to be positioned after the last record in the data set. The read/write mechanism is positioned after the last record each time the data set is opened for output. If the system cannot find volume information for the data set on the DD statement, in the catalog, or passed with the data set from a previous step, the
Copyright IBM Corp. 1988, 2004
13-1
13-2
13-3
Shared control
Exclusive control
Request granted
Request granted
Exclusive control
Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx
Request granted
Request granted
Request granted
Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx
Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Request granted
Request granted
Exclusive control
Request granted
Request granted
Exclusive control
Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx
Request granted
Request granted
Request granted
Fail or wait dependent on SDSN_WAIT specification in ALLOCxx Fail or wait dependent on SDSN_WAIT specification in ALLOCxx
13-4
v The data set label. Therefore, the system ignores a value in a DCB subparameter on the DD statement if the data control block already contains the value. The system ignores a value in the data set label if the data control block already contains the value from the program or a DD DCB subparameter. Note: When concatenated data sets are involved, the DCB is completed based on the type of data set and how the processing program uses the data set. See z/OS DFSMS: Using Data Sets for more information. DCB Values from Cataloged Data Sets The DD statement DCB parameter can ask the system to copy certain values from the data set label of a cataloged data set, by coding:
//ddname //ddname DD DD DCB=dsname,... DCB=(dsname,subparameter,...)...
The system copies the DSORG, RECFM, OPTCD, BLKSIZE, LRECL, KEYLEN, and RKP values from the label. If any of these values are coded in subparameters following the dsname, the system uses the coded values. DCB Values from Earlier DD Statements The DD statement DCB parameter can ask the system to copy all subparameters from the DCB parameter in an earlier DD statement, by coding a backward reference to the earlier statement:
//ddname //ddname //ddname DD DD DD DCB=*.ddname DCB=*.stepname.ddname DCB=*.stepname.procstepname.ddname
Examples
//S1 //DD1 // // //S2 //DD2 //S3 //DD3 EXEC PGM=ANYA DD DSNAME=ABC,DCB=(RECFM=FB,LRECL=80,BLKSIZE=960), DISP=(NEW,CATLG,DELETE),UNIT=3380,VOLUME=223344, SPACE=(CYL,(30,10)) EXEC PGM=ANYB DD DSNAME=COPIER1,DCB=ABC EXEC PGM=ANYC DD DSNAME=COPIER2,DCB=*.S1.DD1
v With SMS, the DD statement parameters KEYLEN, KEYOFF, LRECL, and RECORG. v The ACB, EXLST, or GENCB macro instructions in assembler language programs.
Chapter 13. Data Set Resources - Description
13-5
In Data Class
With SMS, the system obtains information about the attributes of a data set from the data class for the data set. In many cases, the attributes defined in the data class selected by an installation-written automatic class selection (ACS) routine are sufficient for the data sets you create with DD statements. However, you can specify the name of a data class on the DATACLAS parameter for a new data set. (Note that an ACS routine can override the data class that you specify.) The storage administrator at your installation defines the names of data classes and their data set attributes. To view a list of data class names and their attributes, use the Interactive Storage Management Facility (ISMF). You can also override individual data set attributes. Any data set attributes you specify on the following parameters override the corresponding attributes in the data class for the data set. RECORG (record organization) or RECFM (record format) LRECL (record length) KEYLEN (key length) KEYOFF (key offset) DSNTYPE (data set type, PDS or PDSE) AVGREC (record request and space quantity) SPACE (average record length, primary, secondary, and directory quantity) RETPD (retention period) or EXPDT (expiration date) VOLUME (volume-count) Examples
//DD5 //DD6 //DD7 DD DD DD DSNAME=DESIGNA.PGM,DISP=(NEW,KEEP) DSNAME=DESIGNB.PGM,DATACLAS=PGM5,DISP=(NEW,KEEP) DSNAME=DESIGNC.PGM,DATACLAS=PGM5,LRECL=1024,DISP=(NEW,KEEP)
13-6
13-7
13-8
14-1
The system must contain an installation-written file-access exit routine. This routine verifies that the ACCODE parameter specifies the correct code for an existing data set and, therefore, can use a data set. Examples
//DD1 // //DD2 // DD DSNAME=NEWDS,ACCODE=F,LABEL=(,AL),UNIT=3380, VOLUME=SER=998877,DISP=(NEW,CATLG,KEEP) DD DSNAME=OLDDS,ACCODE=J,LABEL=(,AL),UNIT=3380, VOLUME=SER=665544,DISP=OLD
Protection by Passwords
Use the PASSWORD subparameter of the LABEL parameter to specify a password to be used for protecting a data set. Note that SMS ignores the PASSWORD subparameter for SMS-managed data sets. To protect a data set with a password, code:
14-2
These subparameters mean the following: v PASSWORD: The data set cannot be read from, written to, or deleted by another job or step unless the operator supplies the system with the correct password. v NOPWREAD: The data set cannot be written to or deleted by another job or step unless the operator supplies the system with the correct password. However, the data set can be read without the password. To protect a data set with a password, specify PASSWORD when the data set is created. Password-protected data sets must have standard labels, either IBM standard or ISO/ANSI Version 1 or ISO/ANSI/FIPS Version 3 labels. Examples
//EX1 // //EX2 DD DSNAME=ABC,DISP=(NEW,CATLG,DELETE), LABEL=(,SL,PASSWORD),UNIT=3400-5,VOLUME=223344 DD DSANME=DEF,DISP=OLD,LABEL=(,SL,NOPWREAD)
Table 14-2. Processing with DD LABEL Subparameter IN or OUT OPEN Macro Parameter INOUT (BSAM) UPDAT (BDAM) LABEL Subparameter IN Program Processing of Data Set Read records (If the program tries to write to the data set, the system gives control to the error analysis (SYNAD) routine.) Required Password Read password, if data set protected with PASSWORD; write password, if data set protected with NOPWREAD
OUT
Write records (If the program tries to Write password, if data set protected read the data set, the system gives with PASSWORD or NOPWREAD control to the error analysis (SYNAD) routine.)
Chapter 14. Data Set Resources - Protection
14-3
Add records to end of data set (If the Write password, if data set protected program tries to read the data set, with PASSWORD or NOPWREAD the system gives control to the error analysis (SYNAD) routine.)
Other Uses of the LABEL IN Subparameter You can also use the IN subparameter to avoid operator intervention when reading a data set that has an unexpired expiration date. Data Set Processing with LABEL OUT Subparameter When the OPEN macro instruction specifies OUTINX or EXTEND and the DD LABEL contains an OUT subparameter, the system adds records to the end of the data set regardless of the DISP parameter of the DD statement. Examples
//EX1 //EX2 DD DD DSNAME=D.E.F,DISP=OLD,LABEL=(,,NOPWREAD,IN) DSNAME=EXIST,DISP=MOD,LABEL=(,,PASSWORD,OUT)
14-4
of virtual I/O
This chapter includes the following topics related to the allocation of data set resources. v Allocation of Device on page 15-2 v Allocation of Volume on page 15-15 v v v v v v Interactions Between Device and Volume Allocation on page 15-24 Stacking Data Sets on page 15-37 Allocation of Direct Access Space on page 15-42 Allocation of Virtual I/O on page 15-47 Allocation with Volume Premounting in a JES2 System on page 15-50 Dynamic Allocation on page 15-50
Some of these topics include sections that describe the topic from the perspective of whether the resource is SMS-managed or non-SMS-managed.
15-1
Allocation of Device
The device that a data set resides on is determined as follows: v For SMS-managed data sets, by the storage class for the new data set, specified on the STORCLAS parameter of the DD statement or selected by the installation-written automatic class selection (ACS) routine for the new data set. v For non-SMS-managed data sets, by the UNIT parameter, specified on the DD statement for the new data set, or, with SMS, by the SMS default unit, when the UNIT parameter is not specified.
To specify a specific storage class for a new data set, code the STORCLAS parameter; for example:
//DD6 DD DSNAME=DESIGNB.PGM,STORCLAS=STOR55,DISP=(NEW,KEEP)
The system catalogs new permanent system-managed DASD data sets at allocation. The system catalogs data sets on a system-managed tape volume during unallocation processing, according to DISP parameters on DD statements. To retrieve an existing data set, you do not need to code the STORCLAS parameter; for example:
//DD7 DD DSNAME=DESIGNB.PGM,DISP=MOD
If you specify the UNIT parameter for an SMS-managed data set, the system generally ignores the parameter. There are, however, several cases when the system uses the information specified on the UNIT parameter:
15-2
v A type of device, such as a 3350 direct access device or a 1403 printer: v A group of devices, such as DISK, to indicate all direct access devices in the system:
//ddname DD UNIT=group-name,...
The status of a device affects whether the system can allocate it or not. See Table 15-2.
Table 15-2. Effect of Device Status on Allocation Status Direct Access Online Offline Tape Device Type Printer Punch Graphic Teleprocessing
Eligible for allocation Eligible for allocation when the operator brings the device online Eligible for allocation when at least one path to the device is online
Eligible for allocation when the volume is specifically requested Eligible for allocation when the operator selects the device in response to message IEF238D or when the operator brings the device online.
Not applicable Eligible for allocation when the operator selects the device in response to message IEF238D or when the operator brings the device online. Not applicable
15-3
15-4
Note: You can also use deferred mounting for SMS-managed data sets.
15-5
Requesting More than One Unit for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
For faster processing, request several units for a multivolume data set or for a data set that may require additional volumes. When each volume is on its own device, step execution is not halted while the operator demounts and mounts volumes. Always request several units when the data set resides on more than one permanently resident or reserved volumes or may be extended to a new volume during step execution. Permanently resident and reserved volumes cannot be demounted in order to mount a new volume. Request multiple units by: v Coding the unit count subparameter:
//ddname DD UNIT=(device,unit-count),...
v Requesting parallel mounting when the VOLUME parameter requests more than one volume in the volume count parameter or in more than one serial number:
//ddname //ddname // DD UNIT=(device,P),VOLUME=(,,,volume-count) DD UNIT=(device,P), VOLUME=SER=(serial-number,serial-number,...)
Number of Devices Allocated for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
The system assigns volumes and devices for a job step by calculating the following: v The maximum number of volumes per DD statement v The maximum number of devices per DD statement v The number of devices for the step
15-6
Unit name that includes different device types The system allocates devices of the same type.
15-7
Examples for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
Example 1
//TEST //STEP1 //D1 // //STEP2 //D2 // //D3 // //D4 // //D5 // //D6 //D7 JOB 5675,DEPT. 25 EXEC PGM=A1 DD DSNAME=A01DD1,DISP=(,PASS),UNIT=3330, SPACE=(TRK,1),VOLUME=SER=333001 EXEC PGM=A2 DD DSNAME=LIB1,DISP=OLD,UNIT=3340, VOLUME=(PRIVATE,SER=123456) DD DSNAME=ABC,DISP=(OLD,KEEP),UNIT=AFF=D2, VOLUME=SER=777777 DD DSNAME=TAPE,DISP=OLD,UNIT=(3420-5,P,DEFER), VOLUME=SER=(342001,342002,342003,342004,342005) DD DSNAME=DISK,DISP=(SHR,KEEP),UNIT=(,P), VOLUME=SER=(333005,333008,333010) DD UNIT=3340,VOLUME=REF=*.D2,SPACE=(TRK,(5,2)) DD UNIT=3340,VOLUME=REF=DISK,SPACE=(TRK,(10,5))
v D1 defines a new data set named A01DD1. It is to be on volume 333001, which is mounted on a 3330 Disk Storage. v D2 defines an old data set named LIB1, which resides on a private volume, 123456. The volume is mounted on a 3340 Direct Access Storage. v D3 defines an old data set named ABC. This data set is to be kept after this step terminates. ABC is on volume 777777. This volume is to be mounted on the same 3340 device used for D2. v D4 defines an old data set named TAPE. The data set is on the five volumes identified in the VOLUME parameter. The DEFER subparameter indicates that the five volumes are to be mounted only after the data set is opened. The P subparameter requests parallel mounting; that is, all five volumes are to be mounted at the same time on five different 3420-5 Magnetic Tape Units. v D5 defines an old data named DISK. This data set can be shared by another job; the program only reads it. The data set is to be kept after this step. The system determines the number of devices to be allocated from the number of volume serials requested: in this case, three. v D6 is a temporary data set, which is indicated by omission of a DSNAME parameter. The system, therefore, assumes a disposition of NEW,DELETE. The system is to place the data set on the volume used for D2 in STEP2, that is, volume 123456. v D7 is also a temporary data set. The backward reference for volume information is to the dsname DISK, which was defined in D5 in STEP2. The system is to place this data set on the three volumes 333005, 333008, and 333010. Example 2
//STEPA //A1 //A2 EXEC PGM=TESTA DD UNIT=3400-5,VOLUME=SER=111111 DD UNIT=AFF=A1,VOLUME=SER=222222
The system assigns one unit for both volumes. Volume 111111 is mounted first; 222222 is mounted when A2 is opened. This processing is the same for both tape and direct access. Example 3
15-8
The system allocates two units to B1; volumes A and B are mounted. B2 gets allocated to the same two units; volumes C and D are mounted when the data set for B2 is opened. Example 4
//STEPC //C1 //C2 //C3 EXEC DD DD DD PGM=TESTC UNIT=(3330,2),VOLUME=SER=(A,B) UNIT=AFF=C1,VOLUME=SER=(C,D) UNIT=3330,VOLUME=SER=B
STEPC shows a direct access example of volume affinity for volume B. The system allocates volumes A and C to share one unit and volumes B and D to two other units. Example 5
//STEPD //D1 //D2 EXEC PGM=TESTD DD UNIT=(3330,2),VOLUME=SER=(E,F) DD UNIT=AFF=D1,VOLUME=SER=(G,H)
STEPD is a direct access example. If volume E is currently mounted and is permanently resident or reserved, the system allocates a separate unit for volume E because it cannot be dismounted. The system allocates one unit for volume G and a second unit to be shared by volumes F and H. Therefore, three volumes are used, instead of two, because of the permanently resident or reserved attributes. Example 6
//STEPE //E1 //E2 EXEC PGM=TESTE DD UNIT=3400-5,VOLUME=SER=(111111,222222) DD UNIT=AFF=E1,VOLUME=SER=(222222)
STEPE is a tape example. The system allocates two units: one for volume 111111 and the second for volume 222222. Note that only one data set can be open on a tape volume at a time; to prevent an error when the data set for E2 is opened, the data set for E1 must be closed before E2 is opened. Example 7
//STEPF //F1 //F2 EXEC PGM=TESTF DD UNIT=3330,VOLUME=SER=(ABCDEF,GHIJKL) DD UNIT=AFF=F1,VOLUME=SER=(ABCDEF)
STEPF is a direct access example. The system ignores the volume affinity between F1 and F2. Volume ABCDEF of both DD statements uses one unit while the other volume, GHIJKL, uses a different unit. Example 8
//STEPG //G1 //G2 //G3 EXEC DD DD DD PGM=TESTG UNIT=3400-5,VOLUME=SER=111111 UNIT=AFF=G1,VOLUME=SER=111111 UNIT=AFF=G1,VOLUME=SER=222222
In STEPG, G2 and G3 request unit affinity to G1. The system allocates one unit to be used for volume 111111 and volume 222222. Example 9
Chapter 15. Data Set Resources - Allocation
15-9
STEPH copies an input data set to a new output data set on a system-managed tape volume to be shipped offsite to Pittsburgh. The output data set is directed to a system-managed tape library because of the storage class LIBRARY. Data class PITTBRGH defines the media type and recording format requirements of the Pittsburgh data center. If either the media type or the recording-format requirements of that center changes, the storage administrator modifies the PITTBRGH data class definition but does not have to modify JCL. Example 10
//STEPI EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DSN=INPUT.PAYROLL,DISP=SHR //SYSUT2 DD DSN=OUTPUT.PAYROLL,DISP=(NEW,KEEP),LABEL=(1,SL), // DATACLAS=PAYROLL
STEPI copies an input payroll data set to a data set on a system-managed tape volume. The installations ACS routines must assign a storage class to DD SYSUT2 that directs the allocation to a system-managed tape library. The data class PAYROLL defines the media and record format required for payroll data. If either the media type or recording format requirements for payroll data changes, the storage administrator modifies the PAYROLL data class definition but does not have to modify JCL. Example 11
//STEPJ EXEC PGM=IEBCOPY //ICOPY001 DD DISP=SHR,DSN=DASD.DS1 //OCOPY001 DD UNIT=(3490,,DEFER),DISP=(,KEEP), // DSN=USERID.TEST1.ATL,VOL=(,RETAIN) //ICOPY002 DD DISP=SHR,DSN=DASD.DS2 //OCOPY002 DD UNIT=AFF=OCOPY001,DISP=(,KEEP),LABEL=2, // DSN=USERID.TEST2.ATL,VOL=(,RETAIN,REF=*.OCOPY001) //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY OUTDD=OCOPY001,INDD=ICOPY001 COPY OUTDD=OCOPY002,INDD=ICOPY002 /*
This example shows data set stacking using VOL=REF. STEPJ stacks copies of DASD data sets represented by ICOPY001 and ICOPY002 onto an output system-managed tape volume defined by statements OCOPY001 and OCOPY002. Because these data sets will be opened serially, only one system-managed tape library device needs to be allocated. The installations ACS routines must assign a storage class that directs the allocation of DD OCOPY001 to a system-managed tape library (OCOPY002 assumes the library status of OCOPY001 by its volume reference). Because OCOPY002 specifies unit affinity to DD OCOPY001, the system allocates only one system-managed tape library device for these two DD statements.
15-10
STEPK copies existing data set INPUT.18TRACK.LIBRARY.DATASET to new data set OUTPUT.DATASET. Because the existing data set was recorded on an 18-track format device, and will not be extended during the allocation of DD SYSUT1, the system can use any device that can read an 18-track formatted volume for the allocation. If the IBM 3495 Tape Library Dataserver contains both 3480X devices (18-track read/write) and 3490 devices (18-track and 36-track read, 36-track write), using LABEL=(,,,IN) to allocate SYSUT1 means that either device can be allocated.
By JES3
During JES3 initialization, the installation defines how each device is to be managed. See z/OS JES3 Initialization and Tuning Guide. Device Allocation JES3 allocates JES3-managed devices and jointly-managed devices; JES3 performs all allocation before the job is initiated for execution. MVS allocates MVS-managed devices and jointly-managed devices; MVS performs all allocation when a step is being initiated for execution.
15-11
Effect of Job Class on Allocation The CLASS parameter has no effect in an APPC scheduling environment. If you code CLASS in that environment, the system will check the parameter for syntax and ignore it. For started tasks in a JES3 environment all class related attributes and functions are ignored except for device fencing, SPOOL partitioning, and track group allocation. For more information about class attributes and functions, refer to the z/OS JES3 Initialization and Tuning Guide. The job class affects which devices can be allocated to the job. During JES3 initialization, the installation identifies the execution resources, including devices, that can be assigned to each job class. The job class is specified by coding one of the following; if neither is coded, the system assigns the job to the installation-defined standard default class.
//jobname JOB acct,progname,CLASS=jobclass //*MAIN CLASS=class-name
Catalog Use For allocation, JES3 accesses the catalog at job setup time, whereas MVS accesses the catalog at step initiation time. After job setup and before step initiation, the catalog can be changed by, for example, an IBM utility, user utility, or system routine. Because JES3 and MVS access the catalog at different times, catalog changes can cause unpredictable results. Therefore, the installation should not change the catalog while jobs are being scheduled.
When volumes are no longer needed, they are demounted, if removable, and the devices unallocated, that is, made available for use by another job. If you specify the FREE=CLOSE DD parameter, JES3 unallocates the device when the data set is closed. If you are using the dequeue at demount facility (early volume release) for multivolume data sets, JES3 unallocates volumes when they are demounted. For
15-12
Legend U A N The device is allocated and in use The device is allocated but not in use The device is no longer needed and can be unallocated.
High Watermark Setup For high watermark setup, JES3 reserves for a job the maximum number of devices of each type needed for any one job step. JES3 premounts only some volumes before the job executes. When you must use fewer devices for a job, high watermark setup is better than job setup. To request high watermark setup, code: v High watermark setup for tapes, direct access, graphics, printers, and punches:
//*MAIN SETUP=HWS
v High watermark setup for tapes only, with job setup for direct access:
//*MAIN SETUP=THWS
v High watermark setup for direct access, with job setup for tapes:
//*MAIN SETUP=DHWS
When the last step that uses a device no longer needs it, JES3 unallocates it. In Table 15-4 on page 15-14, volumes mounted after STEP1 are indicated by placing the volume number in the box for the step in which it is allocated. For example, Volume 3 is mounted at STEP2.
15-13
Legend U A N The device is allocated and in use The device is allocated but not in use The device is no longer needed and can be unallocated.
Explicit setup Explicit setup is directed by the user. Explicit setup requires the same number of devices as job setup. JES3 premounts volumes according to the instructions coded in:
//*MAIN //*MAIN SETUP=(stepname.ddname,...) SETUP=(stepname.procstepname.ddname,...)
The advantage of explicit setup over high watermark setup is that you can force volumes to stay mounted on devices until they are no longer needed. The
15-14
Legend U A N The device is allocated and in use The device is allocated but not in use The device is no longer needed and can be unallocated.
Altering JES3 Device Allocation To keep JES3 from allocating devices before the first step and holding them until a later step needs them, break a multiple-step job into several smaller jobs in a dependent job net.
Allocation of Volume
The volume that a new data set resides on is determined as follows: v For system-managed DASD data sets, either by the:
15-15
To specify a specific storage class for a new data set, code the STORCLAS parameter; for example:
//DD11 // DD DSNAME=DESIGNG.PGM,DATACLAS=DCLAS12,STORCLAS=STOR55, DISP=(NEW,KEEP)
The system catalogs new permanent system-managed DASD data sets at allocation. The system catalogs data sets on a system-managed tape volume during unallocation processing, according to DISP parameters on DD statements. To retrieve an existing data set, you do not need to code the STORCLAS parameter; for example:
//DD12 DD DSNAME=DESIGNG.PGM,DISP=MOD
15-16
If the storage administrator has not specified GUARANTEED_SPACE=YES in the storage class, the system ignores any volume serial numbers you specify for new system-managed DASD data sets. A system-managed DASD data set can reside on a maximum of 59 volumes.
Volume Allocation for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
With SMS, the storage administrator can specify a system default unit. If there is a system default unit, the system uses the volumes associated with the default unit, and you do not need to code the VOLUME parameter. Volume Attributes The system assigns volumes two attributes: v Use attributes, which control how volumes are allocated, are: Private: The volume can be allocated only when its volume serial number is explicitly or implicitly specified. Public: The volume is eligible for allocation to temporary data sets defined with a nonspecific volume request and without a PRIVATE subparameter in the VOLUME parameter.
15-17
Specific Volume Requests for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
Make a specific volume request by coding:
//ddname DD VOLUME=SER=serial-number //ddname DD VOLUME=REF=dsname //ddname DD VOLUME=REF=*.ddname //ddname DD DSNAME=passed data set //ddname DD DSNAME=cataloged data set
For passed or cataloged data sets, the system obtains the volume serial numbers from the passed data set information or from the catalog. In these cases, do not code a SER or REF subparameter in a VOLUME parameter; other VOLUME subparameters can be coded. How the System Satisfies Specific Volume Requests In the following cases, the system satisfies a request for a specific volume with a volume that is already mounted: v The requested volume is permanently resident or reserved. The system assigns the volume regardless of whether public or private use was requested; the volume retains its original use attribute of public or private. v The requested volume is a removable direct access volume that can be shared and is being used by a concurrently executing step. If the request would make the volume unable to be shared, the system assigns the volume only after all other steps using it terminate. v The requested volume is a removable direct access volume that is mounted but not allocated. The volume is assigned a use attribute of private if the VOLUME parameter specifies PRIVATE; otherwise, the volume is for public use. v The requested volume is a scratch tape volume that is mounted but not allocated. The tape is assigned a private attribute if the request is for a permanent data set or if the VOLUME parameter specifies PRIVATE; otherwise, the volume is for public use.
15-18
Nonspecific Volume Requests for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
Make a nonspecific volume request for a new data set that can be assigned to any volume or volumes. To make a nonspecific volume request, either: v Omit the VOLUME parameter. v Code a VOLUME parameter but omit a SER or REF subparameter. How the System Satisfies Nonspecific Volume Requests The system satisfies a request for a nonspecific volume as follows: Request for private volume for temporary or permanent data set For removable direct access or tape, the system always asks the operator to mount a volume. The operator should mount a volume containing only unused space so that the owner can control all the space on the volume. Once mounted, the volume is assigned the attribute of private. For permanently resident direct access, the use of PRIVATE on non-specific requests is not recommended. Operator intervention will be required to allow the system to allocate such a request to a private volume. Request for public volume for temporary data set For direct access, the system assigns a public or storage volume that is already mounted or, if no space is available, the system asks the operator to mount a removable volume. If the system selects a mounted, public volume, it remains public. If the operator mounts a volume, it is designated a public volume. For non-system-managed tape volumes, the system assigns any available, mounted, tape volume; if none is available, the system asks the operator to mount a tape volume. Once mounted, the volume is assigned the use attribute of public. Assigning an available, mounted volume could result in the loss of user data. However, if the tape volumes are labeled and the LABEL parameter specifies the label type, loss of data is usually prevented because the system checks the first record of the tape when opening the data set. For system-managed tape volumes, the system requests that a tape volume be mounted. Once mounted, the volume is assigned the use attribute of public. Request for public volume for permanent data set For direct access, the system assigns a storage volume, if one is mounted. Otherwise, the system treats the request as a nonspecific volume request for a private volume, which can be satisfied only by a mountable volume on an available offline device. For tape volume, the system treats the request as a nonspecific volume request for a private volume.
Private Volumes for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
The system assigns a removable volume a use attribute of private if any one of the following is true: v The VOLUME parameter contains the PRIVATE subparameter. v The DD statement requests a specific volume.
15-19
To make a tape volume private, specify or obtain the volume serial number; because the request is for a specific volume, the system automatically makes the tape volume private. Using Private Volumes To use a private volume, you must give the system the serial number; the DD statement must specify the serial number or obtain it from the catalog or a from a previous DD statement through a VOLUME=REF parameter. The system cannot assign a nonspecific volume request to an online permanently-resident or already mounted private volume. Therefore, if you request a private volume, you will be the only one using that volume, unless another job makes a specific volume request for that volume.
Public Volumes for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
The system assigns a removable volume a use attribute of public when all of the following are true: v The VOLUME parameter does not contain a PRIVATE subparameter. v The DD statement does not request a specific volume. v The DD statement requests a temporary data set; that is, no name is specified for the data set name or the disposition is DISP=(NEW,DELETE) or a DISP parameter is omitted to imply a new data set to be deleted.
Volume Affinity for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
Data sets on the same volume have volume affinity. Volume affinity influences the allocation of devices. A request for volume affinity with another data set can make the system modify a request for a specific number of units in the unit count subparameter of the UNIT parameter. Stacking Data Sets on page 15-37 provides more information on stacking data sets on the same volume or set of volumes as well as recommendations on which method of volume affinity (explicit versus implicit) you should use. Explicit Volume Affinity To request that a new data set be assigned to the same volume(s) as another data set, code:
//ddname //ddname //ddname //ddname //ddname DD DD DD DD DD VOLUME=REF=dsname VOLUME=REF=*.ddname VOLUME=REF=*.stepname.ddname VOLUME=REF=*.stepname.procstepname.ddname VOLUME=REF=*.procstepname.ddname
15-20
Multivolume Data Sets for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
Number of Volumes When creating or extending a data set, request the maximum number of volumes that might be required. For non-system-managed data sets, indicate the number in the volume-count specified in the VOLUME parameter, or by the number of serial numbers implicitly or explicitly specified. For data sets on a system-managed tape volume, indicate the number in one of the following ways: v In the volume-count specified in the VOLUME parameter v By the number of serial numbers implicitly or explicitly specified v By specifying a data class that contains the appropriate volume-count definition. For a multi-volume data set on tape volumes that are system-managed, all volumes must reside in the same system-managed tape library. These volumes must also be part of the same SMS storage group. For a multi-volume data set on tape volumes that are non-system-managed, all volumes must not be in any system-managed tape library. If you make a specific volume request for more volumes than units, the system automatically indicates that the volumes allocated to the same unit cannot be shared. If you request multiple direct access volumes in a JES3 system, they must be either all mountable or all permanently mounted; a mixture is not allowed. Parallel Mounting For some jobs, all requested volumes must be mounted before the data set can be used. For these jobs, request as many units as volumes or request parallel mounting by coding P in the UNIT parameter. Processing Order When reading or adding to an existing multivolume data set, you can tell the system to begin processing with other than the first volume by coding:
//ddname DD VOLUME=(,,volume-sequence-number),...
Data Sets that Span Libraries Allocation is able to support volumes created in different tape libraries (see Note 1 at the end of this topic) by treating a single DD statement as though it represents a concatenation of DD statements. The system treats an OPTCD=B request as a concatenation of all volumes explicitly coded on the DD statement, in the sequence in which they are coded. (This can affect the meaning of system messages in the
Chapter 15. Data Set Resources - Allocation
15-21
Because of the OPTCD=B request, allocation treats DD4 as though you had coded the following JCL statements, and assigns the following relative position numbers:
//DD4 // // // // // // DD DD DD DD DD DD DD DSN=A,DISP=SHR DSN=DAYS,DISP=SHR,VOLUME=SER=(793284) DSN=DAYS,DISP=SHR,VOLUME=SER=(227996),UNIT=AFF=DD4 DSN=DAYS,DISP=SHR,VOLUME=SER=(382021),UNIT=AFF=DD4 DSN=DAYS,DISP=SHR,VOLUME=SER=(427635),UNIT=AFF=DD4 DSN=DAYS,DISP=SHR,VOLUME=SER=(946565),UNIT=AFF=DD4 DSN=B,DISP=SHR,UNIT=AFF=DD4 +000 +001 +002 +003 +004 +005 +006
The generated DD statements will automatically have unit affinity to each other even if UNIT=AFF is not coded. So, if you coded
//DD5 // // // DD DSN=A,DISP=SHR DD DSN=DAYS,DISP=SHR,DCB=OPTCD=B,VOLUME=SER=(793284,227996, 382021,427635,946565),UNIT=LIBRARY2 DD DSN=B,DISP=SHR
the system treats DD5 as though you had coded the following JCL, and it assigns these relative position numbers:
//DD5 // // // // // // DD DD DD DD DD DD DD DSN=A,DISP=SHR DSN=DAYS,DISP=SHR,VOLUME=SER=(793284),UNIT=LIBRARY2 DSN=DAYS,DISP=SHR,VOLUME=SER=(227996),UNIT=AFF=(DD5+001) DSN=DAYS,DISP=SHR,VOLUME=SER=(382021),UNIT=AFF=(DD5+001) DSN=DAYS,DISP=SHR,VOLUME=SER=(427635),UNIT=AFF=(DD5+001) DSN=DAYS,DISP=SHR,VOLUME=SER=(946565),UNIT=AFF=(DD5+001) DSN=B,DISP=SHR +000 +001 +002 +003 +004 +005 +006
The second and subsequent volumes of the OPTCD=B data set have unit affinity to the first volume of the OPTCD=B data set. (Any error message would use the relative position based on each included volume serial number rather than the position you explicitly specified.) Only messages that include a relative position of +006 refer to data set B. Of course, it is not actually possible to code UNIT=AFF=(DD5+001), but the system treats the DD statements as though that is what you had coded.
15-22
Volumes Required per DD Statement for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
The maximum number of tape volumes or direct access volumes required to satisfy any DD statement is the greater of: v volume-count specified in the VOLUME parameter:
//ddname DD VOLUME=(,,,volume-count),...
v number of serial numbers implicitly or explicitly specified The number of serial numbers implicitly or explicitly specified is: v The number of volume serials in the VOLUME=SER subparameter:
//ddname DD VOLUME=SER=(serial-number,serial-number,...),...
v The number of volume serials obtained from passed data set information, if the DD statement is receiving a passed data set from a prior step. The receiving DD statement must not specify VOLUME=SER or VOLUME=REF; if it does, the system obtains the number from the VOLUME parameter. v The number of volume serials obtained from the catalog, if the DD statement requests an existing, cataloged data set. The DD statement must not specify VOLUME=SER or VOLUME=REF; if it does, the system obtains the number from the VOLUME parameter. Also, the data set must not be passed from a prior step. v The number of volume serials minus the volume sequence number plus one, if the DD statement requests an existing data set and specifies a volume sequence number. For example, if the DD statement specifies eight volume serial numbers and a volume sequence number of four, the system uses five volume serials: 8 4 + 1 = 5. The first three volume serials are not used; the first volume that the system allocates is the fourth volume. v The number of volume serials implied by the unit count in the UNIT parameter, if (1) the unit count is higher than the calculated number of volume serials or (2) the DD statement makes a nonspecific volume request for a new data set on direct access for public use.
15-23
15-24
DD
Allocation will initially be unable to allocate DD1 (since NOTSYS is not within SYSDA), so it will temporarily skip it and go on to DD2. For DD2, since no UNIT is specified, Allocation will pick up the default UNIT of 3380, and successfully allocate DD2. It will then go back to DD1, and, recognizing the volume affinity now established with DD2, will ignore the specified UNIT=SYSDA and successfully allocate DD1 to the same 3380 unit. System Defaults With SMS, the storage administrator can specify a system default unit. If you create a new data set (specifying DISP=NEW or DISP=MOD) on a system with a system default unit, you can omit the UNIT parameter. SMS supplies the default unit. There is also a system default for unit affinity processing. This default unit, identified as the unit-affinity-ignored unit name, is specified on UNITAFF in the ALLOCxx PARMLIB member and applies under certain conditions when unit affinity is ignored. See ALLOCxx in z/OS MVS Initialization and Tuning Reference for more information about the default unit-affinity-ignored unit name. Example 5 on page 15-36 shows an example of when this default is used. It is important to understand how the system uses a group name for the UNIT parameter of a data set that has a disposition of CATALOG or PASS.
15-25
EXAMPLE A The JCL to create a data set specifies the group name of TAPE as the UNIT parameter:
//DD1 //DD1 DD DSN=A.B,UNIT=TAPE,DISP=(NEW,CATLG) or DD DSN=A.B,UNIT=TAPE,DISP=(NEW,PASS)
Data set A.B will be allocated to a 3480 tape device that resides at addresses 3C0-3CF. When a subsequent allocation references data set A.B, the original specification of UNIT=TAPE is no longer available. Subsequent allocations that do not specify a UNIT parameter, such as
//DD2 DD DSN=A.B,DISP=SHR
will cause data set A.B to be allocated to any 3480 tape drive (that is, addresses 3C0-3CF or 4C0-4CF), because a device type of 3480 is in the catalog.
Note: If the tape containing the data set that was passed from a previous step is still mounted, the system will preferentially leave it on that same drive. If you desire to have the tape mounted on one of the tape drives defined only to group name TAPE, you must request this by specifying a unit override:
//DD2 DD DSN=A.B,DISP=SHR,UNIT=TAPE
This will cause the system to consider allocating only the tape drives defined as part of the group name TAPE (3C0-3CF). That is because TAPE is a proper subset of the device information retrieved from the catalog. Note, however, that if the UNIT parameter specified is not a proper subset of the cataloged (or passed) device type, the system ignores the unit override and allocates the data set to any device matching the retrieved device type information. The following example illustrates this; it shows the effects of unit override when the
15-26
EXAMPLE B The JCL to create a data set specifies a group name of TAPE as the UNIT parameter:
//DD1 //DD1 DD DSN=C.D,UNIT=TAPE,DISP=(NEW,CATLG) or DD DSN=C.D,UNIT=TAPE,DISP=(NEW,PASS)
Data set C.D will be allocated to a 3480 or 3490 device that resides at addresses 3C0-3CF or 3D0-3DF. When a subsequent allocation references data set C.D, the original specification of UNIT=TAPE is no longer available. Subsequent allocations that do not specify a UNIT parameter, such as
//DD2 DD DSN=C.D,DISP=SHR
will cause data set C.D to be allocated to any 3480 tape drive (that is, 3C0-3CF or 4C0-4CF) if the data set was originally created on a 3480, or to any 3490 tape drive (that is, 3D0-3DF or 4D0-4DF) if the data set was originally created on a 3490.
Note: If the tape containing the data set that was passed from a previous step is still mounted, the system will preferentially leave it on that same drive. It is not possible using unit overrides to specify that the tape be mounted on one of the tape drives defined only to the group named TAPE. This is because the retrieved device type information will have only one device type (3480 or 3490), whereas two device types (3480 and 3490) are defined to the group named TAPE, so TAPE is not a proper subset of the one device type that is retrieved. In Example B, a unit override of TAPE will be ignored and the data set on the DD2 statement will be allocated to any device matching the cataloged (or passed) device type. That is, if the cataloged (or passed) device type was 3480, the data set will be allocated to 3C0-3CF or 4C0-4CF; if the cataloged (or passed) device type was 3490, the data set will be allocated to 3D0-3DF or 4D0-4DF.
15-27
15-28
Unit and Volume Affinity for Non-System-Managed Data Sets and Data Sets on a System-Managed Tape Volume
When two or more volumes are assigned the same device, the volumes are said to have unit affinity within the same job step allocation. Unit affinity implies deferred mounting for all except one of the volumes. The following definitions apply to unit affinity: v A referencing DD is the DD that specifies the UNIT=AFF keyword. v A referenced DD is the DD pointed to by a referencing DD. v A primary DD is the first DD in a unit affinity chain. v A unit affinity chain is the set of DDs that share the same primary DD. In the following example, DD2 is a referencing DD; DD1 is its referenced DD. DD3 is also a referencing DD; DD2 is its referenced DD. DD1 is the primary DD for the unit affinity chain that consists of the DD1, DD2, and DD3.
//ST1 //DD1 //DD2 //DD3 EXEC DD DSN=A,DISP=(,CATLG),UNIT=3480 DD DSN=B,DISP=(,CATLG),UNIT=AFF=DD1 DD DSN=C,DISP=(,CATLG),UNIT=AFF=DD2
A related concept is volume affinity. When two or more data sets share one or more volumes, the data sets have volume affinity. See Stacking Data Sets on page 15-37 for additional information on stacking data sets on one or more volumes. Explicit Unit Affinity To reduce the number of devices for a step, code UNIT=AFF to request that an existing data set be assigned to the same device(s) assigned for an earlier DD statement in the same step. Code:
//ddname DD UNIT=AFF=ddname,...
Note: Do not specify UNIT=AFF for a NEW (or MOD treated as NEW) data set that references a non-SMS-managed DASD data set; the allocation will fail.
15-29
When you use explicit unit affinity, it is recommended that you use UNIT=AFF to reference the previous DD in the unit affinity chain, rather than the primary DD. That is, code:
//DD1 //DD2 //DD3 //DD4 DD DD DD DD DSNAME=dataset1,... DSNAME=dataset2,UNIT=AFF=DD1,... DSNAME=dataset3,UNIT=AFF=DD2,... DSNAME=dataset3,UNIT=AFF=DD3,...
rather than:
//DD1 //DD2 //DD3 //DD4 DD DD DD DD DSNAME=dataset1,... DSNAME=dataset2,UNIT=AFF=DD1,... DSNAME=dataset3,UNIT=AFF=DD1,... DSNAME=dataset3,UNIT=AFF=DD1,...
Always referencing the previous DD means that, if any condition causes the system to ignore unit affinity for one of the DDs in the chain, any subsequent DDs in the chain will still be allocated to a single unit, rather than to different units. Implied Unit Affinity Implied unit affinity exists among the volumes for one data set when the DD statement requests more volumes than devices. Attention: If all of the following conditions are present, the data set on the referencing DD statement, which requests unit affinity, is written over by the data set on the referenced DD statement: v The referenced DD statement makes a nonspecific volume request. v The data set on the referencing DD statement is opened before the referenced data set. v The tape is not unloaded before the referenced data set is opened and the LABEL parameter does not request positioning of the tape to check tape labels. A tape device allocated to more than one data set is not unloaded when it is dynamically unallocated, or when it is closed and FREE=CLOSE is specified. Unit Affinity Processing for Data Sets on a System-Managed Tape Volume Table 15-6 on page 15-31 contains examples that apply unit-affinity principles to data sets requested on system-managed tape volumes. The system verifies that the primary (referenced) DD statement has a device pool that is a proper subset of the secondary (referencing) DD statement. Therefore, the system honors unit-affinity requests only when each device type to which the primary DD statement is eligible is also contained in the device pool of the secondary DD statement. The column headings have the following meanings: Request Indicates either primary (referenced) DD statement or secondary (referencing) DD statement.
15-30
Libraries and device pools of requestors are identical Primary Secondary LIB1 LIB1 3490 3490 Honor LIB1, 3490
Libraries of primary requestor are proper subset of secondary Primary Secondary LIB1 LIB1, LIB2 3490 3490 Honor and Reduce LIB1, 3490
Device pool of primary requestor is proper subset of secondary Primary Secondary LIB1 LIB1 3490 3490, 3480X Honor and Reduce LIB1 and 3490
Libraries of primary requestor are completely different from secondary Primary Secondary LIB1 LIB2 3490 3490 Ignore LIB1, 3490 LIB2, 3490
Device pool of primary requestor is completely different from secondary Primary Secondary LIB1 LIB1 3490 3480X Ignore LIB1, 3490 LIB1, 3480X
Libraries of primary requestor are not proper subset of secondary Primary Secondary LIB1, LIB2 LIB1 3490 3490 Ignore LIB1, LIB2, 3490 LIB1, 3490
Device pool of primary requestor is not proper subset of secondary Primary Secondary LIB1 LIB1 3490, 3480X 3480X Ignore LIB1, 3490, 3480X LIB1, 3480X
Device pools identical; both are non-library requestors Primary Secondary Non-library request Non-library request 3490 3490 Honor 3490
Device pool of primary requestor is proper subset of secondary; both are non-library requestors Primary Secondary Non-library request Non-library request 3490 3490, 3480X Honor and Reduce 3490
Device pool of primary requestor is not proper subset of secondary; both are non-library requestors Primary Secondary Non-library request Non-library request 3490, 3480X 3490 Ignore 3490, 3480X 3490
Primary is library requestor but secondary is non-library requestor Primary Secondary LIB1 Non-library request 3490 3490 Ignore LIB1, 3490 3490
Chapter 15. Data Set Resources - Allocation
15-31
Note: 3480X is the device type for the 3490 model tape drives and 3490 is the device type for the 3490E model tape drives. Device Eligibility Non-system-managed data sets are eligible to a device when they can be allocated to that device type. The data sets on a system-managed tape volume are eligible to a device when they can be allocated to that device type, and when both the volume and the device reside in the same system-managed tape library. The catalog contains information about the types of devices to which a data set is eligible only if the data set is cataloged. For the system to honor a request for unit affinity, the referenced DD must be eligible to the same devices as the referencing DD statement. In addition, the devices to which the referenced DD statement is eligible must either be a subset of, or the same as, the devices to which the referencing DD is eligible. In all other cases, the system ignores unit affinity, but the allocation will succeed. These rules are illustrated by the following example, in which: v TAPEX is eligible to a 3480X or a 3480. v DS3480 is cataloged as eligible to a 3480. The unit name 3480 has two generic names associated with it: 3480 and 3480X. v DS3480X is cataloged as eligible to a 3480X. v DS3480X2 is cataloged as eligible to a 3480X.
//DD1 //DD2 //DD3 //DD4 DD DD DD DD UNIT=TAPEX DSN=DS3480,UNIT=AFF=DD1 DSN=DS3480X,UNIT=AFF=DD2 DSN=DS3480X2,UNIT=AFF=DD1
If you do not request volume affinity, or the request for volume affinity does not break the unit affinity (see Interaction of Unit and Volume Affinity Requests on page 15-33), the following unit affinities will result: v DD1 and DD2 can have unit affinity, because DD1 and DD2 are both eligible to a 3480 and a 3480X. v DD4 can have unit affinity to DD3, because DD3 and DD4 are both eligible to a 3480X. v Neither DD3 nor DD4 can have unit affinity to DD1, because neither is eligible to a 3480. Thus, the system ignores unit affinity for DD3 or DD4; DD3 and DD4 are not eligible for the same devices as DD1. Exception to Device Eligibility The system will not honor unit affinity when all of the following conditions are met: v The referenced DD is eligible to a 3480X device v The referencing DD is eligible to both a 3480 and a 3480X device v The system was initialized to attempt to allocate a 3480 before a 3480X. The exception is illustrated by the following example, in which: v The system has been initialized to attempt to allocate a 3480 device before allocating a 3480X device. v DS3480 is cataloged as eligible to a 3480. The unit name 3480 has two generic names associated with it: 3480 and 3480X.
15-32
In this example, the system does not honor the request for unit affinity; each DD statement is allocated to a separate device.
The system honors all unit and volume affinity requests. The system assigns DD2 to the same unit as DD1. The system uses the same unit for volume C for both DD3 and DD4. The system will allocate a total of 3 devices for this series of requests. The system assigns DD2 to the same unit as DD1. The system uses the same unit for volume C for both DD3 and DD4. The system will allocate a total of 2 devices for this series of requests. The system honors all volume affinities contained in the unit affinity request; these volumes use the same unit. The other volumes in the unit affinity request use a different unit.
The system assigns volume A for DD2 to the same 3340 as volume A for DD1. Volumes D and B use the other 3340.
15-33
The system honors all volume affinities contained in the unit affinity request; these volumes use the same unit. The other volumes in the unit affinity request use a different unit. The system assigns DD2 to the same unit as DD1. Volume B (in DD2 and DD3) is a 3490 volume. Thus, DD1, DD2, and DD3 use one 3490. The system assigns volume B for DD2 and DD3 to one 3340. Volume A for DD1 uses another 3340.
Permanently Resident or Reserved Volumes If a DD statement requests a volume that is a permanently-resident or reserved volume, the system must allocate the device on which the volume is mounted, regardless of any affinities requested. UNIT=AFF when Requesting Extended Data Sets in a JES3 System In a multiple-step job in a JES3 system, if a data set is extended in an early job step to additional volumes, MVS allocates the additional devices needed. JES3 is unaware of the additional devices. If a later step requests the data set, code UNIT=AFF=ddname so that the system allocates the original and additional devices for the data set.
If you code only volume affinity for a multivolume data set, the following can happen: v The system assigns the requested volumes and allocates them to a device. Thus, the device is to be shared by all the DD statements requesting volume affinity. v The system asks the operator to mount the first volume for the referenced DD statement on the allocated device. v At the end of the first volume, the system asks the operator to demount the first volume and mount the second volume. v If the data set is reopened, the system asks the operator to remount the first volume on a device not used for the volume affinity request. v When the system processes the referring DD statement, it asks the operator to mount the first volume on the device assigned to the volume affinity request. The job now enters a wait because the system has requested the first volume on two different devices.
15-34
If neither volume TAPEA nor volume TAPEB resides in a system-managed tape library or if both TAPEA and TAPEB reside in the same system-managed tape library, then DD1 and DD2 will share one device; only one device is allocated to job step STEP1. Otherwise, DD1 and DD2 require separate devices; two devices are allocated to job step STEP1. To control the number of devices allocated, consider the relationship of DD statements and volumes before moving existing volumes into a system-managed tape library and when choosing a system-managed tape library to create data sets that will be referenced in a UNIT=AFF statement. DD statements that specify unit affinity might require more devices after associated volumes are moved into a system-managed tape library.
In this example, the ACS routines have redirected data set P from non-SMS-managed tape to SMSD, an SMS-managed DASD volume; the ACS routines have also redirected data set Q from non-SMS-managed tape to SMST, an SMS-managed tape volume. DD2 requests unit affinity with DD1, but the system ignores the request because the redirection resulted in inconsistent device categories. The system issues message IEF278I with reason code 1, indicating that one of the DDs is an SMS-managed request and the other is not. Example 2
//DD1 DD DSNAME=PAYROLL,DISP=OLD
Chapter 15. Data Set Resources - Allocation
15-35
The system ignores unit affinity. PAYROLL(0) is a tape and cannot share a unit with the other data sets, which reside on DASD. Because the DASD volumes are non-removable, the system allocates a separate volume to PAYROLL(-1), to PAYROLL(-2), and to PAYROLL(-3). The system issues message IEF278I with a reason code of 2, indicating that the DDs requested incompatible generics. Example 3
//DD1 DD DSNAME=P,DISP=OLD //* (P is cataloged on TEST1 in tape //* (Tape Library TL1 is eligible to //DD2 DD DSNAME=Q,DISP=OLD,UNIT=AFF=DD1 //* (Q is cataloged on TEST2 in tape //* (Tape Library TL2 is eligible to Library TL1) 3480 devices) Library TL2) 3490 devices)
The system ignores the unit affinity request. P is cataloged on volume TEST1, which resides in the TL1 tape library, and Q is cataloged on volume TEST2, which resides in the TL2 tape library. The system issues IEF278I with a reason code of 3, indicating that the DDs requested incompatible tape libraries. Example 4
//DD1 DD DSNAME=R,DISP=OLD //* (R is cataloged on T2, a 3480 tape) //DD2 DD DSNAME=S,DISP=OLD,UNIT=AFF=DD1 //* (S is cataloged on T3, a 3480X tape)
The system ignores the unit affinity request. DD1 is a 3480 tape volume, but DD2 needs a 3480X tape volume, which is not compatible with 3480. The system issues message IEF278I with a reason code of 4, indicating that devices associated with the referenced DD (DD1) are not a subset of the devices associated with the referencing DD (DD2). Example 5
//S1 EXEC ... //DD1 DD DSNAME=W,DISP=(,CATALG),UNIT=3480,VOL=SER=TAPE01 //* (W is redirected to SD2, an SMS-managed DASD volume) //S2 EXEC ...
15-36
In this example, the ACS routines have redirected data set W from non-SMS-managed tape to SD2, an SMS-managed DASD volume; the ACS routines have not redirected data set X. The system cannot honor the unit affinity request for DD2 in step S2 because the redirection resulted in inconsistent device categories. Therefore, the system allocates data set X as a non-SMS-managed data set on the default unit-affinity-ignored unit (named on UNITAFF in the ALLOCxx parmlib member). The system issues message IEF278I with a reason code of 5, indicating that the referencing request (DD2) is a non-SMS-managed data set and the referenced request (DD1) is an SMS-managed data set.
VOL=SER with last volume VOL=REF by data set serial of the previous data name to previous data set set as the first volume serial in the list
15-37
This JCL stacks two data sets on a single volume within the same step. In this example, VOL=REF is used to stack both data set A and data set B on the same tape volume, VOL1. Data sets A and B make up the data set collection.
In this example, VOL=REF is used to stack data sets W, X, and Y on the same tape volume, SMST. Data sets W, X, and Y make up the data set collection. Example 2 This example shows stacking relative generations of a GDG on a single volume within the same job step. (This technique is an acceptable way to avoid the restriction that prohibits using relative GDG names in the VOL=REF subparameter, for example, VOL=REF=MYDSA(0), and still achieve the same effect.)
//STACKGDG //STEP01 //DD1 //DD2 // //DD3 // JOB . . . EXEC . . . DD DSN=MYDSA(0),DISP=SHR (where MYDSA(0) is on volumeTAPE01) DD DSN=MYDSB(+1),DISP=(,CATLG), UNIT=3490,VOL=REF=*.DD1,LABEL=(2) DD DSN=MYDSC(+1),DISP=(,CATLG), UNIT=3490,VOL=REF=*.DD1,LABEL=(3)
In this example VOL=REF is used to stack relative generation data sets MYDSA(0), MYDSB(1), and MYDSC(1) on the same tape volume, TAPE01. Data sets MYDSA(0), MYDSB(1), and MYDSC(1) make up the data set collection. Example 3 This example shows stacking multiple data sets on a single volume across steps within a job.
15-38
In this example, VOL=REF by data set name is used to stack data sets A and B on the same tape volume. Because DD1 does not specify VOL=SER, DD1 represents a non-specific tape request, so the system assigns an available tape volume or, if none is available, asks the operator to mount a tape volume. DD2 places data set B on the same volume as data set A. Data sets A and B make up the data set collection. Example 4 This example shows stacking multiple data sets on a single volume across jobs.
//JOB1 //ST1 //DD1 //JOB2 //ST2 //DD2 // JOB ... EXEC ... DD DSN=A,DISP=(NEW,CATLG) JOB ... EXEC ... DD DSN=B,DISP=NEW,LABEL=(2,SL), VOLUME=REF=A,UNIT=TAPE
In this example, VOL=REF by data set name is used to stack data sets A and B on the same tape volume. Because DD1 on JOB1 does not specify VOL=SER, DD1 represents a non-specific tape request, so the system assigns an available tape volume or asks the operator to mount a tape volume, if none is available. DD2 places data set B on the same volume as data set A. Data sets A and B make up the data set collection. Example 5 This example shows stacking multiple data sets on multiple volumes within the same step.
//ST1 //DD1 // //DD2 // // //DD3 // EXEC ... DD DSNAME=W,DISP=NEW, VOLUME=SER=(ONE,TWO,THREE) DD DSNAME=X,DISP=NEW, VOLUME=SER=(THREE,FOUR), LABEL=(2,SL) DD DSNAME=Y,DISP=NEW,VOLUME=SER=(FOUR,FIVE), LABEL=(3,SL)
In this example, specifying VOL=SER to refer to the last volume of the previous DD is used to stack data sets W, X, and Y on the same set of tape volumes. Data sets W, X, and Y make up the data set collection. Example 6 This example shows stacking multiple data sets on a multiple volumes within the same step. Data set W is an existing, multivolume data set on volumes V1 and V2.
//ST1 //DD1 //DD2 // EXEC ... DD DSNAME=W,DISP=OLD (W is on volumes V1 and V2) DD DSNAME=X,DISP=NEW, VOLUME=SER=(V2,V3),
15-39
DD
In this example, specifying VOL=SER to refer to the last volume of the previous DD is used to stack data sets W, X, and Y on the same tape volumes. Data sets W, X, and Y make up the data set collection. Example 7 This example shows stacking multiple data sets on multiple volumes across steps in the same job.
//JOB1 //ST1 //DD1 // //ST2 //DD2 // JOB ... EXEC ... DD DSN=A,DISP=(NEW,CATLG),UNIT=TAPE, VOLUME=SER=(ONE,TWO,THREE) EXEC ... DD DSN=B,DISP=NEW,LABEL=(2,SL), VOLUME=REF=A,UNIT=TAPE
In this example, specifying VOL=REF by data set name is used to stack data sets A and B on the same tape volume, THREE. Data sets A and B make up the data set collection. Example 8 This example shows stacking multiple data sets on multiple volumes across jobs.
//JOB1 //ST1 //DD1 // //JOB2 //ST2 //DD2 // JOB ... EXEC ... DD DSN=A,DISP=(NEW,CATLG),UNIT=TAPE, VOLUME=SER=(ONE,TWO,THREE)) JOB ... EXEC ... DD DSN=B,DISP=NEW,LABEL=(2,SL), VOLUME=REF=A,UNIT=TAPE
In this example, specifying VOL=REF by data set name is used to stack data sets A and B on the same tape volume (THREE, in this case). Data sets A and B make up the data set collection.
15-40
You can request data set stacking with either VOL=SER or VOL=REF. With VOL=SER, the system can detect data set stacking and check for consistent device categories only within a step. To request data set stacking across steps or across jobs, you must use VOL=REF. When you specify VOL=SER to request data set stacking within a step, the system checks for mixed device categories. If the system finds mixed device categories within a data set collection, it invokes the ACS routines to try to resolve the device category conflict. If the ACS routines do not direct the data sets to a consistent device category, the allocation fails with message IGD23101I. Note: The system does not include existing SMS-managed data sets in a data set collection because catalog information might reflect a redirection. See Example 3. z/OS DFSMS: Implementing System-Managed Storage provides more information about ACS routine handling and detection of data set stacking. When you specify VOL=REF to request data set stacking across steps or jobs, the system can pass information about the volume references to the ACS routines. With this information, the ACS routines can direct requests for data sets within a data set collection to the same device category. If your installation is using TMM and runs jobs that request data set stacking, you need to understand that, because ACS routines might redirect data sets from tape to DASD, certain JCL combinations might not produce the results you expect. Thus: v IBM recommends that you use VOL=REF to request data set stacking across steps or jobs While you might find that specifying VOL=SER to request data set stacking across steps or jobs does work sometimes, it might not always produce the results you expect. To avoid problems, use VOL=REF. If you are using or planning to use TMM and want to use data set stacking, eliminate requests for data set stacking like the ones shown in the following examples. (For examples that show recommended methods of requesting data set stacking, see Examples of Data Set Stacking on page 15-38.) Example 1
//JOB1 //STEP1 //DD1 // //STEP2 //DD2 // JOB ..... EXEC ..... DD DSNAME=W,DISP=(NEW,CATLG), VOLUME=SER=MINE,UNIT=3490 EXEC ..... DD DSNAME=X,DISP=NEW,VOLUME=SER=MINE, LABEL=(2,SL),UNIT=3490
This example uses VOL=SER to request data set stacking across steps. If you replace VOL=SER in DD2 with VOL=REF=W, the ACS routines will have the information they need to allocate data set X to a consistent device category even if data set W is redirected to DASD. Example 2
Chapter 15. Data Set Resources - Allocation
15-41
This example uses VOL=SER to request data set stacking across jobs. If you replace VOL=SER in DD2 with VOL=REF=W, the ACS routines will have the information they need to allocate data set X to a consistent device category. Example 3 This example uses VOL=SER to request data set stacking across jobs.
//JOB1 //STEP1 //DD1 // JOB ..... EXEC ..... DD DSNAME=W,DISP=(NEW,CATLG),UNIT=3490, VOL=SER=TAPE01,LABEL=(1,SL)
In JOB1, the ACS routines redirect data set W to SMS-managed DASD. Data set W becomes SMS-managed.
//JOB2 //STEP2 //DD1 //DD2 // //DD3 // JOB EXEC DD DD DD ..... ..... DSNAME=W,DISP=OLD DSNAME=X,DISP=NEW,VOL=SER=TAPE01, LABEL=(2,SL),UNIT=3490 DSNAME=Y,DISP=NEW,VOL=SER=TAPE01, LABEL=(3,SL),UNIT=3490
In JOB2, data set W, after its redirection, is an existing SMS-managed data set. The system does not include data set W in the data set collection. The system does detect data set stacking between DD2 and DD3; data set X and Y make up the data set collection. If you replace VOL=SER in DD2 with VOL=REF=W and VOL=SER in DD3 with VOL=REF=X, the ACS routines will have the information they need to allocate data sets X and Y to a consistent device category with data set W.
To tell the system the specific tracks to assign to the data set, code:
//ddname DD SPACE=(ABSTR,(primary-qty,address,directory or index)),...
With SMS, you can request space or override the space allocation defined in the data class for the data set. In this case, code:
//ddname DD SPACE=(reclgth,(primary-qty,second-qty,directory)), AVGREC=value,...
15-42
15-43
15-44
15-45
For a complete description of the directory, including details on member entries to enable you to compute how many records to request, see z/OS DFSMS: Using Data Sets. Directory Space for Partitioned Data Sets Extended The size of a PDSE grows dynamically. If you specify directory size on the SPACE parameter, SMS uses the size you specify only if you later convert the PDSE to a PDS.
The first step requests space for two temporary data sets. The second step refers to these data sets for volume information. The space requested for DD1 and DD2 in STEP1 is 10 primary and 5 secondary tracks and for DD4 in STEP2 3 primary and 1 secondary tracks. Example 2
15-46
The space requested in DD6 for the new data set overrides the space allocation in the data class for the data set. The space requested is an average record length of 128 bytes, a primary quantity of 5K (5,120) records, and a secondary quantity of 2K (2,048) records.
This example allocates 5 tracks for a data set: beginning at the second track on a volume.
15-47
v You may code or omit the DISP parameter. If coded, it must specify:
DISP=(NEW,DELETE) DISP=(NEW,PASS) DISP=(,PASS)
| | |
v Code a UNIT parameter for non-SMS-managed data sets. UNIT must specify a VIO unit name. During system initialization the installation must define new and/or existing unit names as VIO; the installation should maintain a list of the VIO unit names. The unit count subparameter is ignored, if coded. v You may code or omit the VOLUME parameter. If you code it, do not specify volume serial numbers. v You may code or omit the SPACE parameter. If coded, the parameter can request up to the size of the simulated volume. The system will allocate as the primary quantity plus 15 secondary quantities an entire simulated volume. If the requested primary quantity is larger than 65,535 tracks, the job will fail. If the primary request is met, but the primary quantity plus 15 times the secondary quantity is greater than 65,535 tracks, the system allocates 65,535 tracks. When allocating by average block length for a VIO data set, the secondary request is computed using the average block length specified in the SPACE parameter. If you omit the SPACE parameter, the system uses a default value: 4 primary and 24 secondary blocks, with an average block length of 8192. If the VIO data set is directed to SMS and space values are specified for the data class chosen by the ACS routines, the data class values will take effect rather than the allocation defaults. v You may code or omit the DCB parameter. If you code it, do not specify IS or ISU in the DSORG subparameter. The system will allocate a VIO data set request to actual direct access storage if the DD statement contains unacceptable parameters; however, if the primary quantity is too big, the system terminates the job. Example 1
//EX1 //EX2 //EX3 //EX4 // DD UNIT=VIO DD DSNAME=&&TEMPDS,UNIT=SYSDA DD DSNAME=&&TEMPDS(MEM1),UNIT=VIRT3 DD DSNAME=&&MYDS,UNIT=VIO,SPACE=(360,(5,30)), DISP=(,PASS),DCB=(RECFM=FB,LRECL=80,BLKSIZE=360)
15-48
In the example, EXSMS defines an SMS-managed VIO data set because the storage administrator has defined storage class SCLASVIO with support for VIO.
Example 2
//DD2 DD UNIT=3330
Example 3
//DD3 DD DSNAME=&&A,DISP=(NEW),SPACE=(CYL,(30,10)),UNIT=SYSDA
Example 4
//DD1 //DD2 DD DD UNIT=SYSDA VOLUME=REF=*.DD1
Example 5
//DDA //DDB DD DD UNIT=SYSDA VOLUME=REF=*.DDA,UNIT=3330
Example 6
//DD1 //DD2 // DD UNIT=SYSDA DD DSNAME=NONTEMP,DISP=(,KEEP), VOLUME=REF=*.DD1,SPACE=(CYL,10)
In this example, the data set defined in DD1 is assigned to external page storage for VIO processing. Because DD2 defines a permanent data set, the system assigns it to direct access storage. Example 7
//DD1 //DD2 // DD UNIT=SYSDA DD DSNAME=&&TEMP,VOLUME=SER=665431, SPACE=(CYL,10),UNIT=AFF=DD1
15-49
VIO data sets are passed in the same way as conventional data sets. This example shows the DD statements for VIO data sets in a job whose steps compile and link edit a program and then execute that program. The three VIO data sets are defined in the statements ASM.SYSGO, SYSLIN, and SYSLMOD. Note: The SPACE parameter must appear on the //SYSLMOD DD statement to make sure that directory space is allocated.
When the job enters the system, JES2 issues a message to the operator console to ask the operator to mount the identified volumes. JES2 places the job on hold until the operator mounts the volumes, then releases the job. Example
/*SETUP 223344,556677,889900
Note: IBM recommends that you do not use the /*SETUP control statement to specify volumes in an IBM 3495 Tape Library Dataserver. This statement causes the job to be unnecessarily held until released by the operator.
Dynamic Allocation
Dynamic allocation allows a job to acquire resources as they are needed and release them immediately after use. The resources are a ddname-data set combination with its volumes and devices. One reason to use dynamic allocation is that you may not know all of the device requirements for a job before execution. Another reason is that it allows the system to use resources more efficiently; that is, the system can acquire resources just before their use and release them immediately after use. To tell the system the number of resources to be held in anticipation of reuse, code:
//stepname EXEC PGM=x,DYNAMNBR=n
15-50
v The JOB statement specifies that this job will be processed in class A and in performance group 70. v The control limit is the sum of the number of DD statements coded and the value coded in the DYNAMNBR parameter:
3 DD statements + 4 = 7
If this control limit is reached and another dynamic allocation is requested, the request is not honored unless resources can be unallocated so that the control limit is not exceeded. v When OUT1 is closed, it is immediately ready for printing.
15-51
15-52
Processing Control by suppressing processing by postponing specification DUMMY NULLFILE on DSNAME DDNAME
with checkpointing CHKPT SYSCKEOV DD by subsystem by TCAM job or task SUBSYS CNTL QNAME CNTL ENDCNTL
The system ignores all parameters other than DUMMY or DSNAME=NULLFILE and DCB. The DCB parameter must be coded if you would code it for normal I/O operations. For example, when an OPEN routine requires a BLKSIZE specification to obtain buffers and BLKSIZE is not specified in the DCB macro instruction, code this information in the DD DCB parameter. Effect of Dummy Data Set For a dummy data set, the system bypasses all input/output operations, does not allocate devices or storage to the data set, and does not perform disposition processing. Requests to Read or Write a Dummy Data Set When the program asks to read a dummy data set, an end-of-data-set exit is taken immediately. When the program writes to the dummy data set, the request is recognized but no data is transmitted. VSAM supports dummy data sets for both read and write processing. BSAM and QSAM support requests to write to a dummy data set. If any other access method is used, the job is terminated. Use of Dummy Data Sets When testing a program, you can suppress writing of an output data set by defining it as a dummy data set. This would forestall printing a data set until you are sure it contains meaningful output.
16-1
How the System Postpones Data Set Definition When the system encounters a DD statement with a DDNAME parameter, it saves the ddname and, temporarily, the name in the DDNAME parameter; the system uses the DDNAME name to relate the statement to a later DD statement. When the system finds a statement whose ddname has been temporarily saved, it does the following: v It uses the parameters on the statement with the matching ddname to define the data set. v It associates these parameters with the name of the statement that contained the DDNAME parameter. v It stops saving the name from the DDNAME parameter. References to the Data Set The system associates the ddname of the statement that contains the DDNAME parameter with the data set definition. The system does not use the ddname of the later statement that actually defines the data set. Therefore, any references to the data set, before or after the data set is defined, must refer to the DD statement that contains the DDNAME parameter, not the referenced DD statement that defines the data set. Concatenating DD Statements when DDNAME is Specified To concatenate data sets to a data set defined with a DDNAME parameter, the unnamed DD statements must follow the DD statement that contains the DDNAME parameter, not the referenced DD statement that defines the data set. Use of Postponing Specification
16-2
DSNAME=NIN,DISP=(NEW,KEEP),UNIT=3400-5
From DD statement XYZ, the system saves XYZ and, temporarily, PHOB. Until the system encounters the ddname PHOB, it treats the data set for XYZ as a dummy data set. When the system reads DD statement PHOB, it uses the DSNAME, DISP, and UNIT values to define the data set named NIN. The system also associates this information with DD statement XYZ. The system stops saving ddname PHOB. The data set is now defined as if you had coded:
//XYZ DD DSNAME=NIN,DISP=(NEW,KEEP),UNIT=3400-5
Example 2
//DD1 DD DDNAME=LATER . . . //LATER DD DSN=SET12,DISP=(NEW,KEEP),UNIT=3350, // VOLUME=SER=46231,SPACE=(TRK,(20,5)) . . . //DD12 DD DSN=SET13,DISP=(NEW,KEEP),VOLUME=REF=*.DD1, // SPACE=(TRK,(40,5))
DD1 postpones defining the data set until the system encounters DD statement LATER. DD12 must do a backward reference to DD1 because the system associates the data set information with the DD statement that contains the DDNAME parameter. Example 3
//DDA DD DDNAME=DEF // DD DSN=A.B.C,DISP=OLD // DD DSN=SEVC,DISP=OLD,UNIT=3350,VOL=SER=52226 . . . //DEF DD * data /*
16-3
The system writes checkpoints for all volumes but the last. The data set must be a multivolume QSAM or BSAM data set. Checkpoints are not written for single-volume QSAM or BSAM data sets or for ISAM, BDAM, BPAM, or VSAM data sets. The system writes the checkpoints in a SYSCKEOV data set. A SYSCKEOV DD statement must be specified in a step with a DD statement that contains CHKPT and again when the step is restarted from a checkpoint written in the data set. Examples
//S1 //D1 // //SYSCKEOV // EXEC PGM=A,RD=R DD DSNAME=OUT1,UNIT=(DISK,3),DISP=(NEW,CATLG), SPACE=(400,(50,10),VOLUME=(PRIVATE,,,3),CHKPT=EOV DD DSNAME=CK1,UNIT=3350,DISP=(MOD,KEEP), SPACE=(CYL,30,,CONTIG)
The subsystem processes the subparameters according to its own rules. When you specify the SUBSYS parameter, the subsystem may alter the significance of certain DD statement parameters. For details, see the documentation for the subsystem. If you specify the DUMMY parameter, MVS invokes the subsystem to check the syntax of subsystem subparameters. If the syntax is acceptable, MVS assigns a dummy status to the data set and processes the request as a dummy request. If you request unit affinity to a subsystem data set, MVS substitutes SYSALLDA as the UNIT parameter specification. Example
//EXSUB DD DSNAME=MYSET,DISP=OLD,SUBSYS=(PRO3,34,92)
16-4
// //ddname
Program control statements supply control information for the subsystem. Example
//S1 //ABC //PGC // //DD1 EXEC PGM=REPT CNTL PRINTDEV BUFNO=2-,PIMSG=YES ENDCNTL DD SUBSYS=XYZ,CNTL=*.ABC
(For information about the PSF PRINTDEV JCL statement, see the manual PSF for z/OS: Customization.)
16-5
16-6
disposition of data DISP RETPD set EXPDT release of unused RLSE on SPACE direct access space disposition of volume RETAIN and PRIVATE on VOLUME
Data sets on system-managed tape library volumes exhibit both system-managed and non-system-managed characteristics. When necessary, data sets on a system-managed tape volume are distinguished from system-managed DASD data sets. Otherwise, the term system-managed data sets refers to both data sets on a system-managed tape volume and system-managed DASD data sets.
Use FREE=CLOSE to allow the system to reallocate a volume or device that is used frequently in the system. Example
//DD1 DD DSNAME=DS6,DISP=OLD,UNIT=TAPE,VOLUME=SER=111111,FREE=CLOSE
17-1
v Abnormal termination or conditional disposition: To delete, keep, catalog, or uncatalog the data set if the step terminates abnormally, code:
//ddname //ddname //ddname //ddname DD DD DD DD DISP=(,,DELETE),... DISP=(,,KEEP),... DISP=(,,CATLG),... DISP=(,,UNCATLG),...
You should consider coding an abnormal termination disposition every time you create or use a data set. This disposition can be used to keep data sets after a program fails, when they might be needed to determine the cause of the failure. This disposition can also be used to delete data sets in case of program failure, thereby restoring the system environment to what it was before the error. Then the failing job can be rerun without an intervening clean-up job. Effect of Abnormal Termination During Execution When a step abnormally terminates but is not automatically restarted, its data sets are disposed of as specified by the abnormal termination disposition. If an abnormal termination disposition is not specified, the normal termination disposition is processed. Effect of Abnormal Termination During Allocation If a job step fails during step allocation, the system disposes of the data sets as follows: v Deletes a data set being created in the step. v Keeps a data set that existed before the step. Effect When No Abnormal Termination Disposition is Coded If a DD statement in an abnormally terminating step requests a data set that was cataloged or kept in an earlier step and if the statement does not specify an abnormal termination disposition, the system uses the disposition specified in the earlier step. Effect of Device Type on Disposition The system handles disposition differently for data sets on direct access and on tape. A direct access volume contains a volume table of contents (VTOC). A VTOC describes the non-VSAM data sets and available space on the volume.
17-2
17-3
17-4
For SMS permanent data sets, the restrictions on receiving passed data sets do not apply. All SMS-managed permanent data sets are cataloged, and can be located using the normal catalog search.
17-5
EXAMPLE: Data set dsname, which does not exist at the start of a job but is created and cataloged during the job, will be uncataloged and deleted if it is passed and not received:
//Step1 //DD1 //* //Step2 //DD2 //* //Step3 //Step4 //DD4 EXEC PGM=pgmname1 DD DSN=dsname,DISP=(NEW,CATLG,DELETE) EXEC PGM=pgmname2 DD DSN=dsname,DISP=(OLD,PASS,DELETE) EXEC PGM=pgmname3 EXEC PGM=pgmname4 DD DSN=dsname,DISP=(OLD,PASS,DELETE)
Data set dsname is cataloged when Step1 ends. After Step2 ends, dsname is still cataloged. If Step3 terminates abnormally, dsname will be deleted during end of job processing, because it had been passed by Step2 and not received by a following step, AND the abnormal disposition for Step2 was DELETE. To avoid that situation, do not specify PASS for a cataloged data setno matter whether it had been created in a prior job or in a prior step of this job. The correct JCL is:
//Step1 //DD1 //* //Step2 //DD2 //* //Step3 //Step4 //DD4 EXEC PGM=pgmname1 DD DSN=dsname,DISP=(NEW,CATLG,DELETE) EXEC PGM=pgmname2 DD DSN=dsname,DISP=(OLD,KEEP,DELETE) EXEC PGM=pgmname3 EXEC PGM=pgmname4 DD DSN=dsname,DISP=(OLD,KEEP,DELETE)
At Abnormal Termination when Abnormal Termination Disposition is Specified: If a job step abnormally terminates, unreceived data sets that specified an abnormal termination disposition when passed are processed according to the specifications in their abnormal termination dispositions.
17-6
Input stream: //JOBEX //S1 //S2 JOB EXEC PROC=MYPROC EXEC PROC=MYPROC
17-7
17-8
1. D1 requests a data set that already exists and can be shared with other jobs. It is to be kept on the volume at the end of step S1. 2. D2 requests a data set that already exists and cannot be shared with other jobs. It is to be deleted at the end of S1, but is to be kept and uncataloged if S1 abnormally terminates. 3. D3 defines a new data set that is to be assigned to volume 335001 on a 3350 Direct Access Storage device. The data set is to be kept on the volume and cataloged if S1 terminates normally, but is to be kept and not cataloged if S1 terminates abnormally. 4. D4 defines a temporary data set that is to be created in this job step. It is to be assigned to volume 335004 on a 3350 and allocated 15 primary tracks, five secondary tracks, and one directory record. This data set is to be passed for use in a later step in this job. 5. D5 requests the temporary data set passed by D4 of S1. When S2 completes, the data set is to be deleted. Example 2
//PASS //S1 //DD1 // //DD2 //DD3 //DD4 //S2 //DD5 //DD6 //DD7 //DD8 //S3 //DD9 JOB ,BILL H. EXEC PGM=IEFBR14 DD DSN=A,DISP=(NEW,PASS),VOL=SER=335000, UNIT=3350,SPACE=(TRK,1) DD DSN=A,DISP=(OLD,PASS),VOL=REF=*.DD1 DD DSN=B,DISP=(OLD,PASS),VOL=SER=335000,UNIT=3350 DD DSN=B,DISP=(OLD,PASS),VOL=SER=335001,UNIT=3350 EXEC PGM=IEFBR14 DD DSN=A,DISP=OLD DD DSN=A,DISP=OLD DD DSN=B,DISP=OLD DD DSN=B,DISP=(OLD,PASS) EXEC PGM=IEFBR14 DD DSN=B,DISP=OLD
1. DD1 and DD2 pass the same data set. DD5 and DD6 receive that same data set.
Chapter 17. Data Set Resources - End Processing
17-9
As long as the time period has not expired, the system will not delete or write over a data set on direct access space. This is true even if a DD statement specifies a disposition of DELETE (other than DISP=(NEW,DELETE)) for the data set. The data set is eligible for deletion once the expiration date or retention period has been reached. When the expiration date of a data set is the current date, the data set is considered expired. The system will delete it or write over it if requested in a DD statement. Deleting before Expiration Date or Retention Period If it is necessary to delete a data set before the expiration date or retention period, do one of the following: v For data sets cataloged in a VSAM catalog, use the DELETE command; this makes the space occupied by the data set available for reallocation. See z/OS DFSMS Access Method Services for Catalogs. v For data sets cataloged in a non-VSAM catalog, delete the catalog entry with the IEHPROGM utility as described in z/OS DFSMSdfp Utilities. v For the data set control block, use a SCRATCH macro with the OVRD parameter; this makes the space occupied by that data set available for reallocation. See z/OS DFSMSdfp Advanced Services. Examples
//D3 // //D4 // DD DSNAME=DSDEF,DISP=(NEW,KEEP),UNIT=3350, VOLUME=SER=668888,SPACE=(TRK,(1,1)),EXPDT=2006/032 DD DSNAME=DSFS.PGM,DATACLAS=DCLAS2,DISP=(NEW,KEEP), EXPDT=2006/032
The system releases space only if the data set is open for output and the last operation was a write. The system does not release space if the step terminates abnormally. The system ignores a request to release unused space if:
17-10
RETAIN Support RETAIN can be specified only for tape. In a JES3 system, RETAIN is supported only by MVS. If coded on a DD statement for a data set on an MVS-managed tape device, the system designates the volume as retained. If coded on a DD statement for a data set on a JES3-managed tape device, JES3 ignores the RETAIN parameter when issuing KEEP/RETAIN messages and when performing unallocation at the end of the job. However, if RETAIN is coded for a data set on a JES3-managed tape device and the tape volume is to be shared with a later step, JES3 designates the volume as retained.
17-11
Volume Retention
The system designates a tape volume as retained (R) if the volume contains one of the following: v A passed data set v A data set requested by a DD statement with RETAIN in the VOLUME parameter. Retained Private Tape Volume If RETAIN is coded or the data set is passed, the system designates the volume as R, does not demount the mounted volume, and does not rewind the tape when the data set is closed or at the end of the step. Retained Public Tape Volume If RETAIN is coded or the data set is passed, the system designates the volume as R, but asks the operator to demount it and keep it near for possible use later. Use of Retained Volumes In a multiple step job, if there is a period when a volume is not in use, you can specify RETAIN to try to keep the volume mounted. If the volume remains mounted, the operator does not have to demount and remount it, and the job does not have to wait until the volume is remounted. Demounting of Passed or Retained Volumes Even if you specify RETAIN or a disposition of PASS, the operator can still unload the volume or, if the device is needed for another step in the same or another job, the system can allocate the device and demount the volume. Either can occur when the device on which the volume is mounted is not allocated to the job step that specified RETAIN or, for unlabeled tapes, when the volume requires verification. Example
//EXDD // DD DSNAME=TAPEDS,DISP=(NEW,CATLG,DELETE),UNIT=3420, VOLUME=(PRIVATE,RETAIN)
Note: CLOSE options may cause RETAIN to be overridden. See the discussion of the CLOSE macro in z/OS DFSMS Macro Instructions for Data Sets.
17-12
DSID
Note that SMS does not manage sysout data sets. Naming a Sysout Data Set To assign the last qualifier of the system-generated name for a sysout data set, code the DSNAME parameter with the SYSOUT parameter. Examples
//EX1 //EX2 //EX3 //EX4 //EX5 //EX6 DD DD DD DD SYSOUT=B,DSNAME=&&PRTREC SYSOUT=(A,,FM23) SYSOUT=(F,,CD3),DSNAME=&&PAYOUT SYSOUT=*
18-1
DD
SYSOUT=class
For example, the installation could define output class W to contain low-priority output; class Y to contain output to be printed on a special form, so that the JCL would not need to request the form; and class J to be reserved for high-volume output. To print the sysout data set and messages from the job on the same output listing, see Printing Job Log and Sysout Data Sets Together on page 7-7. Examples
//X1 //JOBA //ST1 //X2 //OUTA //X3 DD SYSOUT=A
A system command, from the operator or in the input stream, must start the diskette writer before the DD statement is processed. For more information on the 3540 diskette, see 3540 Programmers Reference. For information on external writers, see z/OS JES2 Initialization and Tuning Guide or z/OS JES3 Initialization and Tuning Guide. Example
//EX7 DD SYSOUT=(W,WRT3540),DSID=MYDS5
18-2
19-1
19-2
Use DPAGELBL=YES to indicate that the system should print the security label on each page of printed output. Use SYSAREA=YES to indicate that the system should reserve an area for the security label on each page of printed output. The security label represents a security level and categories defined to the Resource Access Control Facility (RACF) by the security administrator at your installation. Use the DPAGELBL and SYSAREA parameters on an OUTPUT JCL statement as instructed by your security administrator. Example
//JOBB //PSRPT JOB OUTPUT 1,JIM WOOSTER,SECLABEL=CONF DPAGELBL=YES,SYSAREA=YES,FORMS=TSEC
20-1
20-2
Use the priority to increase a sysout data sets priority so it will be printed sooner than it otherwise might have been. Ignoring Priority The installation can instruct the system to ignore a priority specified on an OUTPUT JCL statement. Example
//OUTA //MYDS OUTPUT PRTY=255 DD SYSOUT=F,OUTPUT=*.OUTA
21-1
21-2
Processing Control with additional parameters by segmenting with other data sets OUTPUT code-name on SYSOUT SEGMENT class on SYSOUT THRESHLD (JES3 only) GROUPID (JES2 only) writer-name on SYSOUT WRITER PRMODE HOLD class on SYSOUT DUMMY class on SYSOUT CLASS OUTDISP OUTDISP= PURGE on OUTPUT CKPTLINE CKPTPAGE CKPTSEC AFPSTATS COLORMAP COMSETUP DUPLEX FORMDEF FORMLEN INTRAY OFFSETXB OFFSETXF OFFSETYB OFFSETYF PAGEDEF PRTERROR RESFMT USERLIB USERPATH MAILBCC MAILCC MAILFILE MAILFROM MAILTO PORTNO REPLYTO DEFAULT
|
by Infoprint Server
22-1
This example shows an explicit reference to an OUTPUT JCL statement. Note that with an explicit reference, all default OUTPUT JCL statements are ignored. v The system processes the output from DD statement MFK1 using the options on the OUTPUT statement OUT3 (1) because MFK1 does not contain an OUTPUT parameter and (2) because OUT3 contains DEFAULT=YES and is in the same step as MFK1. MFK1 cannot implicitly reference the job-level default statement OUT2 because of step-level default statement OUT3. If STEP1 had not contained OUT3, MFK1 would have referenced statement OUT2. v The system processes the output from DD statement MFK2 according to the processing options on the job-level OUTPUT JCL statement OUT1 because DD statement MFK2 explicitly references OUT1 using the OUTPUT parameter. Note that the system ignores the processing options on all default OUTPUT JCL statements (OUT2 and OUT3). Example 2
//EXAMP //OUT1 // JOB MSGCLASS=A OUTPUT DEFAULT=YES,DEST=COMPLEX7,FORMS=BILLING, CHARS=(AOA,AOB),COPIES=2
22-2
This example shows how the position of the OUTPUT JCL statement affects the processing of the sysout data sets. In STEP1, the system processes DD statements R1 and R2 using the processing options specified on job-level OUTPUT JCL statements OUT1 and OUT2 because v DEFAULT=YES is specified on OUTPUT JCL statements OUT1 and OUT2, and v there is no OUTPUT JCL statement with DEFAULT=YES within STEP1. v The OUTPUT parameter is not specified on DD statements R1 and R2. In STEP2, the system processes DD statement B1 using the processing options specified on OUTPUT JCL statement OUT3 because: v DEFAULT=YES is specified on OUTPUT JCL statement OUT3 and OUTPUT JCL statement OUT3 is within the job step STEP2. v The OUTPUT parameter is not specified on DD statement B1. v OUTPUT JCL statement OUT3 is within STEP2; therefore, the system ignores the DEFAULT=YES specification on job-level OUTPUT JCL statements OUT1 and OUT2 when processing DD statement B1. In STEP2, the system processes DD statement B2 using the processing options specified on OUTPUT JCL statements OUT3 and OUT2 because: v Both of the OUTPUT JCL statements are explicitly referenced from the SYSOUT statement. Explicitly-referenced OUTPUT JCL statements can be in any previous procedure or step, before the DD statement in the current step, or at the job-level. v Note that default OUTPUT JCL statement OUT1 is ignored when processing the data set defined by DD statement B2 because B2 explicitly references OUTPUT JCL statements OUT3 and OUT2. In STEP3, the system processes DD statement RP1 using the output processing options specified on the job-level OUTPUT JCL statements OUT1 and OUT2 because: v DEFAULT=YES is specified on OUTPUT JCL statements OUT1 and OUT2, and v no OUTPUT JCL statement with DEFAULT=YES is coded within STEP3. v The OUTPUT parameter is not specified on DD statement RP1. Note: In STEP3, OUTPUT JCL statement OUT4 is not used at all because it does not have DEFAULT=YES coded, and no DD statement explicitly references OUT4.
22-3
In the example, two sets of output are created from DD statement REF1. One of the sets will go to NY and have six copies printed on the form defined as BILLS. The other set will go to KY and have two copies printed on the form defined as LOG.
In this example, when the system writes 200 pages to a sysout data set, the segment is spun and a new segment is allocated.
22-4
The sysout data sets for DD1 and DD2 are written on the same output listing. Example 2
//JEX //ST1 //DDA //DDB JOB EXEC DD DD ,M. BIRDSALL,MSGCLASS=D PGM=WKRPT SYSOUT=* SYSOUT=D
The sysout data sets for DDA and DDB are written on the same output listing as the job log.
JES3 calculates the size of the sysout data set(s) as the number of records multiplied by the number of copies requested. When the size exceeds the THRESHLD value, JES3 creates a new unit of work on a data set boundary, and queues it for printing. Use of THRESHLD If a sysout data set or all the sysout data sets in the same class from a job are large, or large numbers of copies are requested, the THRESHLD limit can be used to print copies simultaneously by different printers. Examples
//OUTA OUTPUT THRESHLD=10000 //MYDS1 DD SYSOUT=C,OUTPUT=*.OUTA,COPIES=5 //GRDS DD SYSOUT=C,OUTPUT=*.OUTA,COPIES=3 //OUTB OUTPUT DEFAULT=YES,CLASS=C,THRESHLD=10000 //MYDS1 DD SYSOUT=(,),COPIES=5 //GRDS DD SYSOUT=(,),COPIES=3
22-5
Sysout data sets in the same group are processed together in the same location and time. Subgroups You can always group sysout data sets with similar processing characteristics. But, you cannot group sysout data sets with different output classes, destinations, processing modes (PRMODE), writer names, or groupids. If you use GROUPID to group dissimilar data set, the system breaks down the group into subgroups of sysout data sets with identical classes, destinations, processing modes, writer names, and groupids. Demand Setup Groups The installation controls whether a group can contain sysout data sets with different printer setup requirements, such as forms. Such groups are called demand setup groups. If demand setup grouping is not permitted, data sets with different setup requirements are placed in different subgroups. Example
//TEST1 //OUT1 //STEP1 //RP1 //RP2 //RP3 JOB MSGCLASS=B OUTPUT GROUPID=GRP10,UCS=PN,DEST=RT6,DEFAULT=YES EXEC PGM=REPORT DD SYSOUT=A DD SYSOUT=B DD SYSOUT=A
In this example, two subgroups are created for the three sysout data sets because of the different output classes. One subgroup contains data sets RP1 and RP3; the other contains RP2.
For an external writer, the operator determines which sysout data sets are selected. This can cause certain data sets to be printed on the same listing even though all of the forms, FCB, UCS, and DEST parameters are not the same. The operator must start the external writer for a sysout data set to be printed or punched. For more information on external writers, see z/OS JES2 Initialization and Tuning Guide or z/OS JES3 Initialization and Tuning Guide. Examples
22-6
JES schedules the sysout data set to a printer that can operate in the specified mode. Examples
//OTS //ABC OUTPUT PRMODE=PAGE DD SYSOUT=F,OUTPUT=*.OTS
JES schedules data set ABC to a 3800 Printing Subsystem Model 3, which can print in page mode. Output class F must handle processing for a 3800 model 3.
Or where the specified class is designated as a held class during JES initialization: //ddname //name //ddname //name //ddname DD SYSOUT=class
The HOLD parameter overrides any disposition specified on the OUTDISP parameter.
22-7
Coding OUTDISP=(HOLD,HOLD) is equivalent to coding HOLD=YES on the DD statement. The OUTDISP parameter allows you to specify the following dispositions for a sysout data set: v HOLD allows the system to hold a sysout data set. When the user or operator releases the data set, the system prints and then purges it. v WRITE allows you to print a sysout data set and purge it after it is printed. v KEEP allows you to print and keep the sysout data set. After it is printed, the disposition changes to LEAVE. v LEAVE allows the system to hold a sysout data set until the user or operator releases it. When the sysout data set is released, the disposition changes to KEEP. v PURGE allows you to delete a sysout data set without printing it.
In all these examples, the installation defined class J as a held class during JES initialization.
22-8
Effect of Dummy Sysout Data Set When DUMMY is coded, the system ignores the SYSOUT parameter and bypasses all output operations to the spool. The sysout data set is not printed or punched. Use of a Dummy Sysout Data Set Defining a sysout data set as a dummy data set is useful when testing a program; you do not want data sets printed until you are sure they contain meaningful output. Nullifying a Dummy Sysout Data Set When the sysout data set is to be processed, remove the DUMMY parameter from the sysout DD statement. Examples
//EXA //EXB DD DD DUMMY,SYSOUT=A DUMMY,SYSOUT=(B,WRT),DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
During JES2 initialization, the installation must specify that the requested class contains data sets that are deleted before being printed or punched. Use of Output Suppression Use this technique to suppress the output of started tasks. Examples
//DD2 //OT1 //DD3 //OT2 //DD4 DD SYSOUT=S
In all these examples, the installation defined class S as an output suppression class.
22-9
Example 1
//J2 //S1 //OT2 //DDB JOB EXEC OUTPUT DD ,MHB PGM=ABC CKPTLINE=60,CKPTPAGE=40 SYSOUT=C
JES writes a checkpoint every 40 logical pages. A logical page contains 60 lines. Example 2
//J2 //S1 //OT2 //DDB JOB EXEC OUTPUT DD ,MHB PGM=DEF CKPTSEC=60 SYSOUT=D
The FORMDEF and PAGEDEF parameters identify members in the library named in the cataloged procedure used to initialize the PSF, or in a library specified on the USERLIB parameter of the OUTPUT JCL statement. These members contain statements that specify how the PSF is to process the sysout data set. Examples
//OTPSF OUTPUT //MYPNT DD FORMDEF=FSBILL,PAGEDEF=PSLONG SYSOUT=N,OUTPUT=*.OTPSF
To control how PSF prints a sysout data set on a microfilm device, code:
//name OUTPUT COMSETUP=H1SETUP
The COMSETUP parameter specifies the name of a microfile setup resource that contains setup information for the functional subsystem (FSS) microfilm devices.
22-10
22-11
22-12
These data sets are called spin data sets. If the step continues processing after the close, the sysout data set may be printed concurrently with the last of the steps execution. Use of Spinning Use FREE=CLOSE to let JES begin printing or punching a sysout data set before a long job step is finished. Example
//STEP1 EXEC PGM=VERYLONG //SHORT DD SYSOUT=C,FREE=CLOSE
To make a sysout data set available for printing immediately, code SPIN=UNALLOC on the sysout DD statement, and dynamically unallocate the data set. Dynamic unallocation can be explicit or through FREE=CLOSE.
23-1
23-2
Destination Control to local or remote device or to another node /*ROUTE PRINT ORG on //*MAIN /*ROUTE PUNCH
DEST COMPACT
ACMAIN on //*MAIN
In a JES3 system, to send to group, node, or remote work station: //jobname JOB acct,progname //*MAIN ORG=group-or-node.remote //stepname EXEC PGM=x //ddname DD SYSOUT=class
24-1
Multiple Destinations
For example, to print a report in Chicago, New York, Paris, and Los Angeles, code and reference four OUTPUT JCL statements. Specify a different destination on each; you can code only one destination on each OUTPUT JCL statement. By referencing OUTPUT JCL statements, you can specify 128 different destinations for a single sysout data set. In addition, you can use each OUTPUT JCL statement to specify processing options for each destination. Keep in mind that, if a JCL syntax error occurs, the system will ignore the OUTPUT JCL statement and the output will not reach its destination.
24-2
TSO/E user MWAI cannot receive - TSO/E userid does not match sysout userid (even though WRITER ID does):
//EGGBERTX //TJW //STEP1 //SYSPRINT JOB............. OUTPUT DEST=PLPSC.EGGBERT EXEC PGM=....... DD SYSOUT=(A,MWAI),OUTPUT=(*.TJW)
TSO/E user BERNER can receive - TSO/E userid matches in an NJE sysout case - job executes on non-local node:
//BERNERX //ROUTE //DXP //STEP1 //SYSPRINT JOB............. XEQ SNJMAS3 OUTPUT DEST=PLPSC.BERNER EXEC PGM=....... DD SYSOUT=(A,BERNER),OUTPUT=(*.DXP)
24-3
For the second example, output class F must be defined during JES2 initialization as having a destination, for example, a node in Los Angeles.
24-4
OUTPUT DEST=NYC,COMPACT=TABCM DD SYSOUT=E,OUTPUT=*.OTFAR JOB ,MAIL A60 ORG=NYC EXEC PGM=GHI DD SYSOUT=E
Example
//J1 JOB ,MHB //*MAIN ACMAIN=2,USER=D17MHB //S1 EXEC PGM=PROG67 //DDA DD SYSOUT=G
24-5
//ddname DD
SYSOUT=(class,INTRDR)
INTRDR is an IBM-reserved name identifying the internal reader. The system places the output records for the internal reader into a buffer in your address space. When this buffer is full, JES places the contents on the spool; later, JES retrieves the new job from the spool. Message Class for Internal Reader Job The output class in the SYSOUT parameter becomes the default message class for the job going into the internal reader, unless you code the MSGCLASS parameter on the JOB statement. Limiting Records to Internal Reader Use the OUTLIM parameter on the DD statement to limit the number of logical records written to the internal reader. Sending Internal Reader Buffer Directly to JES Instead of waiting for the buffer in your address space to fill up, send the contents of the internal reader buffer directly to JES by coding as the last record in the job: /*EOF This control statement delimits the job in the data set and makes it eligible for immediate processing. /*DEL This control statement cancels the job in the data set and schedules it for immediate output processing. The output consists of any JCL submitted, followed by a message indicating that the job was deleted before execution. /*PURGE For JES2 only, this control statement cancels the job in the data set and schedules it for purge processing; no output is produced for the job. /*SCAN For JES2 only, this control statement requests that JES2 only scan the job in the data set for JCL errors. The job is not to be executed. References For more information on the internal reader, see z/OS MVS Programming: Assembler Services Guide. Example
//JOBA //GENER //SYSIN //SYSPRINT //SYSUT2 //SYSUT1 //JOBB //REPORTA //OUTDD1 //INPUT //JOBC JOB EXEC DD DD DD DD JOB EXEC DD DD JOB D58JTH,HIGGIE PGM=IEBGENER DUMMY SYSOUT=A,DEST=NODE1 SYSOUT=(M,INTRDR) DATA D58JTH,HIGGIE,MSGLEVEL=(1,1) PGM=SUMMARY SYSOUT=* DSN=REPRTSUM,DISP=OLD D58JTH,HIGGIE,MSGLEVEL=(1,1)
24-6
v JOBA executes program IEBGENER. v Program IEBGENER reads JOBB and JOBC from in-stream data set SYSUT1 and writes them to sysout data set SYSUT2, which is submitted to the internal reader. v The message class for JOBB and JOBC is M, the SYSOUT class specified on DD statement SYSUT2. v The message class for sysout data set OUTDD1 is M because SYSOUT=* is coded. v The /*EOF statement specifies that the preceding jobs are to be sent immediately to JES for input processing.
In a batch job, TERM=TS is treated as though SYSOUT=* were coded. For an output data set in a foreground job, TERM=TS specifies that the data set is to be sent to the TSO/E userid. Example
//DD1 DD TERM=TS
The system prints the values for each parameter on sections of the separator pages reserved for each parameter.
24-7
24-8
BURST on /*JOBPARM
/*JOBPARM COPIES=number,FORMS=form-name,LINECT=number
Most of the formatting parameters can be coded on several statements. If coded more than once for a sysout data set, JES selects one parameter according to override rules and uses it.
25-1
/*JOBPARM COPIES=5,FORMS=FMS3,LINECT=60
Most of the formatting parameters can be coded on several statements. If coded more than once for a sysout data set, JES selects one parameter according to override rules and uses it.
25-2
Copy Modification
For sysout data sets printed on a 3800, you can modify selected copies of output by specifying a copy modification module name in the MODIFY parameter. Copy modification allows printing predefined data on all pages of a copy or copies of the data set. For example, you may want to vary column headings or explanatory remarks on different copies of the same printed page. Or, you may want to personalize copies with the recipients name, address, and other information. Or, you may want to print blanks or certain characters, such as asterisks, to suppress the printing of variable data on particular copies of a page. The predefined data is created as a copy modification module and stored in SYS1.IMAGELIB using the IEBIMAGE utility program. For information on using IEBIMAGE, see z/OS DFSMSdfp Utilities. Copy modification is done with other printers by using short or spot carbons in the forms set.
Character Arrangements
Specify in the CHARS parameter character-arrangement tables to be used when printing on a 3800. For the names of tables for the 3800, see the 3800 Programmers Guide. The installation should maintain a list of the names of available tables. Modifying Character-Arrangement Tables Using the IEBIMAGE utility program, the installation can modify or construct character-arrangement tables and graphic character modification modules to substitute characters or use installation-designed characters. Dynamically Selecting Character-Arrangement Tables To select a character-arrangement table for each logical record in the sysout data set, the second character of each logical record must contain a trc character and you must code either of the following: v TRC in the OUTPUT JCL statement v OPTCD=J in the DD statement DCB parameter For details on using the OPTCD subparameter, see the 3800 Programmers Guide. When Data Set Printed on 3800 or Other Printers You can code a UCS parameter even though a CHARS parameters is also coded; do this if the output might be printed on a 3800 or some other printer. If a printer other than the 3800 is used, the system uses the UCS parameter and ignores the CHARS parameter. If UCS is coded and CHARS is not, and the sysout data set is printed on a 3800, the system uses the UCS value as the default value for the missing CHARS parameter.
Chapter 25. Sysout Resources - Output Formatting
25-3
JES2 ignores these parameters if the output is printed on a device other than a 3211. To send a sysout data set to a 3211, specify the output class set aside by the installation for printing on a 3211. Example 1
//OT10 //DD3 OUTPUT INDEX=6 DD CLASS=W,OUTPUT=*.OT10
This example moves the right margin in 8 spaces from the usual location.
25-4
If the data set is punched on a different card punch, JES ignores the FUNC=I subparameter. The installation can define a special output class for 3525 output. Card interpretation by an external writer is an operator-specified function. Interpretation in a JES3 System Punched output may or may not be interpreted depending on the installation-defined standard for the output class. Examples
//DD17 // //OT3 //DD18 DD SYSOUT=(Q,PUN6),COPIES=5, FCB=IMG4,DCB=FUNC=I OUTPUT COPIES=5,FCB=IMG4,FORMS=PUN6 DD SYSOUT=Q,OUTPUT=*.OT3,DCB=FUNC=I
25-5
25-6
Output Limiting
To limit the number of logical records in a sysout data set, specify a maximum number of records to be written to a sysout data set or to all sysout data sets in a job. By establishing a limit, you avoid printing a useless, huge listing if your program enters an endless loop that contains a write instruction to a sysout data set. After reaching the limit, the system abnormally terminates the step, or sends a warning message to the operator.
Use the JOB statement BYTES, CARDS, LINES, or PAGES parameter to limit the number of logical records written to all sysout data sets in a job. Code the job statement as follows:
//JOB1 //JOB2 //JOB3 //JOB4 JOB JOB JOB JOB accounting-info,programmer,BYTES=(number) accounting-info,programmer,CARDS=(number) accounting-info,programmer,LINES=(number) accounting-info,programmer,PAGES=(number)
In an APPC scheduling environment, you cannot use JES control statements to limit output. If you code a JES2 control statement in an APPC scheduling environment, it
26-1
The system limits output based on the limit specified on the JOB statement. If you do not code a JOB statement limit, the system uses the limit specified on the //*MAIN or /*JOBPARM statements. If you do not code a limit on the JOB, /*JOBPARM, or //*MAIN statements, the system uses the installation default limit, specified at JES initialization.
26-2
26-3
26-4
References
Refer to the following manuals for additional information on potential uses for the USERDATA keyword. v z/OS JES2 Installation Exits and z/OS JES2 Macros, section Choosing Which Exits to Implement lists JES2 installation exits 1, 15 and 23 as pertaining to SYSOUT separator page processing. v z/OS JES3 Customization, section Installation Exits Listed by JES3 Function lists JES3 installation exits 20, 21, 23 and 45 as pertaining to SYSOUT separator page processing. v PSF/MVS System Programming Guide , lists PSF installation exits 1, 2 and 3 as pertaining to SYSOUT separator page processing.
Examples
Example 1
//OUTUSER1 // //DD1 OUTPUT USERDATA=My Own Installation Sub-Title, TITLE=My Own SYSOUT Title DD SYSOUT=A,OUTPUT=*.OUTUSER1
In this example, the SYSOUT data set DD1 refers to the OUTPUT JCL statement named OUTUSER1. If the installation intended to print the USERDATA value on the SYSOUT data set separator page, and if the installation coded the necessary changes to the JES and PSF SYSOUT data set separator page exits, the TITLE value enclosed within the apostrophes (My Own SYSOUT Title) would be printed on the SYSOUT data set separator page. In addition, the USERDATA value enclosed within the apostrophes (My Own Installation Sub-Title) would be printed on the SYSOUT data set separator page. Example 2
//OUTUSER2 //DD2 OUTPUT USERDATA=LOCALDEV=Option1 DD SYSOUT=A,OUTPUT=*.OUTUSER2
In this example, the SYSOUT data set DD2 refers to the OUTPUT JCL statement named OUTUSER2. If the installation defined its own keyword (LOCALDEV) and the valid values for the keyword, and if the installation made the necessary changes to the appropriate JES and PSF exits, the installation would have to parse the USERDATA value to determine if the installation keyword and value were specified. The LOCALDEV keyword value of Option1 could then be used by the installation.
27-1
27-2
Part 6. Examples
This part contains examples of sets of job control statements. Some are for useful processing and some show particular techniques. For examples of the job control statements needed to use utilities, see z/OS DFSMSdfp Utilities.
Part 6. Examples
/* //LKED // //SYSPRINT //SYSLIN //SYSUT1 // //SYSLMOD // //GO // //SYSUDUMP //SYSPRINT // //OUTPUT // //INPUT
/* //
This example shows JCL that can be used to: v Assemble object code entered in the input stream: the step named ASM. v Link edit the object module, if the assembly did not result in a return code of 8 or higher: the step named LKED. v Execute the link edited module, if neither the assembly nor the linkage editing resulted in a return code of 8 or higher: the step named GO. Example 2 The following example of Assemble, Linkedit, and Go uses the IF/THEN/ELSE/ENDIF statement construct to conditionally execute job steps.
//USUAL //ASM
Copyright IBM Corp. 1988, 2004
JOB EXEC
EXECUTES ASSEMBLER
28-1
/* //RC1OK //LKED // //SYSPRINT //SYSLIN //SYSUT1 // //SYSLMOD // //RC2OK //GO //SYSUDUMP //SYSPRINT // //OUTPUT // //INPUT
/* //ENDRC2 //ENDRC1 //
This example shows JCL that can be used to: v Assemble object code entered in the input stream: the step named ASM. v Link edit the object module, if the assembly resulted in a return code of lower than 8: the step named LKED. v Nest IF/THEN/ELSE/ENDIF statement constructs v Execute the link edited module, if the assembly and the linkage editing resulted in a return code of lower than 8: the step named GO.
28-2
This job requests that the system produce nine sets of output: eight sets of job output and one set for the system-managed output data set. Set 1 In STEP1, DD statement R1 explicitly references OUTPUT JCL statement OUT3. Therefore, the system produces one set of output at COMPLEX1 for DD statement R1 combined with OUTPUT JCL statement OUT3. Set 2 In STEP1, DD statement R2 implicitly references OUTPUT JCL statement OUT4 for both of the following reasons: v DD statement R2 does not contain an OUTPUT parameter. v STEP1 contains an OUTPUT JCL statement with DEFAULT=YES. Therefore, the system produces one set of output at COMPLEX9 for DD statement R2 combined with OUTPUT JCL statement OUT4. Sets 3 through 8 In STEP2, DD statements B1 and B2 implicitly reference OUTPUT JCL statements OUT1 and OUT2 for all of the following reasons: v DD statements B1 and B2 do not contain OUTPUT parameters. v STEP2 does not contain an OUTPUT JCL statement with DEFAULT=YES. v DEFAULT=YES is specified on OUTPUT JCL statements OUT1 and OUT2. Therefore, the system produces three sets of output each for DD statements B1 and B2: Sets 3 and 4 at COMPLEX7 for DD statement B1 combined with OUTPUT JCL statement OUT1. Set 5 at COMPLEX3 for DD statement B1 combined with OUTPUT JCL statement OUT2. Sets 6 and 7 at COMPLEX7 for DD statement B2 combined with OUTPUT JCL statement OUT1. Set 8 at COMPLEX3 for DD statement B2 combined with OUTPUT JCL statement OUT2. Set 9 The system-managed output data set is processed locally because of the MSGCLASS parameter on the JOB statement.
29-1
29-2
This example shows the use of JES2 and JCL statements to obtain output. 1. The job will be selected at priority level 5. 2. The job will run in performance group 100; the meaning of 100 is defined by the installation. All system messages are to be written to output class J. 3. The JOBPARM statement indicates that: a. Two copies of the entire job-related output will be printed. b. No more than 20 lines per page will be printed (LINECT=20). You can override this LINECT parameter by coding the LINECT parameter on the OUTPUT JCL statement. c. The programmers room number is 233. This appears on the separator page and is used for distributing output. d. Forms name GRN1 is the name of the form to be used by all data sets unless a specific form is defined on a DD, JES2 /*OUTPUT, or JCL OUTPUT statement. The OUTPUT JCL statement OUT2 indicates that: a. The destination for the output is PRINTER8. PRINTER8 does not necessarily have to be defined as a printer, it can be defined as any output device. b. If the printer has the forms control buffer feature, STD3 must be the name of a member of SYS1.IMAGELIB. STD3 defines the special forms control buffer image to be used for processing any data set that has *.OUT2 coded in the SYSOUT parameter. c. Forms name 2PRT is the name of the form JES2 uses for printing any data sets that have *.OUT2 coded in the SYSOUT parameter (for example, DD3). d. TN is the train or UCS used in output processing. The SETUP statement indicates that volume SCHLIB should be mounted before this job begins processing. SYSOUT data sets (except DD3 and DD4) are printed on the form called GRN1. The DD4 SYSOUT data set is printed on the form called GRPH; the DD3 SYSOUT data set is printed on the form called 2PRT because the code name subparameter of DD3 contains the value *.OUT2 (referring to the OUTPUT JCL statement). The output data set from DD5 and the accompanying data sets will be sent to HDQ.
4.
5. 6.
7.
30-1
30-2
This example shows some of the JES3 and JCL statements that can be used to obtain output. 1. All system messages are to be written to output class J. 2. The first //*FORMAT statement indicates that: a. All print data sets (according to class) that do not have //*FORMAT statements will be printed according to the parameters on this statement unless the output class defines specific processing characteristics because DDNAME is coded without a name (DDNAME=,) and applies to all output data sets for the job. b. JES3 uses the form named GRN1 and prints two copies of all data sets unless a specific form or number of copies is defined on a DD statement or for a class by the installation. 3. The second //*FORMAT statement indicates that: a. The destination for the output is a printer that has an installation-defined name of PRINTER8. b. If PRINTER8 has the forms control buffer feature, STD3 must be the name of a member of SYS1.IMAGELIB. STD3 defines the special forms control buffer image or carriage tape to be used for processing the job. c. Forms name 2PRT is the name of the forms for DD3. d. TN means test printing on a 1403, 3211, or 3203-5 printer.
31-1
31-2
/*
1. This job runs in priority 8, the meaning of which is defined by the installation. 2. The job statement specifies that system messages and JCL statements are to be printed (MSGLEVEL=1). 3. D1 catalogs a newly created data set. The space request is for 12 primary cylinders, 1 secondary, 1 directory, and the space is to be contiguous. 4. D2 creates a temporary data set on a 3330. The space request is for 10 primary tracks and 1 secondary. 5. D3 defines an old cataloged data set. 6. D4 defines a SYSIN data set. This will be followed by data in the input stream.
32-1
Part 6. Examples
32-2
Part 7. Appendixes
A-1
Appendix A. ISAM
EXPDT REFDD VOLUME
DSNAME Parameter The DSNAME parameter is required on any DD statement that defines a new temporary or permanent indexed sequential data set. Code:
//ddname DD DSNAME=name(INDEX) // DD DSNAME=name(PRIME) // DD DSNAME=name(OVFLOW)
When you reuse previously allocated space to create an indexed sequential data set, the DSNAME parameter must contain the name of the old data set to be overlaid. UNIT Parameter The UNIT parameter is required on any DD statement that defines a new indexed sequential data set, unless VOLUME=REF=reference is coded. You must request a direct access device in the UNIT parameter. Do not code DEFER. If the prime and index areas are defined on separate DD statements, request the same number of direct access devices for the prime area as volumes specified in the VOLUME parameter. Request only one direct access volume for an index area and one for an overflow area. A DD statements for the index area or overflow area can request a device type different than the type requested on the other statements. VOLUME Parameter The VOLUME parameter is required if you want an area of the data set written on a specific volume or the prime area requires the use of more than one volume. If the prime area and index area are defined on the same statement, you cannot request more than one volume on the DD statement. Either supply the volume serial number(s) in the VOLUME parameter or code VOLUME=REF=reference. In all cases, you can specify PRIVATE in the VOLUME parameter. Note: v If a nonspecific volume request is used when creating a new indexed sequential data set and its DSNAME already exists on a volume eligible for allocation, the job will fail if the system places the new data set on that volume. However, if the old data set with the duplicate name is on a volume other than the one selected for the new data set, the new data set is not affected and will be added to the volume. You can correct job failures caused by duplicate names by scratching the old data set or by renaming the new data set, then resubmitting the job. v The system fails to allocate space for a new indexed sequential data set with a nonspecific volume request when none of the volumes eligible for allocation contain enough space.
A-2
Appendix A. ISAM
v If the first volume selected by allocation to satisfy a request for a new indexed sequential data set does not contain enough space to satisfy the request, the system does not try to find another volume with enough space if either of these conditions is met: The request is for multiple volumes or units The request uses more than one DD statement to define the data set. LABEL Parameter The LABEL parameter is needed only to specify a retention period, EXPDT or RETPD, or password protection, PASSWORD. DCB Parameter You must code the DCB parameter on every DD statement that defines an indexed sequential data set. At minimum, the DCB parameter must contain DSORG=IS or DSORG=ISU. Other DCB subparameters can be coded to complete the data control block, if the processing program does not complete it. When more than one DD statement is used to define the data set, code all the DCB subparameters on the first DD statement. On the other DD statements, refer to the DCB parameter on the first statement by coding:
DCB=*.ddname
When reusing previously allocated space and recreating an indexed sequential data set, desired changes in the DCB parameter must be coded on the DD statement. Although you are creating a new data set, some DCB subparameters cannot be changed if you want to use the space the old data set used. The DCB subparameters you can change are:
BFALN BLKSIZE CYLOFL DSORG KEYLEN LRECL NCP NTM OPTCD RECFM RKP
DISP Parameter If you are creating a new data set and not reusing preallocated space, the DISP parameter is needed only if you want to: Keep the data set Catalog the data set Pass the data set DISP=(,KEEP) DISP=(,CATLG) DISP=(,PASS)
If you are reusing previously allocated space and recreating an indexed sequential data set, code DISP=OLD. The newly created data set will overlay the old one. In order to catalog the data set by coding DISP=(,CATLG) or to pass the data set by coding DISP=(,PASS), you must define the data set on only one DD statement. If you define the data set on more than one DD statement and the volumes containing the data set are on the same device type, use the access method services DEFINE command to catalog the data set. For details, refer to z/OS DFSMS Access Method Services for Catalogs, SPACE Parameter
A-3
Appendix A. ISAM
The SPACE parameter is required on any DD statement that defines a new indexed sequential data set. Either ask the system to assign the space or request specific tracks. If you use more than one DD statement to define the data set, each DD statement must request space in the same way. System Assignment of Space You must request the primary quantity in cylinders, CYL. When the DD statement that defines the prime area requests more than one volume, each volume is assigned the number of cylinders requested in the SPACE parameter. The index subparameter is used to indicate how many cylinders are required for an index. When you use one DD statement to define the prime and index areas and you want to explicitly state the size of the index, code the index subparameter. You can code the CONTIG subparameter in the SPACE parameter. However, if you code CONTIG on one of the statements, you must code it on all of them. You cannot request a secondary quantity for an indexed sequential data set. Also, you cannot code the subparameters RLSE, MXIG, ALX, and ROUND. Specific Track Request The number of tracks requested must be equal to one or more whole cylinders. The address of the beginning track must be the first track of a cylinder other than the first cylinder on the volume. When the DD statement that defines the prime area requests more than one volume, space is allocated for the prime area beginning at the specified address and continuing through the volume and onto the next volume until the request is satisfied. This can be done only if the volume table of contents of the second and all succeeding volumes is contained in the first cylinder of each volume. Use the index subparameter to indicate how many tracks the index requires. The number of tracks specified must be equal to one or more cylinders. When you use one DD statement to define the prime and index areas and you want to state the size of the index, code the index subparameter.
A-4
Appendix A. ISAM
Table A-1 illustrates the different arrangements that can result based on these criteria. In addition, it indicates what restrictions apply on the number and types of devices that can be requested.
Table A-1. Area Arrangement of ISAM Data Sets Criteria Number of DD statements 3 2 2 Area defined on DD statement INDEX PRIME OVFLOW INDEX PRIME PRIME OVFLOW Restrictions on Index size coded? Device Types and Number of Devices Requested No None None None Resulting Arrangement of Areas
Separate index, prime, and overflow areas. Separate index and prime areas.1 Separate prime and overflow areas. An index area is at the end of the overflow area. Separate prime and overflow areas. An index area is embedded in the prime area. Prime area with index area at its end.2
PRIME OVFLOW
Yes
The statement for the prime area cannot request more than one device. None
1 1
PRIME PRIME
No Yes
The statement cannot Prime area with request more than embedded index area.2 one device.
If both areas are on volumes on the same device type and if one of the cylinders allocated for the index area is only partially filled, the system establishes the overflow area in the unused portion of that cylinder. If the index area occupies at least one cylinder and if the unused portion of the index area is less than one cylinder, the unused portion is established as an overflow area. For a one-cylinder data set, no overflow area is established.
A-5
Appendix A. ISAM
DSNAME Parameter The DSNAME parameter is always required. Identify the data set by its name. Do not code INDEX, PRIME, or OVFLOW. If the data set was passed from a previous step, identify it by a backward reference. UNIT Parameter The UNIT parameter must be coded, unless the data set resides on one volume and was passed. Specify in the UNIT parameter the device type and the unit-count, if more than one device is required. If the data set is on more than one volume but the volumes are for the same device type, you need only one DD statement to retrieve the data set. Request one device per volume in the UNIT parameter. If the areas are on different types of devices, code a DD statement for each different device type. Another way to request a device is to code UNIT=AFF=ddname, where the referenced DD statement requests direct access. VOLUME Parameter The VOLUME parameter must be coded, unless the data set is on one volume and was passed from a previous step. Identify in the VOLUME parameter the serial numbers of the volumes on which the data set resides. Code the serial numbers in the same order that they were coded on the DD statements used to create the data set. DCB Parameter The DCB parameter must always contain DSORG=IS or DSORG=ISU. Do not code other DCB subparameters if the data set is passed from a previous step or is cataloged. However, you can code other DCB subparameters to complete the data control block, if it is not completed in the processing program. DISP Parameter The DISP parameter must always be coded. The first subparameter of the DISP parameter must be SHR or OLD. When you are updating an existing indexed sequential data set, code DISP=OLD. If you specify DISP=SHR, the data set will not open correctly. Optionally, you can specify a disposition in the second subparameter.
A-6
Appendix A. ISAM
Table A-2. DD Parameters for Retrieving or Extending an ISAM Data Set Area INDEX (coded only if index area is not on same device type as prime area) Parameter DSNAME DISP UNIT VOLUME DCB PRIME; or PRIME with overflow; or PRIME with overflow and index DSNAME DISP UNIT VOLUME DCB OVFLOW (coded only if overflow area is not on same device type as prime area) UNIT Third DD statement VOLUME DCB DSNAME DISP Comments Required. Code the same name as in the second DD statement. Required. Code the same value as in the second DD statement. Required Required Required Required Required. Specifies whether data set is being retrieved or updated. Required, unless passed data set is being retrieved and all three areas are on one volume. Same requirement as UNIT. If coded, list volumes in the order in which they were defined. Required Required. Code the same value as in the second DD statement. Required. Code the same value as in the second DD statement. Required Required Required
First DD statement
Example 1
//ISAMJOB JOB ,,MSGLEVEL=(1,1),PERFORM=25 //STEP1 EXEC PGM=INCLUDE //DD1 DD DSNAME=DATASET1(INDEX),DISP=(NEW,KEEP),UNIT=3330, // VOLUME=SER=777777,SPACE=(CYL,(10),,CONTIG), // DCB=(DSORG=IS,RECFM=F,LRECL=80,RKP=1,KEYLEN=8) // DD DSNAME=DATASET1(PRIME),DISP=(NEW,KEEP),UNIT=3330, // VOLUME=REF=*.DD1,SPACE=(CYL,(25),,CONTIG),DCB=*.DD1 // DD DSNAME=DATASET1(OVFLOW),DISP=(NEW,KEEP),UNIT=3330, // VOLUME=REF=*.DD1,SPACE=(CYL,(25),,CONTIG),DCB=*.DD1
This example creates an indexed sequential data set on one 3330 volume. Example 2
//RETRISAM //STEP1 //DDISAM // JOB ,,MSGLEVEL=(1,1),PERFORM=25 EXEC PGM=RETRIEVE DD DSNAME=DATASET1,DCB=DSORG=IS,UNIT=3330,DISP=OLD, VOLUME=SER=777777
This example job shows the DD statements needed to retrieve the indexed sequential data set created in the first example. Example 3
//ISAMJOB //STEP1 //DDISAM // JOB ,,MSGLEVEL=(1,1),PERFORM=25 EXEC PGM=IEFISAM DD DSNAME=DATASET2(INDEX),DISP=(NEW,KEEP),UNIT=3330, VOLUME=SER=888888,SPACE=(CYL,10,,CONTIG),DCB=(DSORG=IS,
Appendix A. Indexed Sequential Data Sets
A-7
Appendix A. ISAM
// // // // // RECFM=F,LRECL=80,RKP=1,KEYLEN=8) DD DSNAME=DATASET2(PRIME),DISP=(,KEEP),UNIT=3350, VOLUME=SER=999999,SPACE=(CYL,10,,CONTIG),DCB=*.DDISAM DD DSNAME=DATASET2(OVFLOW),DISP=(,KEEP),UNIT=3350, VOLUME=SER=AAAAAA,SPACE=(CYL,10,,CONTIG),DCB=*.DDISAM
This job creates an indexed sequential data set on one 3330 and two 3350 volumes. Example 4
//RERISAM //STEP1 //DDISAM // // // JOB ,,MSGLEVEL=(1,1),PERFORM=25 EXEC PGM=IEFISAM DD DSNAME=DATASET2,DCB=DSORG=IS,DISP=OLD,UNIT=3330, VOLUME=SER=888888 DD DSNAME=DATASET2,DCB=DSORG=IS,DISP=OLD,UNIT=(3350,2), VOLUME=SER=(999999,AAAAAA)
This job shows the DD statements needed to retrieve the indexed sequential data set created in the previous example. Example 5
//CATISAM JOB ,,MSGLEVEL=(1,1),PERFORM=25 //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE NONVSAM (NAME(DATASET2) DEVT(3330 3350 3350) VOL(888888 999999 AAAAAA) ) /*
This job catalogs a data set previously created on 3330 and 3350 volumes. (See the third example, jobname ISAMJOB.)
A-8
B-1
Appendix B. GDG
Note: In a shared DASD environment, if two or more jobs running on different systems simultaneously create new generations of the same data set, one of the jobs could fail with a JCL error. v For JES3, when the job is set up, and again by the system at the beginning of the first step that specifies the generation data set by relative generation number. If the most recent data set is not the same at both times, the results are unpredictable. Types of SMS-Managed Data Sets in a GDG An SMS-managed generation data group (GDG) can consist of cataloged sequential and direct data sets residing on direct access volumes. Generation data sets in a GDG can have like or unlike data set attributes and data set organizations. If a GDG is created on an SMS-managed volume, any dependencies on a model data set label in order to allocate a new generation data set should be removed. A GDG can contain both SMS-managed and non-SMS-managed generation data sets. Types of Non-SMS-Managed Data Sets in a GDG A non-SMS-managed generation data group (GDG) can consist of cataloged sequential and direct data sets residing on tape volumes, direct access volumes, or both. Generation data sets in a GDG can have like or unlike DCB attributes and data set organizations. Retrieval of GDG Data Sets All of the generations of a generation data group can be retrieved together as a single data set. The retrieval order is last-in-first-out.
B-2
Appendix B. GDG
DATACLAS and STORCLAS parameters on the DD statement. Also, you can specify those DD parameters that override attributes in the data class and storage class (such as RECORG, LRECL, SPACE, and so on). See the DATACLAS and STORCLAS DD parameters in z/OS MVS JCL Reference.
B-3
Appendix B. GDG
At step termination, the deferred generation data set is rolled into the GDG base. This means that the temporary catalog entry is removed and an entry is made in the GDG base. DISP=(NEW,KEEP) At step and job termination, the deferred generation data set remains in a deferred roll-in state. This means that the temporary catalog entry is not removed and an entry is not made in the GDG base. DISP=(NEW,DELETE) At step termination, the deferred generation data set is scratched and uncataloged. DISP=(NEW,PASS) At job termination, the deferred generation data set is scratched and uncataloged. Note: If you create a new generation data set and a deferred generation data set exists with the same GxxxxVyy number, the number and its associated space are reused.
The DSNAME is the common name by which each generation is identified; therefore, the model data set label cannot be cataloged. The GDG base is an entity that resides in the catalog. xxxxxx is the serial number of the volume containing the catalog where the GDG base resides. The applicable DCB
B-4
Appendix B. GDG
subparameters for a model data set label are DSORG, OPTCD, BLKSIZE, LRECL, KEYLEN, and RKP. If no DCB subparameters are wanted initially, you need not code the DCB parameter. 2. You do not need to create a model data set label if either of the following is true: a. You can refer to a cataloged data set with attributes identical to those you want or to an existing model data set label for which you can supply overriding attributes. b. The DCB attributes are supplied by the specified or selected data class. To refer to a cataloged data set for the use of its attributes, specify DCB=dsname on the DD statement that creates and catalogs your generation. To refer to an existing model, specify DCB=(modeldscbname,attributes) on the DD statement that creates and catalogs your generation. With SMS, specify LIKE=modeldsname or REFDD=*.ddname, *.stepname.ddname, or *.stepname.procstepname.ddname to refer to an earlier DD statement that identifies the model data set name. For more information, see Modeling Data Set Attributes on page D-4. To specify a data class, code DATACLAS=dataclass on the DD statement (although system ACS routines might override the value you code) or use the system default. For more information about data class, see Specifying Constructs on page D-2.
B-5
Appendix B. GDG
UNIT Parameter The UNIT parameter is required for a new generation data set unless VOLUME=REF=reference is coded. In the UNIT parameter, identify the type of device wanted. VOLUME Parameter Assign a volume in the VOLUME parameter, or omit the VOLUME parameter and let the system assign the volume. The VOLUME parameter can request a private volume, PRIVATE, and more than one volume in the volume count. SPACE Parameter Code the SPACE parameter when the generation data set is to reside on a direct access volume. LABEL Parameter You can specify label type; password protection, PASSWORD; and a retention period, EXPDT or RETPD, in the LABEL parameter. If the data set is to reside on a tape volume and is not the first data set on the volume, specify a data set sequence number. DCB Parameter If you use a model data set label from the same GDG and if the label contains all the attributes for this generation data set, omit the DCB parameter. If all the attributes are not contained in the label or if you want to override certain attributes, code DCB=(list of attributes). If you use a model data set label from a different GDG and if the label contains all the attributes for this generation data set, code DCB=dsname. If some attributes are missing from the label or if you want to override some attributes, code DCB=(dsname,list of attributes). If a model data set label does not exist, you must use the label for a cataloged data set. Code DCB=dsname. If some attributes are missing from the label, or if you want to override some attributes, code DCB=(dsname,list of attributes).
B-6
Appendix B. GDG
To retrieve a single generation data set, code in the DSNAME parameter the name of the generation data group followed by a relative generation number in parentheses. The number indicates which generation data set is to be retrieved. To retrieve the most recent data set, code a zero. To retrieve data sets created before the most recent data set, code a minus value, -1 to -255. The value of nnn indicates the relation of the desired data set to the most current data set: (-1) refers to the data set created immediately before the most recent data set; (-2) refers to the data set created before the data set identified by (-1). For example:
PAYROLL DSNAME=PAYROLL(0) DSNAME=PAYROLL(-1) DSNAME=PAYROLL(-2) Name of the GDG This weeks generation data set Last weeks generation data set Generation data set of two weeks ago
Relative generation numbers are maintained by the system only when generation data sets are specified using relative generation numbers. Note: Refer to generation data sets in a deferred roll-in state by their relative number, such as (+1), within the job that creates it. Refer to generation data sets in a deferred roll-in state by their absolute generation number (GxxxxVyy) in subsequent jobs. For more information on how to refer to GDG data sets in a deferred roll-in state, see z/OS DFSMS: Using Data Sets. Note: When retrieving a generation data set within a started task, and the generation data set is cataloged in a private catalog coding a relative generation number produces unpredictable results. Retrieving All Generation Data Sets To retrieve all generations of a GDG as a single data set, specify the GDG name without a generation number in the DSNAME parameter; this is called a GDG ALL request. For example: DSNAME=PAYROLL For all generations
To use a GDG ALL request, the DCB attributes and data set organization of all generations must be identical. The system treats a GDG ALL request as a concatenation of all existing data sets in the GDG, starting with the most recent data set and ending with the oldest, which can affect the meaning of system messages in the job output listing. For example, assume that data set GDGDS has two generations and that data sets A and B are not generation data sets. To concatenate A, all generations of GDGDS, and B, you would code the following JCL:
//DD1 // // DD DSN=A,DISP=SHR DD DSN=GDGDS,DISP=SHR,UNIT=AFF=DD1 DD DSN=B,DISP=SHR,UNIT=AFF=DD1
Because of the GDG ALL request, the system treats DD1 as if you had coded the following statements, and assigns the following relative position numbers:
Appendix B. Generation Data Sets
B-7
Appendix B. GDG
//DD1 // // // DD DSN=A,DISP=SHR DD DSN=GDGDS(0),DISP=SHR,UNIT=AFF=DD1 DD DSN=GDGDS(-1),DISP=SHR,UNIT=AFF=DD1 DD DSN=B,DISP=SHR,UNIT=AFF=DD1 +000 +001 +002 +003
The generated DD statements will automatically have unit affinity to each other even if you did not code UNIT=AFF:
//DD2 // // DD DSN=A,DISP=SHR DD DSN=GDGDS,DISP=SHR DD DSN=B,DISP=SHR
The system treats DD2 as though you had coded the following JCL statements, and assigns the following relative position numbers:
//DD2 // // // DD DSN=A,DISP=SHR DD DSN=GDGDS(0),DISP=SHR DD DSN=GDGDS(-1),DISP=SHR,UNIT=AFF=(DD2+001) DD DSN=B,DISP=SHR +000 +001 +002 +003
Of course, it is not actually possible to code UNIT=AFF=(DD2+001), but the system internally is able to treat the DD statements as though that is what you had coded. Any error message uses the relative position based on each generation included, not the position you explicitly specified. For example, an error message that includes a relative position of +002 refers to GDGDS(-1), not data set B. All older generations have unit affinity to the newest data set. For a GDG on tape, when you use a GDG ALL request and specify parallel mounting in the UNIT parameter, the system mounts all volumes of only the first generation. For a GDG on direct access, when you use a GDG ALL request and specify parallel mounting in the UNIT parameter, the system mounts all volumes of all generations. DISP Parameter For both SMS-managed and non-SMS-managed data sets, always code the DISP parameter. The first subparameter of the DISP parameter must be OLD, SHR, or MOD. If you code MOD for a generation data set and the specified relative generation does not exist in the catalog, the system changes the status to NEW. A normal termination disposition is optional when retrieving a generation data set but is required in a GDG ALL request. Do not code PASS in a GDG ALL request. UNIT Parameter For non-SMS-managed data sets, code the unit-count subparameter in the UNIT parameter when you want more than one device assigned to the data set. Or, if the data set resides on more than one volume and you want as many devices as there are volumes, code P in the UNIT parameter. VOLUME Parameter For non-SMS-managed data sets, use the VOLUME parameter to request a private volume, PRIVATE, and to indicate that more volumes might be required, volume count. For an old generation data set, do not specify either a volume serial number or a volume reference to another data set or to an earlier DD statement.
B-8
Appendix B. GDG
LABEL Parameter For non-SMS-managed data sets, code the LABEL parameter when the data set is on tape and has other than standard labels. If the data set is not the first data set on the volume, specify the data set sequence number. If the data set sequence number is coded for a GDG ALL request, it is ignored; the data set sequence number is obtained from the catalog. DCB Parameter For non-SMS-managed data sets, code DCB=(list of attributes) when the data set has other than standard labels and DCB information is required to complete the data control block. Do not code DCB=dsname.
In the above example, the absolute generation number referenced by relative generation number in STEP1 (DD1) is G0007V00. The system establishes the relative/absolute relationship that it will maintain throughout the job. In STEP2, all generation data sets are to be deleted, which occurs at STEP2 termination. In STEP3, the system assigns the absolute generation number G0009V00 to the new generation data set created (DD3).
Appendix B. Generation Data Sets
B-9
Appendix B. GDG
In the following example, the JCL is set up to delete all generation data sets at the beginning of the job.
//STEP1 //DD1 //STEP2 //DD2 //STEP3 //DD3 EXEC DD DISP=(OLD,DELETE),DSN=A.B.C EXEC DD DISP=(NEW,CATLG),DSN=A.B.C(+1) EXEC DD DISP=(NEW,CATLG),DSN=A.B.C(+2)
In this second example, the system establishes the relative/absolute relationship in STEP2, the first time that a relative generation number is used in the job. The system then assigns absolute generation number G0001V00 to the data set referenced in DD2 and absolute generation number G0002V00 to the data set referenced in DD3.
This step shows the DD statements used to add three SMS-managed data sets to a GDG. The installation-written automatic class selection (ACS) routines are used to select a data class and storage class for the data sets.
B-10
Appendix B. GDG
Example 2 For SMS-managed data sets:
//JWC //STEP1 //DDA //DDB //DDC JOB EXEC DD DD DD ,J. GRIFFIN-KEENE PGM=REPORT9 DSNAME=A.B.C(-2),DISP=OLD DSNAME=A.B.C(-1),DISP=OLD DSNAME=A.B.C(0),DISP=OLD
This job shows the DD statements needed to retrieve the SMS-managed generation data sets created in the first example, when the GDG contains no other generation data sets. Example 3 For non-SMS-managed data sets:
//STEPA //DD1 // //DD2 // //DD3 // // EXEC PGM=PROCESS DD DSNAME=A.B.C(+1),DISP=(NEW,CATLG),UNIT=3400-6, VOL=SER=13846,LABEL=(,SUL) DD DSNAME=A.B.C(+2),DISP=(NEW,CATLG),UNIT=3330, VOL=SER=10311,SPACE=(480,(150,20)) DD DSNAME=A.B.C(+3),DISP=(NEW,CATLG),UNIT=3350, VOL=SER=28929,SPACE=(480,(150,20)), DCB=(LRECL=120,BLKSIZE=480)
This step shows the DD statements used to add three non-SMS-managed data sets to a GDG. DD1 and DD2 do not include the DCB parameter because a model data set label exists on the same volume as the GDG index and has the same name as the GDG: A.B.C. Because the DCB parameter is coded on the third DD statement, the attributes LRECL and BLKSIZE override the attributes included in the model data set label. Example 4 For non-SMS-managed data sets:
//JWC //STEP1 //DDA //DDB //DDC JOB EXEC DD DD DD ,J. GRIFFIN-KEENE PGM=REPORT9 DSNAME=A.B.C(-2),DISP=OLD,LABEL=(,SUL) DSNAME=A.B.C(-1),DISP=OLD DSNAME=A.B.C(0),DISP=OLD
This job shows the DD statements needed to retrieve the non-SMS-managed generation data sets created in the third example, when the GDG contains no other generation data sets. Example 5 For SMS-managed data sets:
//J1 //S11 //A //S12 //B //S13 //C JOB ACCT34,DEPT.17 EXEC PGM=P1 DD DSNAME=GDGDS(+1),DISP=(NEW,CATLG),STORCLAS=... EXEC PGM=P2 DD DSNAME=GDGDS(+2),DISP=(NEW,CATLG),STORCLAS=... EXEC PGM=P3 DD DSNAME=GDGDS(+1),DISP=OLD . .
Appendix B. Generation Data Sets
B-11
Appendix B. GDG
//J2 //S21 //D //S22 //E //S23 //F //S24 //G //S25 //H //S26 //J //S27 //K //S28 //L //S29 //M JOB EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD . . ACCT34,DEPT.17 PGM=P4 DSNAME=GDGDS,DISP=OLD PGM=P5 DSNAME=GDGDS(0),DISP=OLD PGM=P6 DSNAME=GDGDS(+1),DISP=(NEW,CATLG),STORCLAS=... PGM=P7 DSNAME=GDGDS(+2),DISP=(NEW,CATLG),STORCLAS=... PGM=P8 DSNAME=GDGDS(+1),DISP=OLD PGM=P9 DSNAME=GDGDS(+2),DISP=OLD PGM=P10 DSNAME=GDGDS(0),DISP=OLD PGM=P11 DSNAME=GDGDS(-1),DISP=OLD PGM=P12 DSNAME=GDGDS,DISP=OLD
These two jobs show the creation and retrieval of generation data sets. DD statement A - create 1st generation (cataloged at allocation, rolled in at end of step). DD statement B - create 2nd generation (cataloged at allocation, rolled in at end of step). DD statement C - reference 1st generation. At the end of job J1, generation 1 and 2 have been cataloged. DD statement D - reference all generations (1st and 2nd). DD statement E - reference 2nd generation. DD statement F - create 3rd generation (cataloged at allocation, rolled in at end of step). DD statement G - create 4th generation (cataloged at allocation, rolled in at end of step). DD statement H - reference 3rd generation. DD statement J - reference 4th generation. DD statement K - reference 2nd generation. DD statement L - reference 1st generation. DD statement M - reference all generations (1st through 4th). At the end of job J2, generation 3 and 4 have been cataloged. Example 6 For non-SMS-managed data sets:
//J1 //S11 //A //S12 //B //S13 //C JOB EXEC DD EXEC DD EXEC DD . . //J2 JOB //S21 EXEC //D DD //S22 EXEC //E DD //S23 EXEC //F DD ACCT34,DEPT.17 PGM=P1 DSNAME=GDGDS(+1),DISP=(,CATLG),UNIT=... PGM=P2 DSNAME=GDGDS(+2),DISP=(,CATLG),UNIT=... PGM=P3 DSNAME=GDGDS(+1),DISP=OLD ACCT34,DEPT.17 PGM=P4 DSNAME=GDGDS,DISP=OLD PGM=P5 DSNAME=GDGDS(0),DISP=OLD PGM=P6 DSNAME=GDGDS(+1),DISP=(,CATLG),UNIT=...
B-12
Appendix B. GDG
//S24 //G //S25 //H //S26 //J //S27 //K //S28 //L //S29 //M EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD EXEC DD . . PGM=P7 DSNAME=GDGDS(+2),DISP=(,CATLG),UNIT=... PGM=P8 DSNAME=GDGDS(+1),DISP=OLD PGM=P9 DSNAME=GDGDS(+2),DISP=OLD PGM=P10 DSNAME=GDGDS(0),DISP=OLD PGM=P11 DSNAME=GDGDS(-1),DISP=OLD PGM=P12 DSNAME=GDGDS,DISP=OLD
These two jobs show the creation and retrieval of generation data sets. DD statement A - create 1st generation (and catalog at end of step). DD statement B - create 2nd generation (and catalog at end of step). DD statement C - reference 1st generation. At the end of job J1, generation 1 and 2 have been cataloged. DD statement D - reference all generations (1st and 2nd). DD statement E - reference 2nd generation. DD statement F - create 3rd generation (and catalog at end of step). DD statement G - create 4th generation (and catalog at end of step). DD statement H - reference 3rd generation. DD statement J - reference 4th generation. DD statement K - reference 2nd generation. DD statement L - reference 1st generation. DD statement M - reference all generations (1st through 4th). At the end of job J2, generation 3 and 4 have been cataloged.
B-13
Appendix B. GDG
B-14
VSAM Data Sets - With SMS Creating a VSAM Data Set - With SMS
To create a permanent VSAM data set, either (1) use access method services commands or (2) use the DD statement with the RECORG parameter or with a data class that contains RECORG. You can also create temporary VSAM data sets. See Appendix D, Data Sets with SMS for information about SMS. To create a VSAM data set, code a DD statement in the form:
//ddname DD DSNAME=dsname,RECORG=record-organization, // DISP=(NEW,...)...
The system catalogs a permanent VSAM data set when the data set is allocated.
You can pass VSAM data sets within a job. (Note that the system replaces PASS with KEEP for old permanent VSAM data sets. When you refer to the data set later in the job, the system obtains data set information from the catalog.)
C-1
Appendix C. VSAM
Table C-1. With SMS, DD Parameters to Use when Processing VSAM Data Sets Parameter AMP Subparameter Comment This parameter has subparameters for: 1. Overriding operands specified with the ACB, EXLST, or the GENCB macro instructions 2. Supplying operands missing from the ACB or GENCB macro instruction 3. Indicating checkpoint/restart options 4. Indicating options when using ISAM macro instructions to process a key-sequenced data set 5. Indicating that the data set is a VSAM data set when the DD statement specifies unit and volume information or DUMMY 6. Indicating that VSAM is to supply storage dumps of the ACBs that identify the DD statement DATACLAS DDNAME DISP data-class-name ddname all subparameters No special considerations for VSAM data sets, except that the record organization (RECORG) should specify a VSAM data set. No special considerations for VSAM data sets. All DISP subparameters can be used for VSAM data sets except UNCATLG, which is ignored (KEEP is implied if UNCATLG is coded). VSAM uses the dsname. An area-name (area-name), generation number (generation), or member name (member) is ignored if coded with dsname. You can code a temporary dsname for a VSAM data set. You can code backward references to VSAM data sets on the REFDD parameter. No special considerations for VSAM, except that an attempt to read results in an end-of-data condition, and an attempt to write results in a return code that indicates the write was successful. If specified, AMP=AMORG must also be specified. No special considerations for VSAM data sets. No special considerations for VSAM data sets. mgmt-class-name KS ES RR LS No special considerations for VSAM data sets. Specifies a key-sequenced data set. Specifies an entry-sequenced data set. Specifies a relative record data set. Specifies a linear space data set. RECORG overrides the record organization in the data class. SECMODEL SPACE STORCLAS storage-class-name No special considerations for VSAM data sets. No special considerations for VSAM data sets. No special considerations for VSAM data sets. If a storage class is assigned, the VSAM data set is managed by SMS.
DSNAME
dsname
All temporary dsnames All backward DD references of the form *.ddname DUMMY
C-2
Appendix C. VSAM
Table C-1. With SMS, DD Parameters to Use when Processing VSAM Data Sets (continued) Parameter UNIT Subparameter device number type group p Comment Must be the device number of a valid device for VSAM (2305, 3330, 3340, 3344, 3350, 3375, 3380, 3390, or 9345). If not, OPEN will fail. Must be a type supported by VSAM (2305, 3330, 3340, 3350, 3375, 3380, 3390, or 9345). If not, OPEN will fail. Must be a group supported by VSAM. If not, OPEN will fail. System must have enough units to mount all of the volumes specified. If sufficient units are available, UNIT=P can improve performance by avoiding the mounting and demounting of volumes. For multivolume data sets defined in integrated catalog facility catalogs, UNIT=(,P) must be specified because all primary volumes must be mounted in parallel. If the number of devices requested is greater than the number of volumes on which the data set resides, the extra devices are allocated anyway. If a key-sequenced data set and its index reside on unlike devices, the extra devices are allocated evenly between the unlike device types. If the number of devices requested is less than the number of volumes on which the data set resides but greater than the minimum number required to gain access to the data set, the devices over the minimum are allocated evenly between unlike device types. If devices beyond the count specified are in use by another task but can be shared and have mounted on them volumes containing parts of the data set to be processed, they will also be allocated to this data set. No special considerations for VSAM.
unit count
DEFER
Note: MVS/ESA SP 5.2 does not support multiple exposure devices, such as the 2305, 3350P, and 3351P. VOLUME PRIVATE SER No special considerations for VSAM. The volume serial number(s) used in the access method services DEFINE command for the data set must match the volume serial numbers in the VOLUME=SER specification when the data set is defined. After a VSAM data set is defined, the volume serial number(s) need not be specified on a DD statement to retrieve the data set. If, however, VOLUME=SER and UNIT=type are specified, only those volumes specifically named are initially mounted. Other volumes may be mounted when needed, if at least one of the units allocated to the data set cannot be shared or the unit count is equal to the total number of volumes allocated to the data set. A unit cannot be shared when the unit count is less than the number of volume serial numbers specified or when DEFER is specified. If VOLUME=SER is specified and the data set is cataloged in a user catalog, the user catalog should be defined as a JOBCAT or a STEPCAT for the current step. Table C-2. With SMS, DD Parameters to Avoid when Processing VSAM Data Sets Parameter BURST CHARS CHKPT COPIES DATA Subparameter Comment Not applicable. Not applicable. VSAM ignores CHKPT. Not applicable. Not applicable.
C-3
Appendix C. VSAM
Table C-2. With SMS, DD Parameters to Avoid when Processing VSAM Data Sets (continued) Parameter DCB DEST DLM FCB FLASH LABEL BLP, NL, NSL IN OUT NOPWREAD Subparameter All Comment Not applicable. Specify DEST only with the SYSOUT parameter. Not applicable. Not applicable. Not applicable. Not applicable Not applicable Not applicable The password-protection bit is set for all VSAM data sets, regardless of the PASSWORD/NOPWREAD specification in the LABEL parameter. The password-protection bit is set for all VSAM data sets, regardless of the PASSWORD/NOPWREAD specification in the LABEL parameter. Although these parameters apply to direct-access storage devices, SL is always used for VSAM, whether you specify SL, SUL, or neither. Not applicable. If SYSOUT is coded with a mutually exclusive parameter (for example, DISP), the job step is terminated with an error message. All AFF Not applicable. Use this subparameter carefully. If the cluster components, the data and its index, reside on unlike devices, the results of UNIT=AFF are unpredictable. Use this subparameter carefully. If the referenced volumes are not a subset of those contained in the catalog record for the data set, the results are unpredictable. Results are unpredictable. Not applicable because this subparameter gives the number of nonspecific volumes. All VSAM volumes must be specifically defined.
PASSWORD
SL, SUL
VOLUME
REF
vol-seq-number volume-count
Not applicable.
VSAM Data Sets - Without SMS Creating a VSAM Data Set - Without SMS
Use access method services commands to create a VSAM data set. You cannot use a DD statement.
C-4
Appendix C. VSAM
C-5
Appendix C. VSAM
Table C-3. Without SMS, DD Parameters to Use when Processing VSAM Data Sets (continued) Parameter UNIT Subparameter device number Comment Must be the device number of a valid device for VSAM ( 2305, 3330, 3340, 3344, 3350, 3375, 3380, 3390, or 9345). If not, OPEN will fail Must be a type supported by VSAM ( 2305, 3330, 3340, 3350, 3375, 3380, 3390, or 9345). If not, OPEN will fail. Must be a group supported by VSAM. If not, OPEN will fail. System must have enough units to mount all of the volumes specified. If sufficient units are available, UNIT=P can improve performance by avoiding the mounting and demounting of volumes. For multivolume data sets defined in integrated catalog facility catalogs, UNIT=(,P) must be specified because all primary volumes must be mounted in parallel. If the number of devices requested is greater than the number of volumes on which the data set resides, the extra devices are allocated anyway. If a key-sequenced data set and its index reside on unlike devices, the extra devices are allocated evenly between the unlike device types. If the number of devices requested is less than the number of volumes on which the data set resides but greater than the minimum number required to gain access to the data set, the devices over the minimum are allocated evenly between unlike device types. If devices beyond the count specified are in use by another task but can be shared and have mounted on them volumes containing parts of the data set to be processed, they will also be allocated to this data set. No special considerations for VSAM.
type group p
unit count
DEFER
Note: MVS/ESA SP 5.2 does not support multiple exposure devices, such as the 2305, 3350P, and 3351P. VOLUME PRIVATE SER No special considerations for VSAM. The volume serial number(s) used in the access method services DEFINE command for the data set must match the volume serial numbers in the VOLUME=SER specification when the data set is defined. After a VSAM data set is defined, the volume serial number(s) need not be specified on a DD statement to retrieve the data set. If, however, VOLUME=SER and UNIT=type are specified, only those volumes specifically named are initially mounted. Other volumes may be mounted when needed, if at least one of the units allocated to the data set cannot be shared or the unit count is equal to the total number of volumes allocated to the data set. A unit cannot be shared when the unit count is less than the number of volume serial numbers specified or when DEFER is specified. If VOLUME=SER is specified and the data set is cataloged in a user catalog, the user catalog should be defined as a JOBCAT or a STEPCAT for the current step. Table C-4. Without SMS, DD Parameters to Avoid when Processing VSAM Data Sets Parameter BURST CHARS CHKPT COPIES Subparameter Comment Not applicable. Not applicable. VSAM ignores CHKPT. Not applicable.
C-6
Appendix C. VSAM
Table C-4. Without SMS, DD Parameters to Avoid when Processing VSAM Data Sets (continued) Parameter DATA DCB DEST DISP CATLG All Subparameter Comment Not applicable. Not applicable. Specify DEST only with the SYSOUT parameter. VSAM data sets are cataloged and uncataloged as a result of an access method services command; if CATLG is coded, a message is issued, but the data set is not cataloged. VSAM data sets are deleted as a result of an access method services command; if DELETE is coded, a message is issued, but the data set is not deleted. For VSAM data sets, MOD is treated as if OLD were specified, except for processing with an ISAM program, in which case MOD indicates resume load. Because KEEP is implied for VSAM data sets, it need not be coded. VSAM data spaces are initially allocated as a result of the access method services DEFINE command. If NEW is specified, the system allocates space, but it is never used by VSAM. Moreover, an access method services request for space may fail if the DISP=NEW acquisition of space causes too little space to remain available. VSAM data sets are cataloged and uncataloged as a result of access method services commands; if UNCATLG is coded, a message is issued, but the data set is not uncataloged. Not applicable. However, because there is no error checking, coding PASS for a key-sequenced data set whose index resides on a like device does not result in an error. If a VSAM data set and its index reside on unlike devices, the results are unpredictable. In either case, the data set is not passed. Not applicable. dsname(area-name) dsname(generation) dsname(member) All temporary dsnames All backward DD references of the form *ddname FCB FLASH VSAM uses the dsname. An area-name, generation number, or member name is ignored, if coded with the dsname. Do not code a temporary dsname for a VSAM data set. Do not code backward references to VSAM data sets. If the object referred to is a cluster and the data set and index reside on unlike devices, the results of a backward DD reference are unpredictable. Not applicable. Not applicable.
DELETE
MOD
KEEP NEW
UNCATLG
PASS
DLM DSNAME
C-7
Appendix C. VSAM
Table C-4. Without SMS, DD Parameters to Avoid when Processing VSAM Data Sets (continued) Parameter LABEL Subparameter BLP, NL, NSL IN OUT NOPWREAD Comment Not applicable. Not applicable. Not applicable. The password-protection bit is set for all VSAM data sets, regardless of the PASSWORD/NOPWREAD specification in the LABEL parameter. The password-protection bit is set for all VSAM data sets, regardless of the PASSWORD/NOPWREAD specification in the LABEL parameter. Although these parameters apply to direct-access storage devices, SL is always used for VSAM, whether you specify SL, SUL, or neither. Not applicable. VSAM data spaces are initially allocated as a result of the access method services DEFINE command. If SPACE is specified, the system allocates space, but it is never used by VSAM. Moreover, an access method services request for space may fail as a result of the SPACE acquisition of space. If SYSOUT is coded with a mutually exclusive parameter (for example, DISP), the job step is terminated with an error message. All AFF Not applicable. Use this subparameter carefully. If the cluster components, the data and its index, reside on unlike devices, the results of UNIT=AFF are unpredictable. Use this subparameter carefully. If the referenced volumes are not a subset of those contained in the catalog record for the data set, the results are unpredictable. Results are unpredictable. Not applicable because this subparameter gives the number of nonspecific volumes. All VSAM volumes must be specifically defined.
PASSWORD
SL,SUL
MODIFY SPACE
VOLUME
REF
vol-seq-number volume-count
Not applicable.
C-8
SMS Constructs
With SMS, a new data set can have one or more of the following three constructs: v Data class - contains the data set attributes related to the allocation of the data set. v Management class - contains the data set attributes related to the migration and backup of the data set. A management class can only be assigned to a data set that also has a storage class assigned. v Storage class - contains the data set attributes related to the storage occupied by the data set. A data set that has a storage class assigned is defined as an SMS-managed data set. The storage administrator at your installation writes the automatic class selection (ACS) routines that SMS uses to assign the constructs to a new data set.
Copyright IBM Corp. 1988, 2004
D-1
In the example, installation-written ACS routines (possibly based on the data set name and information from your JOB, EXEC, and DD statements) can select a data class, management class, and storage class appropriate for the data set. You code only the ddname, dsname, and disposition of the data set. The constructs selected by the ACS routines contain all the other attributes needed to manage the data set. Without SMS You would have needed to code the data set attributes on the DCB, SPACE, UNIT, and VOLUME parameters; for example:
//SMSDS0 // // DD DSNAME=MYDS0.PGM,VOLUME=SER=SYS084, UNIT=SYSDA,SPACE=(TRK,(10,5)),DISP=(NEW,CATLG), DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
Existing JCL
Generally, your existing JCL will continue to execute correctly. SMS allows the installation to benefit from the data class, management class, and storage class constructs without changing existing JCL. The installation-written ACS routines can be designed to filter existing parameters on the DD statement and select appropriate constructs for the data set.
Default Unit
Also with SMS, for a non-SMS-managed data set, if your storage administrator has set a system default unit under SMS, you do not need to specify UNIT. Check with your storage administrator.
Specifying Constructs
In many cases, the constructs selected by the installation-written ACS routines are sufficient for your data sets. However, when defining a new data set, you can select a data class, management class, or storage class by coding one or more of the following DD parameters: v DATACLAS - specifies the data class v MGMTCLAS - specifies the management class v STORCLAS - specifies the storage class The storage administrator has defined the names of the classes you can specify. You can view the names and attributes defined in each of the named classes by using ISMF. See z/OS DFSMS: Using the Interactive Storage Management Facility for information on how to use ISMF.
D-2
In the example, SMS uses the attributes in the data class named DCLAS01 to manage the data set. The installation-written ACS routines can select the management class and storage class. Note that an ACS routine can override the data class, management class, or storage class that you specify.
In the example, the logical record length of 256 and the expiration date of February 2, 1996, override the corresponding attributes defined in the data class for the data set. With SMS, you can associate a data class with any new data set, (whether or not it is system-managed). If you do not specify one or more of the DD parameters listed earlier (RECORG, RECFM, LRECL, KEYLEN, and so forth), the system uses the defined data class attributes. For an existing system-managed DASD data set, note that you cannot use the volume-count subparameter to override the current volume count. (If you use the subparameter, the system ignores your specification and uses the current volume count.)
D-3
In the example, the data set will reside on volume serials 222333 and 333444.
For both LIKE and REFDD, you can override data class attributes obtained from the referenced data set by coding those DD parameters that can be used to override attributes in these classes.
D-4
Appendix E. Notices
This information was developed for products and services offered in the USA. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the users responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 USA For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106, Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
E-1
Notices
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: IBM Corporation Mail Station P300 2455 South Road Poughkeepsie, NY 12601-5400 USA Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this information and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or any equivalent agreement between us. If you are viewing this information softcopy, the photographs and color illustrations may not appear.
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or other countries or both: v AFP v DB2 v DFSMSdfp v DFSMS/MVS v DFSORT v IBM v IBMLink v IP PrintWay v MVS/ESA v MVS/SP v OpenEdition v OS/390 v Print Services Facility v RACF v Resource Link v RETAIN v SecureWay v System/370 v System/390 v VTAM v zSeries v z/OS UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, and service names may be trademarks or service marks of others.
E-2
12-5
Numerics
3203 Printer Model 5 for printing sysout data set 25-2 3211 Printer for printing sysout data set 25-4 3450 Diskette Input/Output Unit identifying output data set 18-2 input data set 12-6 3800 Printing Subsystem for printing high-density dump 25-5 for printing sysout data set 22-10, 25-2
A
abnormal termination See termination ACB (access method control block) values for data set processing 13-5
X-1
average record See AVGREC parameter AVGREC parameter use 13-6, 15-42, 15-43, D-3
B
base control program See BCP BCP (base control program) in relation to JCL statement 3-1 binary synchronous communication See BSC BSC (binary synchronous communication) use 6-3, 6-4 BURST parameter use 25-2 BYTES parameter to limit jobs output 7-3 in APPC scheduling environment 7-3, 10-12 in non-APPC scheduling environment 7-4, 10-12 use 10-18, 26-1
C
CANCEL subparameter to cancel job that exceeds output limit 10-12 use 26-2 CARDS parameter to limit jobs output 7-3 in APPC scheduling environment 7-3, 10-12 in non-APPC scheduling environment 7-4, 10-12 use 10-18, 26-1 cards subparameter use 26-1 catalog in JES3 allocation 15-12 private of data set 12-6 system of data set 12-6 volume for allocation and unallocation 12-7 cataloged procedure See procedure cataloging data set not performed as requested 17-4 request 17-3 unsuccessful 17-4 use 17-4 when cataloged data set updated 17-4 character-arrangement table dynamic selection 25-3 modifying 25-3 specification 25-3 CHARS parameter use 25-2, 25-5 checkpointing job execution 5-2 multivolume data set 16-4
checkpointing (continued) submitting a job for restart B-10 sysout data set 22-10 CHKPT macro restart control 5-2 CHKPT parameter use 16-4 CHNSIZE parameter use 24-1 CKPTLINE parameter use 22-10 CKPTPAGE parameter use 22-10 CKPTSEC parameter use 22-10 class job description 11-1 for copying job 6-2 in holding job 6-1 to control performance 11-1 output assigning data set 18-1 printing 22-5 use 22-5 CLASS parameter for copying job 6-2 in holding job 6-1 to suppress sysout output 22-9 use 7-7, 10-15, 11-1, 18-1, 22-7 when requesting processor 9-10 CNTL parameter use 16-4 CNTL statement use 16-4 code See return code command statement use 7-1 COMMAND statement use 7-1 comment use 7-2 communication chart 7-1 description 7-1, 7-8 from functional subsystem to programmer example 7-6 from JCL to operator 7-2 example 7-2 from JCL to program 7-2 example 7-2 from JCL to programmer 7-2 example 7-2 from JCL to system 7-1 example 7-2 from system to operator 7-3 example 7-3, 7-4 from system to TSO/E userid 7-4 example 7-5 from TSO/E userid to system 7-5
7-6
X-2
communication (continued) example 7-5 through job log 7-6 example 7-6, 7-7 COMPACT parameter use 24-1 concatenation data set 12-5 COND parameter example 10-7 relationship of JOB and EXEC statement COND parameter 10-6 to force step execution 10-6 use 10-5 constructs with SMS description D-1 control data set 13-1 CONTROL parameter use 25-1 COPIES parameter use 25-1, 25-2, 25-4 copies subparameter use 25-1 copy input stream 6-2 of data set name 12-4
D
data class See also DATACLAS parameter description D-1 overriding attribute D-3 data control block See DCB DATA parameter use in identifying in-stream data set 12-5 data set cataloged deleting 17-3 generation data set 17-4 placing in catalog 17-3 removing from catalog 17-5 specifying CATLG disposition 17-4 unit and volume information 15-24, 15-28 volume reference 15-24, 15-28 concatenation 12-5 dummy effect 16-1 nullification 16-2 to suppress sysout output 22-8 use 16-1 exclusive use 13-2 held release 22-8 request 22-7 multivolume 15-17, 15-21 allocation consideration 15-17, 15-21 checkpointing 16-4
data set (continued) multivolume (continued) requesting space 15-44 passed demounting volume 17-12 effect on volume retention 17-12 unit and volume information 15-24, 15-28 permanent 12-1 postponed definition 16-2 concatenation 16-2 reference 16-2 use 16-2 requesting resource 3-2 securing control 13-1 shared use 13-2 stacking 15-37 sysout grouping 22-6 size 22-5 system-managed description 7-6 temporary 12-3 deleting 17-3 use of VIO 15-47 with SMS D-1 data-set-sequence-number use 12-10 DATACLAS parameter use 13-6, B-2, B-3, D-2 DATASET JES3 statement See //*DATASET DCB (data control block) values for data set processing 13-4 values for sysout data set processing 19-1 values from cataloged data set 13-5 values from earlier DD statement 13-5 DCB parameter use 13-4, 19-1, 25-2, 25-3, 25-4, A-3, A-6, B-6, B-9 DDNAME parameter use 16-2, D-2 deadline execution by 5-4 DEADLINE parameter in deadline scheduling 5-4 in periodic scheduling 5-4 deallocation See unallocation default unit D-2 DEFER subparameter use 15-5 deferred volume mounting specification 15-5 DEFINE command B-2 DEL JES2 statement See /*DEL deletion not performed when data set uncataloged 17-5 of cataloged data set 17-3 of data set with unexpired expiration date 17-3 of generation data set B-9 of temporary data set 17-3
Index
X-3
deletion (continued) request 17-2 delimiter statement use 12-5 dependency before step execution external 5-5 dependent job control See DJC dependent job net testing 5-5 use 5-4 description task for requesting data set resources chart 13-1 description 13-1, 14-1 of data attribute 13-4 of data attributes example 13-5, 13-6, 13-7 of status 13-1 example 13-2 description task for requesting sysout resources chart 19-1 description 19-1 of data attribute 19-1 example 19-1 DEST parameter use 24-1 destination default 24-4 multiple 24-2 destination control task for requesting sysout resources chart 24-1 description 24-1, 24-7 to another processor 24-5 example 24-5 to assist in sysout distribution 24-7 to internal reader 24-5 example 24-6 to local or remote device or to another node 24-1 example 24-4, 24-5 in JES2 network 24-2 in JES3 network 24-4 to terminal 24-7 example 24-7 device allocation 15-2 management in JES3 system 15-11 number allocated 15-6 specifying as destination for sysout data set 24-1 DFSMSdfp with SMS-managed data set D-1 directory of PDS 9-1 DISP parameter use 12-6, 13-1, 17-1, A-3, A-6, B-3, B-5, B-8, B-9, D-2 when data set is cataloged 12-6 DJC (dependent job control) use 5-4 DLM parameter use 12-5
documentation job and its resource requirement 7-2 documents, licensed xvi DPAGELBL parameter use 20-1 DSID parameter use 12-6, 18-2 DSNAME parameter use 12-1, 12-5, 15-18, 18-1, A-2, A-6, B-3, B-5, B-6, D-2 DSNTYPE parameter use 13-6, D-3 DUMMY parameter use 16-1, 22-8 with SUBSYS parameter 16-4 dump after error 10-17 format 25-5 high-density 10-18 DUMP subparameter use 26-2 dynamic allocation 15-50 unallocation 17-1 DYNAMNBR parameter use 15-50
E
end processing task for requesting data set resource chart 17-1 description 17-1, 17-12 disposition of data set 17-1 bypassing 17-8 cataloging 17-3 default 17-8 deleting 17-2 effect of device type 17-2 example 17-9, 17-10 keeping 17-3 passing 17-5 uncataloging 17-5 when no abnormal termination disposition coded 17-2 disposition of volume 17-11 example 17-11, 17-12 of removable volume 17-11 release of unused direct access space 17-10 example 17-11 unallocation 17-1 example 17-1 end processing task for requesting sysout resource chart 23-1 description 23-1 unallocating 23-1 example 23-1 ENDDATASET JES3 statement See //*ENDDATASET ENDPROCESS JES3 statement See //*ENDPROCESS
X-4
entering jobs task in job control 2-4 EOF JES2 statement See /*EOF error scanning JCL 10-15 EVEN subparameter example 10-12 to force step execution 10-6 event external holding job 6-1 execution at remote node 5-6 considerations for 5-7 example 5-8 chart 5-1 deadline or periodic 5-4 example 5-4 use 5-4 description 5-1, 6-1 of procedure 5-2 example 5-2 of program 5-1 example 5-1 when dependent on other job 5-4 when dependent on other jobs example 5-5 when restarting and with checkpointing 5-2 example 5-3 EXPDT parameter use 13-6, 17-10 expiration date for data set deleting prior to date 17-10 effect on disposition 17-10 request 17-10 when unexpired 17-3 extent in allocation of direct access space 15-44 external writer See writer
G
GDG (generation data group) building base entry B-2 cataloging data set 17-4 data set label B-4 defining attribute B-4 identifying 12-2 type of data set B-2 generation data group See GDG generation data set creating B-3, B-5 deleting and uncataloging B-9 description B-1, C-1 example B-10 retrieving B-2, B-6 rules when submitting job for restart B-10 graphic character modification modules modifying 25-3 GROUP parameter use 8-1 GROUPID parameter use 22-6 grouping sysout data sets demand setup 22-6 request 22-6 subgroup 22-6 guaranteed space D-3 with system-managed DASD data set 15-16
H
hard-copy log description 7-6 high-density dumps request 25-5 HOLD parameter in holding job 6-1 use 22-7 holding job entrance 6-1 of sysout data set 22-7 releasing 22-8 use 22-7
F
FAILURE parameter in restart 5-3 FCB parameter use 25-1, 25-4, 25-5 FETCH parameter use 7-3 FLASH parameter use 25-2 FORMDEF parameter use 22-10 FORMS parameter use 25-4 forms subparameter use 25-1 FREE parameter use 17-1, 23-1
I
I/O-to-processing ratio use 11-3 identification task for entering jobs chart 4-1 description 4-1, 5-1 of account 4-3 example for local execution 4-3 example for remote execution 4-4 for local execution 4-3 for remote execution 4-4 of job 4-1 example 4-1
Index
X-5
identification task for entering jobs (continued) of procedure 4-2, 4-3 example 4-2 of programmer 4-4 example 4-4 of step 4-2 example 4-2 identification task for requesting data set resources as TCAM message data set 12-10 example 12-10 by location on tape 12-10 example 12-10 chart 12-1 description 12-1, 13-1 from or to terminal 12-10 example 12-10 of data set 12-1 example for generation data set 12-2 example for indexed sequential data set 12-3, 12-4 example for partitioned data set 12-2, 12-4 example for permanent data set 12-2 example for temporary data set 12-4 example when copying data set name 12-5 of data set on 3450 Diskette Input/Output Unit 12-6 example 12-6 of in-stream data set 12-5 example 12-5, 12-6 through catalog 12-6 example 12-8 through label 12-8 example 12-9 identification, task for requesting sysout resources as a sysout data set 18-1 example 18-1 chart 18-1 description 18-1, 19-1 of data set on 3450 Diskette Input/Output Unit 18-2 example 18-2 of output class 18-1 example 18-2 IEBIMAGE utility program use for character-arrangement table 25-3 use in updating SYS1.IMAGELIB 25-3 IEBUPDTE utility program use 9-5 IEFBR14 program considerations when using 10-16 description 10-16 use in testing 10-16 IEHPROGM utility program use B-9 IF/THEN/ELSE/ENDIF statement construct example 10-4 level of evaluation job level 10-3 step level 10-3 to force step execution 10-4 use 10-1 with COND parameter 10-3
IN subparameter use 14-3, 14-4 in-stream See input stream in-stream procedures See procedure INCLUDE group specifying library containing 9-6 INCLUDE statement example 4-3 use 4-3 independent mode processor requesting 9-9 index area description A-1 identifying 12-3, 12-4 INDEX parameter use 12-3, 25-4 indexed sequential data set area arrangement A-4 creating A-1 description A-1, A-8 example A-7 identifying 12-3, 12-4 parameters for retrieval or extension A-6 retrieving A-5 specific track request 15-47 system assigned space request 15-46 when allocation error occurs A-4 indexing of sysout data set margin 25-4 input control task for entering jobs by copying input stream 6-2 example 6-3 by holding job entrance 6-1 example 6-2 use 6-2 by holding local input reader 6-2 example 6-2 chart 6-1 description 6-1, 6-4 from remote work station 6-3 input stream definition 2-12 description 3-1 device 2-12 example 2-12 identification of data set 12-5 integrity processing chart 13-3 definition 13-1 for other than permanent data set 13-3 for permanent data set 13-2 of data set 13-2 Interactive Storage Management Facility (ISMF) See ISMF interpretation punched sysout data set request 25-5
X-6
INTRDR subparameter use 24-5 invalid syntax scanning for 10-15 IORATE parameter use 11-3 ISMF (Interactive Storage Management Facility) use 13-6, 13-7, 15-2, 15-16, D-2
J
JCLLIB statement specifying library 9-6 for INCLUDE group 9-6 JCLTEST subparameter use 10-15 JESDS parameter use 7-6, 7-7 job background defining 7-4 batch defining 7-4 control 2-1 description 3-1 entering 2-4, 3-1 example 2-4 jobstep example 2-4 predecessor 5-4 processing 3-2 requesting resource 2-3 successor 5-4 termination when data set cannot be cataloged 17-4 job input control See input control task for entering jobs job log description 7-6 execution time messages in log 10-14 for communication from JCL to programmer 7-2 output class 7-6 printing 7-6 with sysout data set 7-7 JOBCAT catalog use 12-7 JOBLIB See library, private jobname to identify job 4-1 JOURNAL parameter in restart 5-2 JSTTEST subparameter use 10-15
keeping (continued) disposition for tape volume 17-11 key length See KEYLEN parameter key offset See KEYOFF parameter KEYLEN parameter use 13-6, D-3 KEYOFF parameter use 13-6, D-3
L
label data set for cataloged or passed data set 12-9 for nonspecific volume request 12-9 for specific volume request 12-9 use 12-8 LABEL parameter use 12-8, 17-10, A-3, B-6, B-9 library defining 9-1 private 5-1, 9-1 adding 9-2 concatenating 9-3 creating 9-2 JOBLIB statement 5-1, 9-1 retrieval 9-3 STEPLIB statement 5-1, 9-1 use 9-2 procedure 9-4 updating 9-5 use for procedure 3-1 residence for executable program 5-1 SYS1.IMAGELIB use 22-10 use in copy modification 25-3 system 5-1, 9-1 SYS1.LINKLIB 5-1, 9-1 use 9-1 temporary 5-1, 9-1 creating 9-4 use 9-4 licensed documents xvi LIKE parameter use 13-6, B-2, D-4 limit sysout output request 26-1 use 26-1 when exceeded 26-2 LINDEX parameter use 25-4 LINECT parameter use 25-1 linect subparameter use 25-1 LINES parameter to limit jobs output 7-3
Index
K
keeping data set request 17-3 when data set uncataloged 17-5
X-7
LINES parameter (continued) in APPC scheduling environment 7-3, 10-12 in non-APPC scheduling environment 7-4, 10-12 use 10-18, 26-1 lines subparameter use 26-1 location of data set on tape 12-10 log See also hard-copy log See job log log subparameter use 7-6 LOGOFF command use 6-4 LOGON command use 6-4 LookAt message retrieval tool xvi loop program stopping execution 10-14 LRECL parameter use 13-6, D-3 LREGION parameter use 9-8
mount (continued) volume (continued) premounting 15-50 MSGCLASS parameter controlling copied input stream 6-2 use 7-6, 7-7, 18-1, 22-5, 24-6 MSGLEVEL parameter use 7-6 use in controlling job log listing 7-2
N
naming data set 12-1 temporary data set 12-3 net See dependent job net node See remote node NOLOG parameter use 7-6 NOPWREAD subparameter use 14-2 Notices E-1 notification of TSO/E userid 7-4 NOTIFY JES2 statement See /*NOTIFY NOTIFY parameter use 7-5 null statement example 4-1 to identify job end 4-1 NULLFILE subparameter use 16-1 nullification of dummy data set 16-2 of dummy status for sysout data set
M
management class See also MGMTCLAS parameter description D-1 overriding attribute D-3 member in PDS 9-1 message during volume mounting 7-3 from system for job 7-6 when job exceeds output limit 7-3 MESSAGE JES2 statement See /*MESSAGE message retrieval tool, LookAt xvi MGMTCLAS parameter use 13-7, D-2 migration and backup D-3 description 13-7 with SMS 13-7 mode process requesting for sysout data set 22-7 model data set attributes summary for SMS-managed data set with SMS 13-6 modification for sysout data set 25-3 MODIFY parameter use 25-2 mount volume deferred 15-5 message control 7-3
22-9
O
ONLY subparameter example 10-12 to force step execution 10-6 operating system content 3-1 OPERATOR JES3 statement See //*OPERATOR ORG parameter use 24-1 OUT subparameter processing with 14-4 use 14-3 OUTDISP parameter of OUTPUT JCL statement to hold a sysout data set 22-7 to suppress output 22-9 OUTLIM parameter use 24-6, 26-1 output formatting chart 25-1
D-4
X-8
output formatting (continued) description 25-1, 26-1 of dump on 3800 Printing Subsystem 25-5 of dumps on 3800 Printing Subsystem example 25-5 to 3211 Printer with indexing feature 25-4 example 25-4 to 3800 Printing Subsystem 25-2 example 25-3 to any printer 25-1 example 25-2 to punch 25-4 example 25-5 OUTPUT JCL statement adding parameter 22-2 changing //*FORMAT statement 22-4 changing /*OUTPUT statement 22-4 references to multiple statements 22-2 use 22-2 output limiting chart 26-1 description 26-1, 26-3 example 26-2 in a non-APPC scheduling environment 26-2 in an APPC scheduling environment 26-1 messages when limit exceeded 7-3 request 26-1 terminating job when limit exceeded 10-12 use 26-1 when exceeded 26-2 OUTPUT parameter use 22-2 overflow area description A-1 identifying 12-3, 12-4 OVFLOW subparameter use 12-3
P
PAGEDEF parameter use 22-10 PAGES parameter to limit jobs output 7-3 in APPC scheduling environment 7-3, 10-12 in non-APPC scheduling environment 7-4, 10-12 use 10-18, 26-1 parallel mounting of volumes to request more than one device 15-6 PARM parameter use in communicating from JCL to program 7-2 values for IBM-supplied program 7-2 partition See spool partitions partitioned data set See PDS pass data set demounting of volume 17-12 disposition when data set unreceived 17-6
pass (continued) data set (continued) effect on volume retention 17-12 receiving passed data set 17-5 requesting 17-5 when step abnormally terminates during execution 17-6 PASSWORD parameter use 8-1, 14-2 passwords in protecting data set 14-2 PDS (partitioned data set) identifying 12-2, 12-4 member 12-2, 12-4 use as library 9-1 PDSE (partitioned data set extended) member 12-2, 12-4 PEND statement to identify procedure end 4-2 performance control task for processing jobs by I/O-to-processing ratio 11-3 example 11-3 by job class assignment by job class assignment 11-1 example 11-2 by selection priority 11-2 example 11-3 chart 11-1 description 11-1, 0-5 performance control task for requesting sysout resources by queue selection 21-1 example 21-1 chart 21-1 description 21-1 periodic execution 5-4 PIMSG parameter use 7-6 postponing specification of data set 16-2 prime area description A-1 identifying 12-3, 12-4 PRIME subparameter use 12-3 print controlling format 25-1 protecting printed output 20-1 sysout data set on same listing 22-5 scheduling 23-1 simultaneously on different printer 22-5 Print Services Facility See PSF printed output protection 20-1 priority aging 11-3 not useful in controlling execution order 6-2 selection 11-2
Index
X-9
priority (continued) for sysout data set 21-1 ignoring 21-1 use 11-2 PRIORITY JES2 statement See /*PRIORITY PROC parameter to execute procedure 5-2 use 9-5 PROC statement to identify procedure 4-2 procedure cataloged and in-stream description 3-1 execution 5-2 overriding DD statement 15-24, 15-28 testing 3-1 in private library 9-5 PROCESS JES3 statement See //*PROCESS processing nonstandard definition 10-17 use in testing 10-17 processing control task for processing jobs by conditional execution 10-1, 10-12 example when return codes tested 10-7 in APPC scheduling environment 10-13 in non-APPC scheduling environment 10-13 by timing execution 10-13 example 10-14, 10-15 chart 10-1 description 10-1, 10-18 for testing 10-15 by altering usual processing 10-15 by dumping after error 10-17 example when dumping 10-18 example when scanning JCL 10-16 example when using IEFBR14 10-16 example when using nonstandard processing 10-17 processing control task for requesting data set resources by postponing specification 16-2 example 16-3 by subsystem 16-4 example 16-4, 16-5 by suppressing processing 16-1 example 16-2 by TCAM job or task 16-5 example 16-5 chart 16-1 description 16-1, 17-1 with checkpointing 16-4 example 16-4 processing control task for requesting sysout resources by checkpointing 22-10 by external writer 22-6 example 22-6 by holding 22-7 example 22-8
processing control task for requesting sysout resources (continued) by mode 22-7 example 22-7 by PSF 22-10 example 22-10 by segmenting 22-4 by suppressing output 22-8 example 22-9 chart 22-1 description 22-1, 22-11 with additional parameter 22-2 with additional parameters example 22-2 with checkpointing example 22-10 with other data set 22-5 with other data sets example 22-5, 22-6 processor as output destination 24-5 selecting in JES2 9-9 selecting in JES3 9-10 selecting using a scheduling environment 9-8 PROCLIB parameter use 9-5 programmers name to identify 4-4 PROTECT parameter use 14-1 protection task for entering jobs chart 8-1 description 8-1, 9-1 through RACF 8-1 example 8-1 protection task for requesting data set resources by password 14-2 by passwords example 14-3 chart 14-1 description 14-1, 15-1 for ISO/ANSI/FIPS Version 3 tape 14-2 for ISO/ANSI/FIPS Version 3 tapes example 14-2 for SMS-managed data sets description 14-2 summary D-4 of access to BSAM and BDAM data set 14-3 of access to BSAM and BDAM data sets chart 14-3 example 14-4 through RACF 14-1 example 14-2 protection task for requesting sysout data set resources chart 20-1 description 20-1 example 20-1 with RACF 20-1 PRTY parameter use 11-2, 21-1
X-10
PSF (Print Services Facility) control 22-10 punch sysout data set formatting 25-4 interpretation 25-5 scheduling 23-1 PURGE JES2 statement See /*PURGE
Q
QNAME parameter use 12-10, 16-5
R
RACF (Resource Access Control Facility) data set protection 14-1 protecting printed output 20-1 protection through 8-1 with in-stream data set 12-5 with sysout data set 18-1 RD parameter in restart 5-2 reader input holding 6-2 internal as output destination 24-5 description 3-1 limiting record 24-6 message class 24-6 sending directly to JES 24-6 receive passed data set requesting 17-5 RECFM parameter use 13-6, D-3 record organization See RECORG parameter RECORG parameter use 13-6, D-3 REFDD parameter use 13-7, B-2, D-4 reference DD statement See REFDD parameter relative generation numbers definition B-1 release held sysout data set requesting 22-8 remote job entry See RJE remote job processing See RJP remote node execution 5-6 specifying as destination for sysout data set remote terminal use 6-3
24-1
remote work station use 6-3 requesting resources 3-5 for data set 2-3 task in job control 2-3 tasks 3-5 task chart 3-5 Resource Access Control Facility See RACF resource control task for entering jobs chart 9-1 description 9-1, 9-12 of address space 9-6 example 9-8 of INCLUDE group 9-6 of procedure library 9-4 example 9-5 of processor 9-8 example 9-10 of program library 9-1 creating and adding example 9-2 example of concatenating 9-4 example of retrieving 9-3 example of temporary 9-4 of spool partition 9-11 example 9-11 restart after abnormal termination 5-2 after JES2 system failure 5-3 after JES3 system failure 5-3 automatic checkpoint 5-2 automatic step 5-2 deferred checkpoint 5-2 deferred step 5-2 use 5-2 when job contains generation data set B-10 RESTART parameter in restart 5-2, 5-3 RETAIN subparameter use 17-11, 17-12 retention of tape volume demounting of volume 17-12 requesting 17-12 use 17-12 RETPD parameter use 13-6, 17-10 return code compatible test 10-2, 10-7 with COND parameter 10-7 with IF/THEN/ELSE/ENDIF statement construct 10-2 example 10-7 testing 10-2, 10-6 with COND parameter 10-6 with IF/THEN/ELSE/ENDIF statement construct 10-2 RJE (remote job entry) use 5-6, 6-3 RJP (remote job processing) output destination 24-5
Index
X-11
RJP (remote job processing) (continued) use 5-6, 6-4 ROUTE JES2 statement See /*ROUTE
S
SCAN JES2 statement See /*SCAN scanning syntax for error 6-2, 10-15 scheduling environment 9-8 SCHENV parameter of JOB statement 9-8 example 9-9 use 9-8 scratch disposition for tape volume 17-11 SECLABEL parameter use 8-1 SECMODEL parameter use 14-2, D-4 security model See SECMODEL parameter SEGMENT parameter of DD statement use 22-4 setup of devices altering 15-15 explicit 15-14 high watermark 15-13 in JES3 system 15-12 job 15-12 SETUP JES2 statement See /*SETUP SETUP parameter mount messages for volume 7-3 use 15-11 SIGNOFF JES statement See /*SIGNOFF SIGNON JES statement See /*SIGNON SMF (System Management Facilities) to establish exit routine when execution time exceeded 10-14 SMS (Storage Management Subsystem) description D-1 SMS-managed data set attribute description 13-6 construct D-1 creating a generation data set B-3 definition D-1 generation data set B-1, B-2 migration and backup 13-7, D-3 modeling attribute 13-6 multivolume data set 15-17 protection 14-2, D-4 retrieving a generation data set B-6 space allocation 15-42 specifying expiration date 17-10
SMS (Storage Management Subsystem) (continued) SMS-managed data set (continued) specifying retention period 17-10 specifying volume serial 15-16 unit allocation 15-2 volume allocation 15-16 with DATACLAS DD parameter 13-6 with DD VOLUME=REF subparameter 15-16 with VIO data set 15-48 specifying directory record 15-46 with temporary data set 12-3 with VSAM data set C-1 SNA/SDLC (systems network architecture synchronous data link control) use 6-3, 6-4 space allocation primary 15-44 secondary 15-45 releasing when unused 17-10 request block 15-43 cylinder 15-43 for indexed sequential data set 15-46 for PDS directory 15-45 record 15-43 specific track 15-47 system assignment 15-43 track 15-43 with user label 15-44, 15-47 SPACE parameter use 13-6, 15-42, 17-10, A-3, B-6, D-3 SPART parameter use 9-11 spinning off sysout data set request 23-1 use 23-1 spool partitions controlling allocation 9-11 stacking, data set 15-37 station See remote work station status of data set specifying 13-1 of device affect on allocation 15-3 step description 3-1 maximum number 3-2 STEPCAT catalog use 12-7 STEPLIB See library, private stepname to identify step 4-2 storage administrator D-1 central 9-6 region size 9-7
X-12
storage (continued) class overriding attribute D-3 summary D-1 logical 9-8 real 9-6 region size 9-7 requesting 9-7 virtual 9-6 region size 9-7 storage class See STORCLAS parameter Storage Management Subsystem (SMS) See SMS STORCLAS parameter use 15-2, 15-16, B-2, B-3, D-2 with temporary data set 12-3 SUBSYS parameter use 16-4 subsystem printing message 7-6 program control statement 16-4 request 16-4 suppression of sysout output request 22-8 using OUTPUT JCL statement 22-9 with started task 22-9 synchronous data link control See SNA/SDLC syntax scanning for error 6-2, 10-15 SYS1.LINKLIB See library, system SYS1.PROCLIB See catalog SYS1.PROCLIB system procedure library use for procedure 3-1 SYSABEND statement use 10-17 SYSAFF parameter use 9-9 SYSAREA parameter use 20-1 SYSCHK DD statement in restart 5-2 SYSCKEOV DD statement use 16-4 SYSMDUMP statement use 10-17 sysout data set printing with job log 7-7 SYSOUT parameter use 7-7, 18-1 System Management Facilities See SMF SYSTEM parameter use 9-10 system-generated qualified name for temporary data set 12-3
T
task chart 3-2 description 3-1 for entering jobs chart 3-3 for processing jobs chart 3-4 for requesting sysout data set resources chart 3-6 TCAM (telecommunications access method) message data set 12-10 processing of TCAM message data set 16-5 telecommunications access method See TCAM temporary data set 12-3 TERM parameter use 12-10, 24-7 terminal See also remote terminal as output destination 24-7 identifying data set 12-10 termination abnormal data set disposition 17-1 disposition of unreceived passed data set 17-6 effect on disposition 17-2 effect on passing of data set 17-6 execution time exceeded 10-14 forcing execution of later step 10-4, 10-6 output limit exceeded 10-12 normal data set disposition 17-1 restarting 5-2 when system cannot catalog data set 17-4 THRESHLD parameter use 22-5 time parameter use 10-15 TIME parameter use 10-14, 10-15 time sharing option See TSO TRC parameter use 25-2, 25-3 TSO/E (time sharing option) userid as output destination 24-5 notifying when job complete 7-4 RACF protection parameters from logon 8-1 TYPE parameter when requesting processor 9-10 TYPRUN parameter copying job 6-2 holding job 6-1 use 10-15
Index
X-13
U
UCS parameter use 25-1, 25-3 unallocation of data set, volume, and device 17-1 sysout data set 23-1 uncatalog data set generation data set B-9 request 17-5 unit See device UNIT parameter definition during system initialization 15-5 for output data set 15-5 relationship to VOLUME parameter 15-24, 15-28 use 15-2, A-2, A-6, B-6, B-8 when requesting processor 9-10 unreceived data set at abnormal termination 17-6 at end of job 17-7 disposition 17-6 UPDATE parameter in holding job 6-2 use 9-5 USER parameter use 8-1 use in identifying job with TSO/E userid 7-5
volume requests (continued) specific 15-18 allocation 15-18 label type 12-9 VSAM (virtual storage access method) data set creating C-1, C-4 description C-1, D-1 parameter C-1 parameters C-5 parameters to avoid C-6, C-7, C-8 retrieving C-1, C-4
W
WARNING subparameter to send warning message when job exceeds output limit 7-3, 7-4 use 26-2 work station See remote work station writer external for processing sysout data set 22-6 request 22-6 WRITER parameter use 22-6
X V
VIO (virtual input/output) backward reference 15-49 use 15-47 virtual input/output See VIO virtual storage access method See VSAM volume attribute affect on device allocation 15-34 assigning 15-19, 15-20 definition 15-17 permanently resident 15-18 private 15-17 public 15-17 removable 15-18 reserved 15-18 retention 17-12 storage 15-18 VOLUME parameter referencing in earlier DD statement 15-25, 15-28 relationship to UNIT parameter 15-24, 15-28 use 13-6, 15-16, 15-17, 15-18, 15-19, A-2, A-6, B-6, B-8, D-3 volume requests nonspecific 15-17, 15-19 allocation 15-19 label type 12-9 number per DD statement 15-23 XMIT JCL statement with JES3 5-7 5-7
X-14
Overall satisfaction
How satisfied are you that the information in this book is: Very Satisfied h h h h h h Satisfied h h h h h h Neutral h h h h h h Dissatisfied h h h h h h Very Dissatisfied h h h h h h
Accurate Complete Easy to find Easy to understand Well organized Applicable to your tasks
h Yes
h No
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you.
Address
___________________________________________________________________________________________________
Fold and _ _ _ _ _ _ _ _ _ _Fold and_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please _ _ _ _ _ staple _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Tape _ _ _ _ _ _ _ _ Tape _ _ _ _ do not _ _ _ _ NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES
IBM Corporation Department 55JA, Mail Station P384 2455 South Road Poughkeepsie, NY 12601-5400
_________________________________________________________________________________________ Please do not staple Fold and Tape Fold and Tape
SA22-7598-04
Printed in USA
SA22-7598-04