JP3925246B2 - Computer system - Google Patents

Computer system Download PDF

Info

Publication number
JP3925246B2
JP3925246B2 JP2002066297A JP2002066297A JP3925246B2 JP 3925246 B2 JP3925246 B2 JP 3925246B2 JP 2002066297 A JP2002066297 A JP 2002066297A JP 2002066297 A JP2002066297 A JP 2002066297A JP 3925246 B2 JP3925246 B2 JP 3925246B2
Authority
JP
Japan
Prior art keywords
data
computer
storage device
interface
format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002066297A
Other languages
Japanese (ja)
Other versions
JP2002333955A (en
Inventor
基博 神田
山本  彰
俊夫 中野
稔 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2002066297A priority Critical patent/JP3925246B2/en
Publication of JP2002333955A publication Critical patent/JP2002333955A/en
Application granted granted Critical
Publication of JP3925246B2 publication Critical patent/JP3925246B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、計算機システムに関し、さらに詳しくは、カウントキーデータ形式に従うインタフェースと、固定長ブロック形式に従うインタフェースの両方を有する記憶装置の使用法に関する。
【0002】
【従来の技術】
異なるオペレーティングシステムの間のファイル共用あるいはファイル変換については、従来の技術で公知のものがある。例えば、日本サンマイクロシステムズ株式会社発行の、JLEリファレンスマニュアル3の、装置とネットワークインタフェースのPCFS(4S)には、UNIXオペレーティングシステムから、MS−DOSオペレーティングシステムのファイルをアクセスする機能が記載されている。
(JLEは、日本サン・マイクロシステムズ株式会社の商標です。UNIXは、米国X/Open Company Ltd. の米国及びその他の国における登録商標です。MS-DOSは、米国Microsoft corporation の米国及びその他の国における登録商標です。)
【0003】
【発明が解決しようとする課題】
近年、パソコンやワークステーションなどのいわゆるオープンシステムを使用して、従来メインフレームで行なわれてきた業務を行なう、いわゆるダウンサイジングが盛んに行なわれている。
【0004】
メインフレームは伝統的にディスクアクセスをカウントキーデータ形式に従って行なってきたのに比べて、オープンシステムはディスクアクセスを固定長ブロック形式に従って行なう。このために、一般的にはメインフレームで使用しているディスクは、オープンシステムでは使用できないという問題がある。メインフレームで使用しているディスクには、すでに大量の業務上の情報が蓄積されているために、ダウンサイジングを行なっても、オープンシステムからこのディスクをアクセスしたいという顧客の要求は大きい。この要求に答えるための技術として、分散データベースや、ファイル転送があるが、ネットワーク負荷が高くなるとか、既存の業務プログラムの変更が必要になるなどの欠点がある。
【0005】
本発明は、ディスクにカウントキーデータ形式に従うインタフェースと、固定長ブロック形式に従うインタフェースの両方を持たせて、オープンシステムからこのディスクをアクセスし、メインフレームから格納した業務上の情報を利用することを可能とするものである。
【0006】
カウントキーデータ形式に従うインタフェースと、固定長ブロック形式に従うインタフェースの両方を有する記憶装置の使用法、特に2つのインタフェースの間でデータを共用する機能については、従来の技術で公知のものはない。
【0007】
【課題を解決するための手段】
本発明は、カウントキーデータ形式に従うインタフェースと、固定長ブロック形式に従うインタフェースの両方を有する記憶装置を含む計算機システムにおいて、シリンダー番号、ヘッド番号そしてレコード番号で指定されるカウントキーデータ形式のレコードアドレスと、LBA(Logical Block Address)で指定される固定長ブロック形式のアドレスとを互いに変換する手段と、カウントキーデータ形式で記憶装置に格納されているレコードを固定長ブロック形式に従うインタフェースでアクセスさせる手段と、前記レコードから、ユーザデータだけを取り出す手段と、前記レコードのユーザデータを、あらかじめ定められた形式にしたがって解釈し、利用する手段とを有する計算機システムを提供する。
【0008】
さらに、本発明は、カウントキーデータ形式に従うインタフェースでデータをアクセスし、当該データを管理する手段と、固定長ブロック形式に従うインタフェースでデータをアクセスし、当該データを管理する手段と、前記どちらかの手段があるデータを使用している場合、もう片方の手段にとっても当該データが使用中であるともう片方の手段をして知らしめる手段を有する計算機システムを提供する。
【0009】
【発明の実施の形態】
以下、図に示す発明の実施の形態によりこの発明をさらに詳しく説明する。
【0010】
ー第1の発明の実施の形態ー
図1は、本発明の第1の発明の実施の形態の計算機システムの要部構成図である。
【0011】
CPU10は、SCSI(Small Computer System Interface)インタフェース60を有する。CPU11は、チャネルインタフェース70を有する。ディスク制御装置80は、SCSIインタフェース61でCPU10と接続し、チャネルインタフェース71でCPU11と接続する。SCSIバス65は、SCSIインタフェース60と61をむすぶ。チャネルケーブル75は、チャネルインタフェース70と71をむすぶ。
【0012】
SCSIインタフェース60ないし61を、任意の固定長ブロック形式に従うインタフェースとする構成も可能である。チャネルインタフェース70ないし71を、任意のカウントキーデータ形式に従うインタフェースとする構成も可能である。
【0013】
以下、カウントキーデータ形式をCKD形式と呼び、固定長ブロック形式をFBA(Fixed Block Architecture)形式と呼ぶ。CKD形式のレコードを、CKDレコードと呼ぶ。
【0014】
CPU10は、UNIXオペレーティングシステム40によって制御される。CPU11は、日立製作所のVOS3(Virtual-storage Operating System 3)オペレーティングシステム50によって制御される。UNIXオペレーティングシステム40を、SCSIインタフェースをサポートする任意のオペレーティングシステムとした構成も可能である。VOS3オペレーティングシステム50を、チャネルインタフェースをサポートする任意のオペレーティングシステムとした構成も可能である。
【0015】
CPU10とCPU11では、アプリケーションプログラム20と21がそれぞれ動作する。アプリケーションプログラム20と21は、プログラミング言語COBOLで記述され、ディスク制御装置80にある、VSAM ESDS(Virtual Storage Access Method Entry-Sequenced Data Set)をアクセスする。VSAM ESDSを、CKD形式で格納されたデータをアクセスする、任意のアクセス法の任意のデータセットあるいは任意のファイルとする構成も可能である。
【0016】
VOS3オペレーティングシステム50は、VSAM55を含む。VSAM55は、ディスク制御装置80に格納されたデータを、VSAMデータセットのレコードとして、アプリケーションプログラム21からアクセス可能とする。
【0017】
図2は、UNIXオペレーティングシステム40の要部構成図である。
UNIXオペレーティングシステム40は、ファイル管理機能150およびSCSIデバイスドライバ155を含む。メモリ管理機能やプロセス管理機能など、本発明の実施の形態に関連のうすいものは省略してある。SCSIデバイスドライバ155は、SCSIインタフェース60を制御し、ディスク制御装置80および180をアクセスする。ディスク制御装置80および180は、SCSIバス65によりSCSIインタフェース60に接続する。ディスク制御装置80は、VSAMデータセットを、ディスク制御装置180はFFS(Berkeley Fast File System)のファイルを格納する。FFSは、UNIXオペレーティングシステム40のファイル管理機能150によって標準的にサポートされるファイルシステムの形式である。一方、UNIXオペレーティングシステム40のファイル管理機能150は、VSAMデータセットのアクセスをサポートしていないものとする。
【0018】
ls コマンド160は、指定したディレクトリに存在するファイルの一覧を表示するコマンドである。ディスク制御装置180に含まれるFFSのあるディレクトリを指定して発行された、ls コマンド160のディスクアクセス要求は、ファイル管理機能150およびSCSIデバイスドライバ155によって処理されて、ディスク制御装置180をアクセスする。
【0019】
一方、CKDレコードアクセスライブラリ35のディスクアクセス要求は、ファイル管理機能150を経由せずに、SCSIデバイスドライバ155だけによって処理され、ディスク制御装置80をアクセスする。この場合、ディスク制御装置80に格納される各VSAMデータセットの属性情報や、物理的な格納位置情報等は、UNIXオペレーティングシステム40からCKDレコードアクセスライブラリ35へは提供されない。CKDレコードアクセスライブラリ35には、ディスク制御装置80全体が1つのファイルに見えるだけである。このようなアクセス方法を、ローIOと呼ぶ。
【0020】
UNIXオペレーティングシステム40は、ファイル名により、前記2つのディスクアクセス要求を区別する。アクセスするファイル名として、キャラクタ特殊ファイル名を指定すると、ローIOによるアクセスがされ、それ以外の通常ファイル名を指定すると、ファイル管理機能150を経由するアクセスとなる。キャラクタ特殊ファイル名の例として、/dev/rsd1c がある。
【0021】
図1に戻って、CPU10には、VSAMアクセスライブラリ30と、CKDレコードアクセスライブラリ35がある。CKDレコードアクセスライブラリ35は、VSAMアクセスライブラリ30が発行する、CKDレコードアクセス要求を、FBA形式のアクセス要求に変換して、UNIXオペレーティングシステム40に与え、その結果をCKD形式に変換してVSAMアクセスライブラリ30に返す。VSAMアクセスライブラリ30は、ディスク制御装置80に格納された、VSAMを制御するためのデータ構造を参照して、ディスク制御装置80に格納されたデータを、VSAMデータセットのレコードとして、アプリケーションプログラム20からアクセス可能とする。
【0022】
なお、UNIXオペレーティングシステム40のファイル管理機能150が、VSAMデータセットのアクセスをサポートする構成も可能である。この場合、VSAMアクセスライブラリ30およびCKDレコードアクセスライブラリ35はUNIXオペレーティングシステムの一部分として実装される。
【0023】
ディスク制御装置80は、バッファ90とディスク装置100を有する。ディスク装置100には、CKDレコード110が格納されている。ディスク制御装置80は、チャネルインタフェース71を経由して、CKD形式にしたがった、シリンダー番号、ヘッド番号、そしてレコード番号を指定したレコードのアクセスを提供する。以下、シリンダー番号、ヘッド番号、そしてレコード番号で表されるレコードアドレスを、CCHHRと呼ぶ。シリンダー番号、ヘッド番号で表されるトラックアドレスを、CCHHと呼ぶ。
【0024】
さらに、ディスク制御装置80は、SCSIインタフェース61を経由して、FBA形式に従ったアクセスも提供する。この場合、ブロック長を512バイトとし、シリンダー0、ヘッド0、そしてレコード1を第0のLBA(Logical Block Address)をもつものとする。ディスク制御装置80に格納されるCKDレコードの、FBA形式に従ったアドレス付けや、アクセスの仕方については後述する。
【0025】
ディスク装置100に格納されたデータは、当該データが格納されているシリンダー番号、ヘッド番号、そしてトラック先頭からのバイト位置によって識別される。データのディスク装置100でのシリンダー番号、ヘッド番号は、当該データが、CPU11からチャネルインタフェース71を経由してアクセスされるときに指定されるシリンダー番号、ヘッド番号と同じであるとする。これが異なる構成も可能である。ディスク装置100に格納されたデータが、LBAで識別される構成も可能である。その場合、CPU11からチャネルインタフェース71を経由してアクセスされるときに指定されるシリンダー番号、ヘッド番号そしてレコード番号と、LBAを互いに変換する手段が必要になる。この構成は、第2の発明の実施の形態として後述する。
【0026】
ディスク装置100が複数ある構成も可能である。
ディスク装置100は、1つのトラックあたり最大64キロバイトのデータを格納することができるものとし、以下これをトラック容量と呼ぶ。バッファ90は、トラック容量だけの大きさを持つ。トラック容量に、ヘッド数をかけたものを、シリンダー容量と呼ぶ。
【0027】
図3は、アプリケーションプログラム20の処理のフローチャートである。
アプリケーションプログラム20は、COBOLで記述され、ディスク制御装置80に格納される、VSAM ESDSを1つオープンして、データセットの最初のレコードを1つ読み、それをコンソールに表示し、データセットをクローズして終わるというものである。
【0028】
ステップ1100で、データセットのオープンを行う。COBOLでの記述形式は、OPEN INPUT データセット名であり、指定したデータセットを読み込み専用でオープンすることを示す。これによりVSAMアクセスライブラリ30が呼ばれる。そこで行なわれる処理を、図4に示す。これについては後述する。
【0029】
ステップ1110で、VSAMレコードの読み込みを行う。COBOLでの記述形式は、READ データセット名 RECORD INTO 一意名であり、指定したデータセットからVSAMレコードを1つ読んで、一意名で示されるアプリケーションプログラム20の変数にいれることを示す。これによりVSAMアクセスライブラリ30が呼ばれる。そこで行なわれる処理を、図5に示す。これについては後述する。
【0030】
ステップ1120で、前記ステップ1110で読み込んだVSAMレコードを、コンソールに表示する。
【0031】
ステップ1130で、データセットのクローズを行なう。これによりVSAMアクセスライブラリ30が呼ばれる。そこで行なわれる処理を、図6に示す。これについては後述する。
以上でアプリケーションプログラム20の処理を終わる。
【0032】
図4は、VSAMアクセスライブラリ30が行う、VSAM ESDSのオープン処理1100のフローチャートである。
ステップ500で、UNIXオペレーティングシステム40の、ローIO機能をオープンする。正確に言うと、ディスク制御装置80に対応したキャラクタ特殊ファイルをオープンする。本発明の実施の形態では、すべてのVSAM ESDSは、ディスク制御装置80に存在するものとする。CPU10に複数のディスク装置が接続される構成も可能である。その場合は、指定されたデータセット名から、それがどのディスク装置に存在するかを判断する手段が必要である。
【0033】
ステップ510で、VSAMアクセスライブラリ30は、CKDレコードアクセスライブラリ35の機能を使用して、ディスク制御装置80から、標準ボリュームラベルを読み込む。
【0034】
標準ボリュームラベルは、ディスク装置の特定の場所に書かれており、VTOC(Volume Table of Content)のアドレスを有する。標準ボリュームラベルの読み込みは、前記特定のCCHHRを指定して、図7に示すCKDレコード読み込み処理を呼ぶことで行う。CKDレコード読み込み処理については後述する。VOS3オペレーティングシステム50は、ディスク装置ごとに1つVTOCを作成する。VTOCは、そのディスク装置に含まれるすべてのデータセットの管理情報を有する。
【0035】
ステップ510で、標準ボリュームラベルのデータ部から、VTOCのCCHHRを得る。
VTOCは、キー部44バイト、データ部96バイトのレコードの集まりである。各レコードを、DSCB(Dataset Control Block)と呼ぶ。DSCBには、いろいろな形式がある。 形式1DSCBは、キー部がデータセット名で、データ部はそのデータセットの属性や、割り当てられている物理的な格納位置の情報を有する。データセットが割り当てられている物理的な格納領域を、エクステントと呼ぶ。エクステントは、それが占めるシリンダー番号、トラック番号で識別される。
【0036】
ステップ520で、VTOCの最初のレコードをCKDレコードアクセスライブラリ35の機能を使用して、1つ読む。
【0037】
ステップ530で、これが形式1DSCBであり、かつキー部は指定されたデータセット名に等しいか調べる。条件が成り立てば、ステップ550に進む。そうでなければ、ステップ540に進む。
【0038】
ステップ550では、これが目的とするデータセットの形式1DSCBであるので、これをVSAMアクセスライブラリ30のローカルな変数にコピーして、コール元に戻る。これで、VSAM ESDSのオープン処理が終わる。
【0039】
ステップ540では、レコードアドレスを進め、次のDSCBを読む準備をして、ステップ520に戻る。
【0040】
図5は、VSAMアクセスライブラリ30が行う、VSAM ESDSのリード処理1110のフローチャートである。
【0041】
VSAM ESDS に含まれるすべてのVSAMレコードは、それらが作成された順で順序づけされている。VSAMアクセスライブラリ30は現在処理対象となるVSAMレコード位置を常に記憶しており、以下、それをカレントレコードと呼ぶ。カレントレコードは、データセットがオープンされたときに、最初のVSAMレコードとされる。リードされると、カレントレコードは次のVSAMレコードとなる。
【0042】
VSAMでは、ディスク装置との転送の単位を、CI(Control Interval)と呼んでいる。CIは、VSAMレコードを含むほか、CI内の未使用スペースの管理情報などを有する。VSAMアクセスライブラリ30は、VSAMレコードを、それが含まれるCIのRBA(Relative Byte Address)と、CIの中でのVSAMレコードの通番で識別する。
【0043】
ステップ600で、目的RBAを、カレントレコードを含むCIのRBAとする。
ステップ610で、目的RBAを含むエクステントを探す。これはつまり、データセット内のオフセットから、そのオフセットを持つデータが実際に格納されているCCHHRを求めることである。
【0044】
VSAM ESDSのオープンの直後のリード処理を例に、以下説明する。このときカレントレコードはVSAM ESDSの最初のCIに含まれ、そのCIのRBAは0であるとする。形式1DSCBは、エクステント情報の配列を持ち、各エクステントごとに、そのエクステントの開始CCHHと、終了CCHHを記録する。前記エクステント情報の配列は、対応するRBAの昇順に並んでいる。今の例では、目的RBAは0であるので、明らかに最初のエクステントの最初のレコードに含まれる。この結果、目的とするCCHHは形式1DSCBに記録された最初のエクステント情報の示す開始CCHHであることがわかる。また、レコード0にはユーザデータは格納できないため、Rは1であることがわかる。
【0045】
ステップ620では、前記ステップ610で求めたCCHHRを指定して、図7に示すCKDレコード読み込み処理を呼ぶ。CIが、複数のCKDレコードからなる場合には、その数だけCKDレコード読み込み処理を呼ぶ。
【0046】
ステップ630では、CI内の制御情報を参照して、CIの中で目的とするVSAMレコードを探す。それは、カレントレコードの通番を持つものである。
ステップ640で、アプリケーションプログラム20の変数である一意名に、VSAMレコードをコピーする。
【0047】
ステップ650で、カレントレコードを、次のVSAMレコードとする。
以上で、VSAM ESDSのリード処理が終わる。
【0048】
図6は、VSAMアクセスライブラリ30が行う、VSAM ESDSのクローズ処理1130のフローチャートである。
【0049】
ステップ1000で、UNIXオペレーティングシステム40の、ローIO機能をクローズする。正確に言うと、ディスク制御装置80に対応したキャラクタ特殊ファイルをクローズする。
【0050】
ステップ1010で、作業領域を解放する。
以上で、VSAM ESDSのクローズ処理が終わる。
【0051】
図7は、CKDレコードアクセスライブラリ35が行なう、CKDレコード読み込み処理のフローチャートである。CKDレコード読み込み処理は、VSAMアクセスライブラリ30から呼ばれ、指定されたCCHHRを持つレコードをディスク制御装置80から読み、そのキー部とデータ部を返す。
【0052】
ステップ400では、指定されたCCHHRを持つレコードを含むトラックの先頭に対応するLBAを計算する。ただし、以下では、割算を示す/では、整数部分のみを商とする。
【0053】
LBA =(CC *シリンダー容量 + HH*トラック容量) / ブロック長
ステップ410では、UNIXオペレーティングシステム40のローIO機能をつかって、前記LBAから、1トラック長だけ、SCSIインタフェース60を経由してディスク制御装置80からデータを読む。ローIO機能を使う理由は、UNIXオペレーティングシステム40はVSAMデータセットのアクセスをサポートしていないために、UNIXオペレーティングシステム40のファイル管理機能を使用することができないためである。
【0054】
ステップ420では、ステップ430で処理するレコードアドレスを、トラックの先頭とする。
【0055】
ステップ430では、当該レコードのカウント部に含まれる、レコードIDを調べて、当該レコードが、指定されたCCHHRを持つものであるか調べる。指定されたCCHHRを持てばステップ440へ進む。そうでなければ、ステップ450へ進む。
【0056】
ステップ440では、目的とするレコードが見つかったので、そのキー部と、データ部をコール元に返して処理を終了する。
【0057】
ステップ450では、レコードアドレスに、現在のレコードのキー部とデータ部の長さを加えて、つぎに処理するレコードアドレスとして、ステップ430に戻る。レコードのキー部とデータ部の長さは、そのレコードのカウント部に書いてある。
【0058】
以上、図7に示した処理では、CKDレコード読み込み処理が1度呼ばれると必ず1トラックがディスク制御装置80から読まれる。最近アクセスしたトラックのデータをキャッシュしておいて、同じトラックが要求されたらディスク制御装置80をアクセスしないですます構成も可能である。
【0059】
図8は、ディスク制御装置80が行なう、SCSI READ処理のフローチャートである。この処理は、前記図7のCKDレコード読み込み処理のステップ410でUNIXオペレーティングシステム40のローIO機能が使用された結果、ディスク制御装置80の側で行なわれるものである。
【0060】
ステップ200では、ディスク制御装置80は、CPU10からSCSIインタフェース61を経由してSCSIのREADコマンドを受ける。
【0061】
ステップ210では、受領したCDB(Command Descriptor Block)から、対象データのLBAを得、それをディスク装置100のシリンダー番号とヘッド番号に変換する。
【0062】
シリンダー番号=(LBA *ブロック長) /シリンダー容量
ヘッド番号=((LBA *ブロック長) %シリンダー容量)/トラック容量
トラック先頭からのバイト位置=(LBA *ブロック長) %トラック容量
%は、剰余を表す。即ち、整数m、nに対して、n%mはnをmで割った余りを示す。
【0063】
ステップ220では、指定されたシリンダー番号とヘッド番号をもつトラックを、バッファ90に読む。このときにバッファ90に読み込まれるトラックの形式を、図9に示す。
【0064】
図9は、ディスク装置100に格納されるデータの、トラック上の配置を示したものである。300から、345は、トラック上の実際の物理的なデータの配置を示す。これに対して、380は、前記図8のステップ220でバッファ90に読み込まれるトラックの形式を示したものである。390、392そして394は、380に示すデータが、SCSIインタフェース61を経由して、CPU10に転送されるときの形式を示したものである。
【0065】
300は、インデクスマーカーであり、トラックの始まりを示す。305は、ホームアドレスであり、トラックの状態や、IDを示す。310はレコード0のカウント部であり、315はレコード0のデータ部である。カウント部は、各レコードの最初のフィールドであり、そのレコードの状態、位置、及び長さを示す。レコード0は、トラックの最初のレコードであり、ユーザデータを格納することはできない。320、325、そして330はそれぞれ、レコード1のカウント部、キー部、データ部である。335、340そして345はそれぞれ、レコード2のカウント部、キー部、データ部である。以下に続くレコードは、省略した。305から345の各フィールドの間は、ギャップと呼ばれる領域で、定められた長さを持ち、データが格納されない。
【0066】
380のトラック形式は、前記305から345までのフィールドのうち、レコード1以下の、カウント部とキー部、そしてデータ部を連続して配置したものである。
【0067】
実際には、305から345までのフィールドにそれぞれ存在するECC(ErrorCorrecting Code)などは380には含まれないが、図3では簡単のため、その違いは表されていない。
【0068】
390、392そして394は、ディスク制御装置80のブロック長である、512バイトの長さを持つブロックである。390、392そして394には、380に示すデータが、カウント部、キー部、データ部すべてが連続して、順に格納される。CKDレコードの境界とブロックの境界とは、必ずしも一致しない。
【0069】
図9に示すように、SCSIインタフェース61からは、ホームアドレス305や、レコード0は見えない。ECCや、ギャップはもちろん見えない。
【0070】
バッファ90の長さである、トラック容量は、トラックに格納されるユーザデータの最大値ではなく、各レコードのカウント部や、ホームアドレス、それにレコード0の長さをも加えた最大値であるとする。
【0071】
図8に戻って、ステップ230では、バッファ90の、ステップ210で求めたトラック先頭からのバイト位置で指定されるブロックから、SCSIインタフェース61を経由してCPU10にデータを転送する。
【0072】
ステップ240では、トラックの終わりまで転送したかを判断する。トラックの終わりまで転送したならば、ステップ250に進む。そうでなければ、ステップ270に進む。トラックの終わりまでを転送したとは、当該トラックの最終レコードの最終バイトを転送し終わったことをいう。
【0073】
ステップ250では、現在転送中のブロックの終端まで、0を転送する。これを以下、パディングと呼ぶ。この処理が必要な理由を以下に示す。
【0074】
CKD形式では、トラックに格納できるデータの容量は、レコード長によって変わる。このため、一般的にはトラックに実際に格納されているデータの容量は、ブロック長、現在の場合512バイトの倍数にならない。ステップ250のパディングを行なわないならば、このディスクをFBA形式で読んだときに、1つのブロック内に異なるトラックのデータが混在することになる。これは、CPU10のCKDレコードアクセスライブラリ35の処理を複雑にする。本発明の実施の形態では、ステップ250のパディングを行ない、トラックは必ずブロック境界から始まることを保証するものとする。ステップ250のパディングを行なわない構成も可能である。パディングのために転送するデータとして、0以外を使うことも可能である。
【0075】
ステップ260では、次のトラックのシリンダー番号、ヘッド番号を計算する。 ステップ270では、CDBで指定されたブロックを、すべて転送したか調べる。すべて転送したなら、リード処理を終了する。すべて転送していないなら、トラック先頭からのバイト位置を0に設定して、ステップ220へ戻る。
【0076】
ただし、本発明の実施の形態では、CKDレコードアクセスライブラリ35は図7のステップ410に示すように、必ず1トラックだけをアクセスする。このため、詳細はUNIXオペレーティングシステム40の処理に依存するものの、ステップ260で計算した次のトラックアドレスを有するトラックがステップ220で読み込まれることは、一般的には起こらないと考えられる。
【0077】
以上、図8の処理においても、図7について述べたように、トラックのキャッシュを行なう構成が可能である。
【0078】
ー第2の発明の実施の形態ー
図10は、本発明の第2の発明の実施の形態の計算機システムの要部構成図である。
【0079】
本発明の第2の発明の実施の形態の計算機システムの構成は、第1の発明の実施の形態のディスク制御装置80のディスク装置100を、FBA形式でアクセスされるディスク装置100’に変更した構成である。ディスク装置100’が複数ある構成も可能であり、これを図18に示す。図18については、後述する。
【0080】
このディスク装置100’は、ブロック長を512バイトとし、LBAによるアクセスを提供する。ディスク装置にCKDレコード110が格納されることや、チャネルインタフェース71を経由して、CKD形式にしたがったアクセスをCPU11に提供することは第1の発明の実施の形態と同じである。
【0081】
図11は、ディスク装置100’に格納されるデータの配置を示したものである。2000、2002そして2004は、ディスク装置100’に格納されたトラックのデータを有するブロックであり、それぞれ512バイトの長さを持つ。380’はバッファ90に読み込まれるトラックの形式である。390、392そして394は、380’に示すデータが、SCSIインタフェース61を経由して、CPU10に転送されるときの形式を示したものである。390、392そして394は図9と同じである。
【0082】
2000は、ホームアドレスや、レコード0を含む。これは、ディスク制御装置80が、チャネルインタフェース71を経由してCKD形式にしたがったアクセスを受けるために、CKD形式特有の、いわゆるフォーマットライトコマンドを処理し、書き込まれたデータを保持する必要があるためである。フォーマットライトコマンドの例としては、WRITE HOME ADDRESS や、WRITE COUNT, KEY, AND DATAがある。
【0083】
380’に示すデータは、2000、2002そして2004のデータを連続して並べたものであり、ここにもホームアドレスとレコード0が存在する。
【0084】
図12は、ディスク制御装置80が行なう、SCSI READ 処理のフローチャートである。図12のフローチャートは、第1の発明の実施の形態の図8のフローチャートに、ステップ2100と、ステップ2110を加えたものである。
【0085】
ステップ2100では、先のステップ210で、CDBに指定されたLBAから計算したCCHHを、さらにLBAに再計算する。
【0086】
LBA =(CC *シリンダー容量 + HH*トラック容量) / ブロック長
上記シリンダー容量とトラック容量は、ディスク制御装置80がチャネルインタフェース71を経由してCPU11に見せているものである。ブロック長は、ディスク装置100’の属性で、512バイトである。ディスク装置100’が複数ある構成をとった場合、目的CCHHを持つトラックがどのディスク装置に存在するかを決める手段が必要になり、LBAの計算も複雑になる。
【0087】
ステップ220’では、ディスク装置100’からバッファ90に、2000、2002、2004そしてそれに続くブロックを、1トラック分だけ読み込む。バッファ90には380’に示すデータが格納される。
【0088】
ステップ2110では、バッファ90のデータ上で、レコード1のカウント部の開始位置を決める。このためには、レコード0のカウント部を見て、レコード0の長さを求め、それとホームアドレスの長さだけをバッファ90の先頭位置に足し込めばよい。ホームアドレスとレコード0は、SCSIインタフェース61を経由して、CPU10に転送されることがないため、この処理が必要である。
【0089】
ステップ230では、前記ステップ2110で位置付けたレコード1から転送がされる。
以下の処理は、第1の発明の実施の形態の図8と同じであるので、説明は省略する。
【0090】
図18は、本発明の第2の発明の実施の形態の計算機システムのディスク装置100’を、その約半分の容量を持つディスク装置100”およびディスク装置2500で置き換えた計算機システムの要部構成図である。各ディスク装置へのデータの分配は、トラック単位で行なわれ、偶数トラック番号のものはディスク装置2500に、奇数トラック番号のものはディスク装置100”に格納されるものとする。
【0091】
ー第3の発明の実施の形態ー
図13は、本発明の第3の発明の実施の形態の計算機システムの要部構成図である。
【0092】
本発明の第3の発明の実施の形態の計算機システムの構成は、第1の発明の実施の形態のCKDレコードアクセスライブラリ35を、少し異なる機能を持つCKDレコードアクセスライブラリ35”に置き換えた構成である。
【0093】
本発明の実施の形態と第1の発明の実施の形態の主な違いを以下に簡単に述べる。
【0094】
第1の発明の実施の形態では、CKDレコードからカウント部を取り除くのはCPU10のCKDレコードアクセスライブラリ35であったが、本発明の実施の形態ではディスク制御装置80がこれを行なう。
【0095】
これにともない、第1の発明の実施の形態では、CKDレコードアクセスライブラリ35はディスク制御装置80からトラック単位でデータを読み込んだが、本発明の実施の形態ではブロック単位でデータを読み込む。そして、本発明の実施の形態ではSCSIインタフェース60を経由してCKDレコードアクセスライブラリ35が受け取るデータにはカウント部がついていないので、これだけではレコード境界が決まらない。しかしこれはVSAM をアクセスするうえでは問題にならない。この理由を、以下に説明する。
【0096】
VSAMでは、ディスク装置に格納される物理的なレコードは、VSAMのユーザであるアプリケーションプログラムが扱うVSAMレコードとは対応しない。ディスク装置への格納すなわちCKDレコードの割当は、CIごとに行なわれる。CIを格納する各CKDレコードは、キー部を持たず、データ部の長さは同じVSAMデータセットに属するCKDレコードであればすべて等しく、VSAMにより1024バイトなど、適当な長さに決められる。ディスク制御装置80は、図8のステップ250のパディング処理をおこなうことで、CKD形式で格納されたデータをFBA形式でアクセスするときに、CKD形式でのトラック境界がFBA形式でのブロック境界をまたがらないことを保証する。このため、トラック先頭のLBAが与えられれば、目的とするレコードの位置は、レコード番号とレコード長から容易に求めることができる。
【0097】
さらに、CKDレコードアクセスライブラリ35が受け取るデータにカウント部がついていないことは、VTOCをアクセスするうえでも問題にならない。VTOCは、キー部44バイト、データ部96バイトのレコードの集まりである。このため、上記VSAMの場合と同様に、レコード位置を求めるのは容易である。
【0098】
即ち、CKDレコードアクセスライブラリ35は、その上位プログラム、今の場合VSAMアクセスライブラリ30から、現在処理対象としているトラックに、どんな形式のレコードが格納されているかを教わることで、レコード境界を見つけることが可能である。このためカウント部は必要ない。
【0099】
ただし、VSAM以外のアクセス法には、任意長のCKDレコードを扱うものもあるため、本発明の実施の形態の方式は適用できないものがある。
【0100】
図14は、ディスク装置100に格納されるデータの、トラック上の配置を示したものである。300から345は、図9と同じであり、トラック上の実際の物理的なデータの配置を示す。380”は、バッファ90に読み込まれるトラックの形式を示したものである。390”と392”は、380”に示すデータが、SCSIインタフェース61を経由して、CPU10に転送されるときの形式を示したものである。
【0101】
380”のトラック形式は、前記305から345までのフィールドのうち、レコード1以下の、キー部とデータ部だけを集めたものである。
【0102】
図15は、CKDレコードアクセスライブラリ35”が行なう、CKDレコード読み込み処理のフローチャートである。
【0103】
ステップ2200では、指定されたCCHHRを持つレコードを含むブロックのLBAを計算する。Rは、目的レコ−ドのレコ−ド番号である。
【0104】
LBA =(CC *シリンダー容量 + HH*トラック容量) / ブロック長 +((Rー1)* レコード長) / ブロック長
最初の項が、目的レコードを含むトラックの先頭アドレスであり、2番目の項がトラック上のオフセットである。
【0105】
さらに、ブロック内での、目的レコードの開始オフセットは、
ブロック内オフセット = ((Rー1)* レコード長) % ブロック長
である。
【0106】
ステップ2210では、UNIXオペレーティングシステム40のローIO機能をつかって、前記LBAから、((レコード長 + (ブロック長ー1))/ ブロック長)ブロックだけ、あるいは、レコードがブロックをまたがる場合にはさらに1ブロック余分に、SCSIインタフェース60を経由してディスク制御装置80からデータを読む。
【0107】
ステップ2220では、読み込んだデータのアドレス+ブロック内オフセットをキー部として、そしてキー部の終了アドレスをデータ部としてコール元に返して処理を終了する。
【0108】
図14で、CKDレコード読み込み処理を例を使って説明する。
CKDレコードアクセスライブラリ35”は、VSAMアクセスライブラリ30から、VTOCのレコード4を読む要求を受けたとする。VTOCは、トラック先頭のレコード1から開始するとする。ブロック長は512バイト、レコード長はキー部が44バイト、データ部が96バイト、合計140バイトである。
【0109】
LBA =(CC *シリンダー容量 + HH*トラック容量)/512 +
((4ー1)* 140) / 512
であり、
ブロック内オフセット = ((4ー1)*140) % 512 = 420である。
【0110】
ステップ2210では、(140+(512ー1))/512 + 1 =2
ブロックが読み込まれる。
【0111】
ステップ2220では、読んだデータの先頭から420バイト目のアドレスがキー部として、464バイト目のアドレスがデータ部として、VSAMアクセスライブラリ30に返る。
【0112】
ー第4の発明の実施の形態ー
図16は、本発明の第4の発明の実施の形態の計算機システムの要部構成図である。
【0113】
本発明の第4の発明の実施の形態の計算機システムの構成は、第1の発明の実施の形態のVSAMアクセスライブラリ30を、少し異なる機能を持つVSAMアクセスライブラリ30’’’に置き換え、さらにCPU11にVTOCユティリティ2300を加えた構成である。
【0114】
本発明の実施の形態と第1の発明の実施の形態の主な違いを以下に簡単に述べる。
【0115】
第1の発明の実施の形態のVSAMアクセスライブラリ30は、図4に示したVSAM OPEN処理において、指定されたデータセット名称の形式1DSCBを探すために、標準ボリュームラベルとVTOCを読んだ。本発明の実施の形態のVSAMアクセスライブラリ30’’’は、そのためにVTOCユティリティ2300が求めたデータを使い、ディスク制御装置80のアクセスはしない。
【0116】
VTOCユティリティ2300は、VOS3オペレーティングシステム50上で動作し、ディスク制御装置80をアクセスして目的データセットの形式1DSCBを求める。VOS3オペレーティングシステム50にはこれを行なうマクロが提供されており、それをOBTAIN(SEARCH)マクロと言う。 VTOCユティリティ2300は、OBTAIN(SEARCH)マクロを、目的とするデータセット名称を指定して発行する。VOS3オペレーティングシステム50はVTOCをアクセスして、結果である形式1DSCBをVTOCユティリティ2300に返す。
【0117】
VOS3オペレーティングシステム50はVTOCをアクセスするときに、VTOC索引を使用したり、指定したキー部を持つレコードをサーチするCCW(Channel CommandWord)を使用したりするために、一般的にその処理は第1の発明の実施の形態のVSAMアクセスライブラリ30の行なう、図4に示したVSAM OPEN処理のステップ505からステップ540に比べると高速である。
【0118】
図17は、VSAMアクセスライブラリ30’’’が行う、VSAM ESDSのオープン処理のフローチャートである。
【0119】
ステップ500で、UNIXオペレーティングシステム40の、ローIO機能をオープンする。
【0120】
ステップ2400では、VSAMアクセスライブラリ30’’’はVTOCユティリティ2300より形式1DSCBを得る。具体的には、プログラム間通信を用いてVTOCユティリティ2300を呼び出して結果を返送させてもいいし、あらかじめVTOCユティリティ2300を実行させておき、その結果を人間がコンソールから入力してもよい。
【0121】
ステップ550では、形式1DSCBをVSAMアクセスライブラリ30のローカルな変数にコピーして、コール元に戻る。これで、VSAM ESDSのオープン処理が終わる。
【0122】
ー第5の発明の実施の形態ー
図19は、本発明の第5の発明の実施の形態の計算機システムの要部構成図である。
【0123】
本発明の第5の発明の実施の形態の計算機システムの構成は、第1の発明の実施の形態のVSAMアクセスライブラリ30を、少し異なる機能を持つVSAMアクセスライブラリ30””に置き換え、さらにCPU11にロックユティリティ2600を加えた構成である。
【0124】
本発明の実施の形態は、第1の発明の実施の形態が有する、以下の課題を解決するための機構を有する。
【0125】
VOS3オペレーティングシステム50はカウントキーデータ形式に従うインタフェースでデータをアクセスし、当該データを管理し、UNIXオペレーティングシステム40は固定長ブロック形式に従うインタフェースでデータをアクセスし、当該データを管理する。両オペレーティングシステムは、ディスク装置100にある各データセットが使用中かどうかという情報を、それぞれのオペレーティングシステムの管理するメモリに持つ。このため、お互いがどのデータセットを使用しているかはわからない。このため、UNIXオペレーティングシステム40上で動作するアプリケーションプログラム20が現在参照しているデータセットを、VOS3オペレーティングシステム50上で動作するアプリケーションプログラム21が削除してしまうといった不具合を防ぐことができない。このような不具合は、アプリケーションプログラムあるいはオペレーティングシステムの動作不良あるいはデータセットの破壊をひきおこすおそれがあるために、避けなければいけない。このために、本発明の実施の形態はロックユティリティ2600を有する。
【0126】
ロックユティリティ2600は、VOS3オペレーティングシステム50上で動作するプログラムである。ロックユティリティ2600は、VSAMアクセスライブラリ30””の要求に従って、VSAMアクセスライブラリ30””がアクセスしようとするデータセットの使用を、 VOS3オペレーティングシステム50に要求する。しかしロックユティリティ2600は自分では使用を要求したデータセットへのアクセスは行わない。データセットへのアクセスはSCSIインタフェースを経由してUNIXオペレーティングシステム40が行う。VOS3オペレーティングシステム50には必要に応じてデータセットの使用の要求を行なうマクロが提供されており、それをDYNALLOCマクロと言う。VSAMアクセスライブラリ30””は、データセットをアクセスしようとするときには、そのデータセット名称を指定してロックユティリティ2600を呼ぶ。ロックユティリティ2600は、DYNALLOCマクロを、目的とするデータセット名称を指定して発行する。これにより、UNIXオペレーティングシステム40がアクセスしようとするデータセットは、VOS3オペレーティングシステム50にとっても使用中とみなされるため、前述のアクセスの競合による不具合を防ぐことができる。
【0127】
図20は、VSAMアクセスライブラリ30””が行う、VSAM ESDSのオープン処理のフローチャートである。
【0128】
ステップ2700で、VSAMアクセスライブラリ30””はオープンしようとするデータセット名称を指定して、ロックユティリティ2600を呼ぶ。具体的には、プログラム間通信を用いてロックユティリティ2600を呼び出すなどの方法がある。ロックユティリティ2600はVOS3オペレーティングシステム50にDYNALLOCマクロを発行し、データセットの使用を要求する。これにより、当該データセットは、VOS3オペレーティングシステム50で動作するアプリケーションプログラムからアクセスができなくなる。
【0129】
以下の処理は図4と同じなので、説明は省略する。
【0130】
図21は、VSAMアクセスライブラリ30””が行う、VSAM ESDSのクローズ処理のフローチャートである。
【0131】
ステップ2800で、VSAMアクセスライブラリ30””はクローズしようとするデータセット名称を指定して、ロックユティリティ2600を呼ぶ。ロックユティリティ2600はVOS3オペレーティングシステム50にDYNALLOCマクロを発行し、データセットの使用の終了を伝える。これにより、当該データセットは、VOS3オペレーティングシステム50で動作するアプリケーションプログラムからアクセスできるようになる。
【0132】
以下の処理は図6と同じなので、説明は省略する。
【0133】
本発明の実施の形態では、VSAMアクセスライブラリ30””がオープンしたデータセットは、VOS3オペレーティングシステム50で動作するアプリケーションプログラムからはいっさいアクセスできなくなる。これを、例えばデータセットの読みだしは許可し、更新は許可しないようにすることもできる。そのためには、VSAMアクセスライブラリ30””からロックユティリティ2600に、データセット名称の他に当該データセットの共用モードを与え、ロックユティリティ2600がその共用モードに従ってDYNALLOCマクロを発行するようにすればよい。
【0134】
また、VSAMアクセスライブラリ30””はロックユティリティ2600を使用して、UNIXオペレーティングシステム40上で動作するアプリケーションプログラム20の要求にしたがって、ディスク装置100にVOS3オペレーティングシステム50の管理するデータセットを新規に作成することができる。同様に、データセットを削除したり、既存のデータセットの大きさを拡張、縮小することもできる。
【0135】
【発明の効果】
本発明の計算機システムによれば、メインフレームと、オープンシステムとの間で、データが共用できる。これにより、より柔軟で、安価かつ高性能な計算機システムを構成することができる。
【図面の簡単な説明】
【図1】本発明の第1の発明の実施の形態の計算機システムの要部構成図である。
【図2】本発明の第1の発明の実施の形態のUNIXオペレーティングシステムの要部構成図である。
【図3】本発明の第1の発明の実施の形態のアプリケーションプログラムの処理の手順を示すフローチャートである。
【図4】本発明の第1の発明の実施の形態のVSAM OPEN処理の手順を示すフローチャートである。
【図5】本発明の第1の発明の実施の形態のVSAM READ処理の手順を示すフローチャートである。
【図6】本発明の第1の発明の実施の形態のVSAM CLOSE処理の手順を示すフローチャートである。
【図7】本発明の第1の発明の実施の形態のCKDレコード読み込み処理の手順を示すフローチャートである。
【図8】本発明の第1の発明の実施の形態のSCSI READ処理の手順を示すフローチャートである。
【図9】本発明の第1の発明の実施の形態のトラック形式のデータ構造図である。
【図10】本発明の第2の発明の実施の形態の計算機システムの要部構成図である。
【図11】本発明の第2の発明の実施の形態のトラック形式のデータ構造図である。
【図12】本発明の第2の発明の実施の形態のSCSI READ処理の手順を示すフローチャートである。
【図13】本発明の第3の発明の実施の形態の計算機システムの要部構成図である。
【図14】本発明の第3の発明の実施の形態のトラック形式のデータ構造図である。
【図15】本発明の第3の発明の実施の形態のCKDレコード読み込み処理の手順を示すフローチャートである。
【図16】本発明の第4の発明の実施の形態の計算機システムの要部構成図である。
【図17】本発明の第4の発明の実施の形態のVSAM OPEN処理の手順を示すフローチャートである。
【図18】本発明の第2の発明の実施の形態の計算機システムの要部構成図である。
【図19】本発明の第5の発明の実施の形態の計算機システムの要部構成図である。
【図20】本発明の第5の発明の実施の形態のVSAM OPEN処理の手順を示すフローチャートである。
【図21】本発明の第5の発明の実施の形態のVSAM CLOSE処理の手順を示すフローチャートである。
【符号の説明】
10、11 CPU
20、21 アプリケーションプログラム
30、30’’’、30”” VSAMアクセスライブラリ
35、35” CKDレコードアクセスライブラリ
40 UNIXオペレーティングシステム
50 VOS3オペレーティングシステム
60、61 SCSIインタフェース
70、71 チャネルインタフェース
80 ディスク制御装置
90 バッファ
100、100’、100”” ディスク装置
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a computer system, and more particularly to the use of a storage device having both an interface according to a count key data format and an interface according to a fixed length block format.
[0002]
[Prior art]
There are known in the prior art for file sharing or file conversion between different operating systems. For example, PCFS (4S) of the device and network interface of JLE Reference Manual 3 issued by Nippon Sun Microsystems, Inc. describes a function for accessing files of the MS-DOS operating system from a UNIX operating system. .
(JLE is a trademark of Japan Sun Microsystems, Inc. UNIX is a registered trademark of X / Open Company Ltd. in the United States and other countries. MS-DOS is a registered trademark of Microsoft Corporation in the United States and other countries. Is a registered trademark.)
[0003]
[Problems to be solved by the invention]
In recent years, so-called downsizing, in which operations that have been conventionally performed on mainframes using so-called open systems such as personal computers and workstations, have been actively performed.
[0004]
Open systems perform disk access according to a fixed-length block format, whereas mainframes traditionally perform disk access according to a count key data format. For this reason, there is a problem that a disk used in a mainframe cannot be used in an open system. Since a large amount of business information is already stored on the disk used in the mainframe, there is a great demand from customers to access this disk from an open system even if downsizing is performed. There are a distributed database and a file transfer as a technique for answering this request, but there are drawbacks such as a high network load and a need to change an existing business program.
[0005]
In the present invention, the disk has both an interface according to the count key data format and an interface according to the fixed-length block format, the disk is accessed from an open system, and business information stored from the mainframe is used. It is possible.
[0006]
There is nothing known in the prior art about the usage of a storage device having both an interface according to the count key data format and an interface according to the fixed-length block format, particularly the function of sharing data between the two interfaces.
[0007]
[Means for Solving the Problems]
The present invention relates to a record system having a count key data format specified by a cylinder number, a head number, and a record number in a computer system including a storage device having both an interface according to a count key data format and an interface according to a fixed length block format. Means for mutually converting addresses in a fixed-length block format specified by an LBA (Logical Block Address); means for accessing records stored in a storage device in a count key data format by an interface in accordance with the fixed-length block format; A computer system having means for extracting only user data from the record, and means for interpreting and using the user data of the record according to a predetermined format is provided.
[0008]
Further, the present invention provides a means for accessing data by an interface according to a count key data format and managing the data, a means for accessing data by an interface according to a fixed-length block format, and a means for managing the data. When a certain means uses data, a computer system is provided having means for letting the other means know that the other means is using the other means.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in more detail with reference to embodiments shown in the drawings.
[0010]
-Embodiment of the first invention-
FIG. 1 is a block diagram showing the principal parts of a computer system according to the first embodiment of the present invention.
[0011]
The CPU 10 has a SCSI (Small Computer System Interface) interface 60. The CPU 11 has a channel interface 70. The disk controller 80 is connected to the CPU 10 via the SCSI interface 61 and is connected to the CPU 11 via the channel interface 71. The SCSI bus 65 connects the SCSI interfaces 60 and 61. A channel cable 75 connects the channel interfaces 70 and 71.
[0012]
A configuration in which the SCSI interfaces 60 to 61 are interfaces according to an arbitrary fixed-length block format is also possible. A configuration in which the channel interfaces 70 to 71 are interfaces according to an arbitrary count key data format is also possible.
[0013]
Hereinafter, the count key data format is referred to as CKD format, and the fixed-length block format is referred to as FBA (Fixed Block Architecture) format. A CKD record is called a CKD record.
[0014]
The CPU 10 is controlled by the UNIX operating system 40. The CPU 11 is controlled by a VOS3 (Virtual-storage Operating System 3) operating system 50 of Hitachi, Ltd. A configuration in which the UNIX operating system 40 is an arbitrary operating system that supports the SCSI interface is also possible. A configuration in which the VOS3 operating system 50 is an arbitrary operating system that supports the channel interface is also possible.
[0015]
In the CPU 10 and CPU 11, application programs 20 and 21 operate, respectively. The application programs 20 and 21 are described in a programming language COBOL and access a VSAM ESDS (Virtual Storage Access Method Entry-Sequenced Data Set) in the disk controller 80. The VSAM ESDS may be configured as an arbitrary data set or an arbitrary file for an arbitrary access method for accessing data stored in the CKD format.
[0016]
The VOS3 operating system 50 includes a VSAM 55. The VSAM 55 makes the data stored in the disk controller 80 accessible from the application program 21 as a record of the VSAM data set.
[0017]
FIG. 2 is a configuration diagram of a main part of the UNIX operating system 40.
The UNIX operating system 40 includes a file management function 150 and a SCSI device driver 155. Light features related to the embodiment of the present invention such as a memory management function and a process management function are omitted. The SCSI device driver 155 controls the SCSI interface 60 and accesses the disk controllers 80 and 180. The disk controllers 80 and 180 are connected to the SCSI interface 60 via the SCSI bus 65. The disk controller 80 stores a VSAM data set, and the disk controller 180 stores an FFS (Berkeley Fast File System) file. FFS is a file system format that is standardly supported by the file management function 150 of the UNIX operating system 40. On the other hand, it is assumed that the file management function 150 of the UNIX operating system 40 does not support access to the VSAM data set.
[0018]
The ls command 160 is a command for displaying a list of files existing in a specified directory. A disk access request of the ls command 160 issued by designating a directory with FFS included in the disk controller 180 is processed by the file management function 150 and the SCSI device driver 155 to access the disk controller 180.
[0019]
On the other hand, the disk access request of the CKD record access library 35 is processed only by the SCSI device driver 155 without going through the file management function 150 and accesses the disk controller 80. In this case, attribute information of each VSAM data set stored in the disk controller 80, physical storage location information, and the like are not provided from the UNIX operating system 40 to the CKD record access library 35. In the CKD record access library 35, the entire disk controller 80 is only seen as one file. Such an access method is called raw IO.
[0020]
The UNIX operating system 40 distinguishes the two disk access requests by the file name. If a character special file name is specified as the file name to be accessed, access is made by raw IO, and if any other normal file name is specified, access is via the file management function 150. An example of a character special file name is / dev / rsd1c.
[0021]
Returning to FIG. 1, the CPU 10 includes a VSAM access library 30 and a CKD record access library 35. The CKD record access library 35 converts the CKD record access request issued by the VSAM access library 30 into an FBA format access request, gives it to the UNIX operating system 40, converts the result into the CKD format, and converts the result into the VSAM access library. Return to 30. The VSAM access library 30 refers to the data structure for controlling the VSAM stored in the disk controller 80 and uses the data stored in the disk controller 80 as a record of the VSAM data set from the application program 20. Make it accessible.
[0022]
A configuration in which the file management function 150 of the UNIX operating system 40 supports access to the VSAM data set is also possible. In this case, the VSAM access library 30 and the CKD record access library 35 are implemented as part of the UNIX operating system.
[0023]
The disk control device 80 includes a buffer 90 and a disk device 100. The disk device 100 stores a CKD record 110. The disk controller 80 provides access to a record specifying a cylinder number, a head number, and a record number according to the CKD format via the channel interface 71. Hereinafter, the record address represented by the cylinder number, head number, and record number is referred to as CCHHR. The track address represented by the cylinder number and head number is called CCHH.
[0024]
Further, the disk controller 80 also provides access according to the FBA format via the SCSI interface 61. In this case, it is assumed that the block length is 512 bytes, and cylinder 0, head 0, and record 1 have a 0th LBA (Logical Block Address). Addressing and accessing the CKD record stored in the disk controller 80 according to the FBA format will be described later.
[0025]
Data stored in the disk device 100 is identified by the cylinder number, the head number, and the byte position from the head of the track where the data is stored. It is assumed that the cylinder number and head number of the data in the disk device 100 are the same as the cylinder number and head number specified when the data is accessed from the CPU 11 via the channel interface 71. Different configurations are possible. A configuration in which data stored in the disk device 100 is identified by an LBA is also possible. In that case, a means for mutually converting the cylinder number, head number and record number specified when accessed from the CPU 11 via the channel interface 71 and the LBA is required. This configuration will be described later as an embodiment of the second invention.
[0026]
A configuration with a plurality of disk devices 100 is also possible.
The disk device 100 is capable of storing a maximum of 64 kilobytes of data per track, and this is hereinafter referred to as track capacity. The buffer 90 has a size equivalent to the track capacity. The track capacity multiplied by the number of heads is called the cylinder capacity.
[0027]
FIG. 3 is a flowchart of processing of the application program 20.
Application program 20 opens one VSAM ESDS, written in COBOL and stored in disk controller 80, reads the first record in the data set, displays it on the console, and closes the data set Then it ends.
[0028]
In step 1100, the data set is opened. The description format in COBOL is the OPEN INPUT data set name, which indicates that the specified data set is opened for reading only. As a result, the VSAM access library 30 is called. The process performed there is shown in FIG. This will be described later.
[0029]
In step 1110, the VSAM record is read. The description format in COBOL is the READ data set name RECORD INTO unique name, which indicates that one VSAM record is read from the specified data set and put in the variable of the application program 20 indicated by the unique name. As a result, the VSAM access library 30 is called. The processing performed there is shown in FIG. This will be described later.
[0030]
In step 1120, the VSAM record read in step 1110 is displayed on the console.
[0031]
In step 1130, the data set is closed. As a result, the VSAM access library 30 is called. The processing performed there is shown in FIG. This will be described later.
This completes the processing of the application program 20.
[0032]
FIG. 4 is a flowchart of the VSAM ESDS open process 1100 performed by the VSAM access library 30.
In step 500, the raw IO function of the UNIX operating system 40 is opened. More precisely, the character special file corresponding to the disk controller 80 is opened. In the embodiment of the present invention, it is assumed that all VSAM ESDS exist in the disk controller 80. A configuration in which a plurality of disk devices are connected to the CPU 10 is also possible. In that case, a means for determining in which disk device it exists from the designated data set name is required.
[0033]
In step 510, the VSAM access library 30 reads the standard volume label from the disk controller 80 using the function of the CKD record access library 35.
[0034]
The standard volume label is written at a specific location of the disk device and has a VTOC (Volume Table of Content) address. The standard volume label is read by designating the specific CCHHR and calling the CKD record reading process shown in FIG. The CKD record reading process will be described later. The VOS3 operating system 50 creates one VTOC for each disk device. The VTOC has management information for all data sets included in the disk device.
[0035]
In step 510, the CTOCHR of the VTOC is obtained from the data portion of the standard volume label.
The VTOC is a collection of records of a key part 44 bytes and a data part 96 bytes. Each record is called a DSCB (Dataset Control Block). There are various forms of DSCB. In the format 1 DSCB, the key part is a data set name, and the data part has information on the attribute of the data set and the assigned physical storage position. A physical storage area to which a data set is allocated is called an extent. An extent is identified by the cylinder number and track number that it occupies.
[0036]
In step 520, the first record of the VTOC is read by using the function of the CKD record access library 35.
[0037]
Step 530 checks if this is format 1 DSCB and the key part is equal to the specified data set name. If the condition is satisfied, the process proceeds to step 550. Otherwise, go to step 540.
[0038]
In step 550, since this is the target data set format 1 DSCB, it is copied to a local variable of the VSAM access library 30 and returned to the caller. This completes the VSAM ESDS open process.
[0039]
In step 540, the record address is advanced, the next DSCB is prepared for reading, and the process returns to step 520.
[0040]
FIG. These are flowcharts of the VSAM ESDS read processing 1110 performed by the VSAM access library 30.
[0041]
All VSAM records contained in a VSAM ESDS are ordered in the order in which they were created. The VSAM access library 30 always stores the current VSAM record position to be processed, which is hereinafter referred to as a current record. The current record is the first VSAM record when the data set is opened. When read, the current record becomes the next VSAM record.
[0042]
In VSAM, the unit of transfer with the disk device is called CI (Control Interval). The CI includes VSAM records and management information on unused space in the CI. The VSAM access library 30 identifies a VSAM record by the RBA (Relative Byte Address) of the CI in which it is included and the serial number of the VSAM record in the CI.
[0043]
In step 600, the target RBA is the RBA of the CI including the current record.
In step 610, an extent including the target RBA is searched. This means that the CCHHR in which data having the offset is actually stored is obtained from the offset in the data set.
[0044]
An example of read processing immediately after opening of VSAM ESDS is described below. At this time, the current record is included in the first CI of the VSAM ESDS, and the RBA of the CI is 0. The format 1 DSCB has an array of extent information, and records the start CCHH and end CCHH of the extent for each extent. The array of extent information is arranged in ascending order of the corresponding RBA. In the present example, since the target RBA is 0, it is clearly included in the first record of the first extent. As a result, the target CCHH is the start CCHH indicated by the first extent information recorded in the format 1 DSCB. Also, since user data cannot be stored in record 0, it can be seen that R is 1.
[0045]
In step 620, the CCHHR obtained in step 610 is designated and the CKD record reading process shown in FIG. 7 is called. When the CI is composed of a plurality of CKD records, the CKD record reading process is called for that number.
[0046]
In step 630, the control information in the CI is referred to search for the target VSAM record in the CI. It has the current record serial number.
In step 640, the VSAM record is copied to the unique name that is a variable of the application program 20.
[0047]
In step 650, the current record is set as the next VSAM record.
This completes the VSAM ESDS read process.
[0048]
FIG. 6 is a flowchart of the VSAM ESDS closing process 1130 performed by the VSAM access library 30.
[0049]
In step 1000, the raw IO function of the UNIX operating system 40 is closed. More precisely, the character special file corresponding to the disk controller 80 is closed.
[0050]
In step 1010, the work area is released.
This completes the VSAM ESDS closing process.
[0051]
FIG. 7 is a flowchart of the CKD record reading process performed by the CKD record access library 35. The CKD record reading process is called from the VSAM access library 30, reads a record having the designated CCHHR from the disk controller 80, and returns its key part and data part.
[0052]
In step 400, the LBA corresponding to the head of the track including the record having the designated CCHHR is calculated. However, in the following, for division /, only the integer part is the quotient.
[0053]
LBA = (CC * cylinder capacity + HH * track capacity) / block length
In step 410, data is read from the disk controller 80 via the SCSI interface 60 from the LBA by one track length using the low IO function of the UNIX operating system 40. The reason for using the low IO function is that the file management function of the UNIX operating system 40 cannot be used because the UNIX operating system 40 does not support access to the VSAM data set.
[0054]
In step 420, the record address processed in step 430 is set to the head of the track.
[0055]
In step 430, the record ID included in the count part of the record is checked to check whether the record has the designated CCHHR. If the designated CCHHR is held, the process proceeds to step 440. Otherwise, go to step 450.
[0056]
In step 440, since the target record is found, the key part and the data part are returned to the caller, and the process is terminated.
[0057]
In step 450, the length of the key part and data part of the current record is added to the record address, and the record address to be processed next is returned to step 430. The length of the key part and data part of the record is written in the count part of the record.
[0058]
As described above, in the process shown in FIG. 7, one track is always read from the disk controller 80 when the CKD record read process is called once. A configuration in which data of recently accessed tracks is cached and the disk controller 80 is not accessed when the same track is requested is also possible.
[0059]
FIG. 8 is a flowchart of the SCSI READ process performed by the disk controller 80. This process is performed on the disk controller 80 side as a result of using the raw IO function of the UNIX operating system 40 in step 410 of the CKD record reading process of FIG.
[0060]
In step 200, the disk controller 80 receives a SCSI READ command from the CPU 10 via the SCSI interface 61.
[0061]
In step 210, the LBA of the target data is obtained from the received CDB (Command Descriptor Block), and is converted into the cylinder number and head number of the disk device 100.
[0062]
Cylinder number = (LBA * block length) / cylinder capacity
Head number = ((LBA * block length)% cylinder capacity) / track capacity
Byte position from the beginning of the track = (LBA * block length)% track capacity
% Represents the remainder. That is, for integers m and n, n% m represents the remainder obtained by dividing n by m.
[0063]
In step 220, the track having the designated cylinder number and head number is read into the buffer 90. The format of the track read into the buffer 90 at this time is shown in FIG.
[0064]
FIG. 9 shows the arrangement of data stored in the disk device 100 on a track. Reference numerals 300 to 345 denote actual physical data arrangement on the track. On the other hand, reference numeral 380 shows the format of the track read into the buffer 90 in step 220 of FIG. Reference numerals 390, 392, and 394 indicate formats in which data indicated by 380 is transferred to the CPU 10 via the SCSI interface 61.
[0065]
Reference numeral 300 denotes an index marker, which indicates the start of a track. Reference numeral 305 denotes a home address, which indicates the track status and ID. 310 is a count part of record 0, and 315 is a data part of record 0. The count part is the first field of each record and indicates the state, position, and length of the record. Record 0 is the first record in the track and cannot store user data. 320, 325, and 330 are the count part, key part, and data part of record 1, respectively. 335, 340, and 345 are the count part, key part, and data part of record 2, respectively. The following records were omitted. Between each field 305 to 345, an area called a gap has a predetermined length and no data is stored.
[0066]
The 380 track format is a field in which the count part, the key part, and the data part of record 1 and below are continuously arranged in the fields 305 to 345.
[0067]
Actually, ECC (Error Correcting Code) and the like existing in fields 305 to 345 are not included in 380, but the difference is not shown in FIG. 3 for simplicity.
[0068]
Reference numerals 390, 392, and 394 denote blocks having a length of 512 bytes, which is the block length of the disk controller 80. In 390, 392, and 394, the data indicated by 380 is sequentially stored in the order of the count part, the key part, and the data part. CKD record boundaries do not always match block boundaries.
[0069]
As shown in FIG. 9, the home address 305 and the record 0 cannot be seen from the SCSI interface 61. Of course, ECC and gaps are not visible.
[0070]
The track capacity, which is the length of the buffer 90, is not the maximum value of user data stored in the track, but the maximum value including the count part of each record, the home address, and the length of record 0. To do.
[0071]
Returning to FIG. 8, in step 230, data is transferred to the CPU 10 via the SCSI interface 61 from the block specified by the byte position from the beginning of the track obtained in step 210 in the buffer 90.
[0072]
In step 240, it is determined whether the data has been transferred to the end of the track. If the data is transferred to the end of the track, the process proceeds to step 250. Otherwise, go to step 270. Transfer to the end of the track means that the last byte of the last record of the track has been transferred.
[0073]
In step 250, 0 is transferred to the end of the block currently being transferred. This is hereinafter referred to as padding. The reason why this processing is necessary is shown below.
[0074]
In CKD format, the amount of data that can be stored in a track varies depending on the record length. For this reason, generally, the capacity of the data actually stored in the track is not a multiple of the block length, which is 512 bytes in the present case. If the padding of step 250 is not performed, the data of different tracks are mixed in one block when this disc is read in the FBA format. This complicates the processing of the CKD record access library 35 of the CPU 10. In the embodiment of the present invention, the padding of step 250 is performed to ensure that the track always starts from a block boundary. A configuration without padding in step 250 is also possible. Other than 0 can be used as data to be transferred for padding.
[0075]
In step 260, the cylinder number and head number of the next track are calculated. In step 270, it is checked whether all the blocks designated by the CDB have been transferred. When all the data has been transferred, the read process is terminated. If not all have been transferred, the byte position from the beginning of the track is set to 0 and the process returns to step 220.
[0076]
However, in the embodiment of the present invention, the CKD record access library 35 always accesses only one track as shown in Step 410 of FIG. For this reason, although the details depend on the processing of the UNIX operating system 40, it is generally considered that the track having the next track address calculated in step 260 is not read in step 220.
[0077]
As described above, in the processing of FIG. 8, as described with reference to FIG.
[0078]
-Embodiment of the second invention-
FIG. 10 is a block diagram showing the principal part of the computer system according to the second embodiment of this invention.
[0079]
In the configuration of the computer system according to the second embodiment of the present invention, the disk device 100 of the disk controller 80 according to the first embodiment is changed to a disk device 100 ′ accessed in the FBA format. It is a configuration. A configuration having a plurality of disk devices 100 'is also possible, and this is shown in FIG. FIG. 18 will be described later.
[0080]
This disk device 100 ′ has a block length of 512 bytes and provides access by LBA. The storage of the CKD record 110 in the disk device and the access to the CPU 11 according to the CKD format via the channel interface 71 are the same as in the first embodiment.
[0081]
FIG. 11 shows the arrangement of data stored in the disk device 100 ′. Reference numerals 2000, 2002, and 2004 are blocks having track data stored in the disk device 100 ', each having a length of 512 bytes. Reference numeral 380 ′ denotes a track format read into the buffer 90. Reference numerals 390, 392, and 394 indicate formats in which data indicated by 380 'is transferred to the CPU 10 via the SCSI interface 61. 390, 392 and 394 are the same as in FIG.
[0082]
2000 includes a home address and record 0. This is because the disk controller 80 needs to process a so-called format write command peculiar to the CKD format and retain the written data in order to receive access according to the CKD format via the channel interface 71. Because. Examples of format write commands include WRITE HOME ADDRESS and WRITE COUNT, KEY, AND DATA.
[0083]
The data indicated by 380 'is a series of 2000, 2002, and 2004 data, and there is also a home address and record 0.
[0084]
FIG. 12 is a flowchart of SCSI READ processing performed by the disk controller 80. The flowchart of FIG. 12 is obtained by adding step 2100 and step 2110 to the flowchart of FIG. 8 of the first embodiment.
[0085]
In step 2100, the CCHH calculated from the LBA specified in the CDB in the previous step 210 is further recalculated into an LBA.
[0086]
LBA = (CC * cylinder capacity + HH * track capacity) / block length
The cylinder capacity and the track capacity are what the disk controller 80 shows to the CPU 11 via the channel interface 71. The block length is an attribute of the disk device 100 ′ and is 512 bytes. When a configuration having a plurality of disk devices 100 ′ is adopted, a means for determining in which disk device a track having the target CCHH exists is required, and the calculation of the LBA becomes complicated.
[0087]
In step 220 ′, 2000, 2002, 2004 and subsequent blocks are read from the disk device 100 ′ into the buffer 90 by one track. The buffer 90 stores data indicated by 380 ′.
[0088]
In step 2110, the start position of the count part of record 1 is determined on the data in buffer 90. For this purpose, the length of record 0 is obtained by looking at the count portion of record 0, and only the length of the home address is added to the head position of buffer 90. This processing is necessary because the home address and record 0 are not transferred to the CPU 10 via the SCSI interface 61.
[0089]
In step 230, transfer is performed from record 1 located in step 2110.
Since the following processing is the same as that of FIG. 8 of the first embodiment, description thereof will be omitted.
[0090]
FIG. 18 is a configuration diagram of the main part of a computer system in which the disk device 100 ′ of the computer system according to the second embodiment of the present invention is replaced with a disk device 100 ″ having a half capacity and a disk device 2500. Data distribution to each disk device is performed in units of tracks, and even-numbered track numbers are stored in the disk device 2500 and odd-numbered track numbers are stored in the disk device 100 ″.
[0091]
-Third embodiment of the invention-
FIG. 13 is a configuration diagram of the main part of the computer system according to the third embodiment of this invention.
[0092]
The configuration of the computer system according to the third embodiment of the present invention is such that the CKD record access library 35 according to the first embodiment is replaced with a CKD record access library 35 ″ having a slightly different function. is there.
[0093]
The main differences between the embodiment of the present invention and the embodiment of the first invention will be briefly described below.
[0094]
In the embodiment of the first invention, it is the CKD record access library 35 of the CPU 10 that removes the count part from the CKD record, but in the embodiment of the present invention, the disk controller 80 does this.
[0095]
Accordingly, in the embodiment of the first invention, the CKD record access library 35 reads data from the disk controller 80 in units of tracks, but in the embodiment of the present invention, it reads data in units of blocks. In the embodiment of the present invention, since the data received by the CKD record access library 35 via the SCSI interface 60 is not provided with a count unit, this alone does not determine the record boundary. However, this is not a problem when accessing VSAM. The reason for this will be described below.
[0096]
In VSAM, a physical record stored in a disk device does not correspond to a VSAM record handled by an application program that is a VSAM user. The storage to the disk device, that is, the allocation of the CKD record is performed for each CI. Each CKD record storing CI does not have a key part, and the length of the data part is the same for all CKD records belonging to the same VSAM data set, and is determined by VSAM to an appropriate length such as 1024 bytes. When the disk controller 80 accesses the data stored in the CKD format in the FBA format by performing the padding process in step 250 of FIG. 8, the track boundary in the CKD format crosses the block boundary in the FBA format. Guarantee that it will not come off. Therefore, if the LBA at the beginning of the track is given, the position of the target record can be easily obtained from the record number and the record length.
[0097]
Further, the fact that the data received by the CKD record access library 35 does not have a count part does not cause a problem in accessing the VTOC. The VTOC is a collection of records of a key part 44 bytes and a data part 96 bytes. Therefore, as in the case of VSAM, it is easy to obtain the record position.
[0098]
That is, the CKD record access library 35 can find a record boundary by being taught from the host program, in this case, the VSAM access library 30, what type of record is stored in the track currently being processed. Is possible. For this reason, a counting part is not necessary.
[0099]
However, some access methods other than VSAM handle CKD records of an arbitrary length, and therefore there are some methods to which the system of the embodiment of the present invention cannot be applied.
[0100]
FIG. 14 shows the arrangement of data stored in the disk device 100 on a track. Reference numerals 300 to 345 are the same as those in FIG. 9, and show the actual physical data arrangement on the track. 380 "indicates the format of the track read into the buffer 90. 390" and 392 "indicate the format when the data indicated by 380" is transferred to the CPU 10 via the SCSI interface 61. It is shown.
[0101]
The track format of 380 "is a collection of only the key part and data part of record 1 and below of the fields 305 to 345.
[0102]
FIG. 15 is a flowchart of the CKD record reading process performed by the CKD record access library 35 ″.
[0103]
In step 2200, the LBA of the block including the record having the designated CCHHR is calculated. R is the record number of the target record.
[0104]
LBA = (CC * cylinder capacity + HH * track capacity) / block length + ((R-1) * record length) / block length
The first term is the start address of the track containing the target record, and the second term is the offset on the track.
[0105]
Furthermore, the start offset of the target record within the block is
Offset within block = ((R-1) * Record length)% Block length
It is.
[0106]
In step 2210, using the low IO function of the UNIX operating system 40, from the LBA, only ((record length + (block length-1)) / block length) blocks, or if the record crosses blocks, further Data is read from the disk controller 80 via the SCSI interface 60 for an extra block.
[0107]
In step 2220, the read data address + in-block offset is used as a key part, and the end address of the key part is returned as a data part to the caller, and the process ends.
[0108]
The CKD record reading process will be described with reference to FIG.
The CKD record access library 35 ″ receives a request to read the VTOC record 4 from the VSAM access library 30. The VTOC starts from the record 1 at the head of the track. The block length is 512 bytes and the record length is the key part. Is 44 bytes and the data part is 96 bytes, for a total of 140 bytes.
[0109]
LBA = (CC * cylinder capacity + HH * track capacity) / 512 +
((4-1) * 140) / 512
And
Intra-block offset = ((4-1) * 140)% 512 = 420.
[0110]
In Step 2210, (140+ (512-1)) / 512 + 1 = 2
A block is read.
[0111]
In step 2220, the address of the 420th byte from the beginning of the read data is returned to the VSAM access library 30 as the key part and the address of the 464th byte as the data part.
[0112]
-Fourth embodiment of the invention-
FIG. 16 is a main part configuration diagram of the computer system according to the fourth embodiment of this invention.
[0113]
In the configuration of the computer system according to the fourth embodiment of the present invention, the VSAM access library 30 according to the first embodiment is replaced with a VSAM access library 30 ′ ″ having a slightly different function, and the CPU 11 In this configuration, VTOC utility 2300 is added.
[0114]
The main differences between the embodiment of the present invention and the embodiment of the first invention will be briefly described below.
[0115]
In the VSAM OPEN process shown in FIG. 4, the VSAM access library 30 according to the first invention reads the standard volume label and VTOC in order to search for the format 1 DSCB of the designated data set name. The VSAM access library 30 ′ ″ according to the embodiment of the present invention uses data obtained by the VTOC utility 2300 for that purpose, and does not access the disk controller 80.
[0116]
The VTOC utility 2300 operates on the VOS3 operating system 50 and accesses the disk controller 80 to obtain the format 1 DSCB of the target data set. The VOS3 operating system 50 is provided with a macro that does this and is called the OBTAIN (SEARCH) macro. The VTOC utility 2300 issues the OBTAIN (SEARCH) macro with the target data set name specified. The VOS3 operating system 50 accesses the VTOC and returns the resulting format 1 DSCB to the VTOC utility 2300.
[0117]
When the VOS3 operating system 50 accesses the VTOC, it generally uses the VTOC index or the CCW (Channel Command Word) that searches for a record having a specified key part. The VSAM access library 30 according to the embodiment of the present invention is faster than steps 505 to 540 of the VSAM OPEN process shown in FIG.
[0118]
FIG. 17 is a flowchart of the VSAM ESDS open process performed by the VSAM access library 30 ′ ″.
[0119]
In step 500, the raw IO function of the UNIX operating system 40 is opened.
[0120]
In step 2400, the VSAM access library 30 ′ ″ obtains the format 1 DSCB from the VTOC utility 2300. Specifically, the VTOC utility 2300 may be called using program-to-program communication to return the result, or the VTOC utility 2300 may be executed in advance, and the result may be input from a console by a human.
[0121]
In step 550, the format 1 DSCB is copied to a local variable in the VSAM access library 30 and the process returns to the caller. This completes the VSAM ESDS open process.
[0122]
-Embodiment of the fifth invention-
FIG. 19 is a block diagram showing the principal parts of the computer system according to the fifth embodiment of the present invention.
[0123]
In the configuration of the computer system according to the fifth embodiment of the present invention, the VSAM access library 30 according to the first embodiment is replaced with a VSAM access library 30 ″ ″ having a slightly different function, and further to the CPU 11. The lock utility 2600 is added.
[0124]
The embodiment of the present invention has a mechanism for solving the following problems that the embodiment of the first invention has.
[0125]
The VOS3 operating system 50 accesses data by an interface according to the count key data format and manages the data, and the UNIX operating system 40 accesses data by an interface according to the fixed-length block format and manages the data. Both operating systems have information on whether or not each data set in the disk device 100 is in use in the memory managed by each operating system. For this reason, it is not known which data set each other is using. For this reason, it is impossible to prevent a problem that the application program 21 operating on the VOS3 operating system 50 deletes the data set currently referred to by the application program 20 operating on the UNIX operating system 40. Such a defect must be avoided because it may cause malfunction of the application program or operating system or destruction of the data set. For this reason, the embodiment of the present invention has a lock utility 2600.
[0126]
The lock utility 2600 is a program that runs on the VOS3 operating system 50. The lock utility 2600 requests the VOS3 operating system 50 to use the data set that the VSAM access library 30 ″ ″ intends to access in accordance with the request of the VSAM access library 30 ″ ″. However, the lock utility 2600 does not access the data set requested for use. The UNIX operating system 40 accesses the data set via the SCSI interface. The VOS3 operating system 50 is provided with a macro for requesting use of a data set as necessary, and this is called a DYNALLOC macro. When the VSAM access library 30 ″ ″ tries to access a data set, the VSAM access library 30 ″ ″ specifies the data set name and calls the lock utility 2600. The lock utility 2600 issues the DYNALLOC macro with the target data set name specified. As a result, the data set to be accessed by the UNIX operating system 40 is also considered to be in use by the VOS3 operating system 50, so that the above-described trouble due to access conflict can be prevented.
[0127]
FIG. 20 is a flowchart of the VSAM ESDS open process performed by the VSAM access library 30 ″ ″.
[0128]
In step 2700, the VSAM access library 30 "" designates the name of the data set to be opened and calls the lock utility 2600. Specifically, there is a method of calling the lock utility 2600 using inter-program communication. The lock utility 2600 issues a DYNALLOC macro to the VOS3 operating system 50 to request use of the data set. As a result, the data set cannot be accessed from an application program running on the VOS3 operating system 50.
[0129]
The following processing is the same as that in FIG.
[0130]
FIG. 21 is a flowchart of the VSAM ESDS closing process performed by the VSAM access library 30 ″ ″.
[0131]
In step 2800, the VSAM access library 30 "" designates the name of the data set to be closed and calls the lock utility 2600. The lock utility 2600 issues a DYNALLOC macro to the VOS3 operating system 50 to signal the end of use of the data set. As a result, the data set can be accessed from an application program running on the VOS3 operating system 50.
[0132]
The following processing is the same as in FIG.
[0133]
In the embodiment of the present invention, a data set opened by the VSAM access library 30 ″ ″ cannot be accessed at all from an application program operating on the VOS 3 operating system 50. For example, it is possible to allow reading of the data set but not update. For this purpose, the VSAM access library 30 ″ ″ may give the lock utility 2600 a sharing mode of the data set in addition to the data set name, and the lock utility 2600 may issue a DYNALLOC macro according to the sharing mode.
[0134]
The VSAM access library 30 "" uses the lock utility 2600 to create a new data set managed by the VOS3 operating system 50 in the disk device 100 according to the request of the application program 20 running on the UNIX operating system 40. can do. Similarly, a data set can be deleted, or the size of an existing data set can be expanded or reduced.
[0135]
【The invention's effect】
According to the computer system of the present invention, data can be shared between the mainframe and the open system. As a result, a more flexible, inexpensive and high-performance computer system can be configured.
[Brief description of the drawings]
FIG. 1 is a main part configuration diagram of a computer system according to a first embodiment of this invention;
FIG. 2 is a main part configuration diagram of the UNIX operating system according to the first embodiment of this invention;
FIG. 3 is a flowchart showing a processing procedure of an application program according to the embodiment of the first invention of the present invention.
FIG. 4 is a flowchart showing a procedure of VSAM OPEN processing according to the first embodiment of this invention;
FIG. 5 is a flowchart showing a VSAM READ processing procedure according to the first embodiment of this invention;
FIG. 6 is a flowchart showing a procedure of VSAM CLOSE processing according to the first embodiment of this invention;
FIG. 7 is a flowchart illustrating a procedure of CKD record reading processing according to the first embodiment of this invention;
FIG. 8 is a flowchart illustrating a SCSI READ processing procedure according to the first embodiment of this invention;
FIG. 9 is a data structure diagram of a track format according to the embodiment of the first invention of the present invention.
FIG. 10 is a block diagram showing the main part of a computer system according to an embodiment of the second invention of the present invention.
FIG. 11 is a data structure diagram of a track format according to the embodiment of the second invention of the present invention.
FIG. 12 is a flowchart illustrating a SCSI READ processing procedure according to the second embodiment of this invention;
FIG. 13 is a block diagram showing the main part of a computer system according to a third embodiment of the present invention.
FIG. 14 is a data structure diagram of a track format according to the third embodiment of the present invention.
FIG. 15 is a flowchart illustrating a procedure of CKD record reading processing according to the third embodiment of this invention;
FIG. 16 is a block diagram showing the principal parts of a computer system according to an embodiment of the fourth invention of the present invention;
FIG. 17 is a flowchart showing a procedure of VSAM OPEN processing according to the fourth embodiment of this invention;
FIG. 18 is a block diagram showing the principal parts of a computer system according to an embodiment of the second invention of the present invention;
FIG. 19 is a block diagram showing the principal parts of a computer system according to an embodiment of the fifth invention of the present invention.
FIG. 20 is a flowchart showing a VSAM OPEN processing procedure according to the fifth embodiment of the present invention;
FIG. 21 is a flowchart showing a VSAM CLOSE processing procedure according to the fifth embodiment of the present invention;
[Explanation of symbols]
10, 11 CPU
20, 21 Application program
30, 30 ''', 30 "" VSAM access library
35, 35 "CKD record access library
40 UNIX operating system
50 VOS3 operating system
60, 61 SCSI interface
70, 71 channel interface
80 disk controller
90 buffers
100, 100 ', 100 "" disk device

Claims (17)

第1の計算機と、A first calculator;
第2の計算機と、A second calculator;
前記第1の計算機及び前記第2の計算機とに接続される記憶装置システムとをA storage system connected to the first computer and the second computer;
有する計算機システムであって、A computer system comprising:
前記記憶装置システムは、前記第The storage device system includes the first 11 の計算機に接続されるカウントキーデータ形式に従う第1のインタフェースと、A first interface according to a count key data format connected to the calculator of
前記第2の計算機に接続される固定長ブロック形式に従う第2のインタフェースと、A second interface according to a fixed-length block format connected to the second computer;
記憶装置とを有し、A storage device,
前記第Said 11 の計算機は、前記第The calculator 11 のインタフェースを介して、前記記憶装置システムに第To the storage system via the interface. 11 のデータを送信し、Send data for
前記記憶装置システムは、前記第The storage device system includes the first 11 のデータを前記記憶装置に格納し、Is stored in the storage device,
前記記憶装置は、前記第1のデータの該記憶装置内での格納位置を示す位置情報を記憶しており、The storage device stores position information indicating a storage position of the first data in the storage device;
前記第2の計算機は、前記位置情報を前記第2のインタフェースを介して前記記憶装置から取得し、The second computer acquires the position information from the storage device via the second interface;
前記位置情報を固定長ブロック形式に従う位置情報に変換し、Converting the position information into position information according to a fixed-length block format;
固定長ブロック形式に変換した位置情報を含むアクセス要求を前記第2のインタフェースを介して前記記憶装置システムに送信することを特徴とする計算機システム。A computer system, wherein an access request including position information converted into a fixed-length block format is transmitted to the storage device system via the second interface.
請求項1記載の計算機システムであって、The computer system according to claim 1,
前記記憶装置は、カウントキーデータ形式に従うデータを記憶しており、The storage device stores data according to a count key data format,
前記記憶装置システムは、前記第2の計算機から受信した前記アクセス要求に基づいて、前記第一のデータを含むカウントキーデータ形式に従う第2のデータを、前記第2の計算機に送信することを特徴とする計算機システム。The storage system transmits second data in accordance with a count key data format including the first data to the second computer based on the access request received from the second computer. A computer system.
請求項2記載の計算機システムであって、A computer system according to claim 2, wherein
前記第2のインタフェースはSCSIであることを特徴とする計算機システム。The computer system, wherein the second interface is SCSI.
請求項2記載の計算機システムであって、A computer system according to claim 2, wherein
前記第2の計算機は、カウントキーデータ形式に従う前記第2のデータのうち、データ部を選択して、データ部に格納されているデータを、アプリケーションプログラムに使用させることを特徴とする計算機システム。The second computer selects a data part from the second data according to the count key data format, and causes the application program to use the data stored in the data part.
請求項4記載の計算機システムであって、A computer system according to claim 4, wherein
前記第2のデータは、前記第1のデータが格納された前記記憶装置内のトラックに格納されているデータであることを特徴とする計算機システム。The computer system according to claim 2, wherein the second data is data stored in a track in the storage device in which the first data is stored.
記憶装置システムと、A storage system;
前記記憶装置システムが有するカウントキーデータ形式に従う第1のインタフェースを介して該記憶装置システムに接続される第1の計算機と、A first computer connected to the storage device system via a first interface according to a count key data format of the storage device system;
前記記憶装置システムが有する固定長ブロック形式に従う第2のインタフェースを介して該記憶装置システムに接続される第2の計算機とを有し、A second computer connected to the storage device system via a second interface according to the fixed-length block format of the storage device system,
前記第1の計算機は、前記第1のインタフェースを介して、第1のデータを前記記憶装置システムに送信し、The first computer transmits first data to the storage device system via the first interface;
前記記憶装置システムは、前記第1のインタフェースを介して前記第1の計算機から第1のデータを受信し、該第1のデータを該記憶装置システムが有する記憶装置に記憶し、The storage device system receives first data from the first computer via the first interface, stores the first data in a storage device included in the storage device system,
前記第2の計算機は、前記記憶装置に格納されている前記第1のデータの前記記憶装置内での格納位置情報を、前記第2のインタフェースを介して前記記憶装置システムから取得The second computer obtains storage location information of the first data stored in the storage device in the storage device from the storage device system via the second interface. し、前記格納位置情報に基づいて前記記憶装置システムにアクセスして、前記第1のデータが格納された前記記憶装置内のトラックに格納されている第2のデータを前記第2のインタフェースを介して受信することを特徴とする計算機システム。Then, the storage device system is accessed based on the storage position information, and the second data stored in the track in the storage device in which the first data is stored is transmitted through the second interface. A computer system characterized by receiving data.
請求項6記載の計算機システムであって、A computer system according to claim 6, wherein
前記第2のデータはカウントキーデータ形式に従うデータであり、前記第2の計算機は、前記第2のデータからデータ部を抽出し、データ部のデータを該第2の計算機で実行されるアプリケーションプログラムに使用させることを特徴とする計算機システム。The second data is data according to a count key data format, and the second computer extracts a data part from the second data, and an application program executed by the second computer for data in the data part A computer system characterized by having it used.
請求項7記載の計算機システムであって、A computer system according to claim 7, wherein
前記第2の計算機が前記記憶装置システムから取得する格納位置情報はカウントキーデータ形式に従うデータであり、The storage location information acquired from the storage device system by the second computer is data according to the count key data format,
前記第2の計算機は、前記格納位置情報を固定長ブロック形式に従うデータに変換し、変換後のデータを有するアクセス要求を前記記憶装置システムに送信することにより前記記憶装置システムにアクセスすることを特徴とする計算機システム。The second computer converts the storage location information into data according to a fixed-length block format, and accesses the storage device system by transmitting an access request having the converted data to the storage device system. A computer system.
第1の計算機と接続されるカウントキーデータ形式に従う第1のインタフェースと、A first interface according to a count key data format connected to the first computer;
第2の計算機と接続される固定長ブロック形式に従う第2のインタフェースと、A second interface according to a fixed-length block format connected to a second computer;
記憶装置とを有し、A storage device,
前記第1のインタフェースを介して前記第1の計算機から第1のデータを受信し、Receiving first data from the first computer via the first interface;
前記第1のデータを前記記憶装置に格納し、Storing the first data in the storage device;
前記第2の計算機からの要求に応じて、前記記憶装置に格納されている、前記第1のデータの前記記憶装置内での格納位置を示す、カウントキーデータ形式に従う位置情報を、前記第2のインタフェースから出力し、In response to a request from the second computer, position information in accordance with a count key data format indicating the storage position of the first data stored in the storage device in the storage device, Output from the interface
前記第2の計算機から、前記第2のインタフェースを介して、前記第2の計算機によって固定長ブロック形式に変換された前記第1のデータの格納位置を示す位置情報を有する、アクセス要求を受信し、An access request having location information indicating a storage location of the first data converted into the fixed-length block format by the second computer is received from the second computer via the second interface. ,
受信した位置情報に基づいて前記第2の計算機に前記第1のデータを含む第2のデータを送信することを特徴とする記憶装置システム。A storage system that transmits second data including the first data to the second computer based on the received position information.
請求項9記載の記憶装置システムであって、The storage device system according to claim 9,
前記記憶装置はカウントキーデータ形式に従うデータを記憶しており、前記第2のデータはカウントキーデータ形式に従うデータであることを特徴とする記憶装置システム。The storage device system stores data according to a count key data format, and the second data is data according to a count key data format.
請求項10記載の記憶装置システムであって、The storage device system according to claim 10,
前記第2のインタフェースはSCSIであることを特徴とする記憶装置システム。The storage system according to claim 2, wherein the second interface is SCSI.
請求項10記載の記憶装置システムであって、The storage device system according to claim 10,
前記第2の計算機に送信される前記第2のデータのうち、データ部のデータが前記第2の計算機によって選択され、該データ部のデータが前記第2の計算機のアプリケーションプログラムが実行される場合に、使用させることを特徴とする記憶装置システム。Of the second data transmitted to the second computer, data in the data portion is selected by the second computer, and the application program of the second computer is executed on the data in the data portion A storage system characterized by causing the system to be used.
請求項12記載の記憶装置システムであって、The storage device system according to claim 12, wherein
前記第2のデータは、前記第1のデータが格納された前記記憶装置内のトラックに格納されているデータであることを特徴とする記憶装置システム。The storage device system, wherein the second data is data stored in a track in the storage device in which the first data is stored.
第1の計算機及び第2の計算機に接続される記憶装置システムであって、A storage system connected to a first computer and a second computer,
カウントキーデータ形式に従う第1のデータを前記第1の計算機から受信する第1のインタフェースと、A first interface for receiving from the first computer first data according to a count key data format;
前記第1のデータを格納する記憶装置と、A storage device for storing the first data;
前記第2の計算機から受信した要求に従って、前記記憶装置に格納されている前記第1のデータの格納位置情報を前記第2の計算機に送信し、前記格納位置情報に基づいた前記第2の計算機からの前記第1のデータへのアクセス要求を受信し、前記アクセス要求に応じて前記第1のデータが格納された前記記憶装置内のトラックに格納されている第2のデータを前記第2の計算機に送信するための、固定長ブロック形式に従う第2のインタフェースとを有することを特徴とする記憶装置システム。According to the request received from the second computer, the storage location information of the first data stored in the storage device is transmitted to the second computer, and the second computer based on the storage location information is transmitted. The second data stored in a track in the storage device in which the first data is stored in response to the access request is received from the second data And a second interface according to a fixed-length block format for transmission to a computer.
請求項14記載の記憶装置システムであって、15. The storage device system according to claim 14, wherein
前記第2のインタフェースから前記第2の計算機に送信される第2のデータは、カウントキーデータ形式に従うデータであり、該第2のデータが有するデータ部のデータが前記第2の計算機で実行されるアプリケーションプログラムに使用させることを特徴とする記憶装置システム。The second data transmitted from the second interface to the second computer is data according to the count key data format, and data in the data portion of the second data is executed by the second computer. A storage system characterized by being used by an application program.
請求項15記載の記憶装置システムであって、The storage device system according to claim 15, comprising:
前記第2のインタフェースから前記第2の計算機に送信される格納位置情報はカウントキーデータ形式に従うデータであり、前記第2のインタフェースが前記第2の計算機から受信するアクセス要求には、前記第2の計算機がカウントキーデータ形式から固定長ブロック形式に変換した格納位置情報が含まれることを特徴とする記憶装置システム。The storage location information transmitted from the second interface to the second computer is data according to the count key data format, and an access request received by the second interface from the second computer is the second A storage system comprising: storage location information converted from a count key data format to a fixed-length block format by the computer.
請求項16記載の記憶装置システムであって、The storage device system according to claim 16, wherein
前記第2のインタフェースはチャネルインタフェースであり、前記第2のインタフェースはSCSIインタフェースであることを特徴とする記憶装置システム。The storage system according to claim 1, wherein the second interface is a channel interface, and the second interface is a SCSI interface.
JP2002066297A 1996-01-19 2002-03-12 Computer system Expired - Fee Related JP3925246B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002066297A JP3925246B2 (en) 1996-01-19 2002-03-12 Computer system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-7136 1996-01-19
JP713696 1996-01-19
JP2002066297A JP3925246B2 (en) 1996-01-19 2002-03-12 Computer system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP26693496A Division JP3384258B2 (en) 1996-01-19 1996-10-08 Computer system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2003136687A Division JP3925461B2 (en) 1996-01-19 2003-05-15 Computer system

Publications (2)

Publication Number Publication Date
JP2002333955A JP2002333955A (en) 2002-11-22
JP3925246B2 true JP3925246B2 (en) 2007-06-06

Family

ID=26341397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002066297A Expired - Fee Related JP3925246B2 (en) 1996-01-19 2002-03-12 Computer system

Country Status (1)

Country Link
JP (1) JP3925246B2 (en)

Also Published As

Publication number Publication date
JP2002333955A (en) 2002-11-22

Similar Documents

Publication Publication Date Title
US6041391A (en) Storage device and method for data sharing
JP3245364B2 (en) Method and system for sharing a storage device via different interfaces
JP3671595B2 (en) Compound computer system and compound I / O system
KR940005775B1 (en) Method of opening disk file
US4601012A (en) Zone partitioning in volume recovery system
US7624230B2 (en) Information processing apparatus, information processing method and storage system using cache to reduce dynamic switching of mapping between logical units and logical devices
US8694563B1 (en) Space recovery for thin-provisioned storage volumes
EP0924596B1 (en) A storage subsystem having a plurality of interfaces conforming to a plurality of data formats
US6591356B2 (en) Cluster buster
KR20020080458A (en) A method for repartitioning physical sectors of a storage system with use of virtual disc drives, a data processing apparatus and a data storage apparatus
JP2001243100A (en) Division table in large capacity storage device and file device directory structure and buffering of individual file cluster chain
US20030037019A1 (en) Data storage and retrieval apparatus and method of the same
JP3384258B2 (en) Computer system
US6330655B1 (en) Digital data storage subsystem including directory for efficiently providing formatting information for stored records
JPH0470649B2 (en)
US7171396B2 (en) Method and program product for specifying the different data access route for the first data set includes storing an indication of the different access for the first data set providing alternative data access routes to a data storage
JPH1185576A (en) Data moving method and information processing system
JP3925461B2 (en) Computer system
JP3925246B2 (en) Computer system
US6209057B1 (en) Storage device having data buffer
JP3528500B2 (en) Computer system
JPH06110766A (en) Directory constitution method and computer system for sharing stored file system
JP4285202B2 (en) Compound computer system and compound I / O system
JP4075790B2 (en) Compound computer system and compound I / O system
Chun Access and organization of secondary memory devices

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050531

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20060207

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060410

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20061121

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070219

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110309

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110309

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120309

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130309

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130309

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140309

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees