ibm introducción a mainframe
DESCRIPTION
Las presentaciones de IBM para el estudio de los conceptos básicos de mainframeTRANSCRIPT
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 1: The new mainframe
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 1 objectivesBe able to:•List ways in which the mainframe of today challenges the traditional thinking on centralized computing versus distributed computing•Explain how businesses make use of mainframe processing power, the typical uses of mainframes, and how mainframe computing differs from other forms of computing•Outline the major types of workloads for which mainframes are best-suited•Name five jobs or responsibilities related to mainframe computing•List four mainframe operating systems.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter•application programmer•architecture•batch processing•compatibility•e-Business•EBCDIC•high availability•infrastructure•mainframe•online processing
•platform•production control•punched card•RAS•scalability•server farm•system administrator•system operator•system programmer•transaction processing
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Evolving architecture
1964 1970 1980 1990 2000 2004
S/360 S/370 S/370XA – 31 bits ESA/390 z/Architecture – 64 bits
MVT, PCPMFT MVS - VTAM
VM
MVS/XA MVS/ESA OS/390
z/OS
DB2z/VM
LinuxCICS
HW
SW
USS -
TCP/IP
WebSphere
CMOS –
Parallel Sysplex
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Mainframes in our midstMainframes:• Are prevalent, yet hidden from public eye• Not often publicized – stable, reliable, dependable.• Contrast with other forms of computing, such as PCs.• Present opportunities for college graduates in a variety
of technical fields.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is a mainframe?
A mainframe is a computing system that businesses use to host the commercial databases, transaction servers, and applications that require a greater degree of security and availability than is commonly found on smaller-scale machines.
The power of a mainframe provides computing speed and capacity, enabling it to perform high volumes of processing.
The mainframe can process a mixed workload of jobs from different time zones and of different types.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Mainframe facts
Who uses mainframes?• Most Fortune 1000 companies use a mainframe environment • 60% of all data available on the Internet is stored on mainframe
computersWhy mainframes?
• Large-scale transaction processing • Thousands of transactions per second
• Support thousands of users and application programs • Simultaneously accessing resources• Terabytes of information in databases• Large-bandwidth communications
There are more CICS transactions processed daily than Web pages served
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Factors contributing to mainframe use
RAS -- reliability, availability, serviceabilitySecurity ScalabilityCentralized controlWorkload managementPartitioning / virtualizationContinuing compatibilityEvolving architectureApplication enablement, complexity, varietyPotential for thousands of users
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Typical mainframe workloads
Batch job
Application Program
Output Data
Application Program
InputData
Process data to perform a
particular task
Online (real time) transaction
Query
Reply
Access shared data on behalf of
online user
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Typical batch use
Disk Storagedatabases
Tape StorageSequential
data sets
Partners and clients exchange
information Reports
Backups
Data update
Reports
Statistics, summaries, exceptions
Residence Main office
Branch offices Account balances bills, etc
Processingreports
MainframeProcessing batch jobs
44
55Reports
22
1010
11
88
66
33
CREDIT CARD
1234 5678 90121234 5678 9012VALID FROM GOOD THRU
XX/XX/XX XX/XX/XXPAUL FISCHERXX/XX/XX XX/XX/XXPAUL FISCHER
77
99
SystemOperator
ProductionControl
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Typical online use
Disk storage
controllerStores
database files
queries and
updates
Account activities
Officeautomation
systems
MainframeAccessesdatabase
Requests
ATMs
Branchoffices
Business analysts Inventory control
Branch office automation systems
SNA or TCP/IPnetwork
55
66
3322
4411
Central office
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Roles in the mainframe world
Operator
Production Control Analyst
System AdministratorSystem Programmer
End User
ApplicationDeveloper
RolesRoles
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Mainframe operating systemsz/OSz/VMVSELinux for zSeriesz/TPF
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
The New Mainframe:
Plays a central role in the daily operations of the world’s largest organizations – and the daily lives of most people.
Is known for its reliability, security, and enormous processing capabilities.
Is designed for processing large scale workloads and serving thousands of users and transactions concurrently.
Is managed by highly skilled technical support staff.Runs a variety of operating systems.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 2: z/OS Overview
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 2 objectivesBe able to:•Give examples of how z/OS differs from a single-user operating system.•List the major types of storage used by z/OS.•Explain the concept of virtual storage and its use in z/OS.•State the relationship between pages, frames, and slots.•List several defining characteristics of the z/OS operating system.•List several software products used with z/OS to provide a complete system.•Describe several differences and similarities between the z/OS and UNIX operating systems.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
address spaceaddressabilityauxiliary storagedynamic address translation (DAT)frameinput/output (I/O)middlewaremultiprocessing
multiprogrammingpage / pagingpage data setprogram productreal storageslotswap data setUNIXvirtual storagez/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is z/OS?
The most widely used mainframe operating system
64-bit operating system
Ideally suited for processing large workloads for many concurrent users
Designed for:• Serving 1000s of users concurrently• I/O intensive computing • Processing very large workloads• Running mission critical applications securely
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Hardware resources managed by z/OS
System Console(hardware)
Master Console(z/OS)
Operator Console(z/OS)
Mainframe computer(CPU, processor
storage)
z/OS running here...
Disk storage (DASD volumes)
DASD controller
Tape drive
Tape cartridges
... Director links mainframes with DASD controllers
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Overview of z/OS internals
Comprised of modules, system programs (macros), system components
Use of the program status word (PSW)
Techniques of multiprogramming and multiprocessing
Information about the system, resources, and tasks is contained in control blocks
Management of physical storage:• Real storage• Auxiliary storage • Virtual storage
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Virtual storage concepts
Virtual storage is an “illusion” created through z/OS management of real storage and auxiliary storage through tables.
The running portions of a program are kept in real storage; the rest is kept in auxiliary storage
Range of addressable virtual storage available to a user or program or the operating system is an address space
Each user or separately running program is represented by an address space (each user gets a limited amount of private storage)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
The address space concept
16 EB
64-bit addresing(z/OS)
The “Bar” 2GB
31-bit addresing(MVS/XA)
16 MBThe “Line” 24-bit addresing
(MVS)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How virtual storage works
• Virtual storage is divided into 4-kilobyte pages• Transfer of pages between auxiliary storage and real storage is
called paging• When a requested address is not in real storage, an interruption is
signaled and the system brings the required page into real storage• z/OS uses tables to keep track of pages• Dynamic address translation (DAT)• Frames, pages, slots are all repositories for a page of information
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How virtual storage works (continued…)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Pages, Frames, and Slots
The pieces of a program executing in virtual storage must be movedbetween real and auxiliary storage:• A block of real storage is a frame.• A block of virtual storage is a page. • A block of auxiliary storage is a slot.
A page, a frame, and a slot are all the same size: 4096 bytes (4kilobytes).
To the programmer, the entire program appears to occupy contiguousspace in real storage at all times.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Pages, Frames, and Slots (continued)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Page Stealingz/OS tries to keep an adequate supply of available real storage frames
on hand.
When this supply becomes low, z/OS uses page stealing to replenish it.
Pages that have not been accessed for a relatively long time are good candidates for page stealing.
z/OS also uses various storage managers to keep track of all pages, frames, and slots in the system.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SwappingSwapping is one of several methods that z/OS uses to balance the
system workload and ensure that an adequate supply of available real storage frames is maintained.
Swapping has the effect of moving an entire address space into, or out of, real storage:
• A swapped-in address space is active, having pages in real storage frames and pages in auxiliary storage slots.
• A swapped-out address space is inactive; the address space resides on auxiliary storage and cannot execute until it is swapped in.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Brief history of z/OS addressability
1970: System/370 defined storage addresses as 24 bits in length.
1983: System/370-XA extended the addressability of the architecture to 31 bits.
2000: z/Architecture extended the addressability to 64 bits.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Addressing value of a byte
Bits 0 0 0 0 0 0 0 0
Bit count 1 2 3 4 5 6 7 8
Bit value 128 64 32 16 8 4 2 1 (binary, power of 2)
In summary:One byte can address 256 locationsThree bytes can address 16 million locations
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Brief history of z/OS addressability (continued…)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What’s in an address space?z/OS provides each user with a unique address space and maintains
the distinction between the programs and data belonging to each address space.
Because it maps all of the available addresses, however, an address space includes system code and data as well as user code and data. Thus, not all of the mapped addresses are available for user code and data.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
64-bit address space map
16 megabyte The “Line”
The “Bar” 2 gigabytes
2 terabytes
512 terabytes
16 exabytes
0User Private Area
Common Area
User ExtendedPrivate Area
Shared Area
User ExtendedPrivate Area
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS address spaces
z/OS and its related subsystems require address spaces of their own to provide a functioning operating system:
• System address spaces are started after initialization of the master scheduler. These address spaces perform functions for all the other types of address spaces that start in z/OS.
• Subsystem address spaces for major system functions and middleware products such as DB2, CICS, and IMS.
• TSO/E address spaces are created for every user who logs on to z/OS• Address spaces for every batch job that runs on z/OS.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How is peripheral storage managed?
Management of peripheral storage devices involves file allocation, placement, monitoring, migration, backup, recall, recovery, and deletion.
A typical z/OS production system includes both manual and automated processes for managing storage.
A user or program can directly control many aspects of z/OS storage use.
The primary means of managing storage in z/OS is through DFSMS.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary of z/OS facilities
• Address spaces and virtual storage for users and programs. • Physical storage types available: real and auxiliary. • Movement of programs and data between real storage and
auxiliary storage through paging. • Dispatching work for execution, based on priority and ability
to execute. • An extensive set of facilities for managing files stored on disk
or tape. Operators use consoles to start and stop z/OS, enter commands, and manage the operating system.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary of z/OS facilities (continued…)
Address spaces
Physical storage
Paging
Operator communication
Reliability, availability, and serviceability
Data integrity
REALAUX
REALAUX
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Defining characteristics of z/OS
• Uses address spaces to ensure isolation of private areas • Ensures data integrity, regardless of how large the user population
might be. • Can process a large number of concurrent batch jobs, with
automatic workload balancing • Allows security to be incorporated into applications, resources, and
user profiles.• Allows multiple communications subsystems at the same time• Provides extensive recovery, making unplanned system restarts very
rare. • Can manage mixed workloads• Can manage large I/O configurations of 1000s of disk drives,
automated tape libraries, large printers, networks of terminals, etc. • Can be controlled from one or more operator terminals, or from
application programming interfaces (APIs) that allow automation of routine operator functions.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Program products for z/OS
A z/OS system usually contains additional programproducts (priced software) that are needed to create apractical working system:• security manager
• database manager
• compilers
• utility programs
• vendor products
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Middleware for z/OS
Middleware is typically something between the operating system and an enduser or end-user applications.
Middleware supplies major functions not provided by the operating system.
Typical z/OS middleware includes:• Database systems• Web servers• Message queuing and routing functions• Transaction managers• Java virtual machines• XML processing functions
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
A brief comparison of z/OS and UNIX…
Quite a few concepts are common to both:• Boot the system versus IPL the system
• Files versus data sets
• Editors vi, ed, sed, and emacs (UNIX) versus ISPF (z/OS)
• telnet or rlogin (UNIX) versus TSO logon (z/OS)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
• z/OS, the most widely used mainframe operating system, is ideally suited for processing large workloads for many concurrent users.
• Virtual storage is an illusion created by the architecture, in that the system seems to have more storage than it really has.
• Each user of z/OS gets an address space containing the same rangeof storage addresses.
• z/OS is structured around address spaces, which are ranges ofaddresses in virtual storage.
• Production systems usually include add-on products for middlewareand other functions.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 3: Interactive facilities of z/OS: TSO/E, ISPF, and UNIX
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 3 objectives
Be able to:
• Log on to z/OS• Run programs from the TSO READY prompt• Navigate through the menu options of ISPF• Use the ISPF editor to make changes to a file• Use the UNIX interfaces on z/OS, including the z/OS UNIX command shell.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
• 3270 and 3270 emulator• CLIST• ISHELL• ISPF• logon• native mode
• OMVS command• path • READY prompt• Restructured Extended Executor (REXX)• shell• Time Sharing Option / Extensions (TSO/E)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How do we interact with z/OS?
TSO/EAllows users to logon to z/OS and use a limited set of basic commands. This is sometimes called using TSO in its native mode.
ISPFProvides a menu system for accessing many of the most commonly used z/OS functions.
z/OS UNIX shell and utilitiesAllows users to write and invoke shell scripts and utilities, and use the shell programming language.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TSO overview
TSO/E • Acronym for Time Sharing Option/Extensions (TSO/E) • Allows users to create an interactive session with z/OS• Provides a single-user logon capability and a basic
command prompt interface to z/OS • Most users work with TSO through its menu-driven
interface, Interactive System Productivity Facility (ISPF)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TSO overview (continued)
In a z/OS system, each user gets a user ID and a password authorized for TSO logon.
During TSO logon, the system displays the TSO logon screen on the user’s 3270 display device or TN3270 emulator.
z/OS system programmers modify the layout and text of the TSO logon panel to better suit the needs of the system’s users.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TSO/E logon screen------------------------------- TSO/E LOGON -----------------------------------
Enter LOGON parameters below: RACF LOGON parameters:
Userid ===> ZPROF
Password ===> New Password ===>
Procedure ===> IKJACCNT Group Ident ===>
Acct Nmbr ===> ACCNT#
Size ===> 860000
Perform ===>
Command ===>
Enter an 'S' before each option desired below: -Nomail -Nonotice -Reconnect -OIDcard
PF1/PF13 ==> Help PF3/PF15 ==> Logoff PA1 ==> Attention PA2 ==> ReshowYou may request specific help information by entering a '?' in any entry field
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using TSO commands in native mode
• Usually, ISPF provides the interface for TSO. • However, TSO includes a limited set of basic commands
independent of ISPF and other programs. • Using TSO in this way is called using TSO in its native mode.
When you logon to TSO, the z/OS system responds by displaying the READY prompt, and waits for input (similar to a DOS prompt).
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TSO Ready Prompt
Cursor, where you enter commandsTSO is ready to accept commands
12
3
1 - You enter a command (like a DOS prompt)2 - TSO displays the command output and3 - TSO is ready to accept new commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using CLISTs under native TSO
Place a command list or CLIST (“see list”) in a file and execute the list as if it were a single command.
A CLIST issues the commands in sequence.
CLISTs are used for performing routine tasks and working more efficiently with TSO.
TSO users create CLISTs with the CLIST command language.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CLISTs versus REXX
• REXX is Restructured Extended Executor language, a command language used with TSO
• Both CLISTs and REXX offer shell script-type processing.
• Both are interpretive languages, not compiled languages (although REXX can be compiled as well).
• Some z/OS users write functions directly as CLISTs or REXX programs
• CLIST programming is unique to z/OS, while the REXX language is used on many platforms.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ISPF overview
Acronym for Interactive System Productivity Facility
ISPF is a menu-driven interface for user interaction with z/OS system. The ISPF environment is executed from native TSO.
ISPF provides utilities, an editor and ISPF applications to the user. To the extent permitted by various security controls an ISPF user has full access to most z/OS system functions.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using ISPF allocate screenMenu RefList Utilities Help
Allocate New Data Set Command ===>
Data Set Name . . . : ZSCHOL.TEST.CNTL
Management class . . . (Blank for default management class) Storage class . . . . (Blank for default storage class) Volume serial . . . . EBBER1 (Blank for system default volume) ** Device type . . . . . (Generic unit or device address) ** Data class . . . . . . (Blank for default data class) Space units . . . . . TRACK (BLKS, TRKS, CYLS, KB, MB, BYTES
or RECORDS) Average record unit (M, K, or U) Primary quantity . . 2 (In above units) Secondary quantity 1 (In above units) Directory blocks . . 0 (Zero for sequential data set) * Record format . . . . FB Record length . . . . 80 Block size . . . . . 27920 Data set name type : (LIBRARY, HFS, PDS, or blank) *
(YY/MM/DD, YYYY/MM/DD
F1=Help F2=Split F3=Exit F7=Backward F8=Forward F9=Swap F10=Actions F12=Cancel
.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Navigating through ISPF menus
To access ISPF under TSO, the user enters a command from the READY prompt to display the ISPF Primary Option Menu.
You can access online help from any of the ISPF panels (press the PF1 key)
ISPF includes a text editor and browser, and functions for locating files and performing other utility functions.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ISPF Menu Structure
Copy/Move
C Copy M Mo CP Cop MP
____Group ____Type ____
0 Settings1 Browse2 Edit3 Utilities4 DS List5 ...
Primary option menu
/ Cursor at .._ ..._ ..._ ...
Settings View Edit1 Dataset2 Library3 Copy/Move4 DS List
Utilities Dialog TestProj ____Group ____Type ____
Other Dsn__
Proj ____Group ____Type ____
Other Dsn__
1 ......2 ......3 ......4 ......
****************0 //JOB1 JOB 0 //S1 EXEC0 //DD1 DD0 ..0 ..***************
Edit
____Group ____Type ____
Library
b Display D Delete Proj ______Group ____Type ____
Dataset
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
General structure of ISPF panelsAction
Bar
Panel Options
Command Line
Function Keys
Dynamic StatusArea
Menu Utilities Compilers Options Status Help --------------------------------------------------------------------------- ISPF Primary Option Menu 0 Settings Terminal and user parameters User ID . : AUES100 1 View Display source data or listings Time. . . : 16:14 2 Edit Create or change source data Terminal. : 3278 3 Utilities Perform utility functions Screen. . : 1 4 Foreground Interactive language processing Language. : ENGLISH 5 Batch Submit job for language processing Appl ID . : ISR 6 Command Enter TSO or Workstation commands TSO logon : LOGON 7 Dialog Test Perform dialog testing TSO prefix: AUES100 8 LM Facility Library administrator functions System ID : SYS1 9 IBM Products IBM program development products MVS acct. : ACCNT# 10 SCLM SW Configuration Library Manager Release . : ISPF 5.2 11 Workplace ISPF Object/Action Workplace S SDSF System Display and Search Facility Enter X to Terminate using log/list defaults
Option ===> F1=Help F2=Split F3=Exit F7=Backward F8=Forward F9=Swap F10=Actions F12=Cancel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Common functions provided in ISPF menus…
Menu Utilities Compilers Options Status Help ---------------------------------------------------------
Action Bar
0 Settings Terminal and user parameters 1 View Display source data or listings 2 Edit Create or change source data 3 Utilities Perform utility functions .
Point-and-Shoot
Option Number 0 Settings Terminal and user parameters 1 View Display source data or listings 2 Edit Create or change source data 3 Utilities Perform utility functions . . Options ===> 3
Function KeysF1=Help F3=Exit F7=Bkwd F8=Fwd F10=Actions F11=Retrieve F12=Cancel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Keyboard mapping:Function KeyEnter Ctrl (right side)Exit, end, or return PF3Help PF1PA1 or Attention Alt-Ins or EscPA2 Alt-HomeCursor movement Tab or EnterClear PausePage up PF7Page down PF8Scroll left PF10Scroll right PF11Reset locked keyboard Ctrl (left side)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ISPF Edit Panel - some line commands
Command DescriptionI Insert linesD Delete linesR Repeat linesC Copy linesM Move linesA After lineB Before line( Shift right columns
< Shift right data) Shift left columns
> Shift left dataX Exclude lines
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ISPF Edit Panel - Inserting lines
Screen 2
Screen 1
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS UNIX interactive interfaces
Like TSO and ISPF, the z/OS UNIX shell and utilities provide an interactive interface to z/OS.
Use the UNIX shell to: • Invoke shell scripts and utilities • Write shell scripts (a list of shell commands created with the
shell programming language) • Run shell scripts and C language programs interactively.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoking the UNIX shell
You can invoke the UNIX shell in any of these ways: • From a 3270 display or a workstation running a 3270
emulator• From a TCP/IP-attached terminal, using the rlogin and
telnet commands• From TSO by entering the OMVS command or the
ISHELL command.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TSO commands used with z/OS UNIX ISHELL -- This command invokes the ISPF shell.
• Intended for users more familiar with TSO/ISPF than UNIX• Provides panels for working with UNIX files, mounting and unmounting file
systems, and z/OS UNIX administration.• z/OS programmers can do much of their work under ISHELL.
OMVS -- This command invokes the z/OS UNIX shell.
• Intended for users more familiar with UNIX than TSO/ISPF • Allows the user to alternate between the shell and TSO • UNIX programmers should find the z/OS UNIX shell programming
environment familiar.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ISHELL command (ish)
A good starting point for TSO/ISPF users who want to use z/OS UNIX.Under ISHELL, you can use action codes to:
• b Browse a file or directory• e Edit a file or directory• d Delete a file or directory• r Rename a file or directory• a Show the attributes of a file or directory• c Copy a file or directory
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
OMVS command shell sessionYou use the OMVS command to invoke the z/OS UNIX shell.
Under the UNIX shell, users can:• Invoke shell commands or utilities that request services from the
system.• Write shell scripts using the shell programming language. • Run shell scripts and C-language programs interactively (in the
foreground), in the background, or in batch.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Direct login to the shell
rlogin• When the inetd daemon is active, you can rlogin to the shell from
a workstation. To log in, use the rlogin (remote log in) command syntax supported at your site.
telnet• Also uses the inetd daemon• inetd must be active and set up to recognize and receive the
incoming telnet requests.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
TSO allows users to logon to z/OS and use a limited set of basic commands in native mode.
ISPF is a menu-driven interface for user interaction with z/OS.
ISPF provides utilities, an editor and ISPF applications to theuser. To the extent permitted by various security controls anISPF user has full access to most z/OS system functions.
TSO ISPF should be viewed as a system management interfaceand a development interface for traditional z/OSprogramming.
The z/OS UNIX shell and utilities provide a command interfaceto the z/OS UNIX environment. You can access the shelleither by logging on to TSO/E or by using the remote loginfacilities of TCP/IP (rlogin).
If you use TSO/E, a command called OMVS creates a shell foryou. You can work in the shell environment until exiting ortemporarily switching back to the TSO/E environment.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 4: Working with data sets
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 4 objectives
Be able to:• Explain what a data set is• Describe data set naming conventions and record formats• List some access methods for managing data and programs• Explain what catalogs and VTOCs are used for• Create, delete, and modify data sets• Explain the differences between UNIX file systems and z/OS data sets• Describe the z/OS UNIX file systems’ use of data sets.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
• block size• catalog• data set• high level qualifier or HLQ• library• logical record length or LRECL
• member • PDS and PDSE• record format or RECFM• system managed storage or SMS• virtual storage access method or VSAM • volume table of contents or VTOC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is a data set?
A data set is a collection of logically related data records stored on one disk storage volume or a set of volumes.
A data set can be:• a source program• a library of macros• a file of data records used by a processing program.
You can print a data set or display it on a terminal. The logical record is the basic unit of information used by a program running on z/OS.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How data is stored in a z/OS system• Data is stored on a direct access storage device
(DASD), magnetic tape volume, or optical media. • You can store and retrieve records either directly
or sequentially. • You use DASD volumes for storing data and
executable programs, including the operating system itself, and for temporary working storage.
• You can use one DASD volume for many different data sets, and reallocate or reuse space on the volume.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Data management in z/OS
Data management involves all of the following tasks: • allocation, placement, monitoring, migration, backup,
recall, recovery, and deletion.Storage management is done either manually or
through automated processes (or through a combination or both).
In z/OS, Data Facility: System-Managed Storage (DFSMS) is used to automate storage management for data sets.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What an access method is• Defines the technique used to store and retrieve data. • Includes system-provided programs and utilities to
define and process data sets. • Commonly used access methods include the following:
• VSAM, QSAM, BSAM, BDAM, and BPAM.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
DASD: Use and terminology
Direct Access Storage Device (DASD) is another name for a disk drive.
DASD volumes are used for storing data and executable programs.
Data sets in a z/OS system are organized on DASD volumes.• A disk drive contains cylinders• Cylinders contain tracks• Tracks contain data records.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using a data setTo use a data set, you first allocate it. Then, access the
data using macros for the access method that you have chosen.
Various ways to allocate a data set:• ISPF data set panel, option 3.2• Access Method Services• TSO ALLOCATE command • job control language (JCL)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Allocating space on DASD volumesHow space is specified:
• explicitly (SPACE parameter)• implicitly (SMS data class)
Logical records and blocks:• Smallest amount of data to be processed• Grouped in physical records named blocks
Data set extents:• Space for a disk data set is assigned in extents
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Data set record formatsrecord
block block
block
record record record
record
recordrecord recordrecord record record
block
record record
record
record
record
record record
record
record
recordrecord
BDW
F
FB
V
VB
U
Fixed records.
Fixed blocked records. BLKSIZE = n * LRECL
RDWVariable records.
Variable blocked records. BLKSIZE >= 4 + n * largest LRECL
Undefined records. No defined internal structure for access method.
Record and block descriptors words are each 4 bytes long
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Types of data setsWe discuss three types in this class:
• Sequential, partitioned, and VSAMA sequential data set is a collection of records written and
read in sequential order from beginning to end.A partitioned data set (PDS) is a collection of sequential
data sets, called members.• Consists of a directory and one or more members.• Also called a library.
A PDSE is a partitioned data set extended.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
PDS versus PDSE
PDS data sets:• Simple and efficient way to organize related groups of
sequential files.
PDSE data sets:• Similar to a PDS, but advantages include:
• Space reclaimed automatically when a member is deleted• Flexible size• Can be shared• Faster directory searches
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is a data set, and how is it stored
Record 1 Record 2 Record 3 Record 4etc ...
Sequential Data Set
Available space
Partitioned Data Set
Previously used space recoverable by compress utility
Directory
Entry for COMPJCL Entry for JCOPY Entry for SORT1
COMPJCL
JCOPY
SORT1
DASD
Partitionedand
Sequential
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
VSAM VSAM is Virtual Storage Access Method
VSAM provides more complex functions than other diskaccess methods
VSAM record formats:• Key Sequence Data Set (KSDS)• Entry Sequence Data Set (ESDS)• Relative Record Data Set (RRDS)• Linear Data Set (LDS)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Simple VSAM control interval
R1 R2 R3 free space in CIRDF
RDF
RDF
CIDF
Record Descriptor Fields
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How data sets are namedData set naming convention
• Unique name• Maximum 44 characters
• Maximum of 22 name segments: level qualifier • The first name in the left: high level qualifier (HLQ)• The last name in the right: low level qualifier (LLQ) • Level qualifiers are separated by '.'
• Each level qualifier:• From 1 up to 8 characters• The first must be alphabetical (A-Z) or special (@ # $)• The 7 remaining: alphabetical, national, numeric (0-9) or hyphen (-)• Upper case only
• Example: MYID.JCL.FILE2 HLQ: MYID 3 qualifiersMember name of partitioned data set
• 8 bytes long• First byte: alphabetical (A-Z) or special (@ # $)• The 7 remaining: alphabetical, special, numeric (0-9)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Catalogs and VTOCsz/OS uses a catalog and a volume table of contents (VTOC)
on each DASD volume to manage the storage and placement of data sets.
VTOC:• Lists the data sets on a volume• Lists the free space on the volume.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
VTOC
LABEL(volser)
Extents
tracks
free spaceYOUR.DATAMY.DATA
trackstracks
VTOC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How a catalog is usedA catalog associates a data set with the volume on which
the data set is located.Locating a data set requires:
• Data set name• Volume name• Unit (volume device type)
Typical z/OS system includes a master catalog and numerous user catalogs.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Catalog Structure
IBMUSER.A1USER.A1SYS1.A1
Catalog Structure
SYSTEM.MASTER.CATALOG
Data Set-SYS1.A1or
HLQs (alias)IBMUSER...USER
Master Catalog
USERCAT.COMPANY
Data Set withHLQ=USER
User Catalog
USERCAT.IBM
User Catalog
Data Set withHLQ=IBMUSER
volume (wrk002)unit (3390)
IBMUSER.A2IBMUSER.A3
volume (wrk001)unit (3390)
volume (012345)unit (tape)
USER.TAPE.A1
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS UNIX file systems
z/OS UNIX System Services (z/OS UNIX) allows z/OS to access UNIX files.
A z/OS UNIX file system is hierarchical and byte-oriented.Files in the UNIX file system are sequential files and are
accessed as byte streams.UNIX files and traditional z/OS data sets can reside on the
same DASD volume.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
UNIX file system structureDirectory
Directory Directory
Directory Directory
File
File
File
File
File
File
File
File
Directory
File
File
File
File
File
File
File
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
• A data set is a collection of logically related data (programs or files)
• Data sets are stored on disk drives (DASD) and tape.• Most z/OS data processing is record-oriented. Byte
stream files are not present in traditional processing, except in z/OS UNIX.
• z/OS records follow well-defined formats, based on record format (RECFM), logical record length (LRECL), and the maximum block size (BLKSIZE).
• z/OS data set names have up to 44 characters, divided by periods into qualifiers.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary (continued)
• Catalogs are used to locate data sets. • VSAM is an access method that provides more
complex functions than other disk access methods. • z/OS libraries are known as partitioned data sets (PDS
or PDSE) and contain members. • A file in the hierarchical file system can be either a text
file or a binary file. • z/OS treats an entire UNIX file system hierarchy as a
collection of “data sets.” Each data set is a mountable file system.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 5: Batch processing and the Job Entry Subsystem (JES)
Batch processing and JES
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 5 objectives
Be able to:
• Give an overview of batch processing and how work is initiated and managed in the system.• Explain how the job entry subsystem (JES) governs the flow of work through a z/OS system.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
•batch processing•execution•initiator•job•job entry subsystem (JES)•output
•procedure• purge• queue• spool• symbolic reference• workload manager (WLM)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is batch processing?
Much of the work running on z/OS consists of programs called batch jobs.
Batch processing is used for programs that can be executed:• With minimal human interaction• At a scheduled time or on an as-needed basis.
After a batch job is submitted to the system for execution, there is normally no further human interaction with the job until it is complete.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is JES?In the z/OS operating system, JES manages the input and
output job queues and data.JES handles the following aspects of batch processing for
z/OS:• Receives jobs into the operating system• Schedules them for processing by z/OS• Controls their output processing
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is JES? (continued)z/OS offers two types: JES2 and JES3Some important differences, but both JES2 and JES3:
• Accept and queue jobs submitted for execution• Queue jobs for an initiator -- a JES program that requests the next
job in the queue• Accept output from a job while it is running and queue the output• Can print the output, or save it on spool for an output manager to
retrieve.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Batch flow (simplified)
Initiator- Allocation- Execution- Cleanup
JOBs
JCL Processing
JES
SPOOLSPOOL
Initiator- Allocation- Execution- Cleanup
submit
Printer
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is spooling?
Spooling is a method for queuing and holding data for input or output.
JES uses one or more disk data sets for spooling.Input jobs and printed output from many jobs are stored in
the single (conceptual) spool data set.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What an initiator does
To run multiple jobs asynchronously, z/OS uses initiators to:• Ensure that jobs do not conflict in data set usage• Ensure that single-user devices (tape drives) are allocated
correctly• Find executable programs requested by jobs• Clean up after the job ends and request the next job
Preventing two users from accessing the same data at the same time is critical to z/OS and the ability to do this is one of the defining characteristics of the operating system.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Symbolic references to files
z/OS normally uses symbolic references to files (data sets) rather than actual file names.
The use of symbolic references provides a naming redirection between a data set-related name used in a program and the actual data set used during execution of that program.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How a symbolic file system is used
OPEN FILE=XYZREAD FILE=XYZ
...CLOSE FILE=XYZ
program
DDNAME
JCL for JOB
DSNAME
//XYZ DD DSNAME=MY.PAYROLL MY.PAYROLL
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How a symbolic file system is used (continued)
OPEN FILE=XYZREAD FILE=XYZ
...CLOSE FILE=XYZ
program
DDNAME
JCL for JOB
DSNAME
//XYZ DD DSNAME=DIV1.PAYROLL DIV1.PAYROLL
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JES, job management, and JCL
Job control language (JCL) is the language used by a batch job to request resources and services from the operating system.
Through JCL, you specify:• Who you are (important for security reasons).• Which resources (programs, files, memory) and services
are needed from the system to process your program. The use of JCL is covered in detail in the next
module.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Related actions with JCLIT USER ACTIONS SYSTEM ACTIONS
Determinethe need
and characteristics
of the Job
Createthe JCL
Submitthe Job
JES interpretsJCL and
passes it to z/OS initiator
z/OS manages each step
of execution
JES printsoutput
JES collectsthe output and
informationabout the Job
User views and
interpretsoutput
SystemMessages
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Spooling
spool
33
program
SYSOUT
write
22read
JCL
//DD1 DD *
/*//DD2 DD SYSOUT=A
……...............data
……...............
//DD1 DD *
/*//DD2 DD SYSOUT=A
……...............data
……...............
//DD1 DD *
/*//DD2 DD SYSOUT=A
……...............data
……...............
11JES
Printer
44JES
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Two-step jobFirst step
Program
Tape
Updates
Program
Printer
Master
Master
Master
Second step
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Job flow through the systemDuring execution, a job goes through the following phases:• Input• Conversion• Processing• Output• Print (to hardcopy or a console display)• Purge
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Phases of job flow: input
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
CONVERSIONQUEUE
JCL & SYSIN
OUTPUT
SPOOLSPOOLDISKDISK
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Phases of job flow: conversion
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
EXECUTIONQUEUE
CONVERSIONQUEUE
JCL
OUTPUT
SPOOLSPOOLDISKDISK
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Phases of job flow: execution
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
OUTPUTQUEUE
EXECUTIONQUEUE
SYSOUTSYSIN
OUTPUT
SPOOLSPOOLDISKDISK
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Phases of job flow: output and hardcopy
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
PURGEQUEUE
HARD-COPYQUEUE
OUTPUTQUEUE
NON-PRINT/PUNCHOUTPUT
OUTPUT
SPOOLSPOOLDISKDISK
SYSOUT
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Phases of job flow: purge
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
PURGEQUEUE
OUTPUT
SPOOLSPOOLDISKDISK
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Job flow through the system
INPUT
JOB
CONVERSION PROCESSING HARD-COPY PURGE
PURGEQUEUE
HARD-COPYQUEUE
OUTPUTQUEUE
EXECUTIONQUEUE
CONVERSIONQUEUE
SYSOUTSYSIN
JCL
JCL & SYSIN
Network job entry (NJE)
OUTPUT
SPOOLSPOOLDISKDISK
SYSOUT
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JES2 compared to JES3In a multi-processor configuration:JES2:
• Each JES2 processor controls its own job input, job scheduling, and job output processing.
• It is possible to configure JES2 to share spool and checkpoint data sets with other JES2 systems (multi-access spool or MAS).
JES3: • Centralized control over processing through a single global JES3
processor, which does job selection, scheduling, and device allocation the other JES3 systems.
• The centralized control of JES3 provides increased job scheduling control, deadline scheduling capabilities, and increased control by providing its own device allocation.
Most installations use JES2, as do the examples in this text.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is workload manager?
Workload manager (WLM):The component of z/OS that manages the processing of
workload in the system according to the company’s business goals, such as response time.
Also manages the use of system resources, such as processors and storage, to accomplish these goals.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
Batch processing is a fundamental function of z/OS. z/OS shares with JES the management of jobs and
resources. JES receives jobs into the system, schedules them for
processing, and controls their output. JES manages jobs in queues.An initiator sets up the necessary environment for
running a batch job. Multiple initiators permit the parallel execution of batch jobs.
During the life of a job, both JES and the z/OS base control program control different phases of the overall processing.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility (SDSF)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 6 objectivesBe able to: • Explain how JCL works with the system, give an overview of JCL coding techniques, and know a few of the more important statements and keywords• Create a simple job and submit it for execution• Check the output of your job through SDSF
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
• concatenation • DD statement • job control language (JCL)• JOB statement• EXEC statement• job name• procedure (PROC)
• record format (RECFM)• system display and search facility (SDSF)• step name• system catalog• system library• utility
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is JCL?
Job control language (JCL) tells the system what program to execute and provides a description of program inputs and outputs.
There are three basic JCL statements:• JOB statement• EXEC statement• DD statement
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Basic JCL coding syntax
//JOBNAME JOB //STEPNAME EXEC//DDNAME DD//* comment - upper or lower case/* ....end of JCL stream
Forward slash in column 1 and 2
JCL must be uppercase
Name (1-8 characters) follow the slashesSpace separators
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL example //MYJOB JOB 1//MYSORT EXEC PGM=SORT//SORTIN DD DISP=SHR,DSN=IBMUSER.AREA.CODES//SORTOUT DD SYSOUT=*//SYSOUT DD SYSOUT=*//SYSIN DD *SORT FIELDS=(1,3,CH,A)
/*
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
In the preceding example… MYJOB Job name MYSORT Step nameSORTIN DD name for program inputSORTOUT DD name for program outputSYSOUT Where to send system output
messages (such as a data set)SYSIN Specifies whether the input will
be data or control statements.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL: JOB statement Create a member using ISPF editCreate JCL statements
JOB statementAccounting informationExecution classes
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL: EXEC statement
EXEC statementRegion size
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL: DD statement
DD statementDD name (referenced in the program)DSN= (the data set name as cataloged on disk)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Specifying a data set disposition:
DISP is an operand of the DD statementDISP indicates what to do with the data set (the disposition)
at step start, end, or abnormal end (if the job fails)DISP helps to prevent unwanted simultaneous access to
data sets, which is very important for general system operation.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Uses of the DISP= operand
DISP=(status,normal end,abnormal end) DISP=(status,normal end)DISP=status
where status can be• NEW• OLD• SHR• MOD
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Creating a new data set
New data sets can be created through JCL by using the DISP=NEW parameter.
For a DISP=NEW request, you need to supply more information, including:• A data set name, DSN=• The type of device for the data set, UNIT=sysda• If a disk is used, the amount of space to be allocated for the
primary extent must be specified, SPACE=• If it is a partitioned data set, the size of the directory must be
specified within the SPACE parameter• Optionally, DCB parameters can be specified.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Continuation and concatenation
Needed to overcome the limitations of the 80-column punched cards used in earlier systems.• Continuation allows a JCL statement to span multiple records.• Concatenation allows a single ddname to have multiple DD
statements.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Continuation and concatenation (example)Continuation example
//JOBCARD JOB 1,// REGION=8M,// NOTIFY=IBMUSER
Concatenation example//DATAIN DD DISP=OLD,DSN=MY.INPUT1// DD DISP=OLD,DSN=MY.INPUT2// DD DISP=SHR,DSN=YOUR.DATA
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL procedures - example//MYJOB JOB 1//MYPROC PROC//MYSORT EXEC PGM=SORT//SORTIN DD DISP=SHR,DSN=&SORTDSN//SORTOUT DD SYSOUT=*//SYSOUT DD SYSOUT=*// PEND
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL procedures (continued)//MYJOB JOB 1//*---------------------------------*//MYPROC PROC//MYSORT EXEC PGM=SORT//SORTIN DD DISP=SHR,DSN=&SORTDSN//SORTOUT DD SYSOUT=*//SYSOUT DD SYSOUT=*// PEND//*---------------------------------*//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES//SYSIN DD *SORT FIELDS=(1,3,CH,A)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
JCL procedures -- statement override//MYJOB JOB 1//*---------------------------------*//MYPROC PROC//MYSORT EXEC PGM=SORT//SORTIN DD DISP=SHR,DSN=&SORTDSN//SORTOUT DD SYSOUT=*//SYSOUT DD SYSOUT=*// PEND//*---------------------------------*//STEP1 EXEC MYPROC,SORTDSN=IBMUSER.AREA.CODES//MYSORT.SORTOUT DD DSN=IBMUSER.MYSORT.OUTPUT,// DISP=(NEW,CATLG),SPACE=(CYL,(1,1)),// UNIT=SYSDA,VOL=SER=SHARED,// DCB=(LRECL=20,BLKSIZE=0,RECFM=FB,DSORG=PS)//SYSIN DD *SORT FIELDS=(1,3,CH,A)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using SDSFAfter submitting a job, z/OS users use System Display and Search
Facility (SDSF) to review the job output for successful completion or JCL errors.
SDSF allows users to:• View and search the system log • Enter system commands• Hold, release, cancel, and purge jobs • Monitor jobs while they are processed• Display job output before deciding to print it• Control the order in which jobs are processed• Control the order in which output is printed• Control printers and initiators
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF panel hierarchyPrimaryOptionMenu
SYSLOGPanel
DisplayActiveUsersPanel
InputQueuePanel
OutputQueuePanel
HelpOutputQueuePanel
StatusPanel
Printer Panel
InitiatorPanel
JobData Set
Panel
OutputDescriptor
Panel
OutputData Set
Panel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Primary option menu
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Options menu
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Viewing the JES2 output filesScreen 1
Screen 2
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Display active users (DA) Display Filter View Print Options Help -----------------------------------------------------------------------------SDSF DA SC67 SC67 PAG 0 SIO 7 CPU 6/ 7 LINE 1-25 (64) COMMAND INPUT ===> SCROLL ===> PAGPREFIX=* DEST=LOCAL OWNER=* SORT=JOBNAME/A NP JOBNAME STEPNAME PROCSTEP JOBID OWNER C POS DP REAL PAGING SIO *MASTER* STC06373 +MASTER+ NS FF 1369 0.00 0.00 ALLOCAS ALLOCAS NS FF 190 0.00 0.00 ANTAS000 ANTAS000 IEFPROC NS FE 1216 0.00 0.00 ANTMAIN ANTMAIN IEFPROC NS FF 4541 0.00 0.00 APPC APPC APPC NS FE 2653 0.00 0.00 ASCH ASCH ASCH NS FE 267 0.00 0.00 BPXOINIT BPXOINIT BPXOINIT LO FF 315 0.00 0.00 CATALOG CATALOG IEFPROC NS FF 1246 0.00 0.00 CICSPAAY CICSPAAY CICS520 STC06504 STC NS FE 4330 0.00 0.00 CONSOLE CONSOLE NS FF 597 0.00 0.00 DFRMM DFRMM IEFPROC STC06363 STC NS FE 510 0.00 0.00 DFSMSHSM HSMSC67 DFSMSHSM STC13178 STC NS FE 6199 0.00 0.00 DUMPSRV DUMPSRV DUMPSRV NS FF 160 0.00 0.00 FTPDMVS1 STEP1 STC06477 STC LO FF 470 0.00 0.00 FTPDOE1 STEP1 STC06475 FTPDOE LO FF 469 0.00 0.00 GRS GRS NS FF 894 0.00 0.00 IEFSCHAS IEFSCHAS NS FF 25 0.00 0.00 IMWEBSUF IMWEBSUF WEBSRV STC15245 WEBSRV IN FE 15T 0.00 0.00
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Issuing MVS and JES commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Input queue panel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Output queue panel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Held output queue panel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDSF: Status panel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Utilities• z/OS includes a number of programs useful in
batch processing called utilities. • Utilities provide many small, obvious, and useful
functions. • A basic set of system-provided utilities is
described in the textbook (Appendix C).• Customer sites often write their own utility
programs, many of which are shared by the z/OS user community.
• Some examples of utilities:• IEBGENER Copies a sequential data set• IEBCOPY Copies a partitioned data set• IDCAMS Works with VSAM data sets
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System Librariesz/OS has many standard system libraries, including:
• SYS1.PROCLIB JCL procedures distributed with z/OS
• SYS1.PARMLIB Control parameters for z/OS and some program products.
• SYS1.LINKLIB Many of the basic execution modules of the system.
• SYS1.LPALIB System execution modules that are loaded into the link pack area at z/OS initialization.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary • Basic JCL contains three statements: JOB, EXEC, and
DD. • A program can access different groups of data sets in
different jobs by changing the JCL for each job. • New data sets can be created through JCL by using
the DISP=NEW parameter.• Users normally use JCL procedures for more complex
jobs. A cataloged procedure is written once and can then be used by many users.
• z/OS supplies many JCL procedures, and locally-written ones can be added easily.
• A user must understand how to override or extend statements in a JCL procedure to supply the parameters (usually DD statements) needed for a specific job.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary - continued
• SDSF is a panel interface for viewing the system log and the list of active users and controlling and monitoring jobs and resources.
• Utility programs make operating on data sets easier• System libraries contain JCL procedures, control
parameters, and system execution modules.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 7: Designing and developing applications for z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 7 objectivesBe able to: List the major considerations for
designing an application for z/OS.Describe the advantages and
disadvantages of using batch versus online for an application.Briefly describe the process for
testing a new application on z/OS.List three reasons for using z/OS
as the host for a new application.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
applicationASCIIDFSORTEBCDIC
enablement executableuser requirementssystem
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is an application?An application
• A piece of software that will satisfy certain specific requirements or resolve certain problems
• The solution can reside on any platform or combination of platforms
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Who designs applications for the mainframe?
Application designer:Determines the best programming solution for an important business
requirement.Understands:
• Business objectives of the company• Other roles in the mainframe IT organization• Company’s hardware and software.
Has a global view of the entire project.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Who writes applications for the mainframe?
Application programmer:Builds, tests, and delivers the applications that run on the
mainframe for end usersWorks from the application designer’s specificationsUses a variety of tools
Application programming involves many iterations of:Code changes and compilesApplication buildsUnit testing.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Where applications reside
Business SystemsDatabases
Business Systems
Applications
Business SystemsFront End
Browser
Browser
Browser
Server
PersonalComputer
"Dumb" Terminal
Browser
Web Server
Appl. Server
e-business
e-businesswith Legacy Systems
Client-Server
GUI Front-End
TerminalProcessing
Internet Enterprise Network Central Site
Web Server
Appl. Server
Personal Computer
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Application development lifecycle
Gatherrequirements Analysis Design
Code & test User, Systemtests
Goproduction Maintenance
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Gathering requirements for the designRequirements:
• Assess what needs to be accomplished• Based on projects constraints• Always keep in mind the end result• Conduct interviews with users and stakeholders • Verify our assumptions
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Types of requirements
AccessibilityClientInteroperabilityRecoverabilityServiceabilityAvailabilityConnectivityPerformanceResource can be monitored, controlled, managed, and administered
Usability Frequency of data backupDistributedPortability Secure centralized controllable capacityWeb servicesChangeabilityInter-communicablePreventing failure and fault analysis
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Design phase
Requirements
Users
Analysis Design Designdocuments
Business Technical
Constraints Verify
Revise Revise
Verify
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Design decisions – based on requirementsBatch versus onlineDatabase, tape, flat file, etc.COBOL, PL/I, JAVA, Assemblerz/OS, Unix, Linux, WindowsCapacity of serverServer typeDevelop or purchase package or both
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Development phase
Designdocuments
Coding Testing
Revise
TestedTestedprogramsprograms
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Developing an application for the mainframeProgrammer uses as input the specifications of the
designerUsually follows this process:
• Code a module.• Test a module for functionality.• Make corrections to the module.• Repeat from step 2 until successful.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Programming tools for the mainframe
• Editor• TSO or ISPF-based
• Repository for source code• PDS, SCLM or some other repository
• Job monitoring and viewing software• SDSF or equivalent product
• Debugging tools
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Debugging a program on the mainframe
• Log on to TSO• Enter ISPF – check out source code• Edit source and make modifications• Submit compile JCL to verify syntax• Switch to SDSF to view job status• View job output in SDSF – check for errors• Correct errors • Repeat from “Submit” until errors are corrected• Save source code in repository
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Interactive Development Environment (IDE)IDEs accelerate development process
• Edit source on work station• Run compiles off-platform• Perform remote debugging• Useful for “hybrid”
applications• Host-based COBOL with CICS, IMS, and
Web browser-like interface• Provides unified development environment
to build OLTP in HLL and HTML front-end interface
0102030405060708090
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
EastWestNorth
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Test phase
User
Performance
Other systems
TestedTestedprogramsprograms
Test data
Prod data
Integrationtests
ValidateTest
results
Finaltested
programs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Test phases (continued)Many levels of testing
• User testing for functionality, acceptance• Performance (stress) testing• Integration testing (with other systems)
Validate the testing resultsFinal step before going production
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Production phase
PromoteTo
productionProductionProductionRepositoryRepository
Finaltested
programs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Go productionDocument:
• Operational procedures• Training manuals (users, administrators, etc.)
Promote application to production status• Implement change control process
Hand over to operations
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Maintenance phase Ongoing day-to-day changes/enhancementsResponsibility for maintenance may change to another
group or stay with developers
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Maintaining and enhancing existing systems
Maintenance and enhancement is a primary role of HLL programmers on the mainframe
Large corporations continue to use COBOL and other traditional languages for new development: • Existing applications are in HLLs such as COBOL and
PL/I• New applications are in JAVA, COBOL and PL/I COBOL,
PL/I continue to be enhanced to exploit new technologies and new data formats
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
Designing and developing an application for the mainframe is similar to other platforms, but some of the questions and conclusions are different.
Life cycle of designing and developing an application to run on z/OS includes phases of:• Requirements gathering and analysis• Design• Development • Test and debugging• Production• Maintenance
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 8: Using programming languages on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 8 objectivesBe able to: • List several common programming languages for the mainframe• Explain the differences between a compiled language and an interpreted language• Create a simple CLIST or REXX program• Choose an appropriate data file organization for an online application• Compare the advantages of a high level language to those of Assembler language• Explain the relationship between a data set name, a DD name, and the file name within a program• Explain how the use of z/OS Language Environment affects the decisions made by the application designer
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
•assembler•binder•compiler•debugging•dynamic link library•generation
• I/O (input/output)• interpreter• load modules• pre-processor• programming language• variable
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Overview of programming languagesA programming language is the way that a programmer instructs
a computer to perform functionsComputers only understand machine languageMachine language is in binary form and, thus, very difficult to
writeHumans write programs in a programming language, which is
converted into machine language for the computer to process
There are many programming languages that have evolved from machine language
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Classification of programming languages
1st generation• Machine language• specific to hardware and software
2nd generation• Assembler language• Specific to hardware• Must be assembled • Symbolic machine instructions plus data structures
corresponding to machine storage and registers
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Classification of programming languages (continued)
3rd generation• Procedural languages, known as high-level languages
(HLL)• Example: COBOL• Must be translated (compiled) before execution• Usually portable (to an extent) across hardware and
software platforms with a recompile
4th generation – 4GL• Non-procedural languages• Report generators• Query languages• Examples:
• RPG, CSP, QMF, SQL
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Classification of programming languages (continued)
Visual programming languages (or event-driven languages)• Visual Basic, Visual C++
Object-Oriented language• used in OO technology, e.g. Smalltalk, Java, C++
Other languages• 3D applications
Scripting languages• Perl• REXX• HTML
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Choosing a programming language for z/OSWhich language to use? Factors to consider include: • Response time requirements for the application • Budget allotted for development and ongoing support• Time constraints of the project• Whether subroutines will be coded in different languages • Whether to use a compiled or an interpreted language
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using Assembler language on z/OSAssembler language
• Not usually used for application development• Machine-specific
Used when:• Accessing bits or bytes• Accessing system control blocks• Execution efficiency is needed (performance)• Require high performance subroutines that can be called from
HLL programs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
From Assembler source to executable module
Messagesand
listings
Assembler languagesource statements
Machine language Machine language version of the version of the
programprogram
High Level Assembler
Binder
ExecutableExecutableload moduleload module
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using COBOL on z/OSCOBOL is an English-like programming languageUsed for business-oriented applicationsCapabilities of IBM Enterprise COBOL for z/OS and OS/390
• Integrate COBOL applications into Web-oriented business processes
• Inter-operability with Java • Parsing of data in XML and Unicode formats
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
From HLL source to executable module
Messagesand
listings
HLLSource statements
Machine language Machine language version of the version of the
programprogram
HLL compiler
Binder
ExecutableExecutableLoad moduleLoad module
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HLL relationship between JCL and program files//MYJOB JOB//STEP1 EXEC IGYWCLG...
INPUT-OUTPUT SECTION.FILE-CONTROL. SELECT INPUT ASSIGN TO INPUT1 .....SELECT DISKOUT ASSIGN TO OUTPUT1 ...
FILE SECTION.FD INPUT1
BLOCK CONTAINS...DATA RECORD IS RECORD-IN
01 INPUT-RECORD...
FD OUTPUT1DATA RECORD IS RECOUT
01 OUTPUT-RECORD.../*//GO.INPUT1 DD DSN=MY.INPUT,DISP=SHR//GO.OUTPUT1 DD DSN=MY.OUTPUT,DISP=OLD
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HLL relationship between JCL and program (continued)
COBOL SELECT statement makes the link between the DDNAMEs INPUT1 and OUTPUT1 and the COBOL FDs INPUT1 and OUTPUT1 respectively
The COBOL FDs are associated with group items INPUT-RECORD and OUTPUT-RECORD
The program is completely independent of the location of the data or the name of the data sets.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Relationship between JCL, program, and data set
DDNAME DSNAME
OPEN FILE=INPUT1READ FILE=INPUT1
...CLOSE FILE=INPUT1
//INPUT1 DD DSNAME=MY.INPUT MY.INPUT
programJCL for JOB
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using PL/I on z/OSFull-function, general-purpose high-level programming
languageSuited for
• System programming• Commercial• Engineering/scientific, etc.
Less verbose than COBOLLess English-like
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HLL relationship between JCL and program files
Referring to physical files by a symbolic file name is used by all of the HLLs - even Assembler language
Isolates your program from changes to data set name and data set location• data set name and location can change without
recompiling program“Hard-coding” data set names or other such information in a
program is not usually considered a good programming practice• Externalize these values from programs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HLL relationship between JCL and program files//MYJOB JOB//STEP1 EXEC CLG...
OPEN FILE=INPUT1OPEN FILE=OUTPUT1READ FILE=INPUT1
... WRITE FILE=OUTPUT1
...CLOSE FILE=INPUT1CLOSE FILE=OUTPUT1
/*//GO.INPUT1 DD DSN=MY.INPUT,DISP=SHR//GO.OUTPUT1 DD DSN=MY.OUTPUT,DISP=OLD
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using C/C++ on z/OSC is a multi-purpose programming languageSuited for:
• System-level code• Text processing• Graphics, etc.
C language contains concise set of statements, with functionality added through its library
C is highly consistent across different platforms
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using Java on z/OS
Java is an object-oriented programming languageEnterprise COBOL and Enterprise PL/I provide interfaces to
programs written in Java Language. Also, DB2 and IMS.Java is pervasive across the zSeries platform.Java Native Interface (JNI) allows your program to call programs
written in other languages. The JNI is part of the Java Development Kit.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using CLISTs on z/OS
CLIST (pronounced "see list") is short for command list, because themost basic CLISTs are lists of TSO/E commands
CLIST language is an interpreted language (that is, you don't have to compile and link-edit it)
CLISTs are easy to write and testCLIST and REXX languages:
• Two command languages available in TSO/ECLIST programming language is used for:
• Performing routine tasks (entering TSO/E commands)• Invoking other CLISTs• Invoking applications written in other languages• ISPF applications (displaying panels, controlling application flow)• One-time quick solutions to problems
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using REXX on z/OS
Restructured Extended Executor (REXX) language is a procedurallanguage
REXX is an interpreted and compiled languageREXX is a more full-function language than CLISTREXX can be used for:
• Performing routine tasks (entering TSO/E commands)• Invoking other REXX execs• Invoking applications written in other languages• ISPF applications (displaying panels, controlling application flow)• One-time quick solutions to problems• System programming• Anywhere that we might use another HLL compiled language
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compiled versus interpreted languagesCompiled versus interpreted:
• A design-stage decision • Performance is slower with interpreted languages
Both compiled and interpreted languages have their strengths and weaknesses
No simple answer as to which is better -- it depends on the application. Within a single application, we might decide to use several programming languages.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Advantages of compiled languagesAssembler, COBOL, PL/I, C/C++ are translated by running the source
code through a compiler
This results in very efficient code that can be executed any number of times
Often, the overhead for the translation is incurred just once, when the source is compiled; thereafter, it need only be loaded and executed
Compiled programs will be more efficient and performing
Interpreted languages are often parsed, interpreted, and executed each time that the program is run, increasing the cost of running the program
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Advantages of interpreted languagesAn interpretive language is relatively easy to code, test, and
changeGood for one-time solutions
Good for developing application prototypes
Ad hoc versus fixed requestsTime saver for command strings that are entered repeatedly
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Overview of Language Environment Goals of application development today:
• Modularize and share code• Develop applications on a Web-based front end
z/OS Language Environment product provides a common environment for all conforming high-level language (HLL) products:
• Establishes a common language development and execution environment for application programmers on z/OS
• Consolidates in a common runtime library, function previously provided in individual library products eliminating the need to maintain separate language libraries
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Advantages of z/OS Language EnvironmentEstablishes a common run-time environment for all participating
HLLs
Combines essential run-time services, such as routines for run-time message handling, condition handling, and storage management
All of these services are available through a set of interfaces that are consistent across programming languages
You can use one run-time environment for your applications, regardless of the application's programming language or system resource needs
Your program can seamlessly call one language from another, to exploit the functions and features in each language
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Language Environment components
C/C++language specific library
COBOLlanguage specific library
FORTRANlanguage specific library
PL/Ilanguage specific library
Language Environment callable service interface, commonservices, and support routines
Javalanguage specific library
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryThe mainframe supports most programming languages in use
today.Your choice of a programming language depends on several
factors, including the requirements of the application and the installation’s ability to maintain the application.
Depending on the application requirements, you might use multiple languages or assembler subroutines for certain parts.
Remember: When it is time to update the application, other people must be able to program these languages as well.
Complexity in design must always be weighed against ease of maintenance.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 9 Compiling and link-editinga program on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 9 objectivesBe able to:Explain the purpose of a compilerCompile a source programCreate executable code from a compiled programExplain the difference between an object module
and a load moduleRun a program on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
bindercopybooklinkage-editorload moduleobject moduleobject-oriented code
procedureprocedure libraryprogram libraryrelocatablesource module
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Source, object, and load modulesA source program can be divided into logical units – or modules --
that perform specific functions. Each module is assembled or compiled by one of the language
translatorsInput to a language translator is a source moduleOutput from a language translator is an object moduleObject modules must be processed by the binder before they can
be executedOutput of the binder is a load module.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Source code to load module
Source module
Objectmodule
LoadmodulePrecompiler Compiler Binder
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Object moduleAn object module:
• Is a collection of one or more compilation units produced by an assembler, compiler, or other language translator and used as input to the binder (or linkage editor)
• Is in relocatable format with machine code that is not executable
• Is stored in an object library
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Load moduleA load module:
• is also relocatable, but with executable machine code• is in a format that can be loaded into virtual storage and
relocated by program manager, a program that prepares load modules for execution by loading them at specific storage locations.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
More about object modules and load modules
Object modules and load modules consist of:• Information (control dictionaries) to resolve cross-references
between sections of different modules• Text, containing the instructions and data of the program• An end-of-module indication (END statement)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What are source libraries?
Source programs are stored in a PDS known as source library
Source libraries contain the source code to be: • submitted for a compilation process• retrieved for modification by an application programmer
A copybook is a source library containing prewritten text; it is used to copy text into a source program, at compile time.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compiling programs on z/OSCompilers:
• Translate source code into object code• Assign relative addresses to all instructions, data elements, and
labels, starting from zero (required in a virtual storage operating system)
Addresses are in the form of a base address plus a displacement (to allow programs to be relocated)
References to external programs or subroutines are left as unresolved
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compiling programs on z/OSVarious ways to compile programs on z/OS:
• batch job• under TSO/E through commands, CLISTs, or ISPF panels• for COBOL programs, you can compile programs in a z/OS
UNIX shell by using the cob2 command.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compilation stepDefine the data sets needed for the compilationAlso, specify any compiler options needed by the program
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compilation step – example Data set (library) that contains the source code is specified
on the SYSIN DD statement://SYSIN DD DSNAME=dsname,// DISP=SHR
You can place source code directly in the input stream -use this SYSIN DD statement:
//SYSIN DD *
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compiling with cataloged procedures (PROCs)A common way to compile a program under z/OS is by using a batch job with a
cataloged procedure or PROC
A PROC contains a set of JCL statements placed in a data set called the procedure library (PROCLIB)
The PROC must include the following information: • Job description • Execution statement to invoke the compiler • Definitions for the data sets needed but not supplied by the PROC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Sample JCL for compiling a COBOL source program inline…//COMP JOB //COMPILE EXEC IGYWC//SYSIN DD *
IDENTIFICATION DIVISION (source program).../*//
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
COBOL compile, link & go PROCJCL in next slide executes the IGYWCLG PROCPROC is a three-step procedure for compiling a source program, linking it into
a load library and executing the load module• The first two steps are the same as those in the compile and link example• We do not need to permanently save the load module in order to execute it
Result of running the JCL is to: • compile our inline source program• link-edit the object code• store the load module (either temporarily or permanently) • execute the load module
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Executing COBOL CLG PROC//CLGO JOB//CLG EXEC IGYWCLG//COBOL.SYSIN DD *IDENTIFICATION DIVISION (source program)
.
.
./*[//LKED.SYSLMOD DD DSN=MY.LOADLIB(PROG1),DISP=OLD]
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
COBOL CLG PROC//IGYWCLG PROC LNGPRFX='IGY.V2R1M0',SYSLBLK=3200, // LIBPRFX='CEE',GOPGM=GO //* //* COMPILE, LINK EDIT AND RUN A COBOL PROGRAM //* //* PARAMETER DEFAULT VALUE USAGE //* LNGPRFX IGY.V2R1M0 //* SYSLBLK 3200 //* LIBPRFX CEE //* GOPGM GO //* //* CALLER MUST SUPPLY //COBOL.SYSIN DD ... //* //COBOL EXEC PGM=IGYCRCTL,REGION=2048K//STEPLIB DD DSNAME=&LNGPRFX..SIGYCOMP, // DISP=SHR //SYSPRINT DD SYSOUT=* //SYSLIN DD DSNAME=&&LOADSET,UNIT=VIO, // DISP=(MOD,PASS),SPACE=(TRK,(3,3)), // DCB=(BLKSIZE=&SYSLBLK) //SYSUT1 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT2 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT3 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT4 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT5 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT6 DD UNIT=VIO,SPACE=(CYL,(1,1)) //SYSUT7 DD UNIT=VIO,SPACE=(CYL,(1,1))
//LKED EXEC PGM=HEWL,COND=(8,LT,COBOL),REGION=1024K //SYSLIB DD DSNAME=&LIBPRFX..SCEELKED, // DISP=SHR //SYSPRINT DD SYSOUT=* //SYSLIN DD DSNAME=&&LOADSET,DISP=(OLD,DELETE) // DD DDNAME=SYSIN //SYSLMOD DD DSNAME=&&GOSET(&GOPGM),SPACE=(TRK,(10,10,1)), // UNIT=VIO,DISP=(MOD,PASS) //SYSUT1 DD UNIT=VIO,SPACE=(TRK,(10,10)) //GO EXEC PGM=*.LKED.SYSLMOD,COND=((8,LT,COBOL),(4,LT,LKED)),// REGION=2048K //STEPLIB DD DSNAME=&LIBPRFX..SCEERUN, // DISP=SHR //SYSPRINT DD SYSOUT=* //CEEDUMP DD SYSOUT=* //SYSUDUMP DD SYSOUT=*
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Load module creation and loadingSource modules
Assembler or compiler
Object modules
Program management
binder
Program object PDSE program
library
Linkage Editor Batch loader
Load modules in PDS program
library
Program management
loader
Load modulesin virtual storage
ready for execution
AA
AA
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Linkage EditorThe linkage editor prepares a load module to be brought into real
storage for executionAs input, the linkage editor accepts object modules, control
statements, and user-specified input.Output of the linkage editor is:
• A load module placed in a library (a PDS) as a named member• Diagnostic output produced as a sequential data set
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
How a load module is createdThe linkage editor assign virtual storage addresses to control
sections of the module and resolves references between them. The output load module contains the input object modules and
input load modules processed by the linkage editorThe load module also contains the text from each input module,
and an end-of-module indicator
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using the binderPerforms all of the functions of the linkage editorCan also process program objects stored in PDSE data
setsBinder removes restrictions of the linkage editorInput can include traditional data sets and z/OS UNIX files
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Binder sampleLink-edits an object moduleThe output from the LKED step will be placed in a private library identified by the SYSLMOD DDThe input is passed from a previous job step to a binder job step in the same job (for example, the output from the compiler is direct input to
the binder)
. . .//LKED EXEC PGM=IEWL,PARM='XREF,LIST', IEWL is IEWBLINK alias// REGION=2M,COND=(5,LT,prior-step)//*//* Define secondary input//*//SYSLIB DD DSN=language.library,DISP=SHR optional//PRIVLIB DD DSN=private.include.library,DISP=SHR optional//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1)) ignored//*//* Define output module library//*//SYSLMOD DD DSN=program.library,DISP=SHR required//SYSPRINT DD SYSOUT=* required//SYSTERM DD SYSOUT=* optional//*//* Define primary input//*//SYSLIN DD DSN=&&OBJECT,DISP=(MOD,PASS) required// DD * inline control statements
INCLUDE PRIVLIB(membername)NAME modname(R)
/*
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Creating load modules for executable programsA load module is an executable program stored in a
partitioned data set program libraryCreating a load module to execute only will require
that you use a batch loader or program management loader
Creating a load module that can be stored in a program library requires that you use the binder or linkage editor
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Creating load modules for executable programs (continued)In all cases, the load module is relocatable
• That is, it can be located at any address in virtual storage within the confines of the residency mode (RMODE)
Relocatable programs allow an identical copy of a program to be loaded in many different address spaces, each being loaded at a different starting address
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Batch loaderThe batch loader:
Performs link-editing and loading into one job stepAccepts object modules and load modules, and loads them
into virtual storage for executionPrepares the executable program in storage and passes
control to it directly
The batch loader is replaced by the binder in later releases of z/OS.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Program management loader
The program management loader:• can load program objects• reads both program objects and load modules into
virtual storage and prepares them for execution• resolves any address constants in the program to point
to the appropriate areas in virtual storage and supports the 24-bit, 31-bit and 64-bit addressing ranges
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Compile, link & execute JCL//USUAL JOB A2317P,'COMPLGO'//ASM EXEC PGM=IEV90,REGION=256K, EXECUTES ASSEMBLER// PARM=(OBJECT,NODECK,'LINECOUNT=50')//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=3509 PRINT THE ASSEMBLY LISTING//SYSPUNCH DD SYSOUT=B PUNCH THE ASSEMBLY LISTING//SYSLIB DD DSNAME=SYS1.MACLIB,DISP=SHR THE MACRO LIBRARY//SYSUT1 DD DSNAME=&&SYSUT1,UNIT=SYSDA, A WORK DATA SET// SPACE=(CYL,(10,1))//SYSLIN DD DSNAME=&&OBJECT,UNIT=SYSDA, THE OUTPUT OBJECT MODULE// SPACE=(TRK,(10,2)),DCB=BLKSIZE=3120,DISP=(,PASS)//SYSIN DD * inline SOURCE CODE. . . Source Code/*//LKED EXEC PGM=HEWL, EXECUTES LINKAGE EDITOR// PARM='XREF,LIST,LET',COND=(8,LE,ASM)//SYSPRINT DD SYSOUT=* LINKEDIT MAP PRINTOUT//SYSLIN DD DSNAME=&&OBJECT,DISP=(OLD,DELETE) INPUT OBJECT MODULE//SYSUT1 DD DSNAME=&&SYSUT1,UNIT=SYSDA, A WORK DATA SET// SPACE=(CYL,(10,1))//SYSLMOD DD DSNAME=&&LOADMOD,UNIT=SYSDA, THE OUTPUT LOAD MODULE// DISP=(MOD,PASS),SPACE=(1024,(50,20,1))//GO EXEC PGM=*.LKED.SYSLMOD,TIME=(,30), EXECUTES THE PROGRAM// COND=((8,LE,ASM),(8,LE,LKED))//SYSUDUMP DD SYSOUT=* IF FAILS, DUMP LISTING//SYSPRINT DD SYSOUT=*, OUTPUT LISTING// DCB=(RECFM=FBA,LRECL=121)//OUTPUT DD SYSOUT=A, PROGRAM DATA OUTPUT// DCB=(LRECL=100,BLKSIZE=3000,RECFM=FBA)//INPUT DD * PROGRAM DATA INPUT
data/*//
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Load libraryA load library contains programs ready to be executedA load library can be one of the following:
• System library • Private library • Temporary library
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System libraryUnless 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-nameThe system looks in the libraries for a member with a name or alias that
is the same as the specified program-nameThe most used system library is SYS1.LINKLIB, which contains
executable programs that have been processed by the linkage editor
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Private libraryPrivate libraries are useful for storing programs too seldom
needed to be stored in a system libraryUser-written programs are usually stored as members in a private
libraryTo indicate that a program is in a private library, you code the DD
statement defining the library with JOBLIB or STEPLIB Result: 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.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Overview of compilation to executionAfter Link-edit
PROGRAM B
PROGRAM A
0
140 KB
80 KB
After compilation
PROGRAM A
0 80 KB
PROGRAM B
60 KB 0
16 MB
2 GB
0
20 KB
Common
MYPROG
2-GB VirtualStorageAddress Space
PROGRAMLIBRARY
MYPROG
Object Modules
Load Module
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using proceduresSaves time and prevents errorsConsist of job control statements placed in a PDS or PDSE known as a
procedure libraryWhen stored in the system procedure library SYS1.PROCLIB (or an
installation-defined procedure library) is called a cataloged procedureA procedure in an input stream is called an inline procedureLimit of 15 inline procedures per job.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Sample definition of a procedure //DEF PROC STATUS=OLD,LIBRARY=SYSLIB,NUMBER=777777//NOTIFY EXEC PGM=ACCUM//DD1 DD DSNAME=MGMT,DISP=(&STATUS,KEEP),UNIT=3400-6,// VOLUME=SER=888888//DD2 DD DSNAME=&LIBRARY,DISP=(OLD,KEEP),UNIT=3350,// VOLUME=SER=&NUMBER
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
The basic steps for turning a source program into an executable load module are:1. compile 2. link-edit3. bind
The compile step translates source code into relocatable machine language, in the form of object code.
Object code must be processed by a binder (or linkage editor or loader) before it can be executed.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary (continued)
The binder resolves unresolved references in the object code and ensures that everything needed by the program is included in the final load module.
To execute a load module, the binder loads the module into real storage and then transfers control to it to begin execution.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 10 Overview of z/OS online workloads
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 10 objectivesBe able to:• Describe the role of large systems in a typical online business.• List the attributes common to most transactional systems.• Explain how databases are used in a typical online business.• Describe two models for network connectivity for large systems.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
• DBMS• multithreading• multitasking• root
• segment• SQL• thread• transaction
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Example of online processing: a travel agency
Mainframe applications designed for:• employee and customer information• contacts with car rental companies• hotels• airline schedules
Changes must be immediately reflected to application end-users (in real time)
Contrast with batch processing
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Example of online processing (continued)Car Rental Agency Hotel Airline
Travel AgencyWAP HTTP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
A practical example
CarRentalAgency
Hotel Airline
TravelAgency
WAP
HTTP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Transactional systemsRequirements: ACID
• Atomicity• Consistency• Isolation• Durability
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Transactional systems: terminology• Commit and roll back• Multitasking and multithreading• Thread• Reentrancy
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Characteristics of a transactional systems
Many Users
Repetitive
Short Interactions
Shared Data
Data Integrity
Low
Cost/Transaction
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Two-phase commit
INITIATOR Agent of A Agent of B
Update local resources Update local resources Update local resources
Prepare Receive
Prepare Receive
SYNCPOINT
SYNCPOINT
Commit
Commit
SYNCPOINT
Phase 1
Phase 2
AA BB CC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is a database?
Relationships
Shipment Customer Customer Order
Part
Purchase Order
Shipment
to Customer
Customer
Orders Parts
Order for Part
Purchase of Part
Attributes
Part No
Name
Unit Price
Shipment No
Dispatch
Date
Customer No
Customer
Address
Order No
Quantity
Delivery
Address
Order No
Quantity
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Why use a database?
• Reduce programming effort• Manage data more efficiently• Easy to separate confidential/sensitive info• Provide a greater level of security• Access & update simultaneously• Ensure consistency• Provide backup and recovery• Utilities to monitor and tune• Structure change does not impact existing
developments
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Role of the database administrator
Provides standards for databases;administers
databases
Determines rules for accessing data and monitors its security
Guides, reviews and approves database
designs
Controls database integrity & availability; monitors activities for backup and recover
DBADBA
Approves the use of any programs that access production
databases
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Databases: terminology• Entities• Data attributes• Entity relationships• Application functions• Access paths
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Databases on z/OS
• Hierarchical databases, such as IMS• Relational database management system
(RDBMS), such as DB2
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Hierarchical DB : Relationships & sequenceLevel 1 ROOT
(1)
Segment B(7)
Segment C(9)
Segment A(2)
Segment F(8)
Segment D(3)
Segment E(4)
Segment G(10)
Segment H(12)
Segment I(5)
Segment J(6)
Segment K(11)
Level 2
Level 3
Level 4
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Hierarchical data structure
Level 1 (or root)PART
STOCK PURCHASEORDER
DETAIL DETAIL
Level 2
Level 3
Parent of STOCKand
PURCHASE ORDER
Child of Partand
Parent of DETAIL
Child of PURCHASE
ORDER
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Segment types and their relationships
STOCK12
DETAIL112
PART1
STOCK11
ORDER11
DETAIL111
Record 1
PART2
STOCK21
ORDER21
DETAIL211
Record 2
PART1
STOCK31
ORDER31
DETAIL311
Record 3
ORDER22
These are twins
Siblings
All segments are dependents of PART
Parent of DETAIL
DETAIL is:Dependent of ORDERDependent of PARTChild of ORDERGrandchild of PART
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Relational DBMS: Codds relational principles
• Primary key• Referential Integrity• Easy to use query language• Nulls• Normalization/Denormalization
• 1NF: structure of a table• 2NF: 1-to-1• 3NF: 1-to-many relationships• 4NF, 5NF: many-to-many relationships
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Relational DBMS: data structures and SQL
Data StructuresDatabasesTables : column, row and valueIndexesKeys
• Primary Key• Unique Key• Foreign Key
SQLDML: SELECT, UPDATE, INSERT, DELETEDDL: CREATE, ALTER, DROPDCL: GRANT, REVOKE
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
A database comparison:
IMS:• Data is relatively static • Navigational : need to know the structure to get to the
right dataDB2:
• Changeable info• Change in structure : no impact on existing application• Non-Navigational : no need to know the structure to get
to the right data (just tablename and columnname(s))
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
• Interaction with the computer happens online through the help of a transaction manager.
• Many transaction managers and database managers exist, but their principles are similar.
• Data can be stored in a flat file, but this can result in duplication or inconsistent data. It is better to create central databases, which can be accessed (reading and changing) from different places.
• The handling of consistency, security, etc. is done by the database management system.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 11 Understanding transaction managers on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 11 objectivesBe able to:Explain the role of CICS in online transaction
processingDescribe CICS programs, CICS transactions, and
CICS tasksExplain what conversational and pseudo-
conversational programming isExplain CICS and Web-enablingDiscuss the IMS components
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter
BMPBMSconversationalDBMSCICS TSCICS commandIRLMbindtransactionCICS commandviewmodified source
task/threadregionPSBIMS TMtransactionunit of worktask/thread SPUFISQLJSYSADMEXPLAIN
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is CICS?Customer Information Control SystemTransactional subsystem of z/OS which:
• run online applications
• the same time, many users, same application(s)
• manages the sharing of resources
• integrity of data
• prioritization of execution, with fast response.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS in a z/OS system
z/OSz/OS
Transactionalsystem
ApplicationApplicationProgramProgramDATADATA
User
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Languages & PlatformsLanguages:COBOLOO COBOLCC++JAVAPL/IAssembler
Platforms:zSeries (z/OS, OS/390,
VSE)Intel serversTXSeries (AIX, HP-UX,
Solaris and Windows)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS Programming roadmapDesign applicationWrite & test program (includes compiling)Define program & transaction in CICS resourcesDefine other resources (files, queues, etc…) in CICS
resourcesMake resources known to CICS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Conversational Pseudo-ConversationalConversational:
UserTypesInputs
PROGV000
W AIT
Menu
Enter account ______Function code______
Menu
Enter account 1234_Function code M____
Record Update
Enter account 1234Name: SmithAmount: $10.00Date: 05/28/04
Menu
Enter account ______Function code______"Update confirmed"
UserTypesChanges
SEND MAP
RECEIVE MAPREAD FILE UPDATE
SEND MAP
RECEIVE MAPREW RITE FILE
SEND MAPRETURN
W AIT
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Conversational Pseudo-ConversationalPseudo-Conversational:
UserTypesInputs
PROGV000
Menu
Enter account ______Function code______
Menu
Enter account 1234_Function code M____
Record Update
Enter account 1234Name: SmithAmount: $10.00Date: 05/28/04
Menu
UserTypesChanges
SEND MAP...RETURN TRANSID(V001)....
Enter account 1234Name: SmithAmount: $99.50Date: 05/28/04"Update Confirmed"
PROGV001
RECEIVE MAP.......READ FILE....... SEND MAP......RETURN TRANSID (V002)....
PROGV002
RECEIVE MAP.......READ FILE UPDATE....REW RITE FILE........ SEND MAP......RETURN TRANSID (V000)...
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS Programming commandsGeneral format:
EXECUTE CICS (or EXEC CICS) + command
e.g. in COBOL: EXEC CICS function option option ... END-EXEC.
CICS command example :EXEC CICS
READ FILE(‘ACCTFIL’) RIDFLD(ACCTC) UPDATE ...
END-EXEC.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS transaction flowOperating System
ABCDABCD TerminalControl
StorageMgmt.
ProgramProgramLibraryLibrary
File or DBFile or DB
SystemServices
11
22
33
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS transaction flow (Cont…)Operating System
ProgramProgramLibraryLibrary
File or DBFile or DB
(menu screen)
ProgramProgramABCD01ABCD01
44
FileControlBMS
55
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS transaction flow (Cont…)Operating System
ProgramProgramLibraryLibrary
File or DBFile or DB
User'sNextInput
ProgramProgramABCD01ABCD01
66
88
FileControl
77
BMS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS services for Application ProgramsApplication program interface: use CICS commandsTerminal control services: use Basic Mapping
Support (BMS)File & database control services:
•CICS file control (mainly VSAM)•Database control (DL/I & DB2)
Other CICS Services: Task Control - Program Control -Temporary Storage (TS) & Transient Data Control (TD) -Interval Control - Storage Control - Dump & Trace Control
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Defining the screensBMS macros: a form of assembler languageResult of an assembles : Physical MapPhysical map contains info to :
• build the screen• merge variable data between program & screen• send variables back to program
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Program ControlCICS
Level 0CICS
Program1LINK ...RETURN
Program 2XCTL
Program 3LINK ...RETURN
Program 4
.....RETURN
Level 1
Level 2
Level 3
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Example of CICS application user screen ABCD Average salary by department
Type a department number and press enter.
Department number: A02
Average salary($): 58211.58
F3: Exit
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS and Web-enabling
4 major elements of web-enabled applications:
Presentation logicIntegration logicBusiness logicData logic
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS Web support
IBM HTTPServer for OS/390
CICSCICSWebServerWebServer
PluginPlugin
CICSCICSTCP/IPTCP/IPlistenerlistener CC
WWSS
32703270WebWeb
bridgebridge
3270presentation
logic
W eb-awarepresentation
logic
CICSapplication
CICS region
COMMAREA
W ebBrowser
Directconnection
EXCI
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CICS Transaction Gateway
Java clientJava clientapplicationapplication
ECI EPI ESI
Clientdaemon
Transportdrivers
Gatewaydaemon CTG.INI ctgcfgctgcfg
Configurationtool
CICSserver
Network
JNI
CICS Transaction
Gateway
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is IMS?Information Management System3 components:
• The Transaction Manager (TM)
• the Database Manager (DB)
• Set of system services, providing common services to the other2
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IMS overview
IMS System
TransactionManager
DatabaseManager
IMSMessageQueues
IMSDatabases
IMSLogsz/OS
Console
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IMS Transaction Manager messagesFour types of messages:
• Transactions• To go to another logical destination• Commands for IMS• For the IMS APPC feature to process
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryThe continued growth of the Internet has caused many corporations to
consider the best ways to make their legacy systems available to users on the Internet.
CICS is a transactional processing subsystem. CICS applications are traditionally run by submitting a transaction request.
Information Management System (IMS) consists of three components: • Transaction Manager (TM)• Database Manager (DB)• A set of system services common to both TM and DB
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 12 Understanding databasemanagers on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 12 objectivesBe able to:Explain the role of DB2 in online transaction
processing.List common DB2 data structures.Compose simple SQL queries to run on z/OS.Give an overview of application programming with
DB2.What the IMS components areThe structure of the IMS DB subsystem
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapterbindDBMSEXPLAINmodified source
SPUFISQLSYSADMview
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
DB2 Concepts: Data Structures
VSAMLDS
VSAMLDS
Storage group
Data base
Table Space
Table
Index Space
Index
Views
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Schema structures
User-defined Data Type (UDT)User-defined Function (UDF)TriggersLarge Object (LOB)Stored Procedure
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System Structure
Catalog & Directory: stores ALL DB2 informationBuffer PoolActive and Archive LogsBootstrap data set (BSDS)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
DB2 for z/OS ArchitectureDB2 Address Spaces
• System Service address space (SSAS)• Database Service address space (DBAS)• Internal Resource Lock Manager (IRLM)
DB2 Attachment Facilities• CICS• IMS• TSO
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI
Select option 1 to enter SPUFI
First you need to create the output file (if not existing)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI (CONT…)
Enter the input and output dataset, if they are not yet in place.Change the member of the PDS, if you want to enter a new SQLDefaults are set to NO from YES.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI (CONT…)
Enter the SQL statement you want to execute. Press F3 to return to the previous screen (to execute the SQL).
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI (CONT…)
When you get back to this screen, the “edit input” is put to “*”.Press ENTER to execute the SQL and to see the output.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI (CONT…)
F8 brings the rest of the results on your screen
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Invoke SQL on z/OS: SPUFI (CONT…)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Application Programming: the flowSourceSource
ProgramProgram
Precompile
IncludeIncludeMemberMember
Compile
Linkedit
ModifiedSource
Object Module
Load Module
DBRM
Bind
Package
Bind
Plan
DCLGEN
RUN
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Get the access path: EXPLAINEXPLAIN ALL SET QUERYNO = 1SELECT EMPNO, LASTNAME
FROM EMPWHERE LASTNAME = 'MILLER';
-The query is NOT executed-The access path is placed in userid.PLAN_TABLE, if it exists
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Other development optionsODBCJAVASQLJJDBCXMLXML Column AccessXML Collection Access
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Managing DB2: System AdministrationInstallationSystem Object ManagementSystem and Disaster RecoveryMonitoring System Performance
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Managing DB2: Database AdministrationCreation & Management of DB2 ObjectsExecution of Utilities:
• Data Organization• Backup & recovery• Data Consistency
Commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Functions of the IMS database manager
A DBMS provides:• Multiple-user access to a single copy of data• Integrity for all updates• Minimal hardware and OS access method dependencies• Reduced data redundancy
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Implementation of IMS DatabasesDepending on user' requirementsTechnologies :
• IMS DB or DL/I or DL1 or Full Function Database
• IMS DEDB or Data Entry DB or Fast Path Database
• IMS Main storage database (MSDB)
• IBM DB2
Database Recovery Control (DBRC)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Structure of IMS DB Subsystem
System Address SpaceApplication Region Address Space
Up to 99 in total
DLISeparateAddressSpace
DBRCRegion
MPP IFP BMP
ApplicationProgram
Full Function DBs RECONs
DependentRegion
AddressSpace
IMS System
IMS Libraries
IMS Message Queues
Logs
Fast Patch DBs
ControlRegion
AddressSpace
Network
JavaMessage
Processing
JavaBatch
ProcessingApplicationProgram
ApplicationProgram
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Databases used by IMS: Database basicsAccess pathsNormalization within IMS
• Unique entities• 1 occurrence only• No many-to-many relationships
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Databases used by IMS: DB ModelSequence to access the segments
ROOT(1)
Segment A2(8)
Segment A1(2)
Segment D3(9)
Segment D2(4)
Segment E3(7)
Segment D1(3)
Segment E2(6)
Segment E1(5)
Segment B2(14)
Segment B1(10)
Segment G2(12)
Segment H1(13)
Segment G1(11)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Databases used by IMS: DB modelAdditional access paths to segments
• Logical relationships• Secondary indices
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Application programming overviewProgram is subroutine of IMS region controller
• Needs a program specification block (PSB)• Uses services:
• Send/receive message from terminals• Access db• Issue IMS commands• Issue IMS service calls
e.g. Checkpoint calls, Sync call
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Program Structure
Segments Segments to/from to/from
databasesdatabases
ENTRy
EXIT
DLI modules
Call infoCall infofrom DLIfrom DLI
PCB-Mask
IO AREA
Application Program
PROGRAM ENTRYDEFINE PCB AREASGET INPUT RECORDS FROM INPUT FILECALLS TO DL/I DB FUNCTIONS
RETRIEVEINSERTREPLACEDELETE
CHECK STATUS CODESPUT OUTPUT RECORDSTERMINATION
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IMS & the World Wide WebMessage flow in IMS transaction
3270 Terminal
1,2
VTAM IMS MPP
3 4,5
8,9 7 6
NCP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IMS & the World Wide WebMessage flow between Web Browser & Web Server
Web Browser
1,2
WebServer
CGIProgram
3 4,5
8,9 7 6
TCP/IP TCP/IP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IMS & the World Wide WebMessage flow IMS transaction & Web Server CGI Programs
3270 Terminal
1,2
VTAM IMS MPP
3 4,5
8,9 7 6
NCP
Web Browser
1,2
WebServer
CGIProgram
3 4,5
8,9 7 6
TCP/IP TCP/IP
Program to ProgramCommunications
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryThe relational database is the predominant approach to data
organization in today's business world. IBM’s DB2 implements such relational principles as primary keys,
referential integrity, a language to access the database (SQL), nulls, and normalized design.
In a relational database, the most fundamental structure is the table with columns and rows.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary (continued)The only way to access the data in DB2 databases is with SQL.On the mainframe, SPUFI is a tool used to enter SQL statements.The DBRM performs a bind process that determines the access path
and stores this executable SQL code in a package. SQL can handle both static and dynamic statements, and EXPLAIN can
be used to find out what access path the optimizer chose for the SQL.
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 13: z/OS HTTP Server
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesAfter reading this chapter, you will be able to:
• List the three server modes• Explain static and dynamic Web pages• List at least two functions from each of the following modes:
• Basic• Security• Caching
• Understand how to deploy a Web application on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter• CGI• dynamic• FRCA• HTTP• J2EE• LDAP• SSL• static
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to Web applications on z/OS:
Past:• Many applications are tied to z/OS (CICS, DB2)• New developments made on other platforms
Now:• Integrate both on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS HTTP Server
Server modes:• Stand-alone server• Scalable server• Multiple servers
Static Web pagesDynamic Web pages
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic Web Pages
Common Gateway Interface (CGI)HTTP Server
Address Spacehttp://www.myzseries.com/cgi-bin/test.cgi
httpd.confURL
Response
ClientBrowser
11
22
33
CGIapplication
test2.cgi
CGIapplication
test.cgi
z/OSAddress Spaces
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic Web Pages - Interaction with WebSphereWebSphere plug-in, same address space
HTTP Serverhttp://www.myzseries.com/my.jsp
was.conf
CICS Serveror
IMS Server
httpd.conf
WASplugin
Servlet
URL
Response
ClientBrowser
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic Web Pages - Interaction with WebSphereWeb container inside HTTP Server, separate EJB container
HTTP Serverhttp://www.myzseries.com/my.jsp
was.confEJBContainer
httpd.conf
WASplugin
Servlet
URL
Response
ClientBrowser
CICS Serveror
IMS Server
EJB
J2EE Server
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic Web Pages - Interaction with WebSphereSeparate J2EE server with both Web container and EJB container
HTTP Serverhttp://www.myzseries.com/my.jsp
was.conf
EJBContainerhttpd.conf
WASplugin
URL
Response
ClientBrowser
CICS Serveror
IMS Server
EJB
J2EE Server
WebContainer
Servlet
JSPs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HTTP server capabilities
Basic functions :• EBCDIC/ASCII file access• System Management Facilities• Tracing & logging• Server Side Includes• Simple Network Management Protocol Management
Information Base (SNMP MIB)• Cookies support• Multi Format Processing• Persistent connections• Virtual hosts
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HTTP server capabilities (continued)
Security functions:• Thread level security• HTTPS/SSL support• LDAP support• Certificate authentication• Proxy support
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
HTTP server capabilities (continued)
File caching:• HTTP server caching HFS files• HTTP server caching z/OS data sets• Unix System Service caching HFS files• Fast Response Cache Accelerator (FRCA)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryIn this chapter, you learned about:
• The three server modes• Static and dynamic Web pages• These HTTP server modes:
• Basic• Security• Caching
• Deploying a Web application on z/OS
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 14 WebSphere Application Server on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 14 objectives
Be able to:
• List the six qualities of the J2EE Application model• Give three reasons for running WebSphere Application Server under z/OS• Name three connectors to CICS, DB2, and IMS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapter•cell•CS•CGI•EIS•JMX
•J2EE•SR•cluster•node
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Introduction to Web applications on z/OS
Past:• Many applications are tied to z/OS (CICS, DB2)• New developments made on other platforms
Now:• Integrate both on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphere Application Server for z/OS
Conform Software Development Kit (SDK)Interoperates with other subsystems
CR = Controller RegionSR = Servant Region
ApplicationServer =Instance
CR
SR
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphere Application Server for z/OS
Organization based on concepts:ServersNodes (and Node Agents): a logical grouping of
WebSphere-managed serversCells: a grouping of Nodes
Within the address spaces, concept of CONTAINER
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
J2EE Application Model in z/OS
Same as on other platforms, following SDK:• Functional• Reliable• Usable• Efficient• Maintainable• Portable
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Running WebSphere Application Server for z/OS
• Basics of WebSphere on z/OS• Consolidation of workloads• WebSphere for z/OS Security• Continuous availability (see next foils)• Performance
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphere on z/OS - continuous availability
• WebSphere with Sysplex Distributor
WebSphereApplication Server
RARAConnection
Addressspace
EIS/DB
RACF RRS
WebSphereApplication Server
RARAConnection
Addressspace
EIS/DB
RACF RRS
clusterz/OS
z/OS
SDSD
SYSPLEX
TCP/IP
memoryto
memory
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphere on z/OS - continuous availability
• Clustering of Server in Cell
Clusterservers B
and D
InstallApplication into Cluster
BrowserBrowser
Deployment Manager
AA
Daemon
CR CR SR
Server A
CR SR
Server B
MVS System or LPAR
Daemon
CR CR SR
Server C
CR SR
Server D
MVS System or LPAR
Cluster
APP APPAPP
HFSHFS HFSHFS
SYSA SYSB
CF
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphere on z/OS - continuous availability• Vertical and Horizontal Cluster
MVS System or LPARMVS System or LPAR
"Vertical"Cluster Two or moreservers in thesame systemor LPAR
DM
CR AA
Node Agent
CR
CR SR
Server A
CR SR
Server B
Node
Node
CR SR
Server C
Daemon
CR
Daemon
CR
Node Agent
CR
CR SR
Server D
CR SR
Server E
Node
CR SR
Server F
Cell A CF
"Horizontal" Cluster Two or moreservers across multiple nodes (or systems)
Servers are clustered through the administrative interface.
Any given server may be a member of only one cluster at a time
You can not have Server_C be a member of two different clusters, for example.
Hybrid of vertical and horizontal is permitted
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Running WAS on z/OS - Performance
WebSphere uses three distinct functions of WLM:• Routing• Queuing• Prioritizing
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Application Server Configuration on z/OS• Base Server Node
Location Service Daemon(BBODMNB)
Controller
Application server node
Cell
J2EE scalable application server (server1) JMS
serverHTTP
internaltransport
Controller Servant
v5 run-timeenvironment
HTTP server
z/OS functionsUNIX System ServicesTCP/IPFTPRRSWorkload ManagementLanguage EnvironmentSecurity ServerARMIMS/TMCICS/TSMQ
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Application Server Configuration on z/OS• Network Deployment Manager
Cell
Location Service Daemon(BBODMNB)
Controller
z/OS functionsUNIX System ServicesTCP/IPFTPRRSWorkload ManagementLanguage EnvironmentSecurity ServerARMIMS/TMCICS/TSMQ
Node 1: Deployment manager
Deployment manager(BBODMGR)
Controller
Node 2: Application server
Node agent(BBON001)
Controller
JMS server(BBOJ001)
Controller
J2EE scalable application server (server1)
Controller Servants
HTTPinternal
transport
v5 run-timeenvironment
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Connectors for Enterprise Information Systems
Some considerations:• Expensive• Must be secured• Need to perform well• Must be monitorable• Methods needed• Quality of devices
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
WebSphereApplication Server
Server A
RA EIS/DB
RACF RRS
z/OS
C
memory to
memory
C=connectorRA=resource adapter
Basic Architecture of an connector to an EIS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Mainframe Connectors
• CICS Transaction Gateway• IMS Connect• DB2 JDBC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryIn this chapter, you learned to:
• List the six qualities of the J2EE Application model• List three reasons for running WebSphere Application Server
under z/OS• Name three connectors to CICS, DB2, and IMS
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 15 WebSphere MQ
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 15 objectivesBe able to:
• Explain why messaging and queuing is used• Describe the asynchronous flow of messages• Explain the function of a queue manager• List three zSeries-related adapters
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key terms in this chapterlocal queuechannelmessage-drivenMQIasynchronous application
dead-letter queueQMremote queuesyncpoint
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Synchronous communication model
AA
BB
MQI
MQI
MQI
MQI
Queue 1
Queue 2
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Asynchronous communication model
AA
BB
MQI
MQI
MQI
MQI
Queue 1
Queue 2
CC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Styles of Communication
ProgramA
ProgramB
ProgramB
ProgramA
ProgramC
ProgramA
ProgramA
Conversational
Messaging
Call and return
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Messages
Types of messages:• Datagram• Request• Reply• Report
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Queue Manager
Messages
Program
Data
Program
Program
Queuemanager
DB2
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Message Queue Interface (MQI)
Application
Queue manager
MQI
Queue manager
objectNamelist
object
Process object
Major callsMQCONNMQCONNXMQOPENMQCLOSEMQPUTMQPUT1MQGET
Minor callsMQBEGINMQCMITMQBACKMQINQMQSET
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Message layout
Application dataHeaders
Set by application and queue managerHeaders
MQMDMQXQHMQDLHand so forth
Any sequence of bytesPrivate to the sending and receiving applicationsNot meaningful to the queue manager
Message = Headers + Application data
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Queue types
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Channels
MQI
Program 1
putget
QMA
Local Q2
ChannelQMB.QMAReceiver
Remote Q1
XmitQQMB
ChannelQMA.QMBSender
MQI
Program 2
putget
QMB
Local Q1
ChannelQMB.QMBReceiver
Remote Q2
XmitQQMA
ChannelQMB.QMASender
Network
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Security
Local Queue Manager
Remote Queue Manager
MCAMCA
MCAMCA
MQMD ApplicationData
USERID
Context
Database
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Data Integrity
DBDBWriteSend
Syncpoint
ReceiveWrite DBDB
Syncpoint2-phasacommit
Synchronousmodel
Unit of work
DBDB Write
PutSyncpointUnit of work 1
Unit of work 2
Unit of work 3
qq Get
WriteSyncpoint
DBDB
Asynchronousmodel
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Travel agency example revisited
MQPUT CAR RENTAL
MQPUT FLIGHT
MQPUT HOTEL
MQGET Reply-to-queue
Car rental
Flight
Hotel
Car
Flight
Hotel
MQPUT
MQPUT
MQPUT
Reply-to queue
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Interfacing to WebSphere MQ
MQ is available on many platformsOn z/OS it has interfacing to:
• CICS• IMS• Batch or TSO
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
MQ functions
• Common application programming interface (MQI)
• Assured delivery: messages do not get lost and they arrive only once
• No synchronous access needed• Message driven application• Quicker development due to shielding of the
network
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
• Messaging and queuing enables communication between applications on different platforms.
• WebSphere MQ is an example of software that manages messaging and queuing in the mainframe and other environments.
• With messaging, programs communicate by through messages, rather than by calling each other directly.
• With queuing, messages are retained on queues in storage, so that programs can run independently of each other (asynchronously).
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 16 Topics in z/OS system programming
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesIn this chapter you will learn to:
• Discuss the responsibilities of a z/OS system programmer• Explain system libraries, their use, and methods for managing
their content• Configure consoles• IPL a system
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key termsHCD IODF SYSRESSMP/E LNKLST IPLWTOR PARMLIB
PROCLIBsystem symbols PSA LPAnucleus LOADPARM SQA
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Considerations for a new application• New batch applications to scheduler• New JCL procedures to procedure library• Document operational procedures• Security privileges• Add load libraries to system• Automation• Reload system (if required)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is systems programming?
• A systems programmer installs, customizes and maintains the operating system
• To do this they need knowledge of• Hardware
• Storage• Processor
• Software• System libraries and data sets
• Current customization
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System programming overview
System performance and workload management
z/OS new featuresimplementation and z/OS system
maintenance
Controlling operating activities and functions
System parameters and system
librariesmanagement
SYSTEM PROGRAMMINGSecurity, Availability
and Integrity
Hardware I/Oconfiguration
iodfxxiodfxx
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS operational system administration is:
• Software installation and maintenance• Customize parameters• System libraries for software• System data sets• z/OS system address spaces and subsystems • Real and virtual storage
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS Workload Manager
• Workload manager (WLM) is an address space which manages the tasks running on the system
• Uses an installation-defined policy to determine relative priority of competing workloads
• WLM can also be used to manage hardware resources
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System performance
• System tuning is constant and iterative• Only a real problem when resources are constrained• WLM is one component• Can only manage what is set up• Initial set up of initiators and other resources plays a
great part
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Job flow
• Job entry subsystem (JES) controls job flow• Receives jobs into system• Initiates the job• Controls initial output processing
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
I/O device management
• Input/output device configuration must be defined to both hardware and software
• HCD is used to build an I/O definition file• This definition can be activated to both software and
hardware dynamically• Sometimes major changes require an IPL of software or
POR of hardware
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Security
• Protection of data against unauthorized disclosure, transfer, modification or destruction
• Systems programmer installs and maintains the security system
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Integrity
• Designed, implemented and maintained to protect against unauthorized access
• Unauthorized software must not be able to access authorized states
• Unauthorized software must not be able to bypass system security such as RACF
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Availability
• System availability is designed to be very high• Many systems require 24 hour 7 day operation
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Change control
• I/T organizations achieve their goals through disciplined change management processes and policy enforcement
• These goals include:• High service availability• Increased security• Audit readiness• Cost savings
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS operation
• This is the day to day management of the operating environment both software and hardware
• Operator interaction is message and command based• Automated processing of the messages and commands
is available and operators now manage by exception
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS Production Control
• Build batch schedules • Promote programs to production• Investigate batch failures
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS system libraries
z/OS software
Non-IBM software
Non-z/OS (CICS, DB2)
Customization data
User defined exits
User data
Mainframe
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Types of data
• z/OS software on SYSRES volumes• Non-z/OS software e.g. CICS• Non-IBM software• Customization data – parmlib, IODF• User exits • User data – often the largest pool of volumes
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
z/OS system libraries
These are the most important system libraries• SYS1.LINKLIB prime system software library• SYS1.LPALIB system subroutines• SYS1.NUCLEUS basic supervisor modules• SYS1.PROCLIB system procedure JCL• SYS1.PARMLIB control parameters
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SYS1.LINKLIB
• SYS1.LINKLIB is the main software library• LNKLST concatenation is a group of system and user-
defined libraries which form part of the system search order for load modules
• Not all on one volume
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System search order for programs
• Programs (load modules) must be in central storage and therefore in the virtual storage of the address space before they can run
• System has a defined search order for a newly requested program
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Search order for programs
1. STEPLIB if present2. JOBLIB if present and no STEPLIB3. Link Pack Area (LPA)
1. Dynamic LPA modules2. Fixed LPA3. Modified LPA4. Pageable LPA
4. Linklist
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Overview of LNKLST – Fig 17.3
Other Load Libraries
System Data Sets
SYS1.LINKLIBSYS1.MIGLIBSYS1.CSSLIB
LNKLST SET
Search order
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Using PROGxx to define LNKLST
• A LNKLST set is an ordered list of datasets for processing as the LNKLST concatenation
• The PROGxx member may be used to define other lists as well as the linklist
• The linklist must be: • Defined• Have libraries added • Activated
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Example linklist definition:
LNKLST DEFINE NAME(LNKSYSA) COPYFROM(CURRENT)LNKLST ADD NAME(LNKSYSA) DSNAME(SYS1.PROD.LOADLIB)LNKLST ADD NAME(LNKSYSA) DSNAME(SYS1.TEST.LOADLIB)LNKLST ACTIVATE NAME(LNKSYSA)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
LLA and VLF
• Library LookAside is an address space which maintains a copy of the directories of selected libraries to improve performance
• By default, LLA always caches the linklist directories• Virtual Lookaside Facility is another address space which caches
the most popular modules which reduces fetch time• VLF can also cache other data objects such as RACF tables to
improve response
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Libraries and members at IPL time
An number of libraries must be present for the system to load at IPL time• SYS1.PARMLIB contains the required definitions• SYSn.IPLPARM searched for LOADxx• SYS1.LPALIB • SYS1.PROCLIB• SYS1.NUCLEUS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
LOADxx
• LOADPARM defines the address of the IODF and the suffix of the LOADxx member
• At IPL the system searches for LOADxx in:• SYS0.IPLPARM – SYS9.IPLPARM on IODF volume• SYS1.PARMLIB on the IODF volume• SYS1.PARMLIB on the IPL volume
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
LOADxx
The LOADxx member specifies:• The IODF data set name• The master catalog name and volume• The parmlib concatenation• The IEASYSxx member to use
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 17.4 Defining a logical parmlib
IODF 00 SYS6 MOEMVSP1 01 YSYSCAT MPAT1113CATALOG.MCAT.VMPCAT1HWNAME P201LPARNAME A1PARMLIB SYS0.IPLPARMPARMLIB SYS1.OS390R7.PARMLIBPARMLIB SYSPROG.SYS1.PARMLIB
SYS0.IPLPARMSYS1.OS390R7.PARMLIBSYSPROG.SYS1.PARMLIBSYS1.PARMLIB
Parmlib concatenation
Searchorder
Loadxx
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IEASYSxx
• This is the main parameter member for z/OS• IEASYS00 is used by default• If essential parameters are not specified then the
operator will be prompted• Normally all parameters are specified to avoid
inconsistent operator response
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Parmlib commands
• The parmlib concatenation can be displayed using D PARMLIB
• The parameters used at IPL can be displayed using D IPLINFO
• The parmlib concatenation can be modified dynamically using SETLOAD xx,PARMLIB
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 17.5 Commands to display parmlib
D PARMLIB IEE251I 17.12.07 PARMLIB DISPLAY 377 PARMLIB DATA SETS SPECIFIED AT IPL ENTRY FLAGS VOLUME DATA SET 1 S TOTSY1 SYS1.SYSPROG.PARMLIB 2 D TOTSY1 SYS1.PARMLIB 3 S Z04CAT CPAC.PARMLIB 4 S Z04RE1 SYS1.IBM.PARMLIB
D IPLINFO IEE254I 17.15.29 IPLINFO DISPLAY 379 SYSTEM IPLED AT 09.28.14 ON 07/23/2004 RELEASE z/OS 01.04.00 LICENSE = z/OS USED LOADR2 IN SYS0.IPLPARM ON 3800 ARCHLVL = 2 MTLSHARE = N IEASYM LIST = XX IEASYS LIST = (R3,04) (OP) IODF DEVICE 3800 IPL DEVICE 8038 VOLUME Z04RE1
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SYS1.LPALIB
• The Link Pack Area (LPA) is built at IPL time from the modules defined in the LPALSTxx member of parmlib.
• SYS1.LPALIB is always the first library used unless overridden by a SYSLIB statement
• Modules are loaded into common storage at IPL time and so are available to all address spaces
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SYS1.LPALIB
• Fixed LPA comprises those modules defined in IEAFIXxx that are fixed in central storage
• Pageable LPA comprises most other modules whose pages are eligible to be stolen
• Modified LPA has modules which are temporary replacements for PLPA modules and is searched first.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Example of LPALST member
File Edit Edit_Settings Menu Utilities Compilers Test Help ----------------------------------------------------------------------------------------------------------EDIT SYS1.PARMLIB(LPALST5B) - 01.01 Columns 00001 00072 Command ===>_____________________________________ Scroll ===> CSR ******** ***************************** Top of Data ****************************************000001 SYS2.LPALIB, 000002 SYS1.LPALIB, 000003 SYS1.SERBLPA, 000004 SDF2.V1R4M0.SDGILPA, 000005 SYS1.SIATLPA, 000006 ING.SINGMOD3, 000007 NETVIEW.SCNMLPA1, 000008 REXX.V1R3M0.SEAGLPA, 000009 ISF.SISFLPA, 000010 EOY.SEOYLPA, 000011 SYS1.SBDTLPA, 000012 CEE.SCEELPA, ****** **************************** Bottom of Data ***************************************
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IEAFIX member
File Edit Edit_Settings Menu Utilities Compilers Test Help ----------------------------------------------------------------------------------------------------------EDIT SYS1.PARMLIB(IEAFIX01) - 01.01 Columns 00001 00072 Command ===>_____________________________________ Scroll ===> CSR ******** ***************************** Top of Data ****************************************000001 INCLUDE LIBRARY(SYS1.LPALIB) 000002 MODULES (IEAVAR00, /* 7K RCT INIT/TERM */000003 IEAVAR06, /* RCT INIT/TERM ALIAS */000004 IGC001G, /* 456 RESTORE(SVC17) */000005 ICHRFC00, /* RACF IMS/CICS */000006 ICHRFR00) /* RACF IMS/CICS */ 000007 INCLUDE LIBRARY(SYS1.SVCLIB) MODULES(IGC09302) *********************************** Bottom of Data ***************************************
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SYS1.PROCLIB
• When the system is first IPL’d either the MSTJCL00 load module or MSTJCLxx in SYS1.PARMLIB is used to provide the JCL for the master scheduler
• This JCL at a minimum points to SYS1.PROCLIB to provide the JCL procedures for the required tasks to run the system
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Sample master JCL
//MSTJCL05 JOB MSGLEVEL=(1,1),TIME=1440//EXEC PGM=IEEMB860//STCINRDR DD SYSOUT=(A,INTRDR)//TSOINRDR DD SYSOUT=(A,INTRDR)//IEFPDSI DD DSN=SYS1.PROCLIB,DISP=SHR//IEFPARM DD DSN=SYS1.PARMLIB,DISP=SHR//SYSUADS DD DSN=SYS1.UADS,DISP=SHR//SYSLBC DD DSN=SYS1.BRODCAST,DISP=SHR
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
A job’s procedure library
• The JES cataloged procedure in SYS1.PARMLIB contains lists of procedure libraries to be searched for JCL procedures
• JCLLIB may also be used to specify a private library to be searched first
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Procedure library//PROC00 DD DSN=SYS1.PROCLIB,DISP=SHR// DD DSN=SYS3.PROD.PROCLIB,DISP=SHR//PROC01 DD DSN=SYS1.PROC2,DISP=SHR...//PROCnn DD DSN=SYS1.LASTPROC,DISP=SHR...
//MYJOB JOB//MYLIBS JCLLIB ORDER=(MY.PROCLIB.JCL,SECOND.PROCLIB.JCL)//S1 EXEC PROC=MYPROC1...
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System symbols
• System symbols allow the use of a shared parmlib by two or more systems
• Each symbol has a name which can be used in various places and then substituted at IPL time
• Major uses are indirect cataloging and substituting system specific datasets such as the page data sets
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System symbols
SYSDEF HWNAME(SCZP801)LPARNAME(A08)SYSNAME(SC04)SYSPARM(R3,04)SYMDEF(&CPCNAME='P801')SYMDEF(&DFHSMHST='ON')SYMDEF(&SYSR2=’ZXYSY2’)SYMDEF(&SYSR3=’&SYSR1(1:5).3’)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Use of system symbols
PAGE=(PAGE.&SYSNAME..&PLPADSN1., PAGE.&SYSNAME..&COMMDSN1., PAGE.&SYSNAME..LOCAL1, PAGE.&SYSNAME..LOCAL2,L)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary
The role of the system programmer is to install customize and maintain the operating system and must be aware of:• z/OS operational system administration• Workload management• System performance• Job flow• I/O device management• Security/integrity/availability• z/OS Operation• Change management
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 17 Security on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesIn this chapter you will learn to:
• Explain security and integrity concepts• Explain RACF and its interface with the operating system• Authorize a program• Discuss integrity concepts• Explain the importance of change control• Explain the concept of risk assessment
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Key termsauthorized libraries authorized program facility (APF)encryptionSAFSVCPASSWORDfirewall
hackerpage protection bitResource Access Control Facility (RACF)security policyseparation of dutiessystem integrity user ID
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Introduction• An installation’s data and programs are among its most valuable
assets and must be protected• At one time data was secure because no one knew how to access it• As more people become computer literate and able to use simple
tools unprotected data is becoming more accessible• Data security is now more important than ever including the
prevention of inadvertent destruction
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Why security?• Any system security must allow authorized users the
access they need and prevent unauthorized access.• Many companies’ critical data is now on computer and is
easily stolen if not protected• z/OS Security Server provides a framework of services to
protect data
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF• RACF (part of Security Server) and the other available packages are
add-on products which provide the basic security framework on a z/OS mainframe
• Identify and authenticate users• Authorize users to access protected resources• Log and report attempted unauthorized access• Control means of access to resources
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 19-1 RACF functions overview
Security administration
Resource authorizationchecking and system control
User identificationand authorization
Audit and integrity reportsviolation alerts
RACFRACF
RACFdatabase
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Identification and verification of users• RACF uses a userid and system encrypted password to
perform its user identification and verification• The userid identified the person to the system• The password verifies the user’s identity• Passwords should not be trivial and exits can be used to
enforce policies.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Protection LevelsRACF works on a hierarchical structure
• ALLOC allows data set creation and destruction• CONTROL allows VSAM repro• WRITE allows update of data• READ allows read of data• NONE no access
A higher permission implies all those below
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Protecting a dataset• A data set profile is created and stored in the database• It will give users or groups an access level• A universal access level will also be set• The profile can be specific or generic, with or without
wild cards
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF typical displayINFORMATION FOR DATASET SYS1.*.** (G)
LEVEL OWNER UNIVERSAL ACCESS WARNING ERASE ----- -------- ------------------------------ ------------00 SYS1 READ NO
NO
AUDITING --------FAILURES(READ)
NOTIFY --------NO USER TO BE NOTIFIED
YOUR ACCESS CREATION GROUP DATASET TYPE -------------------- -------------------------- ----------------------
ALTER SYS1 NON-VSAM
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF access list for SYS1.*.**ID ACCESS
-------- -------SYS1 ALTER KARRAS ALTER WANDRER ALTER SCHUBER ALTER KURTKR UPDATE KURTKR2 UPDATE KURTKR3 NONE CICSRS1 ALTER CICSRS2 ALTER HEISIG UPDATE JUSTO UPDATE GERALD READ
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Protecting general resourcesMany system resources can be protected
• DASD volumes• Tapes• CICS or IMS transactions• JES spool datasets• System commands• Application resources and many more
RACF is flexible and more can be added
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 19-2 Operating system and RACF
..
OperatingSystem
Resourcemanager
RACF
RACFDatabases
or storage
data
SAFSAF
1
7 6
2 3
5
4
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 19-3 Concepts of RACF profile checking
S
A
F
.
.
.
.
RESOURCE MANAGER
S
A
F
RACROUTE
SAF CALLABLESERVICE
.
.
.
. SAF
Yes / no
databases
SECURITY PRODUCT
Optional exits
Exit RC
ExitCheck
RACF call
RACF RC
RACFCheck
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System Authorization Facility• SAF is part of z/OS• Uses RACF if it is present• Can also use an optional exit routine• SAF is a system service and is a common focal point for
all products providing resource control.• SAF is invoked at control points within the code of the
resource manager
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF Structure• Userid• Group
• Every userid belongs to at least one group• Group structures are often used for access to resources
• Resource• Resource classes• Class descriptor table – used to customize
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig19-4 RACF structure overview
GROUPPROFILES
GROUPPROFILESGROUP
PROFILES
DATASET AND GENERAL RESOURCE PROFILES
DATASET AND GENERAL RESOURCE PROFILES
DATASET AND GENERALRESOURCE PROFILES
USERPROFILES
USERPROFILESUSERPROFILES
RESOURCE CLASSESRESOURCE CLASSESRESOURCE CLASSES
SYSTEM OPTIONSSYSTEM OPTIONS
RACF ADMINISTRATION
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF Functions
Security administration
Resource authorizationchecking and system control
User identificationand authorization
Audit and integrity reportsviolation alerts
RACFRACF
RACFdatabase
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
User Identification• RACF identifies you when you logon• Userid and password are required• Each RACF userid has a unique password• Password is one way encrypted so no one else can get
your password not even the administrator• Userid is revoked after a preset number of invalid
password attempts
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF profile checking
ProtectedResource?
YesValid user
&group?
Accessauthority?
denied (*)
(*) if Protect All option is in effect
denied
granted
No
denied
No No
Yes Yes
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Logging and reportingRACF maintains statistical informationRACF writes a security log when it detects:
• Unauthorized attempts to enter the system• Access to resources
• This depends on the settings for the resource• For example AUDIT(ALL(UPDATE) will record all updates to a resource
• Issuing of commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Security AdministrationInterpret the security policy to:
• Determine which RACF functions to use• Identify the level of RACF protection• Identify which data to protect• Identify administrative structures and users
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
RACF sysplex data sharing and RRSF• If many systems share a RACF database there can be
contention problems• RACF will propagate commands throughout a sysplex• RACF can use a coupling facility in a parallel sysplex to
improve performance• RRSF can be used to keep distributed RACF databases
in line
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Authorized programs• Authorized tasks running authorized programs are
allowed to access sensitive system functions• Unauthorized programs may only use standard functions
to avoid integrity problems
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 19-7 Authorized Program Facility
SYS1.LINKLIBSYS1.LPALIBSYS1.SVCLIB
+
List of installation defined libraries
Authorized libraries
APF
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Authorized LibrariesA task is authorized when the executing program has the
following characteristics:• It runs in supervisor state • It runs in PSW key 0 to 7 • All previous programs in the same task were APF programs• The module was loaded from an APF library
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Problem Programs• Normal programs are known as problem programs as
they run in problem state (as opposed to supervisor state)
• They run in the problem key – 8 • They may or may not be in an APF library
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
APF Libraries• Authorized libraries are defined by the APF list in SYS1.PARMLIB• SYS1.LINKLIB, SYS1.SVCLIB and SYS1.LPALIB are automatically
authorized• Installation libraries are defined in PROGxx• By default all libraries in the linklist are authorized but many
installations set LNKAUTH=APFTAB, often prompted by auditors, so that this is no longer the case and only those in the list are authorized
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Authorizing a program• The first, and only the first, load module of the program
must be linked with the authorization code AC=1• It and all subsequent modules must be loaded from an
authorized library• APF libraries must be protected so that only authorized
users can store programs there
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Fig 19-8 Authorizing librariesAuthorized libraries:
SYS1.LINKLIBSYS1.LPALIBSYS1.SVCLIBList of installation defined libraries
APFauthorizedprograms
non-authorizedprograms
System programs usually:reside in APF-authorized librariesexecute in supervisor stateuse storage key 0 to through 7
Unauthorized ibraries.
Application programs usually:reside in non-authorized librariesexecute in problem stateuse storage key 8
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Authorizing libraries• The APF list is built during IPL using those libraries
listed in the PROGxx parmlib member• If a dynamic list is specified then it may be updated by
operator command
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
An example APF list
BROWSE SYS1.PARMLIB(PROGTT) - 01.01 Line 00000000 Col 001 080Command ===> Scroll ===> PAGE*************************** Top of Data ********************************APF FORMAT(DYNAMIC)APF ADD
DSNAME(SYS1.VTAMLIB)VOLUME(******)
APF ADDDSNAME(SYS1.SICELINK)VOLUME(******)
APF ADDDSNAME(SYS1.LOCAL.VTAMLIB)VOLUME(TOTCAT)
APF ADDDSNAME(ISP.SISPLOAD)VOLUME(*MCAT*)
*************************** Bottom of Data *****************************
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic APF• Update a PROGxx member and then activate it with
operator command SET PROG=xx• Use the SETPROG APF command• DISPLAY PROG,APF command will display the current
list
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D PROG,APFD PROG,APF CSV450I 12.46.27 PROG,APF DISPLAY 027 FORMAT=DYNAMIC ENTRY VOLUME DSNAME
1 Z04RE1 SYS1.LINKLIB 2 Z04RE1 SYS1.SVCLIB 3 Z04RE1 ANF.SANFLOAD 4 Z04RE2 AOP.SAOPLOAD 5 Z04RE1 AOP.SAOPLOAD 6 Z04RE1 ARTURO.BFSLMOD 7 Z04RE1 ASMA.V1R2M0.SASMMOD1 8 TOTDBZ ASN.V7R1M0.SASNALNK 9 TOTDBZ ASN.V7R1M0.SASNLLNK
10 TOTDBZ ASN.V8R1M0.SASNLOAD 11 TOTPT1 ASNA.V5R1M0.SASNALNK 12 TOTPT1 ASNL.V5R1M0.SASNLLNK
……
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Operator Console SecurityConsoles are assigned authority levels in CONSOLxx
parmlib memberCommands are grouped:
• INFO informational commands• SYS system control commands• IO I/O commands• CONS console control commands• MASTER master console commands
Each console may have one or more levels
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Consoles• At least one console must have master authority• In a sysplex consoles are shared• It is possible to require logon to consoles using RACF• All extended MCS consoles should require a logon
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Security Roles• Systems programmer sets up RACF• Systems administrator implements the policies• Security Manager sets the policies• Separation of duties is required to prevent uncontrolled
access
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary• z/OS Security Server• RACF• SAF• Authorized Programs• APF list• Console security
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System D1
RACFdatabase
System D2
Node D
System C
RACFdatabase
Node C
System B
RACFdatabase
Node B
System A
RACFdatabase
Node A
System E
RACFdatabase
Node E
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 18
Network Communications on z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesIn this chapter, you will learn:
• An overview of the communication network model layers• The software components of the z/OS Communications Server
product• The difference between a VTAM subarea and APPN network
topology• How the IP network can be used to transport data between SNA
applications.• Commonly used TCP/IP and VTAM commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IBM Communications Server
ApplicationsApplications
Applications
z/OS
APPC
Sockets RPC
SNA
RPC
Sockets APPC
TCP/IP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Open Systems Interconnect (OSI) network model
Physical Physical Physical
Data Link Data Link Data Link Control
IP ARP RARP ICMP Network Path Control
TCP UDP Transport Transmission Control
Session Data Flow Control
telnet, np, SNMP, SMTP Presentation
Applications Transaction Services
NAU Services MgrFunc. Mgmt Data Srvc
TCP/IP OSI SNA
Layered Network Models
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TCP/IP introductionNetwork A Network B
pSeriesRouter
xSeriesRouter
xSeriesRouter
zSeriesGateway
pSeriesWorkstation Workstation Workstation
zSeries
xSeriesGateway
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Interconnecting TCP/IP networks
Router
INTER-NETWORK
Network A Network B
Bridge
Gateway
Gateway
Router
Router
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Internet addressing
IPv4
Host A
IP Address131.12.8.2
IP Address193.15.6.4
IP Address131.12.8.1
Host BGateway
Host C
IP Address193.15.6.3
Network131.12
Network193.15.6
IP address = x.x.x.x (32 bits)= <net-ID> <host addr>
Class A = <x> <x.x.x>Class B = <x.x> <x.x>Class C = <x.x.x> <x>
IP address = x.x.x.x (32 bits)= <net-ID> <host addr>
Class A = <x> <x.x.x>Class B = <x.x> <x.x>Class C = <x.x.x> <x> network ID host
address
193.15.6 3131.12 8.2
hostaddress
network ID
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
TCP/IP commandsTCP/IP Commands can be entered
• TSO ready prompt• ISPF Command Shell• Prefixing the command with TSO on any ISPF command line.
• NETSTAT • PING• TRACERTE• NSLOOKUP• TELNET• FTP
• z/OS UNIX shell prompt (prefix “o”=command)• onetstat
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
VTAM overview - the SNA environment
317x
Clustercontroller
Host processor
z/OSCICSVTAM
PCpSeries
AIX
iSeries
OS/400
zSerieszSeries
z/VM
WindowsWindows
Communicationcontroller (37xx)
Workstations
NCP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
A pure VTAM subarea network
New York City
VTAM (SSCP) Subarea Configuration
Los Angeles Chicago
PU Type 2
LU LU
NCP subarea (13)PU Type 4
NCP subarea (12)PU Type 4
PU Type 2 PU Type 2
LU LU LU LU
NCP subarea (11)PU Type 4
VTAM subarea (3)SSCP (PU Type 5)
LU (CICSTS3)LU (IM S3)
VTAM subarea (1)SSCP (PU Type 5)
LU (CICSTS1)LU (IM S1)
VTAM subarea (2)SSCP (PU Type 5)
LU (CICSTS2)LU (IM S2)
PU Type 2
LU
LU
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
APPN topology
New York City
VTAM (CP) APPN Configuration
Los Angeles ChicagoPC PC
PC PC PC PC
router
VTAM APPNCP (PU Type 5)LU (CICSTS3)
LU (IM S3)
VTAM APPNCP (PU Type 5)LU (CICSTS1)
LU (IM S1)
VTAM APPNCP (PU Type 5)LU (CICSTS2)
LU (IM S2)
Internetsegment
PC
PC
internetsegment
router
Internetsegment
router
Internet and /orintranet
OSAHPR/IP
OSAHPR/IP
OSAHPR/IP
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Common VTAM commandsD NET,VTAMOPTS Displays VTAM startup options.D NET,CSM[,OWNERID=ALL] Displays communication storage usage.D NET,APPLS Displays status of defined applications (ACBs).D NET,MAJNODES Displays status of VTAM activated ATCCONxx
members.D NET,TOPO,LIST=SUMMARY Displays APPN topology information.D NET,CPCP Displays status of APPN CP-CP sessions.D NET,SESSIONS Displays status of subarea SSCP-SSCP sessions.D NET,CDRMS Displays status of subarea cross domain resource
managers.D NET,EXIT Displays status of VTAM exit points.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SummaryIn this chapter, you have learned:
• An overview of the communication network model layers• Software components of the z/OS Communications Server
product• The difference between a VTAM subarea and APPN network
topology• How the IP network can be used to transport data between SNA
applications.• Commonly used TCP/IP and VTAM commands
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Backup slides
Instructor slides with additional material
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
SDLC / CICS
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 19 Hardware systems and LPARs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesIn this chapter you will learn:
• About S/360 and zSeries hardware design• About processing units and disk hardware• How mainframes differ from PC systems in data encoding• About some typical hardware configurations
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
IntroductionHere we look at the hardware in a complete system
although the emphasis is on the processor “box”Terminology is not straightforward
• Ever since “boxes” became multi-engined, the terms system, processor, and CPU have become muddled
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Terminology:
Individual processors in the system
"processors"
"CPUs"
"engines"
"PUs"
"CPs"
IFLs, ICFs, zAAPs, IFLs spares
"system" = CPs running an operating system
System box from IBM possibly a zSeries
machine
Sometimes referenced as a "processor"
A few people use "CEC"
Many use "system"
Sometimes referenced as a "CPU"
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Conceptual S/360
00 33 00 11
ProcessorsStorageControl
MainStorage
11 55 66 AA BB
ControlUnit
3Control
UnitControl
Unit
3
11 22
55 33Channels
Devices
X
Y 00 11 Z
ControlUnit
C0communication
line
ParallelChannels
AnotherAnotherSystemSystem
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Early system design
• System/360 was designed in the early 1960s• The central processor box contains the processors, memory,
control circuits and channel interfaces• Early systems had up to 16 channels whereas modern systems have
over 1000• Channels connect to control units• Control units connect to devices such as disk drives, tape drives
and communication interfaces
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Device addressaddress: 1 3 2
channel number control unit number device number
In the early design the device address was physically related to the hardware architectureParallel channels had large diameter heavy copper “bus and tag” cables
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Current designCurrent CEC designs are considerably more complex then
the early S/360 designThis new complexity includes
• I/O connectivity• I/O operation• Partitioning of the system
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
I/O Connectivity
I/O Processing
Othersystems
01 02 ... 40 41 42 ... ... A0 A1 ... ...
ControlUnit
ESCONDirector(switch)
FICONswitch
ControlUnit
C0Control
Unit
C1Control
Unit
01Control
Unit
02
E - ESC ON channelF - FICON channelO - OSA-Express channel
CEC box
Partition 1 Partition 2
LAN
O E E E E F F
Channels(CHPIDs or PCHIDs)
Control unit addresses (CUA)
00 1100 11Unit addresses (UA)
01
00 11 00 11
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
I/O ConnectivityESCON and FICON channelsSwitches to connect peripheral devices to more than one
CECCHPID addresses are two hex digitsMultiple partitions can share CHPIDsI/O subsystem layer exists between the operating system
and the CHPIDs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
I/O ConnectivityI/O control layer uses a control file IOCDS that translates
physical I/O addresses into devices numbers that are used by z/OS
Device numbers are assigned by the system programmer when creating the IODF and IOCDS and are arbitrary (but not random!)
On modern machines they are three or four hex digits
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
I/O Connectivity
HSA
LPAR BCentral Storage
LPAR ACentral Storage
UCB2001
UCB2000
UCB183F
68306831
68326833
FF00
FF01
FF02
FF03 C40
683F
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
200A
200B
200C
200D
200E
200F
External device labelFour hex digits in range 0000-FFFFArbitrarily assigned by sysprogUsed in JCL, commands, messages, EREP
IEE302I 200A ONLINE
V 200B,ONLINE
V 200A,ONLINE
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System Control and Partitioning
CP CP CP CP
System Control
LPAR1 LPAR2 LPAR3
System Control
CHPID
CHPID
CHPID CHPID CHPID
CHPID CHPID
HMC SE
Specialized microprocessors for internal control functions
PC Think Pads
Located in operator area Located inside CEC but can be used by operators
Memory
Processors
Channels
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
System Control and Partitioning• Among the system control function is the ability to
partition the system into logical partitions (LPARs)• Initial limit was 15 LPARs but newer machines allow 30
partitions• Practical considerations can limit the number to less
than this as each LPAR needs memory, I/O, and processing power
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
LPARsSystem administrators assign:
• Memory• Processors• CHPIDs either dedicated or shared
This is done partly in the IOCDS and partly in a system profile on the Support Element (SE) in the CEC. This is normally updated through the HMC.
Changing the system profile and IOCDS will usually require a power-on reset (POR) but some changes are dynamic
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Characteristics of LPARs• LPARs are the equivalent of a separate mainframe for most practical
purposes• Each LPAR runs its own operating system• Devices can be shared across several LPARs• Processors can be dedicated or shared• When shared each LPAR is assigned a number of logical processors
(up to the maximum number of physical processors) and a weighting
• Each LPAR is independent
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Consolidation of mainframes• Many installations used to have several boxes• A single larger machines running many LPARs is often
more cost effective, as software licenses for multiple small machines can total more than those for a single large one
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Processing UnitsModern processor offer many specialist processor types. Most
of the additional types are not counted as full processors for software charging• Central Processor (CP) - A full z/OS processor• System Assistance Processor (SAP) - Used for the I/O
subsystem – each machine has at least one• Integrated Facility for Linux (IFL) - Special processor for Linux
- optional• zAAP - Used for JAVA code – optional• Integrated Coupling Facility (ICF) - For coupling facilities• Spares
SAPs, IFLs, ICFs, and zAAPs are not counted in the model number and or against software costs
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Capacity on Demand• Various forms of Capacity on Demand exist• Additional processing power to meet unexpected growth
or sudden demand peaks
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Disk Devices
Current mainframes use 3390 disk devicesThe original configuration was simple with a controller connected to the processor and strings of devices attached to the back end
IBM 3390 Disk Unit
IBM 3990 Control Unitchannels
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Current 3390 Implementation
Common Interconnect (across clusters)
HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA
Cluster Processor Complex
cache NVS
DA DA DA DA
Cluster Processor Complex
cache NVS
DA DA DA DA
RAID array
RAID array
Device Adapters
Host Adapters (2 channel interfaces per adapter)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Modern 3390 devices• The 2105 Enterprise Storage Server just shown is very
sophisticated• It emulates a large number of control units and 3390
disks. It can also be partitioned and connect to UNIX and other systems as SCSI devices.
• There are 11 TB of disk space up to 32 channel interfaces, 16GB cache and 284MB of non-volatile memory
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Modern 3390 Devices• The physical disks are commodity SCSI- type units• Many configurations are possible but usually it is RAID-5
arrays with hot spares• Almost every part has a fallback or spare and the control
units are emulated by 4 RISC processors in two complexes.
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Modern 3390 Devices• The 2105 offers FlashCopy, Extended Remote Copy,
Concurrent Copy, Parallel Access Volumes, Multiple Allegiance
• This is a huge extension of the original 3390 architecture and offers a massive performance boost.
• To the z/OS operating system these disks just appear as traditional 3390 devices so maintaining backward compatibility
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
EBCDIC• The IBM S/360 through to the latest zSeries machines use the
Extended Binary Coded Decimal Interchange character set for most purposes
• This was developed before ASCII and is also an 8 bit character set• z/OS Web Server stores ASCII data as most browsers run on PCs
which expect ASCII data• UNICODE is used for JAVA on the latest machines
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Clustering• Clustering has been done for many years in several
forms• Basic shared DASD• CTC/GRS rings• Basic and Parallel sysplex
• Image is used to describe a single z/OS system, which might be standalone or an LPAR on a large box
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Basic shared DASD
Limited capabilityReserve and release against a whole disk Limits access to that disk for the duration of the update
zSeries ( or LPAR)
z/OSchannels
zSeries ( or LPAR)
z/OSchannels
control unit control unit
Real system would have many more control units and devices
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
CTC Ring
Global Resource Sharing (GRS) used to pass information between systems via the CTC ringRequest ENQueue on a data set, update, the DEQueueLoosely coupled system
zSeries ( or LPAR)
z/OSchannels
zSeries ( or LPAR)
z/OSchannels
control unit control unit
Can have more systems in the CTC"ring"
CTC
CTC
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Parallel Sysplex
This extension of the CTC ring uses a dedicated Coupling Facility to store ENQ data for GRSThis is much fasterThe CF can also be used to share application data such as DB2 tablesCan appear as a single system
zSeries ( or LPAR)
z/OSchannels
zSeries ( or LPAR)
z/OSchannels
control unit control unit
system or LPAR
CouplingFacility
CF channels
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Typical Systems
This shows two very small systems• On the left is a Multiprise 3000, which was designed for small
installations with internal disk drives• On the right is a FLEX-ES emulation system, which runs on a PC
running Linux or UNIX
printer
MP3000System
SUPPORTelement
Standard mainframe control units and devices
ESCON channels
LANadapter(s)
tn3270 terminals
printer
tn3270 terminals
LANadapter(s)
FLEX-ESSystem
Parallel channels
Selected mainframe control units and devices
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Medium Mainframe Configuration
This is a completely modern implementation with no older devicesA z890 is featured with two external disk controllers, tape drives, printers, LAN attachments and consoles
Printer
RouterTape drives
LAN
Consoles
OSA-Expressz890
Printer
EnterpriseStorage Server1
EnterpriseStorage Server1
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Medium Single SystemThis system could be running several LPARs
• A production z/OS with interactive applications• A second production LPAR devoted to batch• A test z/OS LPAR for testing new software• One or more LPARs running Linux, perhaps running web
applications
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Moderately Large Configuration
Two machines – a new z990 and an older 9672Parallel Sysplex with coupling facilityMultiple ESS and older DASD connected via a switch3745 communications controllers for an SNA network3490E tape drives retained for compatibilityOSA Express connections to various LANsConsoles
OSA Express
LAN
LAN
Older DASDdevice 3390
3490E
OSA Express
Consoles
CFCF
EsconDirector
EsconDirector
LANOSA Express
LANOSA Express
z990 9672R96
EnterpriseStorage Server1
EnterpriseStorage Server1
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Larger system• This is the sort of mixture of device generations that might be found
in any enterprise• New devices are brought in but older ones are still viable until they
reach the end of their life• z/OS will usually run on older devices until an architectural change
forces their withdrawal• This sort of change is usually well publicized and several years
notice is given of any incompatibility which will usually coincide with the machine being at end of life
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary• Terminology is important• The classic S/360 design is important as all later designs
have enhanced it. The concepts are still relevant• New processor types are now available to reduce
software costs• EBCDIC character set • Clustering techniques and parallel sysplex
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
BulkPowerUnit
FSP BulkPowerUnit
FSPSupportElement
HMC
SupportElement
FSP FSP
DCA DCA
FSP FSP
DCA DCA
FSP FSP
DCA DCA
FSP FSP
DCA DCA
MCM MCM
Memory Memory
ProcessorBook 0
ProcessorBook 1
I/O Cage 2 I/O Cage 3
...Connections for up to 28 channel adapter cards
Connections for up to 28 channel adapter cards
Ethernet
DCA = power +control interface
Systemframe"Box"
Introduction to the new mainframe: z/OS basics
© Copyright IBM Corp., 2005. All rights reserved.
Chapter 20 Parallel Sysplex
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
ObjectivesIn this chapter you will learn:
• How Parallel Sysplex can achieve continuous availability• Dynamic workload balancing• Single system image
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Sysplex Hardware Overview
DASDDASDDASDDASDDASDDASD
ESCON / FICON
Sysplex Timer
IBM zSeries
CF01ICF
IBM zSeries
CF01ICF
z/OS
SysplexLPARs
IBM zSeries
z/OS
SysplexLPARs
123
4567
8910
11 12 12
34
5678
910
11 12
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Sysplex Overview• A sysplex is a collection of z/OS systems that cooperate,
using certain hardware and software products, to process work
• Improved growth potential• Improved level of availability
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is a parallel sysplex?• Innovative multi-system data-sharing technology• Direct concurrent read/write access to shared data from
all processing nodes• No loss of data integrity • No performance hit• Transactions and queries can be distributed for parallel
execution based on available capacity and not restricted to a single node
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
What is parallel sysplex? (continued)• Builds on the strength of zSeries servers by linking up to
32 images to create the industry’s most powerful commercial processing clustered system
• Every “cloned” application can run on every image• Hardware and software can be maintained non-
disruptively
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Continuous availability• Within a parallel sysplex cluster, it is possible to
construct an environment with no single point of failure• Peer instances can of a failing subsystem can take over
recovery responsibility for resources held by the failing instance
• Alternatively the failing subsystem can be automatically restarted on still healthy systems
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Continuous availability• In a parallel sysplex it is possible that the loss of a
server may be transparent to the application and the server workload redistributed automatically with little performance degradation
• Each system is still individual• Software upgrades can be rolled through one system at
a time on a sensible timescale for the business
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Capacity• The parallel sysplex can scale near linearly from 2 to 32
systems.• It can be a mix of any servers that support parallel
sysplex
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Dynamic workload balancing• The entire parallel sysplex cluster can be regarded as a
single logical resource to end users and business applications
• Work can be dynamically distributed to nodes with available capacity
• Workload balancing also allows running of diverse applications while maintaining response times critical to the business
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Ease of usez/OS Workload Manager
• Sysplex-wide workload management to one policySysplex Failure Manager
• Specify failure detection and recovery actions Automatic Restart Manager
• Fast recovery of critical subsystemsCloning and symbolics
• Used to replicate applications across the nodes
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
zSeries Parallel Sysplex Resource Sharing• This is not to be confused with application data sharing• This is sharing of physical system resources such as
tape drives, catalogs, consoles• This exploitation is built into z/OS• Simplifies the management of the system
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Single System Image• The sysplex should appear as a single image to operator,
end user, database administrator and others• Single point of control • Persistent single image across failures
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Applications in a Parallel SysplexDesign goal of no application changesBenefits
• Scalability• Integration of older applications with new workloads such as
web serving• With an existing sysplex there is very little infrastructure work
required for a new application. The existing infrastructure may even be used without the need for a new server
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
GDPS• A geographically dispersed parallel sysplex is the
ultimate disaster recovery and continuous availability solution for a multi-site enterprise
• Two sites up to 100 fiber kilometers apart may be connected for synchronous updates
• Asynchronous techniques may be used over this distance
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Summary• Reduce cost compared to previous offerings of
comparable function and performance• Continuous availability even during change• Dynamic addition and change• Parallel sysplex builds on the strengths of the z/OS
platform to bring even greater availability serviceability and reliability
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Additional materialsThe following foils contain additional material to
demonstrate points about parallel sysplex if one is not available
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
Parallel sysplex display status
Display of a 16 image sysplexEach image has reported active with the last 5 seconds
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D IPLINFO
This shows the first screen of response to D IPLINFO in a sysplexNote that systems have been IPL’d at different times and are running different releases of z/OS
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D WLM
This shows the display for two of the systems in the sysplexNote they are running the same policy activated at exactly the same time by another system SC53
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D XCF,PATHIN
This display shows the connections to the other systems in the sysplex are by both CTC devices and via structures in the coupling facilityIf the CF were to have a problem then the sysplex would continue with the CTC connections
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D XCF,STRUCTURE
This shows a subset of the output from the command to illustrate some pointsThe IXC structures are the ones used by XCF, the main sysplex componentThe SYSZWLM structures are used by workload manager
• Note there is one structure for each physical machine • There are two machines: a 2064 (z900) and a 2084 (z990)
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D M=CPU
This shows the output from the command with the processor type, serial number and number of logical processors assigned
Introduction to the new mainframe
© Copyright IBM Corp., 2005. All rights reserved.
D C
This shows the console display for a system SC04 in a sysplexNote that the only console is attached to SC47