MVS NOTE2

Part4-Data Management in MVS

 

The data management services of an operating system help in storing, organizing, cataloging and retrieving data on secondary storage devices such as disks and tapes. MVS provides several facilities that allow you to manage data. In this chapter, you will learn about these facilities.

 

At the end of this chapter, you will be able to:

Define data sets.

Describe the organization of data sets and,

Describe how MVS stores and retrieves data sets.

 

Section1

The data management service of MVS stores related data as units called data sets. A data set, in the mainframe environment, is very similar to a file in a DOS or an UNIX environment. Within a data set, the data is organized into smaller units called records. Every data set is identified by a unique name.

Programs called Access Method Services(访问方法服务) or AMS manage the storage and retrieval of records. The efficiency with which data is accessed from a data set is directly related to the way they are organized.(从数据集访问数据的效率与数据的组织方式有关)

 

 

 

 

 

 

数据集最多允许8个字符,并且以”.”区分,”.”被计算在数据集名的长度内。数据集名的第一个字符必须是字母或者@#$,最后一个字符不可以是”.”

 

Section2

 

The AMS and therefore the organization of data sets, is classified into the following two categories:

数据集分类:

Non-Virtual Storage Access Methods (Non-VSAM)

VSAM

Non-VSAM organizations were originally developed in the mid-60s. VSAM organizations were introduced in the early 1970s in an effort to overcome the shortcomings of Non-VSAM organizations. However, as VSAM did not achieve this objective completely, both Non-VSAM and VSAM organizations coexist today. As the names indicate, the main difference between these access methods is that VSAM utilities reside in the virtual storage and are, therefore, more efficient. The Non-VSAM utilities reside on secondary storage devices and have to be transferred into the virtual storage before they can be used.(非虚拟存储访问方法在使用前必须调入虚拟存储器)

  

Section3

Non-VSAM data sets can be stored and accessed in five different ways. They are

存储和访问非虚拟存储访问方法数据集的五种方法:

Physical Sequential or PS, 物理连续

Partitioned Data Sets or PDS, 分割数据集

Indexed Sequential, 连续索引This organization is obsolete now

Direct Data Sets 直接数据集This organization is obsolete now

Generation Data Groups or GDG 阶段数据组

 Let's take a closer look at these data sets.

 

Section4 (PS)物理连续

The Queued Sequential Access Method(连续队列访问方法) or QSAM utility controls the organization of PS data sets.

PS data sets are store and accessed by the QSAM utility

       The records are written and read sequentially 记录被顺序访问

In this organization, the records of the data set are written and read sequentially. That is, to access the 50th record, the first 49 records have to be read. In this organization, new records are added at the end of the data set.数据必须顺序存取,新增的数据放在数据集的最后

 

PS data sets can be stored on Direct Access Storage Devices DASD or tapes. 物理连续数据集存储在DASD或是磁带

 

These data sets are usually used to store user data. 通常用来存储用户数据

 

Section5 (PDS)

PDS Partitioned Data Sets are stored and accessed by the Partitioned Access Method or PAM utility.

 

A PDS is partitioned into one or more members each of which can be processed as an independent PS data set. 分割数据集被分割为一个或多个部分,每个部分作为相互独立的物理连续数据集(PS)处理The number of members to be created has to be specified by the user at the time of creation of the data set. Each member is identified by a unique name that starts with an alphabet and can have up to 8 characters. These names are maintained in a directory that is stored at the beginning of the PDS. 每个部分都有唯一的以字母开头的最多8个字符的名字,这些名字存储在PDS的开头的一个目录里The members of the PDS can be accessed individually or the entire PDS can be processed as a single unit.PDS PDS的每个部分可以被独立访问或者整个PDS可以作为一个单一单元被处理

 

The members are grouped into directory blocks to enable better access. Each directory block can have a maximum of five members. PDS的各个部分被集中到一个目录的区域以便于更好的访问,每个目录最多拥有5个成员

 

The members of a block can be added or deleted as and when required. However, it should be noted that when a member is deleted, only the corresponding entry is removed from the directory and the member is not physically deleted.当目录里的成员被删除的时候,只是相应的入口被删除,成员在物理上没有被删掉 Therefore, the data set has to be reorganized to reclaim the unused space. 因此数据集必须重新组织以收回没有被使用的空间This can be done using utilities such as PDS, REORG, IEBCOPY or COMPRESS.

 

Partitioned data sets are mostly used to store application programs and JCLs. They can only be stored on DASD. 分割数据集通常用来存储应用程序和JCL,他们只能存储在DASD

PDS Directory structure

 

The member names are sorted in ascending order in the directory. The size of the directory is fixed at the time of allocation and cannot be changed except that the file is copied to another file with a different sized directory.

A PDS is actually two dataset in one. The first dataset is directory, consists of 256 byte fixed length records which contain information about each member.

 

The directory contains

(i) Name of the member

(ii) a relative location of the first block of the member: Relative Track Address in a three byte binary number TTR where TT is the position of the track relative to the first track in the data set. TT=0 specifies the first track, TT=1 specifies the 2nd track etc. The third binary byte R is to represent the number of the physical block relative to the first physical block on the track. The first block is 1 and not zero.

(iii) optional data: ISPF keeps statistics on a member in the optional area of directory

entry.

 

 

Section6 (Indexed Sequential) 索引连续

Indexed Sequential data sets are organized by the Indexed Sequential Access Method (ISAM) utility.

 

This organization is used for data sets, which have a key field that can uniquely identify each record of the data set. These data sets consist of two parts. The first part is the index, which contains the key field values in the ascending collating sequence along with the corresponding physical location of the record. The second part contains the data including the key field.

The first part        The second part

第一部分是索引,包括KEY字段的值和相关记录的物理地址,并以升序排列

第二部分包括数据和KEY字段

The records of the data set can be accessed either sequentially or randomly using the index. Accessing records using the index is analogous to searching for a topic in a book using the book index.利用索引数据集记录可以被顺序或者随即访问

 

As mentioned above, the key field must be unique. A non-unique alternate key can also be defined for these data sets. KEY字段必须是唯一的;非唯一的备用KEY也可以被定义

 

This organization is obsolete now.

 

Section6 (Direct Data Sets) 直接数据集

 

The Basic Direct Access Method (BDAM) utility is used to access Direct data sets.

The space allotted to these data sets is partitioned into slots. 分配给直接数据集的空间被划分为各个小块These slots are identified by their position relative to the first slot of the data set. The relative position of the slots is called the Relative Record Number or RRN 相关记录号. Each slot can store one record. These records can be accessed sequentially or randomly using their RRN. 每个小块可以存储一个记录,利用RRN这些记录可以被顺序或者随机访问This type of access is very fast.

 

This organization is obsolete now.

 

Section7 (GDG) 阶段数据组

 

Generation Data Groups or GDGs are groups of data sets that are chronologically(按年代顺序排列) or functionally related. 时间或者功能相关的数据集组

 

All the data sets in a GDG are stored with the same name. GDG里存储的数据集有相同的名字The OS keeps track of the data set versions by appending their names with version numbers.操作系统通用在数据集名字附加版本编号来判断数据集版本

 

The advantage of using GDG’s is that the O/S, and not the application programmer, is responsible for maintaining the versions of the data set in the GDG 使用GDG的好处在于操作系统(而不是程序员)负责维护GDG的数据集版本

 

When a GDG is created, it does not contain any data sets; it only contains an index. The index contains the name of the GDG along with other features of the GDG such as the maximum number of data sets it can contain.GDG创建的时候它不包含任何数据集,只包含一个索引。这个索引包含GDG的名字和GDG的其他特性诸如它能包含最大数据集的最大数量

 

A GDG data set is usually referenced by using a relative version number. GDG数据集通常被相关版本号引用

 

A GDG can contain up to 255 data sets. However, you can specify a lesser limit while creating the index. Once this limit is reached, the oldest versions can be deleted. GDG可以包含最多255个数据集,当创建索引的时候可以限定小于255的上限,当超过上限的时候旧版本就被删掉

A GDG can contain up to 255 data sets

 

Section8

 

The following record formats can be used to store records in Non-VSAM data sets:

