数据集操作.ppt

上传人:本田雅阁 文档编号:3185923 上传时间:2019-07-22 格式:PPT 页数:79 大小:2.71MB
返回 下载 相关 举报
数据集操作.ppt_第1页
第1页 / 共79页
数据集操作.ppt_第2页
第2页 / 共79页
数据集操作.ppt_第3页
第3页 / 共79页
数据集操作.ppt_第4页
第4页 / 共79页
数据集操作.ppt_第5页
第5页 / 共79页
点击查看更多>>
资源描述

《数据集操作.ppt》由会员分享,可在线阅读,更多相关《数据集操作.ppt(79页珍藏版)》请在三一文库上搜索。

1、IBM主机系统与操作系统导论,黄志炜 IBM主机系统教育中心,4 数据集操作,Objectives,After completing this unit, Ull be able to: 了解什么是数据集(Data Set) 了解数据集的分类 掌握数据集命名规范( naming conventions) 熟练掌握数据集的建立,删除和修改,4.1数据集概念,A data set is a collection of logically related data records stored on one disk storage volume or a set of volumes. 数据集是存

2、放在一个或一组盘卷上的逻辑相关的 数据的集合 The logical record is the basic unit of information used by a program running on z/OS 在Z/OS系统中,一条逻辑记录是程序运行的基本信息单位,DataSet,What is a data set?,数据集可以是: 一段源程序 一段文字 我们可以通过ISPF或TSO环境,去编辑,查看 数据集,4.2数据集存储,数据可以存储在 DASD( Direct Access Storage Device直接存取存储设备), magnetic tape volume, or o

3、ptical media. 任何类型的数据集都可以存储在 DASD上, 但是只有 顺序数据集(sequential data sets) 才能存在 magnetic tape 上. You can use DASD volumes for storing data and executable programs, including the operating system itself, and for temporary working storage.,4.3 数据访问方法,QSAM BSAM BDAM BPAM VSAM,4.4 DASD卷的使用,一个DASD卷可以用来: 存储数据 和

4、 可执行程序 一个DASD 卷上可以存放多个数据集, 其上的空间是可以被重新分配和重用的 同一盘卷上的数据集的名称必须是唯一的,不可重名. 数据集可以通过如下几个参数来定位 设备类型(device type), 卷标号(volume serial number), 数据集名(data set name).,4.4.1 区别及术语,DASD HAD 卷 柱面 磁道 CKD 数据块,Cylinders(柱面) and Tracks(磁道),3390-3 容量参数,3390-3型磁盘(DASD)是目前主机系统上使用最多的磁盘类型,主要的容量参数: - 3339 CYL/VOL (柱面/盘卷) - 1

5、5 TRKS/CYL (磁道/柱面) - 2.83 GB/VOL - 56664 B/TRK,DASD terminology,Direct Access Storage Device (DASD) 被称为磁盘驱动器 A disk drive contains cylinders(柱面) Cylinders contain tracks(磁道) Tracks contain data records (数据记录) Data blocks (数据块) 是DASD 的基本记录单位,4.4.2 DASD标签,Why? 为了识别是哪一个 DASD 卷 ,卷上又存放了哪些数据集 DASD 卷必须使用标准

6、号( standard labels) 标准号包括:a volume label, a data set label for each data set, and optional user labels. A volume label, stored at track 0 of cylinder 0, identifies each DASD volume. A utility program initializes each DASD volume before it is used on the system. The initialization program generates t

