Front Cover Introduction To The New Mainframe: Z/OS Basics

Transcription

Front coverIntroduction to the NewMainframe:z/OS BasicsAn introduction to mainframecomputing on the IBM zSeries platformz/OS concepts and facilities forstudents and beginnerszSeries hardware andperipheral devicesMike EbbersWayne O’BrienBill Ogdenibm.com/

International Technical Support Organizationz/OS BasicsMarch 2005SG24-6366-00

Note: Before using this information and the product it supports, read the information in “Notices” onpage -1.First Edition (March 2005) Copyright International Business Machines Corporation 2005. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADPSchedule Contract with IBM Corp.

ContentsPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiHow this text is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiHow each chapter is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiiAcknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xixComments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiPart 1. Introduction to z/OS and the mainframe environmentChapter 1. Introduction to the new mainframe . . . . . . . . . . . . . . . . . . . . . 1-11.1 The new mainframe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21.2 Evolving architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21.3 Mainframes in our midst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41.4 What is a mainframe? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-51.5 Who uses mainframe computers?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71.6 Factors contributing to mainframe use . . . . . . . . . . . . . . . . . . . . . . . . . . 1-81.6.1 Reliability, availability, and serviceability. . . . . . . . . . . . . . . . . . . . . 1-91.6.2 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.6.3 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101.6.4 Continuing compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.7 Typical mainframe workloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111.7.1 Batch processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-121.7.2 Online transactional processing . . . . . . . . . . . . . . . . . . . . . . . . . . 1-151.8 Roles in the mainframe world . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-171.8.1 Who is the system programmer? . . . . . . . . . . . . . . . . . . . . . . . . . 1-191.8.2 Who is the system administrator? . . . . . . . . . . . . . . . . . . . . . . . . . 1-201.8.3 Who are the application designers and programmers? . . . . . . . . 1-211.8.4 Who is the system operator? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-211.8.5 Who is the production control analyst? . . . . . . . . . . . . . . . . . . . . . 1-221.8.6 What role do vendors play? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-221.9 z/OS and other mainframe operating systems . . . . . . . . . . . . . . . . . . . 1-231.9.1 z/VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-241.9.2 VSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-241.9.3 Linux for zSeries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-241.9.4 z/TPF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-251.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-261.11 Topics for further discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27Chapter 2. z/OS overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12.1 What is an operating system? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Copyright IBM Corp. 2005. All rights reserved.iii

2.2 What is z/OS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22.2.1 Hardware resources used by z/OS . . . . . . . . . . . . . . . . . . . . . . . . . 2-32.2.2 Modules and macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42.2.3 Program status word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-52.2.4 Multiprogramming and multiprocessing . . . . . . . . . . . . . . . . . . . . . 2-52.2.5 Control blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62.2.6 Physical storage used by z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62.3 Virtual storage and other mainframe concepts . . . . . . . . . . . . . . . . . . . . 2-72.3.1 What is virtual storage?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-72.3.2 What is an address space? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82.4 Virtual storage overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.4.1 What is paging? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92.4.2 What is a virtual storage address? . . . . . . . . . . . . . . . . . . . . . . . . 2-102.4.3 What is dynamic address translation? . . . . . . . . . . . . . . . . . . . . . 2-112.4.4 How does virtual storage work? . . . . . . . . . . . . . . . . . . . . . . . . . . 2-122.4.5 Frames, pages, and slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-132.4.6 Page stealing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-142.4.7 Swapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-142.4.8 A brief history of virtual storage and 64-bit addressability. . . . . . . 2-152.4.9 What’s in an address space? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-192.4.10 z/OS system address spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202.5 How peripheral storage is managed in z/OS. . . . . . . . . . . . . . . . . . . . . 2-212.6 Summary of z/OS facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-222.7 Defining characteristics of z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-232.8 Program products for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-242.9 Middleware for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-252.10 Interfaces for z/OS application programmers . . . . . . . . . . . . . . . . . . . 2-262.11 A brief comparison of z/OS and UNIX. . . . . . . . . . . . . . . . . . . . . . . . . 2-262.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-292.13 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-302.14 Topics for further discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31Chapter 3. TSO/E, ISPF, and UNIX: Interactive facilities of z/OS . . . . . . 3-13.1 How do we interact with z/OS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23.2 TSO overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23.2.1 Using TSO commands in native mode . . . . . . . . . . . . . . . . . . . . . . 3-33.2.2 Using CLISTs and REXX under TSO . . . . . . . . . . . . . . . . . . . . . . . 3-63.3 ISPF overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63.3.1 Keyboard mapping used in this course . . . . . . . . . . . . . . . . . . . . . 3-123.3.2 Using PF1-HELP and the ISPF tutorial . . . . . . . . . . . . . . . . . . . . . 3-133.3.3 Navigating through ISPF menus . . . . . . . . . . . . . . . . . . . . . . . . . . 3-143.3.4 Using the ISPF editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-173.3.5 Using the online help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18ivz/OS Basics

3.3.6 Customizing your ISPF settings . . . . . . . . . . . . . . . . . . . . . . . . . .3.3.7 Adding a GUI to ISPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4 z/OS UNIX interactive interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4.1 ISHELL command (ish) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4.2 ISHELL - user files and directories . . . . . . . . . . . . . . . . . . . . . . . .3.4.3 OMVS command shell session . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4.4 Direct login to the shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.6 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.7 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.7.1 Logging on to z/OS and entering TSO commands . . . . . . . . . . . .3.7.2 Navigating through the ISPF menu options . . . . . . . . . . . . . . . . .3.7.3 Using the ISPF editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.7.4 Using SDSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.7.5 Opening the z/OS UNIX shell and entering commands . . . . . . . .3.7.6 Using the OEDIT and OBROWSE commands . . . . . . . . . . . . . . -333-343-353-35Chapter 4. Working with data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14.1 What is a data set? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24.2 How is data stored?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24.3 How is data managed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24.3.1 What is system-managed storage?. . . . . . . . . . . . . . . . . . . . . . . . . 4-34.4 What are access methods?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44.5 How are DASD volumes used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44.5.1 DASD terminology for UNIX and PC users . . . . . . . . . . . . . . . . . . . 4-54.5.2 What are DASD labels? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-54.6 Allocating a data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-54.7 Allocating space on DASD volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-64.7.1 Logical records and blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-64.7.2 Data set extents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74.8 Data set record formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74.9 Types of data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-94.9.1 What is a sequential data set? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-94.9.2 What is a PDS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-104.9.3 What is a PDSE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-114.10 What is VSAM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-134.11 How data sets are named . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-154.12 Catalogs and VTOCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-164.12.1 What is a VTOC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-164.12.2 What is a catalog?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-174.13 z/OS UNIX file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-214.13.1 z/OS data sets versus file system files . . . . . . . . . . . . . . . . . . . . 4-224.14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23Contentsv

