Студопедия  
Главная страница | Контакты | Случайная страница

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатика
ИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханика
ОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторика
СоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансы
ХимияЧерчениеЭкологияЭкономикаЭлектроника

Липай Алексей

Читайте также:
  1. Алексей
  2. Алексей Андреев. Чего у нас теперь в избытке, так это телесериалов.
  3. АЛЕКСЕЙ ЛОСЕВ
  4. Алексей Сергеевич Кучин
  5. Капитан юстиции Малец Алексей Сергеевич

В основе наборов данных VSAM (Virtual Storage Access Method) лежит универсальный формат доступа к данным, объединяющий возможности последовательных, индексно-последовательных и наборов данных прямого доступа с применением более эффективной технологии. Управление наборами данных VSAM основано на использовании виртуального адресного пространства для размещения буферов ввода-вывода и управляющих таблиц, а также на применении метода индексирования записей.

Набор данных VSAM (рис. 5.16) состоит из логических записей (R) фиксированной или переменной длины, объединяемых в блоки равного размера. Такие блоки принято называть управляющими интервалами CI (control interval). Помимо записей управляющий интервал включает системную информацию. Часть пространства CI может оказаться неиспользуемой. Управляющий интервал является единицей обмена данными между виртуальной памятью и диском. Управляющие интервалы, в свою очередь, могут объединяться в управляющие области CA (control area), каждая размером, кратным одному цилиндру. Таким образом, VSAM набор данных может быть представлен совокупностью управляющих областей равного размера.


Рис. 5.16. Обобщенная структура наборов данных VSAM

Набор данных VSAM может быть дополнен индексной составляющей, обеспечивающей доступ к данным по одному или нескольким альтернативным ключам. Совокупность данных и связанных с ними индексных компонентов получила название кластер VSAM. Фактически имя набора данных VSAM - это имя кластера, тогда как сами данные и индексы хранятся в различных, но связанных между собой наборах данных. При этом имя компонента данных дополняется справа квалификатором DATA, а имя индексного набора данных - квалификатором INDEX.

В z/OS поддерживается четыре типа VSAM наборов данных:

Отметим, что для общности наборы данных типа ESDS, RRDS и LDS также считают кластерами VSAM, в которых индексный компонент не представлен.

Наборы данных VSAM широко используются как для пользовательских, так и для системных нужд. Например, главный каталог z/OS является набором данных типа VSAM, организованным в порядке возрастания ключей (формат KSDS). Линейные наборы данных (LDS) используются в технологии DIV (Data-in-virtual) для отображения наборов данных в виртуальную память.

OPEN

Before an application program can access a data set, it must first issue the

OPEN macro to open the data set for processing. The OPEN is issued against a

user Access method Control Block (ACB). Opening a data set causes VSAM to:

-Verify that the data set matches the description specified in the ACB or

GENCB macro. For example, MACRF=KEY implies that the data set is KSDS.

-Construct the internal control blocks and buffer pools that VSAM needs to

process your requests for access to the data.

-Load the access method (based in the ACB information) placing the address

in the ACB for the next GET or PUT.

-Check your program security authorization (RACF).

 

The type of open that occurs depends on the options you specify:

• If you specify RLS=CRE in the JCL or RLSREAD=CRE in the ACB, you get a transactional VSAM open.

• If you open a non-recoverable data set (LOG is NONE or undefined) for INPUT or OUTPUT and you do not specify CRE (in the JCL or ACB), you get a VSAM RLS open.

• If you open a recoverable data set for INPUT and you do not specify CRE (in the JCL or ACB), you get a VSAM RLS open.

The format of the OPEN macro is: [ label ] OPEN ( address [, [( options )][,...]]) [,MODE={24|31}]

label specifies 1 to 8 characters that provide a symbolic address for the OPEN macro.

address specifies the address of the ACB or DCB for the data sets being opened.

options specifies options parameters used only in opening non-VSAM data sets. VSAM ignores options specified with the address of an access method control block.

MODE = specifies the format of the OPEN parameter list being generated

CLOSE

The CLOSE macro disconnects your program from the data set. VSAM does the

following during CLOSE:

- Writes any unwritten data or index records whose contents have changed.

-Writes SMF records if using SMF.

-Updates the catalog entry for the data set. Updates the data set’s high-used

RBA (HURBA).

-Restores control blocks to the status they had before the data set was

opened.

-Releases virtual storage obtained during OPEN processing for additional

VSAM control blocks and VSAM routines.

 

The format of the CLOSE macro is: [ label ] CLOSE ( address [,[( options )][,...]]) [,MODE={24|31}] [,TYPE=T]

label specifies 1 to 8 characters that provide a symbolic address for the CLOSE macro.

address specifies the address of the access method control block or DCB for each data set to be closed.

options specifies options parameters for use only in closing non-VSAM data sets

MODE={24|31} specifies the format of the CLOSE parameter list to be built.

TYPE=T specifies VSAM is to complete outstanding I/O operations and update the catalog, but not disconnect the program from the data.

• Example:

 

GET

• Use the GET macro to retrieve a record.

• The format of the GET macro is: [ label ] GET RPL= address

label specifies 1 to 8 characters that provide a symbolic address for the GET macro.

RPL= address specifies the address of the request parameter list that defines this GET request.

PUT

 

• Use the PUT macro to write (load) records to an empty data set, and insert or update records into an existing data set.

• To do a PUT UPD you must first do a GET UPD for the record. For transactional VSAM, there is an additional requirement that the GET UPD must be in the same unit of recovery as the PUT UPD. So, you cannot do a GET UPD, then a commit, and then the PUT UPD.

• The format of the PUT macro is: [ label ] PUT RPL= address

label specifies 1 to 8 characters that provide a symbolic address for the PUT macro.

RPL= address specifies the address of the request parameter list defining the request.

Rule: If the PUT macro is used to load records into an empty data set, the STRNO value in the access method control block must be 1, and RPL OPTCD=DIR must not be specified. However, for an empty RRDS, DIR is allowed

 




Дата добавления: 2014-12-19; просмотров: 30 | Поможем написать вашу работу | Нарушение авторских прав




lektsii.net - Лекции.Нет - 2014-2024 год. (0.012 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав