JPH06103324A - Data storage system - Google Patents
Data storage systemInfo
- Publication number
- JPH06103324A JPH06103324A JP4252429A JP25242992A JPH06103324A JP H06103324 A JPH06103324 A JP H06103324A JP 4252429 A JP4252429 A JP 4252429A JP 25242992 A JP25242992 A JP 25242992A JP H06103324 A JPH06103324 A JP H06103324A
- Authority
- JP
- Japan
- Prior art keywords
- data
- length
- definition information
- magnetic tape
- item
- 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.)
- Withdrawn
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明はデータ格納方式、特に磁
気テープ上に記録されているデータを磁気ディスク装置
上のデータベースファイルに格納するデータ格納方式に
関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data storage system, and more particularly to a data storage system for storing data recorded on a magnetic tape in a database file on a magnetic disk device.
【0002】[0002]
【従来の技術】従来、この種のデータ格納方式は、入力
装置から対象となるデータのデータベースファイル中に
おけるデータ構造を表した定義情報に付けられた名前を
入力し、その表名が付けられた定義情報をディレクトリ
ファイルから取出し、主記憶装置上に展開する。そして
磁気テープ上に記録されている外部形式のデータを入力
し、入力された外部形式のデータを磁気ディスク装置上
のデータベースファイルに格納するために、主記憶装置
上に展開されている定義情報に従って、内部形式に変換
して、変換した内部形式のデータを磁気ディスク装置上
のデータベースファイルに出力するようになっている。2. Description of the Related Art Conventionally, in this type of data storage method, a name given to definition information representing a data structure of a target data in a database file is inputted from an input device, and the table name is given. The definition information is extracted from the directory file and expanded on the main storage device. Then, in order to input the external format data recorded on the magnetic tape and store the input external format data in the database file on the magnetic disk device, according to the definition information expanded on the main storage device. The data is converted into the internal format and the converted internal format data is output to the database file on the magnetic disk device.
【0003】[0003]
【発明が解決しようとする課題】上述した従来のデータ
格納方式は、磁気テープ上に記録されているデータが、
ディレクトリファイル上に格納されている定義情報と整
合性がとれていることが前提で、その下で属性に従った
データ形式への変換をしている。このため、もし利用者
が誤って属性構造の異なる定義情報の表名を指定した
り、または磁気テープにデータを格納した後で、定義情
報を変更することにより属性構造が変わってしまった場
合は、項目長の不一致によりデータが格納できないケー
スが起こり、そのデータの格納時にプログラムが例外を
起こし、異常終了してしまうことから、表そのものが不
正な形でデータベースファイル上に残ってしまい、以
後、利用者プログラムからその表を扱えなくなるという
欠点を有している。In the conventional data storage system described above, the data recorded on the magnetic tape is
It is assumed that the definition information is consistent with the definition information stored in the directory file, and then the data format is converted according to the attribute. Therefore, if the user mistakenly specifies the table name of the definition information with a different attribute structure or stores the data on the magnetic tape and then changes the definition information, the attribute structure changes. , There is a case that data cannot be stored due to mismatch of item length, the program causes an exception when storing the data, and it ends abnormally, so the table itself remains in the database file in an incorrect form. It has the drawback that the table cannot be handled by the user program.
【0004】[0004]
【課題を解決するための手段】本発明のデータ格納方式
は、磁気テープ上に記録されている外部形式のデータを
決められた属性に変換して磁気ディスク装置上のデータ
ベースファイルに格納するデータ格納方式において、入
力装置から対象となるデータのデータベースファイル中
におけるデータ構造を表した定義情報に付けられた名前
を入力する表名入力手段と、この表名入力手段が入手し
た表名が付けられた定義情報をディレクトリファイルか
ら取出し、主記憶上に展開する定義情報取得手段と、磁
気テープに記録されている外部形式のデータとその長さ
とを入力するデータ/データ項目長入力手段と、このデ
ータ/データ項目長入力手段により得られた各データ項
目の長さと前記定義情報取得手段によって主記憶装置上
に展開した定義情報のそれぞれの項目の長さとの整合性
を判定し、不一致が検出されたときエラー表示を行なう
データ項目長判定手段と、このデータ項目長判定手段に
より長さの不一致が検出されたとき、前記磁気テープに
記録されている外部形式のデータを前記主記憶装置上の
データ項目の長さに合わせた形に変換するデータ変換手
段と、このデータ変換手段によって変換されたデータを
データベースファイルに出力するデータ出力手段とを有
することにより構成される。A data storage system of the present invention is a data storage for converting external format data recorded on a magnetic tape into a predetermined attribute and storing it in a database file on a magnetic disk device. In the method, the table name input means for inputting the name given to the definition information representing the data structure in the database file of the target data from the input device, and the table name obtained by this table name input means were provided. Definition information acquisition means for extracting the definition information from the directory file and expanding it on the main memory; data / data item length input means for inputting the external format data recorded on the magnetic tape and its length; The length of each data item obtained by the data item length input means and the definition information expanded on the main memory by the definition information acquisition means. Of the data item length determining means for determining the consistency with the respective item lengths, and displaying an error when a mismatch is detected, and when the data item length determining means detects a length mismatch, Data conversion means for converting the data in the external format recorded on the tape into a form adapted to the length of the data item on the main storage device, and data for outputting the data converted by this data conversion means to a database file And output means.
【0005】[0005]
【実施例】次に、本発明について図面を参照して説明す
る。DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.
【0006】図1は本発明の一実施例の構成図である。
図1の実施例は表名入力手段1,定義情報取得手段2,
データ/データ項目長入力手段3,データ項目長判定手
段4,データ変換手段5,データ出力手段6,入力装置
11,ディレクトリファイル12,主記憶装置13,磁
気テープ14,エラー情報スタック15,およびデータ
ベースファイル16を有して構成される。FIG. 1 is a block diagram of an embodiment of the present invention.
In the embodiment shown in FIG. 1, table name input means 1, definition information acquisition means 2,
Data / data item length input means 3, data item length determination means 4, data conversion means 5, data output means 6, input device 11, directory file 12, main storage device 13, magnetic tape 14, error information stack 15, and database It is configured to have a file 16.
【0007】表名入力手段1は入力装置11から定義情
報に付与された表名を入力する。定義情報取得手段2は
表名入力手段1が得た表名と同じ表名をもつ定義情報を
ディレクトリファイル2から取出し、主記憶装置13上
に展開する。データ/データ項目長入力手段3は磁気テ
ープ14に記録されている外部形式のデータとその長さ
とを入力する。データ項目長判定手段4はデータ/デー
タ項目長入力手段3が入力した外部形式のデータの長さ
と、主記憶装置13に存在する定義情報の項目長と比較
して、内部形式に変換することが可能か不可能かを判定
し、長さの不一致が検出されれば、その旨をエラー情報
スタック15に出力する。データ変換手段5は外部形式
のデータを内部形式のデータに変換するが、データ項目
長判定手段14でデータ項目長が不一致と判定された外
部形式のデータについても、主記憶装置13上に展開さ
れている定義情報に基づいてその長さに合せて変換す
る。データ出力手段6はデータ変換手段5で内部形式に
変換したデータをデータベースファイル16に出力す
る。The table name input means 1 inputs the table name given to the definition information from the input device 11. The definition information acquisition means 2 takes out the definition information having the same table name as the table name obtained by the table name input means 1 from the directory file 2 and expands it on the main storage device 13. The data / data item length input means 3 inputs the external format data recorded on the magnetic tape 14 and its length. The data item length determination means 4 can compare the length of the data in the external format input by the data / data item length input means 3 with the item length of the definition information existing in the main storage device 13 and convert it into the internal format. Whether it is possible or impossible is determined, and if a length mismatch is detected, the fact is output to the error information stack 15. The data converting means 5 converts the data in the external format into the data in the internal format, but the data in the external format, which is judged by the data item length judging means 14 to have a mismatch in the data item length, is also expanded in the main storage device 13. It is converted according to the length based on the definition information. The data output means 6 outputs the data converted into the internal format by the data conversion means 5 to the database file 16.
【0008】図2は図1の実施例において取扱われる各
種の情報およびデータの形式および内容例を示す図であ
る。以下図2を参照して図1の実施例の処理の説明を進
める。先ず、表名入力手段1は入力装置11から、これ
から格納するデータのデータベースファイル16におけ
る属性構造を示す定義情報に付与された表名、例えば
“Table01”を受け取るものとする。図2(a)
はディレクトリファイル12に格納されている複数の定
義情報の内容例で、定義情報取得手段2は表名“Tab
le01”の定義情報をディレクトリファイル12から
取出し、主記憶装置13上に展開する。図2(b)は主
記憶装置13上に展開された定義情報の内容例を示して
いて、表名に続いて項目長とデータの属性とが繰返され
ている。属性のCHは文字形式を、PDはパックド10
進形式を、UDはアンパックド10進形式を意味してい
る。次にデータ/データ項目長入力手段3が磁気テープ
14上に記録されている外部形式のデータおよびその長
さを入力する。図2(c)は磁気テープ上のデータの形
式および内容例を示していて、先頭にデータの格納の長
さを示す1バーイトのフィールドを、次にその長さ分の
データを対にして繰返されている。図中のC1,C2,
〜F1,F2はEBCDIC符号表現によるデータを示
している。データ項目長判定手段4は磁気テープ14か
ら入力された各データ項目の長さと、主記憶装置13上
に展開されている定義情報の各データ項目の長さとを比
較し、その整合性を判定する。図2(b)の定義情報と
図2(C)の磁気テープ上のデータの例では、磁気テー
プ14から入力した先頭のデータの長さと定義情報の先
頭のデータ項目の長さとは共に“03”で判定は真とな
り、次の磁気テープ上のデータの後のデータ長を示す1
バイトは“03”で、定義情報も“03”なので、ここ
でも判定は真となる。以下同様に次のデータ項目の長さ
も、磁気テープと定義情報と共に“02”で真となって
いる。従ってデータ項目長判定手段4は外部形式と内部
形式とは矛盾なく変換が可能であると判定する。次に、
データ変換手段5は磁気テープの外部形式を定義情報に
従って内部形式に変換する。図2(d)は図2(c)の
磁気テープ上のデータを図2(b)の定義情報に従って
変換した例を示す図で、先頭の文字形式の“03”で示
される3バイトはそのままで、次のパックド10進形式
の“03”で示される3バイトは4ビットづつの1,
2,3と+を意味すC符号とに変換され、次のアンパッ
クド10進形式の“02”で示される2バイトはそのま
まの形で出力される。データ出力手段6はデータ変換手
段5から出力されたデータをデータベースファイル16
に格納する。FIG. 2 is a diagram showing the format and contents of various information and data handled in the embodiment of FIG. The processing of the embodiment shown in FIG. 1 will be described below with reference to FIG. First, it is assumed that the table name input means 1 receives from the input device 11 a table name added to the definition information indicating the attribute structure of the data to be stored in the database file 16, for example, "Table01". Figure 2 (a)
Is an example of contents of a plurality of definition information stored in the directory file 12, and the definition information acquisition means 2 uses the table name "Tab".
The definition information of "le01" is extracted from the directory file 12 and expanded in the main storage device 13. FIG. 2B shows an example of the contents of the definition information expanded in the main storage device 13, which follows the table name. The item length and the data attribute are repeated, the attribute CH being the character format and the PD being the packed 10
The decimal format and UD mean the unpacked decimal format. Next, the data / data item length input means 3 inputs the external format data recorded on the magnetic tape 14 and its length. FIG. 2C shows an example of the format and contents of the data on the magnetic tape. A 1-byte field indicating the length of data storage at the beginning and then the data of that length are repeated as a pair. Has been. C1, C2 in the figure
˜F1 and F2 represent data in EBCDIC code representation. The data item length determination means 4 compares the length of each data item input from the magnetic tape 14 with the length of each data item of the definition information expanded on the main storage device 13 to determine the consistency. . In the example of the definition information of FIG. 2B and the data on the magnetic tape of FIG. 2C, the length of the head data input from the magnetic tape 14 and the length of the head data item of the definition information are both “03”. The judgment is true with ", indicating the data length after the next data on the magnetic tape 1
Since the byte is "03" and the definition information is also "03", the determination is true here as well. Similarly, the length of the next data item is true with "02" together with the magnetic tape and the definition information. Therefore, the data item length determination means 4 determines that the external format and the internal format can be converted without contradiction. next,
The data converting means 5 converts the external format of the magnetic tape into the internal format according to the definition information. FIG. 2D is a diagram showing an example in which the data on the magnetic tape of FIG. 2C is converted according to the definition information of FIG. 2B, and the 3 bytes indicated by “03” in the first character format are unchanged. Then, the next 3 bytes indicated by packed decimal format "03" are 4 bits each
2, 3 and C code which means + are converted, and the next 2 bytes indicated by "02" in the unpacked decimal format are output as they are. The data output unit 6 stores the data output from the data conversion unit 5 in the database file 16
To store.
【0009】次に、磁気テープ14上に記録されている
データの構成と主記憶装置13上に展開した定義情報の
構成とが異なる場合として、磁気テープ14にデータを
格納した後に、定義情報を変換して“Table02”
という表をデータベースファイル16に格納するものと
する。この場合は表名入力手段1は入力装置11から定
義情報の表名として“Table02”を受取り、定義
情報取得手段2は入力された“Table02”を表名
とす定義情報をディレクトリファイル14から取出し、
主記憶装置13上に展開する。図2(e)は主記憶装置
13上に展開した“Table02”の内容を示す図で
ある。次に、データ/データ項目長入力手段3は磁気テ
ープ14からデータを入力する。図2(f)はこの場合
の磁気テープ14か入力した外部形式のデータおよびそ
の長さのデータの例を示す図である。ここでデータ項目
長判定手段4は磁気テープ14から入力された各データ
項目の長さと、主記憶装置13上に展開されている定義
情報の各データ項目の長さとを比較し、その整合性を判
定す。この場合、磁気テープ14から入力した最初のデ
ータの長さの“03”に対して、定義情報の先頭のデー
タ項目の長さは“02”になっている。そこで不一致と
判定し、その旨のメッセージをエラー情報スタック5に
出力する。一方、データ変換手段5は、データ項目判定
手段14でデータ項目不一致と判定されたデータC1,
C2,C3を定義情報で指定された“02”に従って2
バイト分だけ取出し、次のデータF1,F2は定義情報
と磁気テープとのデータ項目長が共に“02”であるた
め、そのまま内部形式に変換する。図2(g)はこの場
合のデータ変換手段5によって出力されたデータの例を
示している。この変換によりデータC3は欠落するが、
次の項目データであるF1,F2は正しく変換されるの
で、データの不整合は最初の項目だけにとどまり、表全
体の欠落を防止できる。Next, assuming that the structure of the data recorded on the magnetic tape 14 is different from the structure of the definition information expanded on the main storage device 13, the definition information is stored after the data is stored on the magnetic tape 14. Convert it to "Table02"
The table is stored in the database file 16. In this case, the table name input unit 1 receives "Table02" as the table name of the definition information from the input device 11, and the definition information acquisition unit 2 extracts the definition information having the input "Table02" as the table name from the directory file 14. ,
It is expanded on the main storage device 13. FIG. 2E is a diagram showing the contents of “Table02” expanded on the main storage device 13. Next, the data / data item length input means 3 inputs data from the magnetic tape 14. FIG. 2 (f) is a diagram showing an example of the data of the external format input from the magnetic tape 14 and the data of its length in this case. Here, the data item length determination means 4 compares the length of each data item input from the magnetic tape 14 with the length of each data item of the definition information loaded on the main storage device 13 to check the consistency. Judge. In this case, the length of the first data item input from the magnetic tape 14 is “03”, whereas the length of the first data item of the definition information is “02”. Therefore, it is determined that they do not match, and a message to that effect is output to the error information stack 5. On the other hand, the data conversion means 5 includes the data C1, which is determined by the data item determination means 14 as a data item mismatch.
2 for C2 and C3 according to "02" specified in the definition information
Only bytes are taken out, and the following data F1 and F2 are directly converted to the internal format because the definition information and the data item length of the magnetic tape are both "02". FIG. 2 (g) shows an example of data output by the data conversion means 5 in this case. Data C3 is lost by this conversion,
Since the next item data F1 and F2 are correctly converted, the data inconsistency is limited to only the first item, and the loss of the entire table can be prevented.
【0010】[0010]
【発明の効果】以上説明したように本発明は、磁気テー
プ上に記録されている外部形式のデータを指定された定
義情報に従った属性に変換する際に、変換前にそのデー
タの磁気テープへの格納時の長さと、定義情報での長さ
が一致しているかを判定し、不一致の場合は、主記憶装
置上の定義情報に従って変換することにより、データ変
換時に発生する例外を未然に防ぐことができ、利用者が
誤って磁気テープ上のデータの構造と異なる定義情報に
付けられた表名を入力装置から入力したり、磁気テープ
のデータを格納後に、定義情報を変更しても、例外の発
生によりプログラムの異常終了を避け、データベースァ
イル中に不正な情報を残してしまい、以後、利用者プロ
グラムからその表を扱えなくなるということを回避する
ことができるという効果がある。As described above, according to the present invention, when the external format data recorded on the magnetic tape is converted into the attribute according to the specified definition information, the magnetic tape of the data is converted before the conversion. It is determined whether the length when stored in the memory and the length in the definition information match, and if they do not match, conversion is performed according to the definition information in the main storage device, and exceptions that occur during data conversion are detected beforehand. Even if the user mistakenly inputs a table name with definition information different from the structure of the data on the magnetic tape from the input device or changes the definition information after storing the data on the magnetic tape. , It is possible to avoid the abnormal termination of the program due to the occurrence of an exception and to leave the incorrect information in the database file, so that the user program can no longer handle the table. There is an effect.
【図1】本発明の一実施例の構成図である。FIG. 1 is a configuration diagram of an embodiment of the present invention.
【図2】図1の実施例の各手段における情報の形式およ
び内容例を示す図である。FIG. 2 is a diagram showing a format and an example of contents of information in each means of the embodiment of FIG.
1 表名入力手段 2 定義情報取得手段 3 データ/データ項目長入力手段 4 データ項目長判定手段 5 データ変換手段 6 データ出力手段 11 入力装置 12 ディレクトリファイル 13 主記憶装置 14 磁気テープ 15 エラー情報スタック 16 データベースファイル 1 table name input means 2 definition information acquisition means 3 data / data item length input means 4 data item length determination means 5 data conversion means 6 data output means 11 input device 12 directory file 13 main storage device 14 magnetic tape 15 error information stack 16 Database file
Claims (1)
のデータを決められた属性に変換して磁気ディスク装置
上のデータベースファイルに格納するデータ格納方式に
おいて、入力装置から対象となるデータのデータベース
ファイル中におけるデータ構造を表した定義情報に付け
られた名前を入力する表名入力手段と、この表名入力手
段が入手した表名が付けられた定義情報をディレクトリ
ファイルから取出し、主記憶上に展開する定義情報取得
手段と、磁気テープに記録されている外部形式のデータ
とその長さとを入力するデータ/データ項目長入力手段
と、このデータ/データ項目長入力手段により得られた
各データ項目の長さと前記定義情報取得手段によって主
記憶装置上に展開した定義情報のそれぞれの項目の長さ
との整合性を判定し、不一致が検出されたときエラー表
示を行なうデータ項目長判定手段と、このデータ項目長
判定手段により長さの不一致が検出されたとき、前記磁
気テープに記録されている外部形式のデータを前記主記
憶装置上のデータ項目の長さに合わせた形に変換するデ
ータ変換手段と、このデータ変換手段によって変換され
たデータをデータベースファイルに出力するデータ出力
手段とを有することを特徴とするデータ格納方式。1. A data storage system for converting data of an external format recorded on a magnetic tape into a database file on a magnetic disk device after converting the data into a predetermined attribute and storing the target data from an input device. A table name input means for inputting the name given to the definition information representing the data structure in the file, and the definition information with the table name obtained by this table name input means are taken out from the directory file and stored in the main memory. Definition information acquisition means to be expanded, data / data item length input means for inputting the external format data recorded on the magnetic tape and its length, and each data item obtained by this data / data item length input means And the length of each item of the definition information expanded on the main storage device by the definition information acquisition means. , A data item length determining means for displaying an error when a mismatch is detected, and when the data item length determining means detects a length mismatch, the external format data recorded on the magnetic tape is used as the main data A data storage system characterized by having data conversion means for converting the data into a form according to the length of a data item on the storage device, and data output means for outputting the data converted by the data conversion means to a database file. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4252429A JPH06103324A (en) | 1992-09-22 | 1992-09-22 | Data storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP4252429A JPH06103324A (en) | 1992-09-22 | 1992-09-22 | Data storage system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH06103324A true JPH06103324A (en) | 1994-04-15 |
Family
ID=17237246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP4252429A Withdrawn JPH06103324A (en) | 1992-09-22 | 1992-09-22 | Data storage system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH06103324A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100949596B1 (en) * | 2008-06-24 | 2010-03-25 | (주)에이더블유아이 | Modeling method of information technology architecture using internet |
-
1992
- 1992-09-22 JP JP4252429A patent/JPH06103324A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100949596B1 (en) * | 2008-06-24 | 2010-03-25 | (주)에이더블유아이 | Modeling method of information technology architecture using internet |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5377818B2 (en) | Method and system for sequentially accessing a compiled schema | |
CN111741019A (en) | Communication protocol analysis method and system based on field description | |
JP5044942B2 (en) | System and method for determining acceptance status in document analysis | |
JP5789236B2 (en) | Structured document analysis method, structured document analysis program, and structured document analysis system | |
JPH06103324A (en) | Data storage system | |
JPH05257774A (en) | Information retrieving device compressing/storing index record number | |
JPH0594345A (en) | Data storing system | |
JP2737279B2 (en) | Load module relative address comparison method | |
CN113962198B (en) | Method, device, equipment and medium for converting Chinese text | |
JP3186530B2 (en) | How to compress and expand computer data | |
JP2604492B2 (en) | Data compression processing method for sequential files | |
WO2011099104A1 (en) | File name management method and file name management device | |
JP2871964B2 (en) | Drawing data exchange method | |
JP3454188B2 (en) | Command parameter syntax checking device, command parameter syntax checking method, and recording medium storing command parameter syntax analysis program | |
JPS63225824A (en) | Set operation system | |
JPH11184740A (en) | File compare list editing device | |
JP3087699B2 (en) | Standard information simple input system and standard information simple input method | |
JPH0574860B2 (en) | ||
JPH01295345A (en) | Compression/expansion device for character string data | |
JPH04238531A (en) | Automatic generating system for code conversion data of another system | |
JPH05127885A (en) | Processing flow chart conversion system | |
JPH11126159A (en) | Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program | |
JP2003030017A (en) | Data storage method and storage medium storing program based on the method | |
JPH0232468A (en) | Character string data retrieving system | |
JPH06110928A (en) | Storage system for value using binary data as index |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 19991130 |