529
Introduction to the new mainframe: z/OS basics © Copyright IBM Corp., 2005. All rights reserved. Chapter 1: The new mainframe

IBM introducción a mainframe

Embed Size (px)

DESCRIPTION

Las presentaciones de IBM para el estudio de los conceptos básicos de mainframe

Citation preview

Page 1: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 1: The new mainframe

Page 2: IBM introducción a 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.

Page 3: IBM introducción a mainframe

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

Page 4: IBM introducción a mainframe

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

Page 5: IBM introducción a mainframe

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.

Page 6: IBM introducción a mainframe

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.

Page 7: IBM introducción a mainframe

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

Page 8: IBM introducción a mainframe

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

Page 9: IBM introducción a mainframe

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

Page 10: IBM introducción a mainframe

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

Page 11: IBM introducción a mainframe

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

Page 12: IBM introducción a mainframe

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

Page 13: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Mainframe operating systemsz/OSz/VMVSELinux for zSeriesz/TPF

Page 14: IBM introducción a mainframe

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.

Page 15: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 2: z/OS Overview

Page 16: IBM introducción a mainframe

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.

Page 17: IBM introducción a mainframe

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

Page 18: IBM introducción a mainframe

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

Page 19: IBM introducción a mainframe

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

Page 20: IBM introducción a mainframe

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

Page 21: IBM introducción a mainframe

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)

Page 22: IBM introducción a mainframe

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)

Page 23: IBM introducción a mainframe

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

Page 24: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

How virtual storage works (continued…)

Page 25: IBM introducción a mainframe

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.

Page 26: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Pages, Frames, and Slots (continued)

Page 27: IBM introducción a mainframe

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.

Page 28: IBM introducción a mainframe

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.

Page 29: IBM introducción a mainframe

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.

Page 30: IBM introducción a mainframe

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

Page 31: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Brief history of z/OS addressability (continued…)

Page 32: IBM introducción a mainframe

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.

Page 33: IBM introducción a mainframe

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

Page 34: IBM introducción a mainframe

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.

Page 35: IBM introducción a mainframe

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.

Page 36: IBM introducción a mainframe

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.

Page 37: IBM introducción a mainframe

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

Page 38: IBM introducción a mainframe

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.

Page 39: IBM introducción a mainframe

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

Page 40: IBM introducción a mainframe

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

Page 41: IBM introducción a mainframe

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)

Page 42: IBM introducción a mainframe

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.

Page 43: IBM introducción a mainframe

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

Page 44: IBM introducción a mainframe

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.

Page 45: IBM introducción a mainframe

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)

Page 46: IBM introducción a mainframe

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.

Page 47: IBM introducción a mainframe

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)

Page 48: IBM introducción a mainframe

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.

Page 49: IBM introducción a mainframe

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

Page 50: IBM introducción a mainframe

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).

Page 51: IBM introducción a mainframe

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

Page 52: IBM introducción a mainframe

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.

Page 53: IBM introducción a mainframe

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.

Page 54: IBM introducción a mainframe

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.

Page 55: IBM introducción a mainframe

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

.

Page 56: IBM introducción a mainframe

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.

Page 57: IBM introducción a mainframe

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

Page 58: IBM introducción a mainframe

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

Page 59: IBM introducción a mainframe

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

Page 60: IBM introducción a mainframe

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)

Page 61: IBM introducción a mainframe

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

Page 62: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

ISPF Edit Panel - Inserting lines

Screen 2

Screen 1

Page 63: IBM introducción a mainframe

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.

Page 64: IBM introducción a mainframe

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.

Page 65: IBM introducción a mainframe

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.

Page 66: IBM introducción a mainframe

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

Page 67: IBM introducción a mainframe

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.

Page 68: IBM introducción a mainframe

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.

Page 69: IBM introducción a mainframe

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.

Page 70: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 4: Working with data sets

Page 71: IBM introducción a mainframe

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.

Page 72: IBM introducción a mainframe

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

Page 73: IBM introducción a mainframe

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.