7、he volume label and builds the volume table of contents (VTOC).,4.5 分配数据集,要使用一个数据集, 首先需要分配(allocate it (establish a link to it), 然后使用您选择的存取方法来存取数据 分配一个数据集 means either/both of two things To set aside (create) space for a new data set on a disk. To establish a logical link between a job step and any

8、data set.,Ways to allocate dataset?,Four ways: ISPF panel option 3.2 Access Method Services TSO Allocate Command Using JCL,4.6 数据集命名,数据集的名字可以由一个名字段 ( name segment) 或 多个名字段以分隔符”.”组合起来构成. 每一个名字段称为一个level qualifier. E.G. STV001.LAB1.DATA is composed of three name segments. MYID.JCL.FILE2 HLQ: MYID 3 qu

9、alifiers,Data sets naming rules,Unique name 独一无二: 最长 44 个字符 (包括名字段 和 分隔符 .) 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

10、 8 characters The first must be alphabetical (A-Z) or special ( # $) The 7 remaining: alphabetical, national, numeric (0-9) or hyphen (-),Data sets name bad example,(HLQ.ABCDEFGHI.XYZ) (HLQABC) (HLQ.ABC.) (HLQ.123.XYZ),Some name conventions,The letters LIB somewhere in the name indicate that the dat

11、a set is a library. The letters CNTL, JCL, or JOB somewhere in the name typically indicate the data set contains JCL. The letters LOAD, LOADLIB, or LINKLIB in the name indicate that the data set contains executables. The letters PROC, PRC, or PROCLIB indicate a library of JCL procedures. Various com

12、binations are used to indicate source code for a specific language, for example COBOL, Assembler, FORTRAN, PL/I, JAVA, C, or C+.,4.7 用JCL在DASD卷分配空间,You can specify the amount of space required in blocks, records, tracks, or cylinders. Logical records and blocks Data set extents,Allocating space on D

13、ASD volumes,Allocating space on DASD volumes,4.7.1逻辑记录和块,A logical record (LRECL) is a unit of information about a unit of processing . It is the smallest amount of data to be processed, and it is comprised of fields which contain information recognized by the processing application Logical records,

14、 when located in DASD, tape, or optical devices, are grouped in physical records named blocks (BLKSIZE). Each block of data on a DASD volume has a distinct location and a unique address,4.7.2 数据集分区,Space for a disk data set is assigned in extents. An extent is a contiguous number of disk drive track

15、s (or cylinders) Data sets can increase in extents as they grow. Older types of data sets can have up to 16 extents per volume. Newer types of data sets can have up to 128 or 255 extents A data set organization based on extents is designed to maximize disk performance. Reading or writing contiguous

16、tracks is faster than reading or writing tracks scattered over the disk, as might be the case if tracks were allocated dynamically.,4.8 数据集记录格式,The data set record formats are as follows: F Fixed One physical block on disk is one logical record and all the blocks/records are the same size FB Fixed B

17、locked Several logical records are combined into one physical block. V Variable One logical record as one physical block, The application is required to insert a four-byte Record Descriptor Word (RDW) at the beginning of the record. The RDW contains the length of the record plus the four bytes for t

18、he RDW.,Data set record formats,The data set record formats are as follows: VB Variable Blocked This format places several variable-length logical records (each with an RDW) in one physical block. The software must place an additional Block Descriptor Word (BDW) at the beginning of the block, contai

19、ning the total length of the block. U Undefined This format consists of variable-length physical records/ blocks with no predefined structure. Although this format may appear attractive for many unusual applications, it is normally used only for executable modules.,key terms,The data set record form

20、ats are as follows: Block Size (BLKSIZE) is the physical block size written on the disk for F and FB records. For V, VB, and U records it is the maximum physical block size that can be used for the data set Logical Record Size (LRECL) is the logical record size (F, FB) or the maximum allowed logical

21、 record size (V, VB) for the data set. Format U records have no LRECL Record Format (RECFM) is F, FB, V, VB, or U as just described,4.9 数据集类型,Three types: Sequential Data set 顺序数据集 Partitioned Data set 分区数据集 VSAM,4.9.1 顺序数据集,Sequential data set,It consists of one or more records that are stored in p

22、hysical order and processed in sequence. New records are appended to the end of the data set job control language (JCL) : DSORG=PS ISPF 3.1 Allocate new dataset: TSO: alloc dsn(test2.data) new space(1,1) tra lrecl(80) recfm(f,b) dsorg(ps) vol(user01),4.9.2 分区数据集,A PDS is a collection of sequential d

23、ata sets, called members. Each member is like a sequential data set and has a simple name, which can be up to eight characters long A PDS also contains a directory. The directory contains an entry for each member in the PDS with a reference (or pointer) to the member A partitioned data set is common

24、ly referred to as a library A PDS loses space whenever a member is updated or added. As a result, z/OS users regularly need to compress a PDS to recover the lost space,Partitioned data set,Partitioned data set,job control language (JCL) : DSORG=PO ISPF 3.1 Allocate new dataset:,Example1(Allocate pds

25、),Example1(Allocate pds),Example1(Allocate pds),Example1(Allocate pds),Example1(Allocate pds),Example1(Allocate pds),Example1(Allocate pds),Advantages of a PDS,Grouping of related data sets under a single name makes z/OS data management easier. Members of a PDS can be used as sequential data sets, a

26、nd they can be appended (or concatenated) to sequential data sets. Multiple PDS data sets can be concatenated to form large libraries. PDS data sets are easy to create with JCL or ISPF,Disadvantages of a PDS,Wasted space (gas need be compressed) When a member in a PDS is replaced, the new data area

27、is written to a new section within the storage allocated to the PDS. When a member is deleted, its pointer is deleted too, so there is no mechanism to reuse its space. Limited directory size The directory size is fixed when the data set is allocated. Lengthy directory searches Entries are stored in

28、alphabetical order of the member names.,How PDS and SDS is stored?,4.9.3 扩展分区数据集,4.9.4 数据集空间管理,SYSTEM ABEND 0D37? 1,分区数据集用C做压缩 2,分配一个更大的数据集,将成员从原数据集复制到新数据集,4.10 VSAM,4.11 卷内容表和目录,z/OS使用目录和卷内容(VTOC)管理数据集的存储和布置,每个DASD都有一个目录和一个卷内容表,4.11.1 VTOC,4.12DFSMS的角色,在操作系统中,存储管理包括文件分配、存放、监控、移动、备份、检索、恢复和删除等。这些操作既可

29、以人工处理也可以自动处理完成。当自动执行存储管理时,由系统决定对象的存放位置并自动管理对像备份、移动、间隔和安全性。z/OS系统典型的存储管理方式都包括人工方式和自动方式。 根据z/OS系统及其存储设备的配置情况,用户或程序可以直接控制存储器使用的许多方面,并且早期的操作系统都要求用户这样做。然而,z/OS日益依赖于安装时的设置细节来管理数据和资源,并附加存储管理产品来实现自动化存储器的管理和使用,在z/OS中实现存储管理的主要手段是使用DFSMS组件,存储管理子系统SMS,SMS是基于空间管理的简单化、自动化、高效性而设计的, 它包括: SG - Storage group DC - Dat

30、a class SC - Storage class MC - Management class,存储管理子系统SMS,在SMS管理下分配一个数据集,首先由SG指定存放到哪一类Volumes,即具体分配到哪个盘卷,是由DC与SC支持的,包括其属性、空间、性能等。 SMS选择来自SG的Volume: - 应有足够的空间来满足主(首次)分配,这由 DC支持对这个数据集对空间大小的请求。 - 应有足够的数据集的性能与有效性的要求,这 由SC支持对这个数据集对性能与有效性的要求,SMS系统 中的几个Construct,在SMS环境下,你可以使用SMS CLASS和GROUP等几个Construct去指

31、定数据的空间需要、性能目标及数据定义模板 可以使用ISMF创建这些Construct以及自动类选择(ACS)程序,4.13UNIX文件系统,z/OS系统的UNIX 系统服务(z/OS UNIX)允许z/OS访问UNIX的文件,UNIX应用程序也可以访问z/OS的数据集。用户可以使用分层文件系统(HFS)、z/OS网络文件系统(z/OS NFS)、zSeries文件系统和临时文件系统(TFS)。 z/OS UNIX文件系统是分级的,并且是面向字节的。在文件系统中查找文件是通过查找目录来完成的,它没有用于直接指向文件的z/OS目录的类似概念,在z/OS系统中,用户给z/OS数据集分配的前缀指向了一

32、个用户目录。用户拥有所有的以其用户名作为前缀开头的数据集。例如,属于TSO/E用户ID为IBMUSER的数据集都是以IBMUSER开头的。这些数据集名可以是IBMUSER.C和IBMUSER.C(PGMA)。 在UNIX文件系统中,IBMUSER可以有一个指定的用户目录 /U/IBMUSER 。在该目录下,可以有个指定的子目录/u/ibmuser/c,u/ibmuser/c/pgma将指向文件pgma,4.14 zFS文件系统,zFS文件系统与现有的z/OS文件系统的管理服务的集成提供了文件系统自动管理能力,而这种能力也许不能在其他UNIX平台上使用。但这种集成可以使文件所有者在整个文件系统的

33、备份和存储等任务上花更少的时间,4.15 实验:数据集ISPF操作,4.16 实验:数据集上传下载,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. z/OS records follow well-defined formats, based on record format (RECFM), logical record length (LRECL), and the maximum block size (BLKSIZE). Three types of data sets: sequential, partitioned, and VSAM z/OS libraries are known as partitioned data sets (PDS or PDSE) and contain members.,THATS ALL FOR TODAY! THANKS!,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1