在非虚拟存储访问方法数据集里存储记录的记录格式:

Fixed Unblocked - In this format all records are of the same length. Each physical block contains only one logical record.

所有记录长度相同,每个物理块只包含一个逻辑记录

Fixed Blocked - Each physical block of this format contains multiple logical records. All logical records in these data sets are of the same size.

每个物理块包含多个逻辑记录,所有记录大小相同

Variable Unblocked - Each logical record can be of different length. The first four bytes of every record specify the record length of that record. Similarly, the first four bytes of a block specify the block length of the block. Because of the extra space required to store record length and block length, this format is not recommended.

每个记录长度不同,每个记录的首4字节标明记录长度,块的前4个字节也标明块的长度。由于需要额外空间来存储记录和块的长度,这种格式不为推荐

Variable Blocked - Each physical record contains more than one logical variable record.

每个物理块包含多个可变长度的记录

Undefined - Undefined records can be of any length. The length of these records is determined by the programs that read and write them.

记录长度任意,由操作记录的程序决定

 

 

 

Section9

VSAM data sets can also be stored and accessed in four different ways. They are

虚拟存储访问方法有4种不同的存储和访问方法:

 Entry Sequenced or ESDS, Key Sequenced or KSDS, Relative Record or RRDS, and Linear or LDS. Let us now take a closer look at these organizations.

 

Section10 (ESDS) Entry Sequenced顺序进入数据集 (类似PS数据集)

The ESDS organization is similar to the PS organization of Non-VSAM data sets. That is, the data is stored in the sequence in which it is entered. The data in these data sets can be accessed using the Relative Byte Address or RBA.相关字节地址 In this type of addressing, the location of a record is calculated relative to the storage location of the first record. ESDS records can be of fixed or variable length. New records are inserted at the end of the data set. Deletion of records is logical. That is, deleted records are not physically removed and continue to exist in the device.

 

 

ESDS的记录可以有固定或可变长度,新的记录添加到数据集末端,删除记录只是逻辑删除(类似PDS

 

 

 

 

 

Section11 (KSDS) Key Sequenced 顺序KEY (类似顺序索引数据集)

The KSDS organization is similar to the Indexed Sequential organization of Non-VSAM data sets. That is, the records can be accessed sequentially or randomly based on a key value or using the RBA.

 

Records of KSDS data sets can be of fixed or variable length. New records are inserted in the ascending order of the key field and deleted records are physically removed. KSDS的记录可以有固定或可变长度,新的记录按照KEY字段的升序添加,删除记录是物理删除

 

Section12 (RRDS) Relative Record 相关记录 (类似直接数据集)

The RRDS organization is similar to the Direct organization of Non-VSAM data sets. The records of these data sets are of fixed length. They can be accessed sequentially or randomly using the RRN. 记录长度固定,利用RRNRelative Record Number)可以顺序或者随机访问

 

RRDS records can be inserted sequentially or randomly. When a record is deleted, it is physically removed from the slot. It is important to note that the empty slot continues to exist and can be used for subsequent insertions. 记录添加是顺序或者随机的,当记录删除时,从每个小块中删除记录,但是空的小块依然存在,并可以用来进行下一轮记录的插入

Section13 (LDS) Linear 线性数据集

A LDS has no records. The data is stored as a long string of bytes. LDS organization is primarily used by DB2, and RDBMS used in the MVS environment 线性数据集没有记录,数据作为一串字节储存

 

Section13

VSAM allows very fast and efficient access to data sets. One reason for its high performance is the internal organization of data within a data set.

 

Records in VSAM data sets can be of fixed or variable length. These records are stored in blocks called Control Intervals or CIs. 在块中存储的记录叫做控制间隔

 

Section13

CI is the smallest unit of data that can be stored or retrieved from a storage device. It has four components. The first component is the data itself.

 

The second component is the Control Interval Description Field or CIDF. This contains information about the free space within the CI.

 

The third component is the Record Description Field or RDF. The RDF indicates whether the records in the CI are of fixed length, variable length or spanned. Spanned records are created when they span two or more CIs.

 

Depending on the type of the record, a CI can have one or more RDFs

 