Page 74: IBM introducción a mainframe

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.

Page 75: IBM introducción a mainframe

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.

Page 76: IBM introducción a mainframe

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.

Page 77: IBM introducción a mainframe

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.

Page 78: IBM introducción a mainframe

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)

Page 79: IBM introducción a mainframe

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

Page 80: IBM introducción a mainframe

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

Page 81: IBM introducción a mainframe

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.

Page 82: IBM introducción a mainframe

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

Page 83: IBM introducción a mainframe

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

Page 84: IBM introducción a mainframe

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)

Page 85: IBM introducción a mainframe

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

Page 86: IBM introducción a mainframe

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)

Page 87: IBM introducción a mainframe

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.

Page 88: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

VTOC

LABEL(volser)

Extents

tracks

free spaceYOUR.DATAMY.DATA

trackstracks

VTOC

Page 89: IBM introducción a mainframe

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.

Page 90: IBM introducción a mainframe

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

Page 91: IBM introducción a mainframe

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.

Page 92: IBM introducción a mainframe

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

Page 93: IBM introducción a mainframe

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.

Page 94: IBM introducción a mainframe

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.

Page 95: IBM introducción a mainframe

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

Page 96: IBM introducción a mainframe

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.

Page 97: IBM introducción a mainframe

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)

Page 98: IBM introducción a mainframe

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.

Page 99: IBM introducción a mainframe

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

Page 100: IBM introducción a mainframe

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.

Page 101: IBM introducción a mainframe

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

Page 102: IBM introducción a mainframe

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.

Page 103: IBM introducción a mainframe

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.

Page 104: IBM introducción a mainframe

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.

Page 105: IBM introducción a mainframe

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

Page 106: IBM introducción a mainframe

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

Page 107: IBM introducción a mainframe

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.

Page 108: IBM introducción a mainframe

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

Page 109: IBM introducción a mainframe

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

Page 110: IBM introducción a mainframe

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

Page 111: IBM introducción a mainframe

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

Page 112: IBM introducción a mainframe

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

Page 113: IBM introducción a mainframe

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

Page 114: IBM introducción a mainframe

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

Page 115: IBM introducción a mainframe

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

Page 116: IBM introducción a mainframe

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

Page 117: IBM introducción a mainframe

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

Page 118: IBM introducción a mainframe

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.

Page 119: IBM introducción a mainframe

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.

Page 120: IBM introducción a mainframe

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.

Page 121: IBM introducción a mainframe

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)

Page 122: IBM introducción a mainframe

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

Page 123: IBM introducción a mainframe

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

Page 124: IBM introducción a mainframe

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

Page 125: IBM introducción a mainframe

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

Page 126: IBM introducción a mainframe

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)

