《数据集操作》PPT课件.ppt_第1页
《数据集操作》PPT课件.ppt_第2页
《数据集操作》PPT课件.ppt_第3页
《数据集操作》PPT课件.ppt_第4页
《数据集操作》PPT课件.ppt_第5页
已阅读5页,还剩74页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 数据集是存放在一个或一组盘卷上的逻辑相关的 数据的集合 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 optical 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卷可以用来: 存储数据 和 可执行程序 一个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 (柱面/盘卷) - 15 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 卷必须使用标准号( 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 the 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 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 qualifiers,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 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 data 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 combinations 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 DASD 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, 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 tracks (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 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 Blocked 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 the 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, containing 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 formats 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 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 physical 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 data 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 commonly 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),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, and 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 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 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的角色,在操作系统中,存储管理包括文件分配、存放、监控、移动、备份、检索、恢复和删除等。这些操作既可以人工处理也可以自动处理完成。当自动执行存储管理时,由系统决定对象的存放位置并自动管理对像备份、移动、间隔和安全性。z/OS系统典型的存储管理方式都包括人工方式和自动方式。 根据z/OS系统及其存储设备的配置情况,用户或程序可以直接控制存储器使用的许多方面,并且早期的操作系统都要求用户这样做。然而,z/OS日益依赖于安装时的设置细节来管理数据和资源,并附加存储管理产品来实现自动化存储器的管理和使用,在z/OS中实现存储管理的主要手段是使用DFSMS组件,存储管理子系统SMS,SMS是基于空间管理的简单化、自动化、高效性而设计的, 它包括: SG - Storage group DC - Data 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去指定数据的空间需要、性能目标及数据定义模板 可以使用ISMF创建这些Construct以及自动类选择(ACS)程序,4.13UNIX文件系统,z/OS系统的UNIX 系统服务(z/OS UNIX)允许z/OS访问UNIX的文件,UNIX应用程序也可以访问z/OS的数据

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论