The fourth component of the CI is the Free space. Free space, as the name indicates, is free space in a CI that can be used for internal re-organization when records are added, updated or deleted.

CI是能从存储设备储存和获得数据的最小单元,由4个部分组成:

1.数据本身

2CIDF控制间隔描述字段,包括CI里未利用的空间信息

3RDF记录描述字段,标明CI里的记录是否未固定长度、可变长度或可跨越的

4.剩余空间,添加更新删除记录时用来重组内部记录

A collection of 2 or more CIs is called a Control Area (CA). 多个CI的集合

 

 

CI is the smallest unit of data that can be stored or retrieved from a storage device. It has four components

 

 

VSAM performance evaluation is appropriate whenever is a change in system hardware or software. The different parameters that can be tuned are Control Interval size, Free space and Buffer space

 

Control interval size:

Choice of CI size depends on the kind of processing performed and device characteristics like direct/sequential processing.

•For sequential processing, smaller CIs are not desirable as smaller CIs will require more I/Os.

•For random/direct processing, smaller CIs are desirable as larger CIs will require longer data transfer time.

•For data sets accessed both randomly and sequentially, a data CI of size between 2K and 8K is desirable.

 

Free space:

Free space should be specified whenever there is an insert activity within a data set or modification to the length and variable length records are expected.

 

Buffer space:

Too many buffers result in additional virtual storage and system paging.

Too few buffers result in poor performance and multiple DASD accesses.

 

Section14

Listed here are the advantages of VSAM data sets.

 

Data from these data sets can be accessed sequentially or randomly. The AMS utility IDCAMS is used to access data from these data sets.

数据集的数据可以顺序或者随机访问

 

Because of the way VSAM data sets are organized, data access from these data sets is much faster than any other type of data set.

因为VSAM数据集的组成方式,VSAM数据集数据访问速度比其他类型数据集要快

 

Insertion of records into a VSAM data set is more efficient(Insertion of records is more efficient than in Non-VSAM data sets). This is because less reorganization is required after each insertion.

插入记录操作VSAM数据集效率更高,因为插入操作后只需要少量的重组

 

In Non-VSAM data sets, deletion of records is logical and not physical. The data set has to be reorganized to reclaim the space. In VSAM data sets, however, deletion of records is physical.

Non-VSAM数据集里,删除记录是逻辑的,数据集必须重组来收回空间;但是VSAM数据集里记录删除是物理的?

 

Section15

Let us look at a few more advantages and one major disadvantage of VSAM data sets.

 

VSAM data sets are device independent. That is, VSAM data sets and catalogs can be easily transported between operating systems.

VSAM数据集是设备独立的,可以在操作系统间轻松传送

 

The JCLs required to access VSAM data sets are much simpler than the JCLs required for other file structures.(Simpler JCLs are required to access these data sets) JCL的操作更为容易

 

VSAM data sets can contain spanned records.可跨越记录

 

On the DASD, often one or more volumes are allotted for storing VSAM data sets. These data sets must reside in this space only.(On DASD, they must reside only in the VSAM data space)

DASD多个卷被分配储存VSAM数据集,这些数据集只能放在这些空间

 

VSAM data sets are used to store user data. They are also used extensively to store a large part of the data that MVS creates and uses. An example of such a data set is the MVS catalog.(These data sets are used to store both user data and the data that MVS creates and uses)

VSAM被用来存储用户数据,也可以用来存储MVS创建的大量数据

 

A major disadvantage of VSAM data sets is that they require more storage space. This is partly because these data sets carry control information in them and partly because of the free space embedded in them.

VSAM的缺点是占用大量存储空间

 

Section16

You have learnt how the data in data sets is organized. Let's now learn how MVS stores and retrieves these data sets.

 

MVS uses labels, catalogs and the Volume Table Of Contents or VTOC to store information about the data sets stored on storage devices.

 

Data sets stored on disks or tapes are identified by special records called Labels. DASD labels are of two types, volume labels and file labels.

DASD标签包括卷标和文件标签

 