/*

Page 127: IBM introducción a mainframe

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.

Page 128: IBM introducción a mainframe

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

Page 129: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

JCL: EXEC statement

EXEC statementRegion size

Page 130: IBM introducción a mainframe

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)

Page 131: IBM introducción a mainframe

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.

Page 132: IBM introducción a mainframe

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

Page 133: IBM introducción a mainframe

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.

Page 134: IBM introducción a mainframe

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.

Page 135: IBM introducción a mainframe

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

Page 136: IBM introducción a mainframe

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

Page 137: IBM introducción a mainframe

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)

Page 138: IBM introducción a mainframe

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)

Page 139: IBM introducción a mainframe

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

Page 140: IBM introducción a mainframe

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

Page 141: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Primary option menu

Page 142: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Options menu

Page 143: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Viewing the JES2 output filesScreen 1

Screen 2

Page 144: IBM introducción a mainframe

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

Page 145: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Issuing MVS and JES commands

Page 146: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Input queue panel

Page 147: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Output queue panel

Page 148: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Held output queue panel

Page 149: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDSF: Status panel

Page 150: IBM introducción a mainframe

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

Page 151: IBM introducción a mainframe

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.

Page 152: IBM introducción a mainframe

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.

Page 153: IBM introducción a mainframe

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.

Page 154: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 7: Designing and developing applications for z/OS

Page 155: IBM introducción a mainframe

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.

Page 156: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Key terms in this chapter

applicationASCIIDFSORTEBCDIC

enablement executableuser requirementssystem

Page 157: IBM introducción a mainframe

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

Page 158: IBM introducción a mainframe

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.

Page 159: IBM introducción a mainframe

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.

Page 160: IBM introducción a mainframe

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

Page 161: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Application development lifecycle

Gatherrequirements Analysis Design

Code & test User, Systemtests

Goproduction Maintenance

Page 162: IBM introducción a mainframe

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

Page 163: IBM introducción a mainframe

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

Page 164: IBM introducción a mainframe

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

Page 165: IBM introducción a mainframe

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

Page 166: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Development phase

Designdocuments

Coding Testing

Revise

TestedTestedprogramsprograms

Page 167: IBM introducción a mainframe

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.

Page 168: IBM introducción a mainframe

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

Page 169: IBM introducción a mainframe

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

Page 170: IBM introducción a mainframe

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

Page 171: IBM introducción a mainframe

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

Page 172: IBM introducción a mainframe

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

Page 173: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Production phase

PromoteTo

productionProductionProductionRepositoryRepository

Finaltested

programs

Page 174: IBM introducción a mainframe

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

Page 175: IBM introducción a mainframe

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

Page 176: IBM introducción a mainframe

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

Page 177: IBM introducción a mainframe

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

Page 178: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 8: Using programming languages on z/OS

Page 179: IBM introducción a mainframe

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

Page 180: IBM introducción a mainframe

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

Page 181: IBM introducción a mainframe

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

Page 182: IBM introducción a mainframe

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

Page 183: IBM introducción a mainframe

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

Page 184: IBM introducción a mainframe

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

Page 185: IBM introducción a mainframe

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

Page 186: IBM introducción a mainframe

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

Page 187: IBM introducción a mainframe

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

Page 188: IBM introducción a mainframe

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

Page 189: IBM introducción a mainframe

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

Page 190: IBM introducción a mainframe

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

Page 191: IBM introducción a mainframe

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.

Page 192: IBM introducción a mainframe

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

Page 193: IBM introducción a mainframe

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

Page 194: IBM introducción a mainframe

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

Page 195: IBM introducción a mainframe

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

Page 196: IBM introducción a mainframe

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

Page 197: IBM introducción a mainframe

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.

Page 198: IBM introducción a mainframe

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

Page 199: IBM introducción a mainframe

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

Page 200: IBM introducción a mainframe

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.

Page 201: IBM introducción a mainframe

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

Page 202: IBM introducción a mainframe

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

Page 203: IBM introducción a mainframe

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

Page 204: IBM introducción a mainframe

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

Page 205: IBM introducción a mainframe

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

Page 206: IBM introducción a mainframe

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.

Page 207: IBM introducción a mainframe

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

Page 208: IBM introducción a mainframe

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

Page 209: IBM introducción a mainframe

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

Page 210: IBM introducción a mainframe

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.

Page 211: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Source code to load module

Source module

Objectmodule

LoadmodulePrecompiler Compiler Binder

Page 212: IBM introducción a mainframe

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

Page 213: IBM introducción a mainframe

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.

Page 214: IBM introducción a mainframe

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)

Page 215: IBM introducción a mainframe

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.

Page 216: IBM introducción a mainframe

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

Page 217: IBM introducción a mainframe

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.

Page 218: IBM introducción a mainframe

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

Page 219: IBM introducción a mainframe

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 *

Page 220: IBM introducción a mainframe

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

Page 221: IBM introducción a mainframe

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).../*//

Page 222: IBM introducción a mainframe

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

Page 223: IBM introducción a mainframe

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]

Page 224: IBM introducción a mainframe

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=*

Page 225: IBM introducción a mainframe

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

Page 226: IBM introducción a mainframe

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

Page 227: IBM introducción a mainframe

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

Page 228: IBM introducción a mainframe

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

Page 229: IBM introducción a mainframe

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)

/*

Page 230: IBM introducción a mainframe

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

Page 231: IBM introducción a mainframe

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

Page 232: IBM introducción a mainframe

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.

Page 233: IBM introducción a mainframe

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

Page 234: IBM introducción a mainframe

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/*//

Page 235: IBM introducción a mainframe

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

Page 236: IBM introducción a mainframe

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

Page 237: IBM introducción a mainframe

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.

Page 238: IBM introducción a mainframe

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

Page 239: IBM introducción a mainframe

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.

Page 240: IBM introducción a mainframe

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

Page 241: IBM introducción a mainframe

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.

Page 242: IBM introducción a mainframe

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.

Page 243: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 10 Overview of z/OS online workloads

Page 244: IBM introducción a mainframe

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.

Page 245: IBM introducción a mainframe

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

Page 246: IBM introducción a mainframe

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

Page 247: IBM introducción a mainframe

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

Page 248: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

A practical example

CarRentalAgency

Hotel Airline

TravelAgency

WAP

HTTP

Page 249: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Transactional systemsRequirements: ACID

• Atomicity• Consistency• Isolation• Durability

Page 250: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Transactional systems: terminology• Commit and roll back• Multitasking and multithreading• Thread• Reentrancy

Page 251: IBM introducción a mainframe

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

Page 252: IBM introducción a mainframe

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

Page 253: IBM introducción a mainframe

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

Page 254: IBM introducción a mainframe

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

Page 255: IBM introducción a mainframe

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

Page 256: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Databases: terminology• Entities• Data attributes• Entity relationships• Application functions• Access paths

Page 257: IBM introducción a mainframe

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

Page 258: IBM introducción a mainframe

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

Page 259: IBM introducción a mainframe

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

Page 260: IBM introducción a mainframe

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

Page 261: IBM introducción a mainframe

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

Page 262: IBM introducción a mainframe

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

Page 263: IBM introducción a mainframe

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))

Page 264: IBM introducción a mainframe

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.

Page 265: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 11 Understanding transaction managers on z/OS

Page 266: IBM introducción a mainframe

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

Page 267: IBM introducción a mainframe

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

Page 268: IBM introducción a mainframe

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.

Page 269: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

CICS in a z/OS system

z/OSz/OS

Transactionalsystem

ApplicationApplicationProgramProgramDATADATA

User

Page 270: IBM introducción a mainframe

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)

Page 271: IBM introducción a mainframe

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

Page 272: IBM introducción a mainframe

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

Page 273: IBM introducción a mainframe

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)...

Page 274: IBM introducción a mainframe

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.

Page 275: IBM introducción a mainframe

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

Page 276: IBM introducción a mainframe

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

Page 277: IBM introducción a mainframe

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

Page 278: IBM introducción a mainframe

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

Page 279: IBM introducción a mainframe

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

Page 280: IBM introducción a mainframe

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

Page 281: IBM introducción a mainframe

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

Page 282: IBM introducción a mainframe

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

Page 283: IBM introducción a mainframe

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

Page 284: IBM introducción a mainframe

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

Page 285: IBM introducción a mainframe

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

Page 286: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

IMS overview

IMS System

TransactionManager

DatabaseManager

IMSMessageQueues

IMSDatabases

IMSLogsz/OS

Console

Page 287: IBM introducción a mainframe

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

Page 288: IBM introducción a mainframe

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

Page 289: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 12 Understanding databasemanagers on z/OS

Page 290: IBM introducción a mainframe

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

Page 291: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Key terms in this chapterbindDBMSEXPLAINmodified source

SPUFISQLSYSADMview

Page 292: IBM introducción a mainframe

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

Page 293: IBM introducción a mainframe

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

Page 294: IBM introducción a mainframe

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)

Page 295: IBM introducción a mainframe

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

Page 296: IBM introducción a mainframe

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)

