Method and apparatus for recording and reading date data having coexisting formats
First Claim
1. A series of operational steps to be performed on or with the aid of computer, said steps comprising:
- (a) reading a year datum which comprises two bytes from a computer-readable storage medium;
(b) taking the year datum to be a binary integer and computing a composite binary value of at least some of the two bytes of the binary integer;
(c) determining whether the composite binary value of said at least some of the two bytes of the binary integer falls within a first range;
(d) if the composite value falls within the first range, determining decimal digits encoded by the year datum in accordance with a character set and determining the year in accordance with the decimal digits, each of the two bytes separately representing one of the decimal digits;
(e) determining whether the composite value falls within a second range; and
(f) if the composite value falls within the second range, determining the year as a linear function of the composite value, the composite value representing at least four decimal digits of the year.
2 Assignments
0 Petitions
Accused Products
Abstract
In a database having date fields, years past 1999 are written in a format such as binary integer format or binary-coded decimal format, either of which can be signed or unsigned. In the binary-coded decimal format, two bytes generally used to indicate the last two digits of the year can instead be used to indicate a sign and three digits. If the number of years elapsed since 1900 is used, the positive numbers from zero to 999 represent the years 1900-2899, while negative numbers represent years before 1900. Year data written in either of these formats can coexist with year data written in legacy formats, in which case the legacy and enterprise formats are distinguished by comparison of the binary integer value of a year datum or a portion thereof with a predetermined range or by checking one or more bits. The legacy format can be a format such as ASCII, EBCDIC or BCD Julian.
20 Citations
3 Claims
-
1. A series of operational steps to be performed on or with the aid of computer, said steps comprising:
-
(a) reading a year datum which comprises two bytes from a computer-readable storage medium;
(b) taking the year datum to be a binary integer and computing a composite binary value of at least some of the two bytes of the binary integer;
(c) determining whether the composite binary value of said at least some of the two bytes of the binary integer falls within a first range;
(d) if the composite value falls within the first range, determining decimal digits encoded by the year datum in accordance with a character set and determining the year in accordance with the decimal digits, each of the two bytes separately representing one of the decimal digits;
(e) determining whether the composite value falls within a second range; and
(f) if the composite value falls within the second range, determining the year as a linear function of the composite value, the composite value representing at least four decimal digits of the year.
-
-
2. A programmable computer that is directed by a computer program to control transfer of data between said computer and a computer-readable storage medium to increase a range of year data that can be stored in fields of fixed size in said storage medium, said programmable computer comprising:
-
(a) means for reading the year datum which comprises two bytes from the computer-readable storage medium; and
(b) processor means, receiving the year datum from the means for reading and having logic circuitry, for performing the following operations under control of the program;
(i) taking the year datum to be a binary integer and computing a composite binary value of at least some of the two bytes of the binary integer;
(ii) determining, in the logic circuitry, whether the composite value of said at least some of the two bytes of the binary integer falls within a first range;
(iii) if the composite value falls within the first range, determining, in the logic circuitry, decimal digits encoded by the year datum in accordance with a character set and determining the year in accordance with the decimal digits, each of the two bytes separately representing one of the decimal digits;
(iv) determining, in the logic circuitry, whether the composite value falls within a second range; and
(v) if the composite value falls within the second range, determining, in the logic circuitry, the year as a linear function of the composite value, the composite value representing at least four decimal digits of the year.
-
-
3. A method of making a system capable of storing and retrieving date data of an increase range in fields of fixed size, the method comprising:
-
(a) providing a programmed computer having a logic circuit and a program including instructions for controlling the computer to perform the following operations;
(i) reading a year datum comprising two bytes from a computer-readable storage medium;
(ii) taking the year datum to be a binary integer and computing a composite value of at least some of the bits of the two bytes of the binary integer;
(iii) determining whether the composite value falls within a first range;
(iv) if the composite value falls within the first range, determining decimal digits encoded by the year datum in accordance with a character set and determining the year in accordance with the decimal digits, each of the two bytes separately representing one of the decimal digits;
(v) determining whether the composite value falls within a second range; and
(vi) if the composite value falls within the second range, determining the year as a linear function of the composite value, the composite value representing at least four decimal digits of the year;
(b) executing the program so that a state of said logic circuit in the computer is changed to enable the computer to perform operations (i)-(vi) to allow storage and retrieval of the data in the increased range.
-
Specification