comp 3400 mainframe administrationthese slides are · pdf filedata sets a data set is a...

44
Christian Grothoff COMP 3400 Mainframe Administration 1 Christian Grothoff [email protected] http://grothoff.org/christian/ 1 These slides are based in part on materials provided by IBM’s Academic Initiative. 1

Upload: hoangtram

Post on 07-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

COMP 3400 Mainframe Administration1

Christian [email protected]

http://grothoff.org/christian/

1These slides are based in part on materials provided by IBM’s AcademicInitiative.

1

Page 2: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Sets

• A data set is a collection of logically related data recordsstored on one disk storage volume or a set of volumes.

• Data sets can be:– a source program– a library of macros– a set of data records used by a processing program

• Data sets can be printed or displayed on a terminal.

• The logical record is the basic unit of information usedby a program running on z/OS (except z/OS UNIX)

2

Page 3: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set Naming

3

Page 4: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Naming Requirements

• Names must be upper case only and unique (kind of)

• Maximum of 44 characters; maximum of 22 namesegments

• Each level qualifier can have 1 to 8 characters

• Each level qualifier must start with A-Z or specials“@#$”

• Remaining characters can also contain 0-9 and hyphen(“-”)

4

Page 5: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Allocating Data Sets

Allocation methods:

• ISPF data set panel, option 3.2

• TSO ALLOCATE command

• Access Method Services (more later)

• Using the Job Control Language (JCL) – next lecture

During allocation, you must specify certain details about

the size and structure of the data set.

5

Page 6: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

ISPF-based Allocation

6

Page 7: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility

7

Page 8: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

ISPF-based Allocation

8

Page 9: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Records

• A record is the equivalent of a line in a textfile

• Data sets do not have EOL characters

• Records can be fixed-length or variable-length

• Record length (for fixed-length records) is referred to asthe LRECL

• Indentation (offset of text in the record) often matters

9

Page 10: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Blocks

• Multiple records are grouped in a block

• Logical records are usually the smallest amount of datato be processed by applications

• Blocks are usually the unit of data read from or writtento DASD

10

Page 11: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data set record formats

record

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

11

Page 12: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Example Data Set Specification

12

Page 13: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

The Volume Table of Contents (VTOC)

VTOC:

• Lists the data sets on a volume

• Lists the free space on the volume

13

Page 14: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

The Volume Table of Contents (VTOC)

14

Page 15: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Extents

LABEL(volser)

Extents

tracks

free spaceYOUR.DATAMY.DATA

trackstracks

VTOC

15

Page 16: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Catalogs

A catalog associates a data set name 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 systems include a master catalog and

numerous user catalogs.

16

Page 17: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Creating a Catalog

17

Page 18: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

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

18

Page 19: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Defining an Alias

19

Page 20: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Locating a data set in z/OS

20

Page 21: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Inspecting a Catalog

21

Page 22: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Cataloged and Uncataloged Data Sets

22

Page 23: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Types of Data Sets

• Sequential Data Set: written and read in sequentialorder

• Partitioned Data Set (PDS or library):

– Collection of a directory and sequential data sets(called members)

– Member names can be 8 bytes long

• VSAM – both a type of data set and an access method

23

Page 24: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

PDS vs. PDSE

PDS Extended (PDSE) is an extension of PDS with the

following advantages:

• Space reclaimed automatically when a member isdeleted (PDS has a compaction utility)

• Flexible size

• Can be shared

• Faster directory searches

24

Page 25: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Comparison of MVS Data Sets and UNIXHFS

25

Page 26: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Access Methods

• An access method defines the technique used to storeand retrieve data

• This definition includes system-provided programs andutilities to define and process data sets.

26

Page 27: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Commonly Used Access Methods

QSAM Queued Sequential Access Method (for most simple data

sets)

BSAM Basic Sequential Access Method (for special cases)

BDAM Basic Direct Access Method (becoming obsolete)

BPAM Basic Partitioned Access Method (for libraries)

VSAM Virtual Storage Access Method (for complex applications)

27

Page 28: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

VSAM

VSAM provides more complex functions than other common disk

access methods; VSAM knows four record formats:

• Key Sequence Data Set (KSDS) – most commonly used; like ahash table

• Entry Sequence Data Set (ESDS) – for simple sequential access

• Relative Record Data Set (RRDS) – access records by number

• Linear Data Set (LDS) – like UNIX files (and used by zFS)

28

Page 29: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Simple VSAM Control Interval

VSAM Control Intervals are the basic unit for DASD reads

and writes used by VSAM. They contain records and meta

data:

R1 R2 R3 free space in CIRDF

RDF

RDF

CIDF

Record Descriptor Fields

29

Page 30: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

VSAM Index Structure

30

Page 31: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Key Sequence Data Set (KSDS)

31

Page 32: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Entry Sequence Data Set (ESDS)

32

Page 33: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Relative Record Data Set (RRDS)

33

Page 34: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Linear Data Set (LDS)

34

Page 35: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Listing

35

Page 36: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Listing (More)

36

Page 37: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Commands

37

Page 38: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Info

38

Page 39: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Volume View

39

Page 40: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Data Set List Utility: Volume DS List

40

Page 41: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

DFSMS

41

Page 42: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Automatic Class Selection (ACS)

ACS uses coded criteria to determine allocation parameters:

1. Data Class (RECORG, RECFM, LRECL, PDS/PDSE, SPACE, ...)

2. Management Class (migration, backup frequency, automaticdeletion, ...)

3. Storage Class

4. Storage Group (device media)

ACS uses the DD’s DATACLS, MGTMCLAS, STORCLAS, DSN and

DISP operands for criteria determination.

42

Page 43: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Copying between Data Sets and UNIX Files

In order to copy files from or to UNIX, use the following

commands in the ISPF Command Shell:

OGET ’/u/$USER/file’ KC02292.FOO(BAR)OPUT KC02292.FOO(BAR) ’/u/$USER/file’

43

Page 44: COMP 3400 Mainframe AdministrationThese slides are · PDF fileData Sets A data set is a collection of logically related data records stored on one ... Blocks are usually the unit of

Christian Grothoff

Questions

?

44