Page 297: IBM introducción a mainframe

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.

Page 298: IBM introducción a mainframe

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).

Page 299: IBM introducción a mainframe

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.

Page 300: IBM introducción a mainframe

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

Page 301: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Invoke SQL on z/OS: SPUFI (CONT…)

Page 302: IBM introducción a mainframe

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

Page 303: IBM introducción a mainframe

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

Page 304: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Other development optionsODBCJAVASQLJJDBCXMLXML Column AccessXML Collection Access

Page 305: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Managing DB2: System AdministrationInstallationSystem Object ManagementSystem and Disaster RecoveryMonitoring System Performance

Page 306: IBM introducción a mainframe

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

Page 307: IBM introducción a mainframe

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

Page 308: IBM introducción a mainframe

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)

Page 309: IBM introducción a mainframe

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

Page 310: IBM introducción a mainframe

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

Page 311: IBM introducción a mainframe

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)

Page 312: IBM introducción a mainframe

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

Page 313: IBM introducción a mainframe

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

Page 314: IBM introducción a mainframe

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

Page 315: IBM introducción a mainframe

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

Page 316: IBM introducción a mainframe

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

Page 317: IBM introducción a mainframe

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

Page 318: IBM introducción a mainframe

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.

Page 319: IBM introducción a mainframe

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.

Page 320: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 13: z/OS HTTP Server

Page 321: IBM introducción a mainframe

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

Page 322: IBM introducción a mainframe

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

Page 323: IBM introducción a mainframe

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

Page 324: IBM introducción a mainframe

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

Page 325: IBM introducción a mainframe

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

Page 326: IBM introducción a mainframe

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

Page 327: IBM introducción a mainframe

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

Page 328: IBM introducción a mainframe

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

Page 329: IBM introducción a mainframe

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

Page 330: IBM introducción a mainframe

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

Page 331: IBM introducción a mainframe

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)

Page 332: IBM introducción a mainframe

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

Page 333: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 14 WebSphere Application Server on z/OS

Page 334: IBM introducción a mainframe

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

Page 335: IBM introducción a mainframe

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

Page 336: IBM introducción a mainframe

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

Page 337: IBM introducción a mainframe

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

Page 338: IBM introducción a mainframe

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

Page 339: IBM introducción a mainframe

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

Page 340: IBM introducción a mainframe

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

Page 341: IBM introducción a mainframe

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

Page 342: IBM introducción a mainframe

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

Page 343: IBM introducción a mainframe

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

Page 344: IBM introducción a mainframe

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

Page 345: IBM introducción a mainframe

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

Page 346: IBM introducción a mainframe

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

Page 347: IBM introducción a mainframe

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

Page 348: IBM introducción a mainframe

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

Page 349: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Mainframe Connectors

• CICS Transaction Gateway• IMS Connect• DB2 JDBC

Page 350: IBM introducción a mainframe

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

Page 351: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 15 WebSphere MQ

Page 352: IBM introducción a mainframe

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

Page 353: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Key terms in this chapterlocal queuechannelmessage-drivenMQIasynchronous application

dead-letter queueQMremote queuesyncpoint

Page 354: IBM introducción a mainframe

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

Page 355: IBM introducción a mainframe

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

Page 356: IBM introducción a mainframe

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

Page 357: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Messages

Types of messages:• Datagram• Request• Reply• Report

Page 358: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Queue Manager

Messages

Program

Data

Program

Program

Queuemanager

DB2

Page 359: IBM introducción a mainframe

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

Page 360: IBM introducción a mainframe

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

Page 361: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Queue types

Page 362: IBM introducción a mainframe

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

Page 363: IBM introducción a mainframe

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

Page 364: IBM introducción a mainframe

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

Page 365: IBM introducción a mainframe

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

Page 366: IBM introducción a mainframe

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

Page 367: IBM introducción a mainframe

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

Page 368: IBM introducción a mainframe

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).

Page 369: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 16 Topics in z/OS system programming

Page 370: IBM introducción a mainframe

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

Page 371: IBM introducción a mainframe

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

Page 372: IBM introducción a mainframe

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)

Page 373: IBM introducción a mainframe

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

Page 374: IBM introducción a mainframe

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

Page 375: IBM introducción a mainframe

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

Page 376: IBM introducción a mainframe

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

Page 377: IBM introducción a mainframe

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

Page 378: IBM introducción a mainframe

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

Page 379: IBM introducción a mainframe

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

Page 380: IBM introducción a mainframe

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

Page 381: IBM introducción a mainframe

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

Page 382: IBM introducción a mainframe

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

Page 383: IBM introducción a mainframe

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

Page 384: IBM introducción a mainframe

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

Page 385: IBM introducción a mainframe

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

Page 386: IBM introducción a mainframe

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

Page 387: IBM introducción a 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

Page 388: IBM introducción a mainframe

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

Page 389: IBM introducción a mainframe

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

Page 390: IBM introducción a mainframe

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

Page 391: IBM introducción a mainframe

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

Page 392: IBM introducción a mainframe

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

Page 393: IBM introducción a mainframe

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

Page 394: IBM introducción a mainframe

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)

Page 395: IBM introducción a mainframe

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

Page 396: IBM introducción a mainframe

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

Page 397: IBM introducción a mainframe

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

Page 398: IBM introducción a mainframe

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

Page 399: IBM introducción a mainframe

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

Page 400: IBM introducción a mainframe

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

Page 401: IBM introducción a mainframe

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

Page 402: IBM introducción a mainframe

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

Page 403: IBM introducción a mainframe

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

Page 404: IBM introducción a mainframe

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.

Page 405: IBM introducción a mainframe

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 ***************************************

Page 406: IBM introducción a mainframe

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 ***************************************

Page 407: IBM introducción a mainframe

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

Page 408: IBM introducción a mainframe

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

Page 409: IBM introducción a mainframe

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

Page 410: IBM introducción a mainframe

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...

Page 411: IBM introducción a mainframe

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

Page 412: IBM introducción a mainframe

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’)

Page 413: IBM introducción a mainframe

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)

Page 414: IBM introducción a mainframe

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

Page 415: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 17 Security on z/OS

Page 416: IBM introducción a mainframe

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

Page 417: IBM introducción a mainframe

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

Page 418: IBM introducción a mainframe

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

Page 419: IBM introducción a mainframe

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

Page 420: IBM introducción a mainframe

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

Page 421: IBM introducción a mainframe

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

Page 422: IBM introducción a mainframe

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.

Page 423: IBM introducción a mainframe

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

Page 424: IBM introducción a mainframe

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

Page 425: IBM introducción a mainframe

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

Page 426: IBM introducción a mainframe

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

Page 427: IBM introducción a mainframe

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

Page 428: IBM introducción a mainframe

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

Page 429: IBM introducción a mainframe

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

Page 430: IBM introducción a mainframe

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

Page 431: IBM introducción a mainframe

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

Page 432: IBM introducción a mainframe

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

Page 433: IBM introducción a mainframe

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

Page 434: IBM introducción a mainframe

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

Page 435: IBM introducción a mainframe

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

Page 436: IBM introducción a mainframe

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

Page 437: IBM introducción a mainframe

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

Page 438: IBM introducción a mainframe

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

Page 439: IBM introducción a mainframe

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

Page 440: IBM introducción a mainframe

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

Page 441: IBM introducción a mainframe

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

Page 442: IBM introducción a mainframe

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

Page 443: IBM introducción a mainframe

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

Page 444: IBM introducción a mainframe

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

Page 445: IBM introducción a mainframe

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

Page 446: IBM introducción a mainframe

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

Page 447: IBM introducción a mainframe

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 *****************************

Page 448: IBM introducción a mainframe

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

Page 449: IBM introducción a mainframe

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

……

Page 450: IBM introducción a mainframe

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

Page 451: IBM introducción a mainframe

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

Page 452: IBM introducción a mainframe

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

