JP3188659B2 - Data correction method, data display method, data reading method, and data recording method - Google Patents
Data correction method, data display method, data reading method, and data recording methodInfo
- Publication number
- JP3188659B2 JP3188659B2 JP23404797A JP23404797A JP3188659B2 JP 3188659 B2 JP3188659 B2 JP 3188659B2 JP 23404797 A JP23404797 A JP 23404797A JP 23404797 A JP23404797 A JP 23404797A JP 3188659 B2 JP3188659 B2 JP 3188659B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- byte area
- date
- digits
- year
- 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
Links
Landscapes
- Complex Calculations (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、西暦2000年に
対応するために日付データを修正するデータ修正方法、
この日付データに基づいて日付を表示するデータ表示方
法、この日付データを読み取るデータ読取方法、および
この日付データを記録するデータ記録方法に関するもの
である。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data correction method for correcting date data to correspond to the year 2000.
The present invention relates to a data display method for displaying a date based on the date data, a data reading method for reading the date data, and a data recording method for recording the date data.
【0002】[0002]
【従来の技術】現在、コンピュータ等において使用され
る日付の表現形式においては、西暦の下2桁のみが示さ
れており、例えば1997年8月11日であれば、「9
7/08/11」のように表現されている。これは欧米
において西暦を表すのに下2桁のみが使用されることが
多く、また、1988年以前はISOやJISの規格に
より下2桁で表記することが定められていたこと、さら
には1980年頃まではハードのコストが高く、できる
だけデータ長を小さくしたかったということが背景とな
っている。2. Description of the Related Art At present, only the last two digits of the Christian era are shown in the date expression format used in computers and the like.
7/08/11 ". In Europe and the United States, only the last two digits are often used to represent the Christian era, and before 1988, the last two digits were stipulated by ISO and JIS standards. Until around this time, hardware costs were high, and it was the background that we wanted to reduce the data length as much as possible.
【0003】しかしながら、このような日付の表現方法
においては、西暦2000年になると、下2桁が「0
0」となるため、コンピュータにおいて西暦1900年
であると認識してしまい、現在使用しているデータやプ
ログラムに様々な障害が生じ、例えば、日付の大小比
較、日付の帳票印刷、年齢算出処理、金利算出処理、あ
るいは和暦西暦変換処理において誤処理を起こしてしま
う。具体的には、和暦西暦変換処理においては、199
9年までは1999年を平成11年と正しく変換するこ
とができるが、2000年になると、平成−88年のよ
うに全く誤った変換を行ってしまう。However, in such a date representation method, in the year 2000, the last two digits are "0".
0 ", the computer recognizes that the year is 1900 AD, and various obstacles occur in data and programs currently used. For example, comparison of date size, date form printing, age calculation processing, Erroneous processing occurs in the interest rate calculation processing or the Japanese calendar year conversion processing. Specifically, in the Japanese calendar year conversion process, 199
Until 1999, 1999 can be correctly converted to 1999, but in 2000, a completely wrong conversion will be performed as in Heisei-1988.
【0004】このため、日付データを2000年に対応
させるために、様々な方法が提案されている。具体的に
は、現在西暦の下2桁で表されている年号のデータを4
桁に変更して「97」と表現されていたものを「199
7」と変更する方法が挙げられる。[0004] For this reason, various methods have been proposed to make date data correspond to the year 2000. Specifically, the data of the year represented by the last two digits of the Christian era is
What was changed to a digit and expressed as "97" was changed to "199".
7 ".
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上述し
たように、年号データを2桁から4桁に変更するために
は、日付データの全てを書き換える必要があるため非常
に手間がかかる。また、年号データが4桁に増えること
により、日付データのレコード長が長くなるため、日付
データを含むデータが保存されているディスクの容量に
余裕がないときは、別のディスクにデータを保存し直す
必要が生じる。さらに、プログラムのジョブを制御する
ジョブ制御文においては、例えば日付データの後にデー
タの類別を示すデータが付随している「000722
AB123C−1」というようなデータの類別の位置を
指定するために、「7桁目から14桁目」というような
指定を行っている。しかしながら、年号のデータが4桁
に増えると上記データは「20000722 AB12
3C−1」となり、類別の位置が「9桁目から17桁
目」となってしまうため、ジョブ制御文の書き換えも必
要となる。However, as described above, changing the year data from two digits to four digits requires a great deal of time and effort since all date data must be rewritten. In addition, since the year data increases to four digits, the record length of the date data increases, so if there is not enough space on the disk where the data including the date data is stored, save the data to another disk. It is necessary to do it again. Further, in the job control statement for controlling the job of the program, for example, data indicating the type of data is attached after the date data “000722”.
In order to specify a position of a data category such as "AB123C-1", a specification such as "7th to 14th digit" is performed. However, when the year data is increased to four digits, the above data becomes "2000722 AB12
3C-1 ", and the classification position becomes" the ninth digit to the seventeenth digit ", so that the job control statement needs to be rewritten.
【0006】本発明は上記事情に鑑みなされたものであ
り、データ長を変更することなく西暦2000年に対応
することができるデータ修正方法、データ表示方法、デ
ータ読取方法およびデータ記録方法を提供することを目
的とするものである。The present invention has been made in view of the above circumstances, and provides a data correction method, a data display method, a data reading method, and a data recording method capable of coping with the year 2000 without changing the data length. It is intended for that purpose.
【0007】[0007]
【課題を解決するための手段】パック形式の日付データ
においては、1バイトで2つの数字を表現することがで
きるものであり、4バイトの領域のうち、1/2バイト
に符号を、1バイトに2桁の日にちを、1バイトに2桁
の月を、1バイトに西暦の下2桁を割り当てているた
め、残る1/2バイトの領域が使用されていない。本発
明はこの点に着目してなされたものである。In packed date data, two numbers can be represented by one byte. In a 4-byte area, a code is assigned to 1/2 byte and 1 byte. , Two-digit days are assigned to one byte, two-digit months are assigned to one byte, and the last two digits of the year are assigned to one byte, so that the remaining half-byte area is not used. The present invention has been made focusing on this point.
【0008】すなわち、本発明によるデータ修正方法
は、1/2バイトの領域に正負の符号が、1バイトの領
域に2桁の日にちが、1バイトの領域に2桁の月が、1
バイトの領域に西暦の下2桁がそれぞれ割り当てられて
なる全4バイトで構成されるパック形式の日付データを
修正する方法であって、前記日付データの残余の1/2
バイトの領域に西暦の上2桁を符号化して割り当てるこ
とを特徴とするものである。That is, in the data correction method according to the present invention, a plus / minus sign is set in a half-byte area, a two-digit day is set in a one-byte area, and a two-digit month is set in a one-byte area.
A method for correcting packed date data composed of a total of 4 bytes in which the last two digits of the Christian era are respectively allocated to a byte area, wherein the remaining half of said date data is 1 /
The first two digits of the Christian era are encoded and assigned to a byte area.
【0009】また、本発明によるデータ表示方法は、上
述したパック形式の日付データに基づいて、日付を表示
する方法であって、前記日付データの残余の1/2バイ
トの領域に割り当てられたデータに基づいて、西暦の上
2桁を表示することを特徴とするものである。A data display method according to the present invention is a method for displaying a date based on the above-mentioned date data in a pack format, wherein the data allocated to the remaining half-byte area of the date data is provided. , The first two digits of the Christian era are displayed.
【0010】さらに、本発明によるデータ読取方法は、
上述したパック形式の日付データを読み取る方法であっ
て、前記日付データの残余の1/2バイトの領域に記憶
されたデータに基づいて、西暦の上2桁を読み取ること
を特徴とするものである。Further, the data reading method according to the present invention comprises:
A method for reading date data in a pack format as described above, wherein the first two digits of the Christian era are read based on data stored in a remaining half-byte area of the date data. .
【0011】また、本発明によるデータ記録方法は、上
述したパック形式の日付データを記録する方法であっ
て、前記日付データの残余の1/2バイトの領域に西暦
の上2桁を符号化して記録することを特徴とするもので
ある。A data recording method according to the present invention is a method for recording date data in a pack format as described above, wherein the first two digits of the Christian era are encoded in a remaining half-byte area of the date data. It is characterized by recording.
【0012】[0012]
【発明の効果】本発明は、パック形式の日付データにお
いて、現在使用されていない1/2バイトの領域に西暦
の上2桁のデータを符号化して割り当てるようにしたも
のである。具体的には、1/2バイトの領域のデータが
「0」であるときは西暦1900年を表し、「1」であ
るときは西暦2000年を表すようにしたものである。
このように、パック形式の日付データにおいて現在使用
されていない領域に西暦の上2桁のデータを符号化して
割り当てるようにしたため、日付データを読み取るため
のプログラムにわずかな変更を加えるのみで、日付デー
タのデータ長を変更することなく、日付データの修正、
表示、読取りおよび記録を行って西暦2000年に対応
することができる。また、データ長を変更する必要がな
いため、上述したデータの書き換えやジョブ制御文の変
更が不要となり、これにより、変更作業がほとんど不要
となって人件費を大幅に低減することができる。According to the present invention, in the packed date data, the first two digits of the Christian era are encoded and assigned to a half-byte area that is not currently used. Specifically, when the data of the half-byte area is "0", it indicates the year 1900, and when it is "1", it indicates the year 2000.
As described above, since the first two digits of the Christian era are encoded and assigned to areas that are not currently used in the pack format date data, the date reading program can be modified with only a slight change. Modify date data without changing the data length,
Display, reading and recording can be done for the year 2000. Further, since there is no need to change the data length, it is not necessary to rewrite the data or change the job control statement as described above. As a result, the change work becomes almost unnecessary, and the labor cost can be greatly reduced.
【0013】[0013]
【発明の実施の形態】以下図面を参照して本発明の実施
形態について説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0014】図1は本発明の実施形態によるデータ修正
方法により変更されるパック形式の日付データを示す模
式図である。ここで、パック形式とは正確にはパック1
0進表記法のことであり、2つの連続した10進数字に
それぞれ4ビットを割り当て、1バイトで表現する方法
のことをいうものである。FIG. 1 is a schematic diagram showing packed date data changed by the data correction method according to the embodiment of the present invention. Here, the pack format is exactly pack 1
0-base notation, which refers to a method of assigning 4 bits to each of two consecutive decimal digits and expressing them in one byte.
【0015】図1に示すように、パック形式の日付デー
タは8つの1/2バイトの領域1A〜4Bからなる4バ
イトのデータであり、図1における1マスが1/2バイ
トを示すものである。そして、領域1Aには正負の符号
が、領域1Bには日にちの1の位の数が、領域2Aには
日にちの10の位の数が、領域2Bには月の1の位の数
が、領域3Aには月の10の位の数が、領域3Bには西
暦の1の位の数が、領域4Aには西暦の10の位の数が
それぞれ割り当てられている。As shown in FIG. 1, packed date data is 4-byte data composed of eight 1 / 2-byte areas 1A to 4B, and one cell in FIG. 1 indicates 1/2 byte. is there. In the area 1A, the sign of positive / negative, in the area 1B, the number of the ones place of the date, in the area 2A, the number of the tens place of the date, in the area 2B, the number of the ones place of the month, The area 3A is assigned the number of the tens place of the month, the area 3B is assigned the number of the ones place of the Christian era, and the area 4A is assigned the number of the tens place of the Christian era.
【0016】現在のパック形式の日付データにおいて
は、西暦を下2桁のみで表していたため、領域3B,4
Aを使用するのみで年号を表現することができるが、西
暦2000年には対応することができない。In the current pack format date data, the year is represented by only the last two digits, so the regions 3B and 4
Although the year can be expressed only by using the letter A, it cannot correspond to the year 2000.
【0017】そこで、本実施形態においては、使用され
ていない領域4Bに西暦の上2桁の値を符号化して割り
当てることにより、日付データを西暦2000年に対応
することができるようにしたものである。すなわち、領
域4Bに記憶される0〜9のデータについて、それぞれ
下記の表1に示すように、データの数と西暦の上2桁と
を対応付けることにより、少なくとも西暦2800年代
まで日付データのデータ長を変更することなく、日付を
表現できるようにしたものである。Therefore, in the present embodiment, the date data can be made to correspond to the year 2000 by encoding and assigning the first two digits of the year to the unused area 4B. is there. That is, as shown in Table 1 below, the data lengths of the date data at least until the 2800s are set by associating the number of data with the first two digits of the Christian era as shown in Table 1 below. Can be expressed without changing the date.
【0018】[0018]
【表1】 [Table 1]
【0019】例えば、図1に示すように領域4Bに0が
記憶されている場合には、図1に示す日付データを読み
取ることにより「1997/08/11」のように日付
が表現され、図2に示すように領域4Bに1が記憶され
ている場合には、「2000/08/11」のように日
付が表現されることとなる。For example, when 0 is stored in the area 4B as shown in FIG. 1, by reading the date data shown in FIG. 1, the date is represented as "1997/08/11". When 1 is stored in the area 4B as shown in 2, the date is represented as "2000/08/11".
【0020】なお、このように修正された日付データか
ら日付を読み取るためには、パック形式のデータにおけ
る領域4Bのデータをも読み取るように、わずかにプロ
グラムを変更することにより足りるものである。また、
日付データの記録を行う場合も、領域4Bにデータを記
録できるように、わずかにプログラムを変更すればよい
ものである。In order to read the date from the date data corrected in this way, it is sufficient to slightly change the program so that the data in the area 4B in the pack format data is also read. Also,
When recording date data, the program may be slightly changed so that data can be recorded in the area 4B.
【0021】このように、本実施形態においては、日付
データのデータ長を変更することなく、日付データの修
正、表示、読取りおよび記録を行って西暦2000年に
対応することができるため、データの書き換えやジョブ
制御文の変更などの作業がほとんど不要となり、これに
より、変更作業の期間を短縮して人件費を大幅に低減す
ることができる。As described above, according to the present embodiment, the date data can be corrected, displayed, read, and recorded without changing the data length of the date data so as to correspond to the year 2000. Work such as rewriting and change of the job control statement is almost unnecessary, thereby shortening the period of the change work and greatly reducing labor costs.
【図1】本実施形態により修正がなされたパック形式の
日付データの例を示す模式図FIG. 1 is a schematic diagram showing an example of packed date data corrected according to the embodiment;
【図2】本実施形態により修正がなされたパック形式の
日付データの他の例を示す模式図FIG. 2 is a schematic diagram illustrating another example of packed date data corrected according to the embodiment;
1A〜4B データ領域 1A-4B data area
Claims (4)
バイトの領域に2桁の日にちが、1バイトの領域に2桁
の月が、1バイトの領域に西暦の下2桁がそれぞれ割り
当てられてなる全4バイトで構成されるパック形式の日
付データを修正する方法であって、 前記日付データの残余の1/2バイトの領域に西暦の上
2桁を符号化して割り当てることを特徴とするデータ修
正方法。1. A sign of plus or minus in a half-byte area is 1
Packed date data consisting of a total of 4 bytes consisting of a 2-digit day in the byte area, a 2-digit month in the 1-byte area, and the last two digits of the year in the 1-byte area A data correction method, wherein the first two digits of the Christian era are encoded and assigned to a remaining half-byte area of the date data.
バイトの領域に2桁の日にちが、1バイトの領域に2桁
の月が、1バイトの領域に西暦の下2桁がそれぞれ割り
当てられてなる全4バイトで構成されるパック形式の日
付データに基づいて、日付を表示する方法であって、 前記日付データの残余の1/2バイトの領域に割り当て
られたデータに基づいて、西暦の上2桁を表示すること
を特徴とするデータ表示方法。2. The method according to claim 1, wherein the sign of the sign is 1 in a half-byte area.
Packed date data consisting of a total of 4 bytes consisting of a 2-digit day in the byte area, a 2-digit month in the 1-byte area, and the last two digits of the year in the 1-byte area A method for displaying a date based on data assigned to a remaining half-byte area of the date data, based on the date, wherein the first two digits of the year are displayed.
バイトの領域に2桁の日にちが、1バイトの領域に2桁
の月が、1バイトの領域に西暦の下2桁がそれぞれ割り
当てられてなる全4バイトで構成されるパック形式の日
付データからデータを読み取る方法であって、 前記日付データの残余の1/2バイトの領域に記憶され
たデータに基づいて、西暦の上2桁を読み取ることを特
徴とするデータ読取方法。3. The sign of plus or minus in the area of 1/2 byte is 1
From packed date data consisting of a total of 4 bytes in which a 2-digit day is assigned to a byte area, a 2-digit month is assigned to a 1-byte area, and the last two digits of the year are assigned to a 1-byte area What is claimed is: 1. A data reading method, comprising reading the first two digits of the Christian era based on data stored in a remaining half-byte area of the date data.
バイトの領域に2桁の日にちを、1バイトの領域に2桁
の月を、1バイトの領域に西暦の下2桁をそれぞれ割り
当て、全4バイトで構成されるパック形式の日付データ
を記録する方法であって、 前記日付データの残余の1/2バイトの領域に西暦の上
2桁を符号化して記録することを特徴とするデータ記録
方法。4. A plus / minus sign in a 1/2 byte area is set to 1
A 2-digit date is assigned to the byte area, a 2-digit month is assigned to the 1-byte area, and the last two digits of the year are assigned to the 1-byte area, and packed date data consisting of all 4 bytes is recorded. A data recording method, wherein the first two digits of the Christian era are encoded and recorded in a remaining half-byte area of the date data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP23404797A JP3188659B2 (en) | 1997-08-29 | 1997-08-29 | Data correction method, data display method, data reading method, and data recording method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP23404797A JP3188659B2 (en) | 1997-08-29 | 1997-08-29 | Data correction method, data display method, data reading method, and data recording method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH1173300A JPH1173300A (en) | 1999-03-16 |
JP3188659B2 true JP3188659B2 (en) | 2001-07-16 |
Family
ID=16964747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP23404797A Expired - Fee Related JP3188659B2 (en) | 1997-08-29 | 1997-08-29 | Data correction method, data display method, data reading method, and data recording method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3188659B2 (en) |
-
1997
- 1997-08-29 JP JP23404797A patent/JP3188659B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH1173300A (en) | 1999-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5812841A (en) | Method and apparatus for recording and reading date data having coexisting formats | |
JP3188659B2 (en) | Data correction method, data display method, data reading method, and data recording method | |
JPH02151921A (en) | Table data display device and table data storage device | |
JPH05314483A (en) | Recording method of information | |
JPS61105636A (en) | Printing device | |
JPH03266172A (en) | Word processor | |
JPH01109432A (en) | Memory card writing device | |
KR20010048239A (en) | Y2K Solution Method and Record Medium | |
JPS6239466Y2 (en) | ||
EP0469592B1 (en) | Small electronic apparatus with updatable memory means | |
JPS6245226Y2 (en) | ||
JPS62168202A (en) | Program recording device | |
JPH03134755A (en) | Message management executing device | |
JPS60181895A (en) | Time recorder | |
JPH04148375A (en) | Cad data compression/store processing system | |
JPH03225448A (en) | Converting, outputting, and updating method for information in file | |
JPH0195062A (en) | File editing device | |
JPS62171068A (en) | Document preparing device | |
JPS62278606A (en) | Numerical controller | |
JPH02114327A (en) | Dynamic changing system for access information | |
JPH0683681A (en) | Data corrector | |
JPH0854996A (en) | Outputting method for mixed numerical/character data to crt of process computer | |
JPH02165329A (en) | Method for forming system | |
JPS62171069A (en) | Document preparing device | |
JPS6145341A (en) | Memory editing and transfer method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20010501 |
|
LAPS | Cancellation because of no payment of annual fees |