A DASD has multiple volumes. Every DASD volume is identified by a volume label, often called a VOL1 label. VOL1 label has two functions. It provides a unique six-character volume serial number, called vol-ser, that identifies the volume. It also provides the disk address of the VTOC.

VOL1 label的两个功能:提供6个字符的连续数字来标志卷;提供VTOC的磁盘地址

 

The file labels describe the data sets on a volume. These labels are also called Data Set Control Blocks, or DSCBs. They are stored in the VTOC of a volume.

文件标签描述卷上的数据集,也叫数据集控制块,存储在卷的VTOC

 

Though most tapes have volume labels that conform to MVS conventions, they can also have non-standard labels or no labels at all.

磁带同样也有非标准的标签或没有标签

 

The tape file labels are stored along with the files rather than together in a separate data set. As you can see, at the start of a tape file is a file-header label, HDR1. This is followed by the file's data. The end-of-file label, EOF1, appears at the end of the data.

磁带的文件标签和文件存储在一起

 

Section17

Most MVS installations have hundreds of DASD volumes and thousands of data sets. In such installations, proper cataloging becomes mandatory. MVS uses special data sets called Catalogs and the Volume Table of Contents (VTOC) to catalog other data sets.

 

MVS catalogs are of two types. They are Master System Catalog and User catalogs. Every MVS system has one Master System Catalog and it is used to store information about the system-related data sets. There are several user catalogs and they are used to store information about user data sets. Each user catalog must be defined in the master catalog.

每个用户目录必须在系统目录里定义

 

Section18

MVS Catalogs are similar to the File Allocation Table or FAT in the DOS environment or file system in the UNIX environment. These are critical data sets on the DASD. They contain data set labels. As mentioned above, each data set label specifies details such as

the names of the data set,

the device where it is stored,

the type of organization,

the space occupied,

the record format.

 

目录包括了数据集标签,数据集标签用来描述数据集名称、存储设备名、数据组织方式、占用的空间、记录的格式等

 

The VTOC is the second type of data set that is used to catalog data sets. It catalogs all the data sets on the volume on which it resides. Each record of the VTOC is the DSCB of one data set in that volume and contains the data set's name, its size, DASD location, and other characteristics.

VTOC用来编录卷上的数据集,包括数据集名、大小、DASD的地址和其他特性

 

Note:

For VSAM files, file characteristics such as type of organization, size, etc. are stored in the catalogs. For non-VSAM files this information is stored in the VTOC.

VSAM的文件特性存放在目录中

Non-VSAM的文件信息存放在VTOC

 

 

 

VTOC contents

The VTOC contain several types of records. All records in the VTOC are 140 character long, and are in two parts. The first part of a VTOC record is 44-byte physical key (separate from the data portion) which contains the record type, data, or a data set name. The second part is a 96-byte data component. The records are called Data Set Control Block (DSCB). Observing the value stored in the 44th byte (i.e., in fact 45 byte since counting starts from 0) in hex will determine the type of the record. For example x 'F4' implies it is a format 4-type record.

 

Different types of format

• Format 1 DSCB : primary extent and three secondary extents

• Format 3 DSCB : thirteen additional extents

• Format 5 DSCB : defines upto 26 free extents

 

Format 0

This is an available DSCB in the volume i.e., an available VTOC record that could be

used to store the information of the data set. If no record of this type is available, then the creation

of the data set on this volume is not possible, because VTOC may not be extended as other data

sets.

Format 1

This format holds the information of the data set, i.e., its name in key part, and in the

data part it can hold the information of 3 extents. If data set has more space then it may contain the

pointer to the Format 3 record, which would contain the information of the additional extents.

Format 2

Used only with ISAM. Format 2 DSCB contains info about index of ISAM files

Format 3

This format contains the information of additional space allocated to the data set. This

can hold the information up to 13 extents only. This means that including format 1, format 3 can

support only 16 extents for any data set. This limit is for a volume. Hence if the data set is spanned

across over more than volume, it can have extents per volume.

Format 4

This DSCB describes the VTOC itself. Format 4 is always the first record in the VTOC,

and there is only one Format 4. The record describes the VTOC, the location on the volume and

absolute address of the VTOC.

Format 5

Describes the free space available on the volume. This format can hold information of 8