4.15 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.16 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.16.1 Exploring ISPF Option 3.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.16.2 Allocating a data set with ISPF 3.2 . . . . . . . . . . . . . . . . . . . . . . .4.16.3 Copying a source library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.16.4 Working with data set members . . . . . . . . . . . . . . . . . . . . . . . . .4.16.5 Listing a data set (and other ISPF 3.4 options) . . . . . . . . . . . . . .4.16.6 Performing a catalog search . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-254-254-264-274-284-284-294-30Chapter 5. Batch processing and JES. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15.1 What is batch processing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25.2 What is JES?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25.3 What an initiator does . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45.4 Why z/OS uses symbolic file references . . . . . . . . . . . . . . . . . . . . . . . . . 5-55.5 Job and output management with JES . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65.5.1 Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65.5.2 Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-115.6 Job flow through the system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-135.7 JES2 compared to JES3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-165.8 What is Workload Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-165.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-175.10 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18Chapter 6. Using JCL and SDSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16.1 What is JCL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26.2 JOB, EXEC, and DD operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46.2.1 JOB operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46.2.2 EXEC operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46.2.3 DD operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56.3 Data set disposition, DISP operand . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56.3.1 Creating new data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-66.4 Continuation and concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-86.5 Reserved DDNAMES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-96.6 JCL procedures (PROCs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-96.6.1 JCL PROC statement override . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-106.6.2 How is a job submitted for batch processing?. . . . . . . . . . . . . . . . 6-116.7 Using SDSF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-126.8 Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-156.9 System libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-156.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-166.11 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.12 Topics for further discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-176.13 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18viz/OS Basics

6.13.1 Creating a simple job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.2 Using ISPF in split screen mode . . . . . . . . . . . . . . . . . . . . . . . . .6.13.3 Submitting a job and checking the results. . . . . . . . . . . . . . . . . .6.13.4 Creating a PDS member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.5 Copying a PDS member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.6 Learning about system volumes . . . . . . . . . . . . . . . . . . . . . . . . .6.13.7 Using the PA1 key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.8 Using a utility program in a job . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.9 Examining the TSO logon JCL . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.10 Exploring the master catalog. . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.11 Using SDSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.13.12 Checking job status with SDSF. . . . . . . . . . . . . . . . . . . . . . . . .6.14 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.15 Topics for further discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -266-27Part 2. Application programming on z/OSChapter 7. Designing and developing applications for z/OS . . . . . . . . . 7-17.1 Application designers and programmers. . . . . . . . . . . . . . . . . . . . . . . . . 7-27.2 Designing an application for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-37.2.1 Designing for z/OS: Batch or online? . . . . . . . . . . . . . . . . . . . . . . . 7-37.2.2 Designing for z/OS: Data sources and access methods . . . . . . . . . 7-47.2.3 Designing for z/OS: Integrating a multi-tiered application . . . . . . . . 7-47.2.4 Designing for z/OS: Exception handling . . . . . . . . . . . . . . . . . . . . . 7-47.2.5 Designing for z/OS: Availability and workload requirements. . . . . . 7-57.3 Application development life cycle: An overview . . . . . . . . . . . . . . . . . . . 7-57.3.1 Gathering requirements for the design . . . . . . . . . . . . . . . . . . . . . . 7-97.4 Developing an application on the mainframe . . . . . . . . . . . . . . . . . . . . 7-107.4.1 Using application development tools. . . . . . . . . . . . . . . . . . . . . . . 7-117.4.2 Conducting a debugging session . . . . . . . . . . . . . . . . . . . . . . . . . 7-127.4.3 Performing a system test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-137.5 Going into production on the mainframe . . . . . . . . . . . . . . . . . . . . . . . . 7-147.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-157.7 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16Chapter 8. Using programming languages on z/OS. . . . . . . . . . . . . . . . . 8-18.1 Overview of programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-28.2 Choosing a programming language for z/OS . . . . . . . . . . . . . . . . . . . . . 8-38.3 Using Assembler language on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-48.4 Using COBOL on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-68.4.1 COBOL relationship between JCL and program files . . . . . . . . . . . 8-98.4.2 HLL relationship between JCL and program files . . . . . . . . . . . . . 8-118.5 Using PL/I on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-128.6 Using C/C on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15Contentsvii

8.7 Using Java on z/OS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.7.1 Interfacing with Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.8 Using CLISTs on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.9 Using REXX on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.10 Compiled versus interpreted languages . . . . . . . . . . . . . . . . . . . . . . .8.10.1 Advantages of compiled languages . . . . . . . . . . . . . . . . . . . . . .8.10.2 Advantages of interpreted languages . . . . . . . . . . . . . . . . . . . . .8.11 Overview of Language Environment . . . . . . . . . . . . . . . . . . . . . . . . . .8.11.1 How is Language Environment used? . . . . . . . . . . . . . . . . . . . .8.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.13 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8.14 Topics for further discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . hapter 9. Compiling and link-editing a program on z/OS . . . . . . . . . . . 9-19.1 Source, object, and load modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29.2 What are source libraries? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29.3 Compiling programs on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-39.3.1 What is a pre-compiler? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-49.3.2 Compiling with cataloged procedures . . . . . . . . . . . . . . . . . . . . . . . 9-49.3.3 Compiling object-oriented (OO) applications . . . . . . . . . . . . . . . . 9-129.3.4 What are object modules? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-139.3.5 What is an object library? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-139.3.6 How does program management work? . . . . . . . . . . . . . . . . . . . . 9-149.3.7 How is a linkage editor used? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-159.3.8 How a load module is created . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-169.4 Creating load modules for executable programs. . . . . . . . . . . . . . . . . . 9-209.4.1 Batch loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-209.4.2 Program management loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-219.4.3 What is a load library?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-229.5 Overview of compilation to execution . . . . . . . . . . . . . . . . . . . . . . . . . . 9-239.6 Using procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-249.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-259.8 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-269.9 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-279.9.1 Exercise: compiling and linking a program . . . . . . . . . . . . . . . . . . 9-279.9.2 Exercise: executing a program . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29Part 3. Online workloads for z/OSChapter 10. Overview of z/OS online workloads . . . . . . . . . . . . . . . . . .10.1 Online processing on the mainframe. . . . . . . . . . . . . . . . . . . . . . . . . .10.2 Example of global online processing--the new big picture . . . . . . . . .10.3 Transactional systems for the mainframe . . . . . . . . . . . . . . . . . . . . . .10.3.1 What are transaction programs? . . . . . . . . . . . . . . . . . . . . . . . . .viiiz/OS Basics10-110-210-210-410-4

10.3.2 What is a transactional system? . . . . . . . . . . . . . . . . . . . . . . . . . 10-410.3.3 What are the typical requirements of a transactional system? . . 10-610.3.4 What is commit and roll back? . . . . . . . . . . . . . . . . . . . . . . . . . . 10-610.4 Database management systems for the mainframe . . . . . . . . . . . . . . 10-910.4.1 What is a database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-910.4.2 Why use a database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1010.4.3 What is the role of the database administrator? . . . . . . . . . . . . 10-1210.4.4 How is a database designed? . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1210.4.5 What is a database management system? . . . . . . . . . . . . . . . . 10-1510.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1810.6 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1810.7 Exercises. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Chapter 11. Understanding Transaction Managers on z/OS . . . . . . . . . 11-111.1 What is CICS?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-211.1.1 CICS in a z/OS system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-211.1.2 CICS programs, transactions and tasks . . . . . . . . . . . . . . . . . . . 11-311.1.3 Using programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . 11-411.1.4 CICS programming roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-511.1.5 Conversational and pseudo-conversational programming . . . . . 11-511.1.6 CICS programming commands . . . . . . . . . . . . . . . . . . . . . . . . . . 11-711.1.7 How a CICS transaction flows. . . . . . . . . . . . . . . . . . . . . . . . . . . 11-811.1.8 CICS services for application programs . . . . . . . . . . . . . . . . . . 11-1111.1.9 Program control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1311.1.10 Our online example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1511.2 What is IMS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1611.2.1 IMS in a z/OS system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1711.2.2 IMS Transaction Manager messages . . . . . . . . . . . . . . . . . . . . 11-1811.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1911.4 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2011.5 Exercise 1: Create a CICS program . . . . . . . . . . . . . . . . . . . . . . . . . 11-20Chapter 12. Understanding Database Managers on z/OS . . . . . . . . . . . 12-112.1 What is DB2? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-212.1.1 Data structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-212.1.2 Schema structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-312.1.3 Using SQL on z/OS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-512.1.4 Application programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1212.1.5 Database administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1612.2 Functions of the IMS Database Manager . . . . . . . . . . . . . . . . . . . . . 12-1712.3 Structure of the IMS Database subsystem . . . . . . . . . . . . . . . . . . . . 12-1812.3.1 The IMS hierarchical database model. . . . . . . . . . . . . . . . . . . . 12-19Contentsix

12.3.2 IMS use of z/OS services . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.3.3 Evolution of IMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.3.4 Our online example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.5 Questions for review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.6 Exercise 1 -- Use SPUFI in a COBOL program . . . . . . . . . . . . . . . .12.6.1 Step 1: Create files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.6.2 Step 2: DCLGEN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.6.3 Step 3: Test your SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12.6.4 Step 4: Create the program. . . . . . . . . . . . . . . . . . . . . . . . . . . .12.6.5 Step 5: Complete the program . . . . . . . . . . . . . . . . . . . . . . . . .12.6.6 Step 6: Run the program from TSO . . . . . . . . . . . . . . . . . . . . 712-2712-27Chapter 13. z/OS HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13.1 Introduction to Web-based workloads on z/OS . . . . . . . . . . . . . . . . . .13.2 What is z/OS HTTP Server? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13.2.1 Serving static Web pages on z/OS . . . . . . . . . . . . . . . . . . . . . . .13.2.2 Serving dynamic Web pages on z/OS . . . . . . . . . . .

z/OS Basics Mike Ebbers Wayne O'Brien Bill Ogden An introduction to mainframe computing on the IBM zSeries platform z/OS concepts and facilities for students and beginners zSeries hardware and peripheral devices Front cover. z/OS Basics March 2005 International Technical Support Organization