File access processing system

Abstract: The system can execute sequential access for a copied file in a data processing device (1) which includes a data processing unit (10) and an access processing unit (11 ). The data processing device is connected to an external storage device (2) having a file management table (21) and a copy file (22). The access processing unit includes : an access executing unit (12) for executing an access to the file management table and the copy file in the external storage device; a setting unit (14) for setting file organization information into the file management table, after the setting unit obtains the file organizatian information, which indicates whether the file is a record file or a stream file, by referring to the head information of the file when the copied file is first sequentially accessed; and a judgement unit (13) for detecting whether the file is a record file or the stream file by referring to the file organization information set into the file management table of the file when the copied file is sequentially accesssed. When the file is the stream file in accordance with the information detected by the judgement unit, the judgement is executed as the requested sequential access is the sequential access for the stream file, then the sequential access for the stream file is executed without referring to the head information of the stream file.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file access processing system for a stream file when sequentially accessing a copied stream file, particularly, it relates to an access processing system enabling high speed sequential access for the stream file. 2. Description of the Related Art In general, a file used in a data processing system can sort briefly a stream file (or regular file) and a record file. The former only has a structure of a byte permutation enabling random access and has no structural limitation besides the above. The latter is constituted by providing structures, such as a sequential organization, a relative organization, an indexed sequential organization, etc., on the stream file. Further, in the record file, attribute information of that file is set into a head portion thereof. Meanwhile, in the stream file, no such attribute information is set into the head portion thereof since the stream file has no structural limitation. However, the stream file has the structures enabling a record access and enabling for the sequential access for data of the file. Accordingly, it is necessary to provide means for enabling high speed access when executing the sequential access to the stream file having such a structure. SUMMARY OF THE INVENTION The object of the present invention lies in a provision of an access processing system enabling high speed sequential access processing for the stream file when sequentially accessing thereto. In accordance with the present invention, there is provided a file access processing system for executing sequential access for a copied file in a data processing device which includes a data processing unit and an access processing unit, and the data processing device being connected to an external storage device having a file management table and a copy file, the access processing unit includes: an access executing unit for executing an access to the file management table and the copy file in the external storage device; a setting unit for setting file organization information into the file management table, after the setting unit obtains the file organization information, which indicates either the file is a record file or it is a stream file, by referring head information of the file when the copied file is first sequentially accessed; and a judgment unit for detecting whether the file is record file or it is the stream file by referring the file organization information set into the file management table of the file when the copied file is sequentially accessed; wherein, when the file is the stream file in accordance with the information detected by the judgment unit, then the sequential access for the stream file is executed without referring to head information of the stream file. In a preferred embodiment, the file management table comprises a space information section storing a file name, a file size, etc., and a file organization information section storing an indication of either the stream file or the record file. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic block diagram of a data processing system including a file access processing system according to the present invention; Fig. 2 is a flowchart at a file opening processing in the access processing unit shown in Fig. 1; Figs. 3A and 3B are views for explaining management data in a management table of a copied file; and Figs. 4A and 4B are views for explaining processing operation according to the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS Before describing the preferred embodiments, an explanation will be given of a conventional art. When executing a record access for a file, it is necessary to clarify whether an access request is a record access for a stream file or it is a record access for a record file. This is necessary for executing the record access. Accordingly, file organization information, which indicates either the stream file or the record file, is set into a file management table which is provided in the external storage device. In this case, when copying the file by using the stream file, only data in the file is transferred and copied, and it is impossible to copy the data of the file management table since the data in the file is separately provided from the data of the file management table. As explained above, in a conventional art, when sequentially accessing the copied file in accordance with the record access, the head portion of the file is searched to detect whether the file to be accessed is the stream file or the record file. That is, when the attribute information is set into the head portion of the file, the copied file, which is the object of the access, is determined as the record file, and the sequential access is executed in accordance with the attribute information of the file. Contrary, when the attribute information is not set into the head portion of the file, the copied file is determined as the stream file and the sequential access is executed in accordance with the stream file. There is, however, a problem regarding such an access in the above conventional art. That is, it is difficult to execute high speed access processing because when sequentially accessing the copied stream file, it is necessary to search the head portion of the stream file to determine whether it is the stream file itself. Accordingly, the object of the present invention lies in an access processing system enabling high speed sequential access when sequentially accessing the copied file. Figure 1 is a schematic block diagram of a data processing system including a file access processing system according to the present invention. In Fig. 1, reference number 1 denotes a data processing device constituted by, at least one central processing unit and memory, and reference number 2 denotes an external storage device constituted by, for example, a magnetic disk device. As a functional expression, the data processing device 1 includes a data processing unit 10 for executing the processing operation of data (below, data processing) based on an application program and an access processing unit 11 for executing the processing operation for an access (below, access processing) to the external storage device 2. Further, the external storage device 2 includes a copied file 20 (below, copy file) and a file management table 21 for storing and managing space information of the copy file 20. As shown in the drawing, the access processing unit 11 includes an access executing unit 12, a judgment unit 13, and a setting unit 14. The access executing unit 12 executes the access processing to the original file and the copy file 20 stored in the external storage unit 2. When the sequential access is requested from the data processing unit 10 to the copy file 20, the judgment unit 13 detects whether or not the file organization information is set into the file management table 21. In this case, the file organization information indicates that the copy file 20 is either the record file or the stream file. Further, when the sequential access is requested from the data processing unit 10 to the copy file 20, in the case that the file organization information is not set into the file management table 21, the setting unit 14 refers to the head portion of the copy file 20 in accordance with the information of the access executing unit 12, and obtains information to determine whether the copy file 20 is the record file or the stream file. Further, the setting unit 14 sets the obtained file organization information into the file management table 21. In the present invention, when the sequential access is requested from the data processing unit 10 to the copy file 20, the judgment unit 13 refers to the file management table 21 of the copy file 20, and detects whether or not the file organization information of the copy file 20 is set into the file management table 21. At the time when the copy file 20 is generated, only the space information is set into file management table 21. Accordingly, at the first time of the request of the sequential access from the data processing unit 10 to the copy file 20, the file organization information is not set into the file management table 21. When the judgment unit 13 determines that the file organization information is not set into the file management table 21, the setting unit 14 obtains the file organization information and sets it into the file management table 21. In accordance with the processing operation at the setting unit 14, on and after the second request of the sequential access from the data processing unit 10 to the copy file 20, the judgment unit 13 can detect the fact that the file organization information of the copy file 20 is already set into the file management table 21. Accordingly, in accordance with this file organization information, the judgement unit 13 detects whether the copy file 20 to be accessed is the record file or it is the stream file. When the judgment unit 13 determines that the copy file 20 is the stream file, the access executing unit 12 executes the sequential access to the copy file 20 of the stream file without referring to the head portion of the copy file 20. As explained above, in the present invention, on and after the second request of the sequential access to the copied stream file, it is possible to immediately execute the sequential access processing without referring to the head information of the stream file so that it is possible to realize high speed sequential access for the stream file. Figure 2 is a flowchart at a file opening processing in the access processing unit shown in Fig. 1. Figures 3A and 3B are views for explaining management data in a management table of a copied file, and Figures 4A and 4B are views for explaining the processing operation according to the present invention. The operations of the present invention are explained in detail below. In Fig. 2, when an application program in the data processing unit 10 requests the opening of a file to the access processing unit 11, first, the access processing unit 11 determines whether or not the file organization information is set into the file management table 21 of the file which is the object of the opening (step 1). As explained above, when the file which is the object of the access is the copied file and regardless of whether the copy file is the record file or it is the stream file, the file organization information is not set into the file management table 21. In Fig. 3A, the record file 20 has an attribute information section 20a and a data section 20b. The attribute information section 20a is available to the head of the record file 20 for accessing the attribute information. The attribute information is constituted by a maximum record length, a file organization, a record form, etc. The maximum record length indicates the maximum record length possible for one access, the record form indicates a fixed length and a variable length, and the file organization is explained in detail herein after. The file management table 21 has a space information 20c including a file name, a file size, etc., used as management data. The space 20d is used for storing the attribute information data. In Fig. 3B, the stream file 20 is constituted by only a data section and has no attribute information section in the head thereof. The space 20d of the file management table 21 is vacant in the case of the stream file. When the copy file 20 is generated, the file management table 21 which manages the space information of the copy file 20 is automatically generated. However, when the data of the file is copied by using the stream access, the file organization information, which is already set into the file management table of the original file, is not copied in the file management table 21. When the file organization information is not set into the file management table (NO, in step 1), the judgment is executed as to whether or not the attribute information to be accessed is set into the head portion of the copy file 20 to be accessed (step 2). When the copy file 20 is the record file, the attribute information for the access is set into the head portion thereof. When the copy file 20 is the stream file, the attribute information for the access is not set into the file. Accordingly, based on the processing operation of this step 2, it is possible to detect whether the copy file 20 to be accessed is the record file or it is the stream file. In the step 2, when the attribute information is set into the head portion of the file (YES), i.e., when the copy file 20 to be accessed is the record file, the data indicating "record file" is set into the file organization information section 20d in the file management table 21 (step 3). When the attribute information is not set into the head portion (NO, in step 2), i.e., when the copy file 20 to be accessed is the stream file, the data indicating "stream file" is set into the file organization information section 20d in the file management table (step 4). As shown in Figs. 4A and 4B, after completion of the steps 1 to 4, the file organization information, which indicates whether the copy file is the record file or the stream file, is set into the file organization information section 20d. In Fig. 4A, the file organization information is set into the section 20d of the record file. In Fig. 4B, the file organization information is set into section 20d of the stream file. In the present invention, when the copy file 20 is first opened, the file organization information, which indicates whether the copy file 20 is the record file or the stream file, is set into the file organization section of the file management table 21. Accordingly, when the file organization information is set into the file management table 21, on and after the second opening of the copy file 20, it is easy to discern that the file organization information is set into the file management table 21. When the file organization information is set into the file management table 21 (YES, in step 1), a judgment is performed to determine whether the file organization information indicates the record file or the stream file (step 5). When the file organization information indicates the record file (YES, in step 5), the attribute information for the access is read out from the head portion of the file (step 6). Further, in accordance with the attribute information obtained from the head. the record access is executed for the copy file 20 which is the record file to be accessed (step 7). When the file organization information indicates the stream file (NO, in step 5), the attribute information for the access is not set into the head portion of the file, the record access is executed to the copy file 20, which is the stream file to be accessed, without referring the head portion. Accordingly, on and after the second sequential access for the copied stream file, it is possible to immediately execute the sequential access without referring to the head portion of the stream file so that it is possible to realize high speed sequential access for the stream file.

