Combining small records into a single record block for recording on a record media

Abstract: Information bearing signals are recorded in one of a plurality of record formats on one record medium, such as a magnetic tape, magnetic disk, optical disk, and the like. The format selected may be commanded or based upon record lengths, in bytes. When the record length equals or exceeds a predeter­ mined number of bytes, then one record is recorded in each signal block of the record format. When the record length is less than the predetermined number, then a second format is used which inserts several of the records in one of the signal blocks. The signal block and its packets respectively contain indications of formats such that any one of several formats may be used on one record medium and in one signal block having a plurality of variable length packets. Logical indicators, such as format marks, tape marks, and the like, may separate formats used on the storage medium.

Description: FIELD OF THE INVENTION The present invention relates to digital signal recording devices particularly to those devices which are to be used for storing a relatively large number of small records and wherein normally the number of small records would be separated by inter-block gaps or synchronizing signals and the records are variable in length. BACKGROUND OF THE INVENTION Digital signal recording devices such as those attached to host processors record records as single addressable units in magnetic tape subsystems. Such addressable units are a block of signals recorded on the tape. Each such block on a tape is separated by a so-called inter-block gap (IBG) which can be an erased portion of the tape, a tone or other special symbol denoting such IBG. Generally the IBG's are quite long, i.e., greater than 0.1 centimeter. When a large number of small records are recorded, then the IBG's occupy a major portion of the magnetic tape resulting in reduced storage capacity. It is desired to provide for a more efficient method, apparatus and format for recording small records, particularly records of variable or indeterminate length when initially received. That is, the length of a record is determined by the host processor for each file which may consist of many records. All of the records in one file usually are the same length, for example 973 bytes, in another file to be recorded on the same tape the record length could be different, for example 3300 bytes, no limitation thereto intended. In yet another file a record could be 64,000 bytes. It is desired to provide an enhanced recording format without software intervention by a host processor. It is also desired to provide for different length records to be recorded on the same tape without intervention by a host processor and to faithfully reproduce the combined records into one block after recording. A similar problem arises on magnetic and optical disks using fixed block architecture. In such architecture, each track is divided into a large plurality of equal sized sectors, each sector capable of storing a predetermined number of bytes, such as 2048 bytes. Recording a large number of small records on such a track, for example a record of 333 bytes requires 2024 bytes of disk space for each of the 333 byte records. This means that a little over 1600 bytes are wasted in each sector. Similarly, in count key data (CKD) format which has no identifiable sectors, each small record recorded in that format is separated by inter-block gaps using the same principles set forth in tapes. The invention can be applied to such disk or other recorders in the same manner as applied to magnetic tape. DISCUSSION OF THE PRIOR ART So called packet communication systems have combined a plurality of packets into a single transmission lock of signals. All of the packets are of a fixed length, i.e., cannot be variable length as contemplated by the present invention. Such packet systems are used often for interleaving a plurality of communication messages on a single communication channel. All of these have an object of providing an orderly flow of data through a single channel using the above described interleaved packet assignment system. Examples of such packet communication systems are found in Braff, et al., U. S. Patent 4,644,533; Fernow, et al., U. S. Patent 4,475,192. Yamauchi, In U.S. Patent 4,800,550 shows an optical disk recording and reproducing system having a plurality of formats. The difference in the formats is the interval between synchronizing signals. As best understood, this patent appears to provide for two different sizes of sectors on a single recording disk, which does not address the problem set forth in the Background of the Invention. Co-pending European Patent Application 0 327 201 (part of the state of the art by virtue of A.54(3) EPC) discloses a data recorder and a method of recording data which uses frames of data. Data segmentation units are used comprising a plurality of frames. Each frame has a header portion with its format identified, but the format used only indicates the format of the data recorder. Any given data recorder does not support multiple formats, neither can multiple formats be used on the same medium. SUMMARY OF THE INVENTION In one aspect of the invention, when the size of the record to be recorded is examined, if the size is less than a predetermined threshold, then a plurality of such records are combined into a single block of signals for recording on the storage member. Upon reading or sensing the recorded blocks, a special ID recorded at the beginning of the block (as a header which can be a packet header for a record within a block) is sensed which indicates whether or not more than one record is recorded in the block, the size of the records and other control information. In a specific form of the invention, each block is assigned a sequence number; when a plurality of records are recorded as a single block each of the record numbers will be assigned a sequence number within the storage member and the block will be assigned a block number which is indicative of the first record recorded in the respective blocks. Each record in a block is formatted into a "packet". The size of the records combined in a given block may vary from record to record. The invention will be apparent from the following more particular description of a preferred embodiment of the invention, as illustrated in the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWING Figure 1 diagrammatically illustrates a block format used in the prior art such as that used in the system described by U. S. Patent 4,463,286 in the documents incorporated by reference. Figure 2 diagrammatically illustrates incorporating the teaching of the present invention into the Figure 1 illustrated format. Figure 3 diagrammatically illustrates the assignment of block and record numbers in a data portion of the Figure 1 illustrated format while using the present invention. Figure 4 diagrammatically illustrates a magnetic tape using the Figure 1 format but incorporating the invention for enabling a plurality of different data formats on a single storage member. Figure 5 diagrammatically illustrates in abbreviated form an autoblock table ABT used in connection with the Figure 2 illustrated format. Figure 6 is a simplified machine operations chart illustrating recording signals on a storage member using the autoblocking concept of the present invention. Figure 7 is a machine operations flowchart showing the operations for reading a storage member in which the present invention is used as a format. DETAILED DESCRIPTION Referring now more particularly to the drawing like numerals indicate like structural features and operations in the various figures. Figure 1 illustrates a prior art tape block which is defined at its extremities by a pair of inter-block gaps (IBGs) 10 and 11. Block 12 at its end portion facing the beginning of tape includes a clock synchronizing set of signals 13 on each of the nine (9) or eighteen (18) tracks. A single record 14 of data is stored immediately following the synchronizing portion 13. Block trailer 15 includes a physical reference number 16 (PHY REF), a flag field F 17 and a block ID 18. The physical reference 16 indicates the general physical location along the length of the tape while the block ID 18 is a sequential number assigned in each block of each tape record as set forth in the documents incorporated by reference. Block control 20 includes pad bytes 21 for causing the length of block 12 to be an integral multiple of a number of bytes which is compatible with the format, a residual count field 22 which indicates the number of pad byte 21, and block CRC 23 used to verify the integrity of block 12. It is to be understood that record 14 includes its own error detection and correction redundancies. A postamble synchronizing set of signals 24 completes the block. Synchronizing signals 13 and 24 are symmetrical for allowing forward and backward reading, i.e., away from the beginning of tape or toward the beginning of tape. Figure 2 illustrates a format arrangement of the record portion 14 generated in practicing a preferred embodiment of the present invention. Each block may be divided into a plurality of packets PKT 30-34, each packet having one record. PKT CNT 35 indicates the number of packets in the block. Byte count field 36 indicates the summation of the original lengths of the host supplied records. A preferred block size in the illustrated embodiment was about 64KB (KB indicates thousands of bytes). Depending upon the size of records put into the respective packets, the number of packets in the block can change dramatically for accommodating variable size records. All packets have the same format. The portion of the packet closest to the beginning of tape is record ID 40 which indicates a sequential or serial number of the record stored in the packet. Offset field 41 points to the last byte position of the record 46 stored in the packet. The byte address within the block of the next ensuing packet, such as packet 31, is indicated by the offset value of fields 41 respectively and the trailer length indicated in field 43. In this manner, each of the packets 30-34 within a block can be located and delineated by using the byte address fields and from byte offset addressing. Remember the byte addressing begins at the end of the synchronizing field 13 and extends through the end of the record field 14. Field PF 42 is a packet flag field for indicating information about the instant packet. As one example, a given flag within field PF 42 can indicate whether or not it is the last packet in the recorded block of packets. If there is one packet in a block, of course, then that packet will have the last packet indication set in PF field 42. Field PF 42 may indicate format information about the record 46 field to enable multiple data representation schemes to be used for the respective stored records. In particular, PF field 42 identifies the current packet and the format of the data in such current packet. This identification enables each packet to employ its own format independently of the data format used in any other packet. Trailer length field 43 is set to a value for indicating the number of bytes within the trailer portion including fields 47 through 48. The packet trailer length field 43 is in the header portion of the packet which includes fields 40-45 for facilitating processing in the buffer for finding the next successive packet header. A preset number of zero bytes are written in pad field 44 for making the buffer CRC bytes in field BUF CRC 45 the last two bytes in the header. The buffer CRC in field 45 operates only on the data contained in the header consisting of fields 40-45. Following the header is the actual record in record field 46. The trailer portion includes pad field 47 consisting of a variable number of bytes followed by the buffer CRC field BUF CRC 48. The number of pad bytes in pad field 47 is such that the buffer CRC field 48 will always be the last two bytes of a fixed length (32 bytes) data page to be recorded, also termed a buffer page. Regarding the arrangement described above for a block, please note that the prior art record format does not include the 32 byte buffer or data page. For arbitrary reasons, the packet length is an integral multiple of 32 bytes in the described embodiment. Buffer CRC field 48 is also the last portion of the packet 30. Immediately adjacent field 48 is the first field record ID 49 of packet 31. Identifications of all packets are by the above described offset values in fields 41 and the trailer length indicated in field 43. With each packet having signals defining the location of a next succeeding packet, packets in each block 12 can vary in length. It is also to be understood that the error detection and correction system for the record portion 14 is not shown in Figure 2, but is automatically inserted and deleted after data leaves the buffer and before it is recorded on tape and deleted before the data is put into the buffer as corrected data, as is well known. In accordance with one aspect of the present invention, a block ID 18 is also used as a format change mark (FCM). In such an instance in the Figure 1 illustrated format, block 12 has a multiple byte record 14. When reading a block 12, the control unit first analyzes block ID 18. When the block ID 18 signal pattern indicates a sequential number, as in the prior art, then the record 14 is user data. On the other hand, unique signal patterns not used for indicating sequential block numbering are available and are assigned to block ID as indicators of format changes in the storage member. Two examples of such changes are from the prior art format of Figure 1 to the format of the present invention as shown in Figures 2-4, and a change from the Figures 2-4 format back to the prior art format. The FCM need only indicate the new format such that a plurality of formats may be used in a record member. The FCM enables changing recording format within a file (TMs denote file extremities). Since the selection of numerical and control patterns are arbitrary, they are not shown, any pattern selection will suffice for practicing the present invention. While the format of an FCM can be unique, such as a tape mark, the format used in the illustrative embodiment is similar to the Figure 1 illustrated format and arranged such that the FCM is also readily identifiable when reading the packet format shown in Figures 2-4. The sync fields 13 and 24 bound the FCM data as in block 12. Block trailer 15 and block control 20 are used as well. Flag field F 17 indicates the block is an FCM. When the field F 17 is "00", the Figure 1 format is indicated, when it is "01" the packet format of Figures 2-4 is indicated while a "11" indicates an FCM. The sequence numbers constituting the block ID 18 sequential numbers have a range from zero through 3FFEFF (hex) while the indicators for format marks, such as an FCM, have a range from 3FFFOO through 3FFFFF (hex) for indicating up to 256 different format or other marks. An FCM is not only indicated by a flag field indication, but also the value of the assigned block ID number. No limitation is intended for indicating an FCM, tones, special tape marks and the like may also be used to indicate a next ensuing format; for purposes of flexibility the FCM created as a separate block of signals derived from the formats indicated allows other patterns to be used for different purposes. The described arrangement facilitates analysis of the FCM, a very short block of signals, by the Bauer, et al. microprocessor without the need for special circuits to detect an FCM. Figure 3 illustrates the block and record numbering system used in the present invention. The numbers begin at the beginning of tape and increase toward the end of tape, each record being assigned a number. A first block 12 disposed between IBGs 10 and 11 is shown as having four (4) records, RD0 through RD3 respectively denominated by numerals 55-58. The block number in field 59 is block 0 and corresponds to the block ID field 18 of Figure 1. The block of signals between IBG 11 and IBG 68 also has four records 65 which are individually numbered 4 through 7. The block number in field 66 is 4, corresponding to the lowest numbered record in the block. In a similar manner, the records 70 in the block line between IBGs 68 and 71 have a block number of 8, which is the same as the lowest record number in the block. As the record sizes change between the files, the number of records in the blocks will also change which indicates that the succession of block numbers will also change, i.e., rather than 0, 4 and 8, it could be 0, 5 and 10, and so forth. In this manner, which records are in which blocks are easily identified. Block ID sequences can be checked by adding the packet count to the ID of the first packet 30; equality should occur between these two values. Figure 4 illustrates a plurality of different formats on a single storage member or tape. At the beginning of tape is a tape label 75 which may contain control information about signals recorded on the tape. In general the tape label 75 will be written in the old format which will include one record per signal storage block. A known tape mark 76 separates the tape label 75 from other recorded data. The first tape area 77 happens to store relatively small records which causes the later described set of machine operations. The packet format is used for small or short records, as described in Figures 2 and 3. The end of the area 77 is indicated by FCM 78. In the area 79, the records happen to be recorded as one record per block of signals called the prior art format. Completing or terminating the area 79 is an FCM 80. Following FCM 80 may be several format changes, some of which use the packet format, all format selections preferably depending upon record length and others based on program controls, i.e., such as a host processor using a MODE SET command to select a format to be used in recording. While it is preferred to use an FCM to denote format changes, an erase gap (ERG) may also indicate a possible change in format. Even within a given file which has a plurality of different sizes of records, both formats can be used. File 84 includes a portion 81 which is recorded in the packet format as indicated by PKT. An erase gap ERG 82 (nominally 4 mm or longer of erased tape, for example, plus 2 mm for an IBG) denotes the end of the packet format 81 and the beginning of another format following the ERG 82. As it turns out, the old format of one record per block of signals is recorded in portion 83 of file 84. When beginning of tape is not indicated by a tape mark 76 or a tape label 75, beginning of tape is known to the system because of the loading of a tape reel onto the tape drive (not shown). The beginning of tape may also be optically sensed through transparent portions on the tape, for example. Other machine sensible indicia may be used as well. The end of a rewind operation also is used to indicate beginning of tape. Figure 5 is a simplified diagram of a autoblocking table ABT 90. There is one entry in the autoblocking table for each autoblocking operation currently in progress, that is with 16 recorders attached to a control unit as shown by the documents incorporated by reference. Several of the 16 could be recording data at the same time. The informational content of ABT 90 lasts for only a period of reading or writing one block of data. Field 91 indicates whether or not autoblocking is on. If autoblocking is on then field 92 indicates the progress by record count of the autoblocking operation. Other fields will then include the size of the record, size of the padding, and values in the header and trailer portions as described for Figure 2. Pointer systems are used for indicating where in the data buffer (not shown) the records are to be placed, for example one portion of the buffer is reserved for assembly for recording a block of data. If block 12 is to be recorded and record zero has a first offset, record one a second offset and so forth, all is described for Figure 2 and the operation of which in a buffer or data storage system is well known and not further described for that reason. The documents incorporated by reference show the hardware environment which the present invention is preferably incorporated and also together with the description herein represent preferred embodiment of the invention. The Bauer, et al. patent 4,423,480 shows the general arrangement for a magnetic tape storage subsystem. Plurality of utilizing hosts operate through a set of channel adapters to two so-called control units. Each of the control units has a data buffer for temporarily storing data that is being transferred from the utilizing host to the various devices such as magnetic tape units. The later described machine operations in Figures 6 and 7 operate primarily with the buffers illustrated in the Bauer, et al. patent, that is the data that is received from the utilizing host for recording on tape in the tape units is analyzed and selectively repackaged into a block of signals as shown in Figures 2 through 4 of this application. Similarly, while reading data from the tape drives for transferring it to the utilizing host the blocks of signals are analyzed such that the records for the host are identified and separately sent to the utilizing hosts. As set forth above, byte offset addressing is used within the block of signals for identifying the records. Such space plus offset addressing is well known and is not detailed here for that reason. The Milligan, et al. patent 4,393,445 shows the assignment of block IDs in the prior art format of Figure 1, such as the numbers entered into field 18. All of the later illustrated machine operations are microprogram effected, such as in the microprocessor shown in the documents incorporated by reference. Whether or not the data received from the utilizing host are subject to the autoblocking feature of this invention is determined by a known so-called mode set command which has been used for setting operation modes in subsystems. In accordance with the invention, the mode set command is expanded to instruct the control units to either enable or disable autoblocking. When autoblocking is enabled, the bit 91 of ABT 90 of Figure 5 is set to the active condition. There is one entry 90 for each of the devices zero through F (Bauer, et al., supra) such that the mode of operation for each of the devices is selected by the using host processor. When virtual addresses are added to the devices zero through F, then the number of entries in ABT is increased such that for each virtual address there is one entry 90 for controlling the autoblocking. The above described mode set command is preferably only in the same chain of commands in which the recording data transfer is to occur between the host and the recording device. Depending on the mode, the mode set can be in a chain of commands executed earlier than the data recording chain of commands. The term chain of commands is a known term and is also described briefly in the Bauer, et al. patent as well as in other documents. In another mode of operation, the mode set command is used only during a chain of commands in which the data transfer occur. At the end of the command chain the autoblocking mode can be automatically reset within the control unit or a second mode set command may be issued by the host processor to disable the autoblocking, i.e., reset bit 90 for the device indicated in the mode set command. Power on reset also resets the autoblocking bit 91. By arbitrary protocol in the preferred embodiment, if a mode set command is not received in the chain of commands for a write data transfers then the control unit will reset bit 91 for the device addressed by the chain of commands. The mode set to autoblocking enables the determination, based on record length, whether or not autoblocking is to be used, all as will become apparent. With bit 91 set to the active condition, which is also termed the autoblocking mode, means that the data may be written in the packet format shown in Figures 2 through 4. For purposes of data integrity the block such as blocks 12, etc. are separated by the IBGs shown in Figures 1 through 4. It is preferred that any headers such as tape label 75 written in a one record per block format enables the storage members to be labeled before recording data thereon to indicate whether a one record per block format is used or autoblock applications reside on the storage member. It is also convenient location and format for indicating the volume serial number of the storage member. Such a tape label 75 may indicate that a storage member has a plurality of recorded formats. In the illustrated embodiment, such indication is not usable for controlling the read back of the storage member. In the present embodiment, a TM 76 is recorded in the Figure 4 illustrated format. Of course, the file label can be preceded by an FCM indicating the packet format. At beginning of tape, for reading signals, the format is designated as being unknown; the first block is read to ascertain its format. Remember that an FCM can be interposed between blocks which store data; in such instance there is a known current format such that the FCM is recorded in that format. Accordingly, a TM 76, FCMs 78 or 80, or an ERG 81 is always written between adjacent signal blocks recorded on the storage member which have different formats, i.e., logical separators are always provided between the formats such that the reading control unit is alerted to watch for a change in format. During reading, the mode set need not be used. The control unit analyzes the recorded data to ascertain which format exists in the recorded data. Any non-sequential tape motion, such as rewind, tape load, space filed (a movement of the tape without reading or recording data) or a locate record (see Milligan, et al., supra) resets the control unit operation to an unknown format state such that the first tape mark, ERG or beginning of tape encountered requires the control unit to analyze later read signals for determining which format is being sensed. An FCM indicates to the control unit the ensuing format. In a similar manner each of the logical separators, tape marks and ERGs indicate to the control unit that the format is in an unknown state. In general, during recording, when autoblocking is specified, records received from a host processor are accumulated in the control unit buffer until a minimum block size is reached, such as 32KB. Note that the header and trailer bytes in the packets and in the blocks are included in the 32KB threshold. Therefore the block 12 is usually longer than 32KB whenever the packet autoblocking system is invoked. It is preferred that for records having fewer than 32KB bytes are accumulated to exceed 32KB such that the maximum block size is about 64KB. For records larger than 32KB and less than 100KB, only one record is written within each block in the autoblocking format. Records larger than 100KB are preferably recorded on the storage member in the Figure 1 illustrated formats. The result of autoblocking is that all blocks on storage member have a length of greater than about 64KB thereby reducing the number of IBGs to an insignificant portion of the storage member. For performing the autoblocking algorithm, as later described, a 32 byte buffer storage space is left blank for each block to be built using the later described machine operation all within the buffer of the control unit. Once the block of data signals are built within the buffer, the packet trailer pad 47 and buffer CRC 48 is completed and then the 32 byte space for the packet header items 40 through 45 is completed. The packets are built in the above-described manner until the 100KB maximum blocking requirement is not exceeded. At this point, the packet count field 35 is built as well as the block trailer 15 and block control 20 in Figure 1. Upon completion of the block, data transfer to tape may begin and the recording occurs as in the prior art. Because of the size of the buffer in the control unit, a plurality of such constructed blocks may be stored with a burst of such blocks being recorded to the storage member in one sequence of signal transfers. During the recording or write process, whenever the buffer in the control unit becomes too full for receiving additional data from the supply and host processor, the control unit will issue a CHANNEL COMMAND RETRY (CCR) which temporarily stops the data transfer until buffer space again becomes available. A DEVICE END (DE) is sent by the control unit to the supplying host processor telling the host processor to resume transfer of the data signals. The buffer in the control unit is segmented for serving the various recording devices 0 through F in an efficient manner. When a segment of the buffer becomes full, additional segments can be allocated such as shown in the Cole, et al. patent 4,603,382, supra. All of the above operations are enabled with high data integrity because the packet header is written after the data transfer of the record has been completed. Several criteria are used for terminating the building of a signal block 12 from a plurality of records into a plurality of packets 30-34. Most common is that the 64KB threshold would be exceeded by adding another record to the block. If during the building of a block of signals a tape motion command other than a write command is received, this indicates to the control unit that the writing operation will probably be stopped. At this point the autoblocking is also stopped. An example of these tape motion type commands are read, read backwards, rewind, rewind unload, erase gap, write tape mark or forward or backward space block, forward or backward space file, synchronize, locate block and data security erase. Another criterion for not autoblocking is the receipt of a "set tape write immediate mode". This command indicates that the data received from a supplying host processor is to be immediately written into the tape and not maintained in the control unit buffer. The receipt of such an immediate mode command causes the control unit to complete the current signal block being constructed and then record that block onto the tape irrespective of the threshold. All of these commands are used in the prior art. Another criterion for stopping the autoblocking operation is the receipt of above-described mode set command which indicates autoblocking is not to be used. In that event the operations described for the immediate mode set are followed. Another criterion for resetting autoblocking is that the transport of the storage member, such as tape, by the recording device reaches the end of tape (EOT). At that point any incomplete autoblocking signal block is completed and a unit exception status or interrupt is presented to the host processor via a so-called peripheral channel using the above referred to channel adapter. End of tape of course means that no more signals can be recorded until a new tape is mounted. Another criterion for terminating the autoblocking operation is that the modulus of the block ID field 18 is about to be exceeded. Block ID modulus acts as a logical EOT indicating that no more signals should be written on the tape. Yet another criterion is a device error. The last criteria are the receipt of a selective reset or system reset signal from the host processor. In these latter two events any incomplete autoblock block is completed and written to tape. Other criteria may also be used to complete a current autoblocking operation and then terminate the autoblocking mode. Figure 6 is a simplified machine operations chart which is program effective for illustrating the present invention. This machine operations chart is representative of the operations performed in the control unit of Bauer, et al. for practicing the present invention. A write command is received at step 100 and a data is sent to the buffer. It should be noted that for this machine operations chart that the write command is any one imbedded in the chain of commands and that several write commands can insert several records into the buffer to await the Figure 6 autoblocking operation. Step 100 also represents the autoblocking operation beginning to process a next record into the current block. Therefore, a previous write command may have been executed, as will become apparent, which resulted in an autoblocking operation. This previous operation only occurs when the above-described mode set command had set the appropriate bit 91 to the active condition, i.e., the bit 91 corresponding to the device addressed by the received write command. Autoblocking is effected for any write command then if the progress field 92 a bit is set to indicate that autoblocking has occurred as authorized by the bit 91. If at step 101 the control unit determines that an autoblocking operation to build a block is in progress. For a new block to be built (no current block), the control unit at step 103 determines whether or not the first record exceeds 100KB. If not, then at step 104 an ABT 91 entry is started which includes an indication that a current block is being built, the current number of records in the block, byte accumulation and the like. Then at machine step 105 the first record for the autoblock is converted into a packet 30 (Figure 2) and the packet is stored in the buffer awaiting completion of the block construction. Then, later-described machine steps 114, et seq. are executed preparatory to processing the next record to be examined for inclusion into the block just started. If the first record is found to exceed 100KB (KB means kilobytes), then at step 110 a single record is recorded in one block. Two alternatives may occur here. The autoblocking format of Figure 2 may be continued. It is preferred that an FCM is created and recorded indicating that the ensuing record is in the Figure 1 illustrated format, then the large record is recorded on the storage medium in the Figure 1 illustrated format. Upon detecting an ensuing record less than 100KB, autoblocking is automatically resumed. From machine step 110, the machine steps 114, et seq. are performed. If the next received record would create a block greater than 100KB, then the block is completed for recording by later described block terminating steps 112, 113, and such next received record is used to start a new block. If the record size sensed does not cause the block to exceed 100KB, then autoblocking bit in progress field 92 for the address device remains set to the active condition. At machine step 104, if the record received for processing in the autoblocking operation is a first record, than ABT 91 is updated with the autoblocking for one block indicated and the number of bytes in the record to be processed into a packet of such block. At machine step 105, the record is converted to a packet to become a part of the block, the conversion is that operation to create the packet header and trailer; processing signals to a known format is easily within the skill of ordinary art and is not detailed here for that reason. After creating a packet from a received record as shown in Figure 2, whether or not a special condition has occurred is checked at machine step 114. Such special conditions are the receipt of a non-sequential command (rewind, an indication from the host processor to end the recording operation, etc. as set forth above) or other conditions which indicate that autoblocking should be terminated. If such a condition has been received, that at step 116 the block is finished with the last-received record irrespective of having less than 100KB accrued in the block being built. Machine step 116 includes recording the block in the storage member. Then other programs beyond the current condition. Usually, a special condition will not be encountered, then at machine step 117 it is determined whether or not the record analyzed at machine step 103 was "left over", i.e., would cause the 100KB upper limit on block size to be exceeded. If yes, then a new block is started in machine steps 102 and 104. It should be noted that the block was completed such that steps 102-105 are executed without receiving another record from a host processor (not shown). If there is no "left over" record, then at machine step 118 whether or not the buffer (see documents incorporated by reference) is full is check. If full, the next received write command is channel command retired (CCR'd). It should be noted that this step is useful when a plurality of records are queued in the buffer awaiting autoblocking. If the buffer is not full, then the next record to be processed is received by the autoblocking operation at step 100. At machine step 101, a block is being built so that the machine operations go to step 106 to ascertain whether or not the received record at machine step 100 will cause the block size to exceed 100KB. If not, the record is processed into the current block at machine step 108 by creating a packet as shown in Figure 2. Then machine steps 114 through 118 are repeated. If at machine step 106, the 100KB limit would be exceeded by inserting the just received record into the current block, steps 112 and 113 are performed for terminating the block creation and recording the block onto the storage medium. At step 112, the block trailer is completed and the block is queued for writing to the storage medium or is directly recorded--this is a design choice and is based on system designs, as is known. At machine step 113, ABT 91 is modified to indicate no block is currently being built such that the left over record becomes the first record in the next block to build. From machine step 113, the machine steps 114 through 118 are repeated as above described. In reading the signals in the packet format, as shown in Figure 7, created by the autoblocking is that the packet header consisting of fields 40 through 45 contains the information necessary for the control unit to begin data transfer from the control unit buffer to the host processor before the entire signal block is read from the tape for data integrity purposes. The control unit in the read operation assumes that it is an unknown format, i.e., the next block being read will be in the Figure 1 illustrated format. This is after any non-sequential tape motion, rewind and so forth, as above described. Once any block is read and the packet format has been identified, then the control unit assumes that all subsequent blocks are in the packet format until a logical separator tape mark, FCM or ERG is read from the storage member. In the packet format the flag field 17 has a packet format flag set to the active condition, therefore the control unit can determine at the end of the first block being read, whether or not the signals being read are in the packet or in the Figure 1 illustrated format. To deblock the packets 30-34 from the signal block 14, the control unit senses the 32 byte packet header at the beginning of the block, i.e., fields 40 through 45 of packet 30. The information contained in the packet header indicates the start and end address of the first packet which contains the first record of the signal block. At this point, each of the packets and the location of the actual record 46 in the respective packets is known. Signal transfer of the record to the host processor may then ensue before the whole signal block is read from the storage member. The packets are sequentially deblocked and the records transferred until all the packets in the block have been read and deblocked. Several signal blocks may be buffered in the read mode depending upon the size of the buffer. Further, as signal blocks are read from the tape or storage member into the buffer, sequence checking using the block ID in the block ID 18 of the block trailer is verified (see Milligan, et al., 4,393,445). In the packet format, the block ID values have skips in the sequence as shown in Figure 3. Verification uses the algorithm of adding thc packet count 35 to the previous block ID to determine which is the block ID of the next ensuing signal block. When the records are sent to the host processor, then the record IDs are substituted for the block IDs such that the host processor sees a continuing sequence of IDs which the host processor believes to be block IDs. Also, as set forth in Figure 3, the ID of the first record in the block has to be the same as the block ID. Figure 7 is a simplified showing of machine operations for reading a block of signals from the tape. At machine step 130 the block signals are being read from the tape. At machine step 131 the read block is analyzed to determine if it is an FCM. If no, then at machine step 132 the block is examined to see if an ERG or TM is being encountered, i.e., the format of the ensuing block 12 is now unknown. If not, the current mode of reading continues. At machine step 133 the current mode is examined in the progress field 92 to ascertain if the format is known. If yes, at machine step 134 whether the flag 17 in the block is set to the current format indication in ABT 91 is checked. If the current mode is one record per block, then at machine step 122, the next ensuing record is read in the one record per block mode. If the flag format indication in the block matches the indicated format, then the read block is processed at machine step 135 as described earlier for either the packet format of Figure 2 or for the Figure 1 illustrated format. Then the next block is read at machine step 130. If at machine step 133 the format is unknown, such as set to the unknown state by a TM or ERG, then, at machine step 137, the format flag field 17 is examined to ascertain the format. In one embodiment, the read block is then processed as it is in the buffer. In another embodiment, a portion of the block had been sent to the host processor and such signals may be in error. To correct the error the read command received from the host processor which caused reading the block from tape is channel command retired (CCR'd), at machine step 140, which causes the host processor to discard the data from the block it had received and to reissue the read command to actuate the recording system to again read the block form tape. The tape is moved to a position for rereading the block a second time. Then at machine step 141 the format indication in ABT 91 is set to match the read flag field 17. While the machine operations chart shows going immediately to machine step 130, in a practical embodiment, other machine functions would be performed waiting for the read command to be reissued. In the first mentioned embodiment of processing the read block, machine step 144 would be executed to send the data from the block to the host processor whether in the Figure 1 illustrated format or the Figure 2 illustrated packet format. If at machine step 132 a TM or ERG is detected, the format indication in ABT 91 is set to an unknown state at machine step 146. Reading the next ensuing block, assuming it is not an FCM, results in an unknown format being detected at machine step 133 which then causes the format to be identified as above described. When an FCM is recognized at machine step 131, it is determined at machine step 150 whether the ensuing format will be in the packet or in the Figure 1 illustrated format. The ABT 91 format indicator is set accordingly. For the packet format being indicated, the next block is read as being in the packet format as indicated at machine step 151 which set the ABT format indicator to the packet format. Similarly, when the read FCM indicates a non-packet, e.g. the Figure 1 format, format then at machine step 152 the ABT format indicator is set to the Figure 1 format for reading the next block as in that format. From machine steps 151 and 152, machine step 130 is again executed. In some embodiments, the blocks may be read from the storage medium and queued in the buffer awaiting read back process as described herein. On the other hand, if the current mode is autoblock, i.e., packet format, then at step 124 the control unit reads the tape in the autoblock mode as above described. When the blocks exceed a predetermined size, then a so-called synchronous mode is preferably employed in the tape recorder such as described by Milligan, et al. in U. S. Patent 4,435,762. This mode is preferably used for records exceeding 100KB length. Milligan, et al. indicate that a long record which initiates the synchronous mode has to be sensed by the control unit which means that the record has to be sent twice in order to establish the synchronous mode. Accordingly, even with combining the variable length records into multiple packets for recording as a single signal block done in the manner for maintaining all other flexibility of the recording system. When reading the packet format storage member in the backward direction, the entire block must be in the buffer prior to sending data to the host so that the record can be deblocked from beginning to end. This requirement may or may not have a performance impact. The performance limitation may be removed by adding an offset field 47A to each packet trailer 47, 48 which points to the packet header and thereby allowing the control unit to process the records in the block in the backward direction. While the invention has been particularly shown and described with reference to a preferred embodiment thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein.