extents in key part and 18 extents in the data part. This format also contains the pointer to the next

Format 5 record. This is the way a linked list is maintained.

Format 6

In previous IBM operating system, cylinder could be shared by data sets. This was too

complex to implement, and support is dropped for split cylinder by MVS.

 

 

 

MVS Catalogs

Catalogs record location of files so that its volume-serial need not be specified to locate it.

Master catalogs:

– entries that identify system data sets &

– entries that identify user catalogs

User catalogs:

– entries that identify user data sets

 

System catalogs to keep track of:

i) User files

ii) MVS page spaces and swap data sets

 

ICF catalogs are the best MVS master and User catalogs. All types of data sets can be safely and efficiently stored in ICF catalogs.

 

Data set processing by MVS :

• Three distinct steps :

– Allocation

• unit ( device ), volume, data set

• DISP parameter qualifies how a non-VSAM file is allocated

– Processing

• Access methods used for processing

– basic, queued or VSAM

– open, I/O and close processing

– Deallocation存储单元分配

• auto deallocate after job over

 

Storage Management subsystem :

• MVS/ESA feature, SMS, is a separate software that automates storage management.

• SMS uses storage class, data class etc., to automate storage management

• Enables allocating VSAM data sets using JCL

– Without SMS an AMS ( Access Method Service ) utility called IDCAMS needs to be used for this purpose.

 

The purpose of SMS is to provide the user with system-managed data, intended to accomplish the following objectives:

• Simplify user interface for allocating and maintaining data.

• Provide the user with a logical view of data, separated from the actual physical device characteristics.

• Provide centralized control of disk storage by putting a data set under SMS control (SMS-managed), the user derives some important benefits.

• Disk allocation for new data sets is directed to the most suitable group of disk volumes under centralized disk-storage administration control. The user does not determine which volumes will be used. SMS does.

• The management of a data set after it is created of archiving, retention, etc., is also under centralized administration control.

• JCL is simplified.

 

Job Management

• A job is the execution of one or more related programs in sequence

– Each program to be executed is a job step

• Job control language or JCL :

– A set of control statements that provide the specifications necessary to process a job.

 

Work is processed in units called jobs.

Every MVS installation has a primary subsystem that is the job entry subsystem, JES2 or JES3. It maintains its own queues.

 

A job may cause one or more programs to execute in sequence. One of the problems that arise when batch processing is used is managing how work flows through the system. To manage this in the multi-user system, the Job Entry Subsystem (JES) processes each user's job in an orderly fashion.

 

The 3 Basic JCL statements

• JOB

– Info that identifies a job

• EXEC

– Name of program to be executed

• DD

         Defines data, one per file of data referred

 

Basic format of a JCL

A job consists of more than one step. Each of the steps is executed sequentially one by one, when job is submitted. A submitted job is interpreted by Job Entry Subsystem (JES), and if there is no error in your JCL, it is placed in Job Queue, Element (JQE), for execution. Depending upon priority, and availability of an initiator, your job will be executed in the initiator's address space. Since each step is executed sequentially, it forms a task, and it is also a unit of work.

JES - Basic responsibilities

• Enter job into system.

• Decide when job is be processed.

• Pass job to MVS for processing.

• Deliver job’s printed output to correct destination.

 

How is an MVS job processed ?(JES)

1.The job is submitted.

• Create JCL at terminal using an editor (ISPF).

         Job stream now in a file on DASD

• Use SUBMIT command to enter job into system :

– JES copies job stream into JES spool ( a special system DASD file )

 

2.The job is selected for execution.

• Each initiator has one or more job classes associated with it

         Can control no. of jobs of each class and combinations there-of.

• Within a class initiators select a job for execution based on priority ( 0 - 15 ).

A job in the input queue begins processing as soon as an initiator picks it up.

The initiator will hold the job till it gets executed.

 

• Job class & priority decides when a job is actually scheduled to run.

• Initiator – prog. that runs in sys region of address space eligible for batch jobs

         Examines JES spool, selects job, executes job in address space & returns to spool for next job.

• Each initiator handles one job and no. of initiators can be varied dynamically.