Page 453: IBM introducción a mainframe

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

Page 454: IBM introducción a mainframe

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

Page 455: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 18

Network Communications on z/OS

Page 456: IBM introducción a mainframe

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

Page 457: IBM introducción a mainframe

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

Page 458: IBM introducción a mainframe

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

Page 459: IBM introducción a mainframe

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

Page 460: IBM introducción a mainframe

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

Page 461: IBM introducción a mainframe

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

Page 462: IBM introducción a mainframe

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

Page 463: IBM introducción a mainframe

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

Page 464: IBM introducción a mainframe

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

Page 465: IBM introducción a mainframe

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

Page 466: IBM introducción a mainframe

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.

Page 467: IBM introducción a mainframe

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

Page 468: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

Backup slides

Instructor slides with additional material

Page 469: IBM introducción a mainframe

Introduction to the new mainframe

© Copyright IBM Corp., 2005. All rights reserved.

SDLC / CICS

Page 470: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 19 Hardware systems and LPARs

Page 471: IBM introducción a mainframe

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

Page 472: IBM introducción a mainframe

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

Page 473: IBM introducción a mainframe

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"

Page 474: IBM introducción a mainframe

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

Page 475: IBM introducción a mainframe

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

Page 476: IBM introducción a mainframe

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

Page 477: IBM introducción a mainframe

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

Page 478: IBM introducción a mainframe

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

Page 479: IBM introducción a mainframe

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

Page 480: IBM introducción a mainframe

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

Page 481: IBM introducción a mainframe

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

Page 482: IBM introducción a mainframe

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

Page 483: IBM introducción a mainframe

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

Page 484: IBM introducción a mainframe

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

Page 485: IBM introducción a mainframe

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

Page 486: IBM introducción a mainframe

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

Page 487: IBM introducción a mainframe

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

Page 488: IBM introducción a mainframe

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

Page 489: IBM introducción a mainframe

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

Page 490: IBM introducción a mainframe

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)

Page 491: IBM introducción a mainframe

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

Page 492: IBM introducción a mainframe

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.

Page 493: IBM introducción a mainframe

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

Page 494: IBM introducción a mainframe

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

Page 495: IBM introducción a mainframe

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

Page 496: IBM introducción a mainframe

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

Page 497: IBM introducción a mainframe

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

Page 498: IBM introducción a mainframe

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

Page 499: IBM introducción a mainframe

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

Page 500: IBM introducción a mainframe

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

Page 501: IBM introducción a mainframe

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

Page 502: IBM introducción a mainframe

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

Page 503: IBM introducción a mainframe

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

Page 504: IBM introducción a mainframe

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

Page 505: IBM introducción a mainframe

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"

Page 506: IBM introducción a mainframe

Introduction to the new mainframe: z/OS basics

© Copyright IBM Corp., 2005. All rights reserved.

Chapter 20 Parallel Sysplex

Page 507: IBM introducción a mainframe

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

Page 508: IBM introducción a mainframe

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

Page 509: IBM introducción a mainframe

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

Page 510: IBM introducción a mainframe

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

Page 511: IBM introducción a mainframe

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

Page 512: IBM introducción a mainframe

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

Page 513: IBM introducción a mainframe

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

Page 514: IBM introducción a mainframe

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

Page 515: IBM introducción a mainframe

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

Page 516: IBM introducción a mainframe

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

Page 517: IBM introducción a mainframe

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

Page 518: IBM introducción a mainframe

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

Page 519: IBM introducción a mainframe

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

Page 520: IBM introducción a mainframe

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

Page 521: IBM introducción a mainframe

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

Page 522: IBM introducción a mainframe

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

Page 523: IBM introducción a mainframe

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

Page 524: IBM introducción a mainframe

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

Page 525: IBM introducción a mainframe

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

Page 526: IBM introducción a mainframe

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

Page 527: IBM introducción a mainframe

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)

Page 528: IBM introducción a mainframe

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

Page 529: IBM introducción a mainframe

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