Claims: A method of operating a data recorder for recording data on a storage medium, the data being stored in blocks, each successive block (12) being separated from adjacent blocks by a gap (10,11), the method comprising the steps of: a plurality of data formats (77,79) are used in recording data on the storage medium, the data recorder having a mode of operation for each of the data formats to be used, including at least one data format in which a plurality of records are stored in a single block, thus reducing the number of gaps on the storage medium; and demarcation marks (17,18) are used to indicate the data format used for recording on the storage medium; a single record (14) in a single signal block (12) is recorded in a first one (79) of said plurality of data formats; the method further comprises the steps of: in a second one (77) of said formats recording a plurality of records (46) in a single signal block (12) and including an identifying signal (17,18) in signal blocks (12) having said second format (77) that the signals in the block are in said second format (77), each of said records comprising address information (41) indicating a record location of a predetermined other one of said records within the signal block; while recording when switching from one of said data formats (77,79) to another of said data formats (77,79), recording a one of said demarcation marks (17,18) to signify a change in data format; and after encountering any one of said demarcation marks (17,18) recorded on a storage medium, setting (151,152) the mode of operation to the format indicated by said mark, and then for readback using said indicated data format. A method as claimed in claim 1, wherein the data recorder has non-format demarcation marks (76,81) defined for recording on the storage medium, and the method further comprises the step of when reading (130) the storage medium in a given current format, detecting (132) a one of said non-format demarcation marks and indicating (146) an unknown format for the next data to be read from the storage medium. A method as claimed in claim 2, further comprising the step of reading (130) the next data signal and analyzing (131) the signals to ascertain which of said data formats (77,79) such next data signals are recorded in and setting a readback mode of operation to such ascertained data format for reading (151,152) signals following said next data signals. A method as claimed in claim 1, further comprising the step of assigning a record ID (18,40) to each of said records (14,46) recorded in said first format (79) or said second format (77) and continuing the record numbers throughout said first and said second formats such that in one storage member there is one sequence of record numbers. A method as claimed in claim 4, further comprising the step of selecting predetermined ones of said record ID's (18) as said format indicating demarcation marks, respectively, and not using the selected ones of said record ID's to indicate data representing signals recorded on the storage medium. A method as claimed in claim 4, further comprising the step of in said second format (77), assigning block ID's (18) to the signal blocks which are the same number as the record ID (40) of the first record in the respective signal block such that record ID's (40,49) are in a continuum of a given number sequence while the block ID's have a numerical sequence which is an arithmetic precession of the number of records stored in the respective signal blocks. A method as claimed in claim 6, wherein: for each record (30,31,32) included in a one of said signal blocks of said second format (71), including a header having a record ID (40), a byte offset (41) indication to the end of the record, a flag field (42), length (43) of a packet trailer, padding bytes (44) and an error detecting redundancy (45); and for each record included in a one of said signal blocks of said second format, including a trailer having padding bytes (47) and an error detecting redundancy (48) for the record, the record header and record trailer such that the packets may have diverse data lengths; and further comprising the steps of: when recording data, indicating whether all data should be recorded in said first format (79) or the data can be recorded in either said first (79) or second (77) formats. A method as claimed in claim 7, further comprising the steps of: when the data can be recorded in either said first (79) or second (77) format, establishing that the desired record format is unknown, and when the record format is unknown, measuring (103) the length of the records to be recorded; when the measured record has fewer than a predetermined number of bytes of data, then selecting (104) the second format and when the measured record has said predetermined or more than predetermined number of bytes of data, then selecting (110) the first format; establishing a desired average size of signal block; when recording using said second format, selecting a number of said records for recording in a one of said signal, blocks that creates a data byte count, which approximates the desired average size of signal block, less than the size of one record difference from the desired signal block average size. A method as claimed in claim 8, further comprising the steps of: sensing (132) the signal blocks recorded on the record medium, and examining said signal block for said flag (17), then processing subsequent signal blocks as being in said first (79) or second (77) format depending on the indication of said flag; and sensing a logical separator and establishing (146) an unknown format condition and when reading the next signal block repeating the step set forth immediately above. A method as claimed in claim 1, further comprising the steps of: recording said signals on the storage medium, arranging the signals in blocks of signals (12); in each of the blocks of signals, establishing and recording an indication (17) of the format used in the signals in the block such that the format in each block on the storage medium is independent of the format of other signal blocks on such storage medium; establishing a predetermined number of packets (30, 31) to be recorded in a one of the signal blocks on said storage medium; inserting one data record (46) in each of said packets (30); assigning a given number (40) to each of the data records and recording that assigned number in the respective packet; and in each of said packets, identifying the data format of the data record in the packet such that the format of data in each of said packets is independent of the format in any other of said packet. A method as claimed in claim 10, further comprising the steps of: inserting a first error detecting redundancy (23) in each of the signal blocks (12) for detecting errors in the signal block; and inserting a second error detecting redundancy (45, 48) in each of the packets (30, 31) for detecting errors respectively in each of the packets. A method as claimed in claim 11, further comprising the steps of: inserting into each packet a packet header which includes said data record given number (40), address information (41) indicating a packet location of a predetermined packet within the signal block when reading in a forward direction; a format identifier (42) for the packet, length (43) of a packet trailer and an error detecting redundancy (45) for the packet header; inserting into each packet a packet trailer having length indicated in said packet header and including padding bytes (47), and said packet error detecting redundancy (43) for the data record, the packet header and said padding bytes; and in each said packet trailers, inserting a reverse address indication for a predetermined packet within the signal block for enabling reading the signal block in a direction opposite to said forward direction and including said reverse address indication in calculating said packet error detecting redundancy. A storage medium capable of storing data in a given format in signal blocks (12), each successive block being separated from adjacent blocks by a gap (10,11), each gap being used as a block indicator (10,11); each block being capable of storing one or more data records (46); each of the signal blocks (12) has a block identification (18) which is identical to a predetermined record identification (40) which is recorded in the block such that each block identification (18) on the storage medium corresponds to a respective record identification (40); and each block (12) having more than one of said records including records with record identifications (49) which are not the same as said block identification. A storage medium as claimed in claim 13, further comprising: a plurality of recording areas on the storage medium, area demarcation marks separating each area from another area; each of the recording areas having data recorded in a one of a plurality of data formats, one of said data formats being said given data format while another of said data formats being substantially different from said given data format; and wherein said record medium is a recording tape, said block separators including inter-block gaps (10,11) and said demarcation marks including marks usable with all of said plurality of data formats. A storage medium as claimed in claim 14 wherein predetermined ones of said demarcation marks indicate which of said formats are used to record data signals following such predetermined ones of said demarcation marks and demarcation marks other than said predetermined ones of the demarcation marks indicate an unknown format used to record data signals following such other demarcation marks, and said tape marks being at least some of said other demarcation marks; and said demarcation marks including first and second types of demarcations, a first type indicating boundaries of different files and a second type indicating different formats. An apparatus for retrieving data recorded on a storage member, said recorded data being in any one of a plurality of recorded data formats (79,77) interspersed with format demarcation signals some of which indicate an ensuing data format and others of said demarcation marks indicating no information about the ensuing format, comprising: format means for indicating which of said plurality of data formats are used in predetermined areas of said record medium and for indicating when a record data format is unknown; sensing means for sensing the recorded data including said format demarcation signals and being connected to said format means for responding to a sensed format demarcation signal to actuate the format means to indicate an indicated format when sensing said same demarcation marks and an unknown record format when sensing another demarcation mark; reading means connected to said sensing means and to the format means for responding to the format means indicating an unknown format for detecting which of the formats are recorded and responding to an indication of a one of said plurality of recorded data formats for receiving data signals from the sensing means for processing data signals having the indicated format; and means connected to said reading means and to said format means for receiving signals from the reading means for determining which of said plurality of formats the received data signals are in and for setting said format means to indicate said determined format. An apparatus for recovering data recorded on a record medium, comprising: sensing means for sensing the recorded data of said record medium, said data being recorded in signal blocks, each of the signal blocks having a plurality of records therein, each record having a record ID including a first of said records having a predetermined ID and each said block having a trailer portion with a block ID which is identical to said predetermined ID, respectively; unblocking means connected to said sensing means for receiving the sensed data and for sensing the predetermined IDs in said first record of each block of signals sensed and the block ID in the respective trailer portion of the sensed block and for comparing the block ID with the first record ID and indicating an error when the two are different.

Inventors: DUNN EDWIN CHARLES, FRY SCOTT MILTON, JACKSON SCOTT ARIE, MACLEAN NEIL HECTOR JR, REYNOLDS RICHARD PORTER, RIPBERGER RICHARD ANTHONY, DUNN, EDWIN CHARLES, FRY, SCOTT MILTON, JACKSON, SCOTT ARIE, MACLEAN, NEIL HECTOR, JR., REYNOLDS, RICHARD PORTER, RIPBERGER, RICHARD ANTHONY
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1990
Main classification: G11B20
IPC codes: G11B20, G06F3