Claims: A file access processing system for executing sequential access for a copied file in a data processing device which includes data processing means (10) and access processing means (11), and said data processing device (1) being connected to an external storage device (2) having a file management table (21) and a copy file (20), said access processing means comprising: access executing means (12) for executing an access to the file management table (21) and the copy file (20) in the external storage device (2); setting means (14) for setting file organization information into the file management table (21), after said means (14) obtains the file organization information, which indicates whether the file is a record file or it is a stream file, by referring to the head information of the file when the copied file is first sequentially accessed; and judgment means (13) for detecting whether the file is a record file or it is a stream file by referring to the file organization information set into the file management table (21) of the file when the copied file is sequentially accessed; wherein, when the file is a stream file in accordance with the information detected by the judgment means (13), then the sequential access for the stream file is executed without referring to the head information of the stream file. A file access processing system as claimed in claim 1, wherein the file management table comprises a space information section storing a file name, a file size, etc., and a file organization information section storing an indication of either the stream file or the record file.

Inventors: UCHIDA HIROFUMI, YAMAMOTO ATSUSHI, UCHIDA, HIROFUMI, YAMAMOTO, ATSUSHI, YAMAMOTO, ATSUSHI, RYOBISISUTEMUZU
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G06F17
IPC codes: G06F17, G06F12