Scheduling:

A job is scheduled based on the Class and the Priority.

The job class mechanism works because of how MVS actually picks jobs for execution. MVS uses special programs called program initiators to do job picking. A programmer cannot control how many initiators MVS uses at any moment or what the initiators do.

 

Initiator is an address space that runs in the system region of an address space that is eligible for batch job processing. Each initiator can handle one job at a time. The number of active initiators on a system determines the number of jobs that can be multiprogrammed at once. Each initiator has one or more job classes associated with it. Within a job class, a job for execution is assigned depending upon the priority. JES assigns the jobs to the initiator.

 

3.The job is executed.

• Initiator selects job for exec and invokes interpreter.

• Interpreter examines job stream and creates a series of control blocks which describe all data sets required.

• Then, initiator,

– invokes allocation routines

– builds user region and executes job in it

– invokes unallocation routines after job over.

Execution Processing - JES keeps track of each job by building a Job Queue Element (JQE) to present the job. The JQE has name, the job number, the job class, the Priority, Input, an Output routing, and pointers to other control blocks. A job class may have 1 to 38 possible classes. A-Z are the first 26 possibilities, 0-9 are 10 more, and "Started Task" and "logon" are the 37th and 38th.

NOTE :

SYSIN data also called in-stream data is specified along with JCL ( in line ) and is stored in the JES spool

SYSOUT data is produced by the user program in the JES spool

 

On the execution queue, a job is selected by these criteria:

* Is there an initiator available with this job class? If an initiator has more than one job class assigned, then jobs are selected in order by job class. For example, if initiator 10 has job class "AB" assigned, class "B" jobs will be selected only if there are no class "A" job.

* Is the priority of the job the highest in the queue for this job class? As the job executes, the Job Entry Subsystem performs simulated Input/Output operations for SYSIN and SYSOUT data sets. At the completion of the job, JES places the job on the next queue- output processing.

 

4.The job’s output is processed.

• Like jobs, SYSOUT data is also assigned to different output classes :

– Class A : Std printer output, Class Z : held output, etc.,

• Single job may produce SYSOUT data using more than one output class :

– Class A for system messages & program output, class D for some of job’s

spooled output.

• Specs for output like no. of copies etc.,

Out put Processing - As a job produces output, Job Output Elements (JOEs) are built. Each unique output data set with different characteristics is represented by JOEs are kept in a table called the Job Output Table (JOT). Output data sets are written to print and punch files in the JES SPOOL. They can be routed to local and/or remote locations. Only after all spooled data sets are processed can the job proceed to the purge queue.

 

5.The job is purged.

• JES spool space held by job freed, after output processing has been done.

• JES control blocks associated with job deleted.

After output processing has been done, the JES spool space held by the job is freed.

 

Alternative data set allocations :

• Job-step allocation :

– allocate/deallocate on a step by step basis.

• JES3 allocation :

– part of resources pre-allocated by JES3 and rest by MVS during execution.

– prevents resource conflicts

• Dynamic allocation : JES2 & JES3

– No allocation till request.

– Mainly used during TSO sessions.

The Job Entry Subsystem (JES) is the part of MVS, which manages batch jobs, and SYSOUT under MVS. There are two flavors. The first is JES2. The second is JES3. Similarities between JES2 and JES3 are as follows:

Both receive batch jobs to be processed by MVS.

Instream data (SYSIN) is stored until the jobs and OPENs/READs the file.

Both support writers to print the batch jobs from local users and remote users of the data center.

They support TSO.

Both JES subsystem writes accounting information.

Both support remote computing - Network Job Entry.

Ability for batch jobs to submit other jobs during execution.

JES2 and JES3 are subsystems to MVS. They are able to handle the above functions because they "register" with MVS method used to communicate between JES and MVS. JES is started after the Master Scheduler is completely initialized. In fact, the only thing that can start after the Master Scheduler is a JES must be running for tasks to start and stop. JES really is in two parts. The first part is a separate address space, which does the work of establishing an environment for other address spaces to use JES services and managing jobs. The second part is a set of service routines, which are available to all address spaces - in the Pageable Link Pack Area.

 

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值