A method, apparatus, and article of manufacture for handling access to multiple file-systems from a program written in a high-level language such as COBOL, programming language compilers and run-time environments. More specifically, the present invention provides a computer-implemented method for supporting multiple file-systems in file input/output (I/O) operations. As a result, an object program has access to different file-systems without recompilation. Further, the interfaces within the source language are independent of the specified file-system, so that support of any number of different file-systems can be accomplished with relative ease. In addition, the ability to dynamically select a file-system on a file-by-file basis is provided, thereby allowing the program to use a first file-system for one file and a second file-system for another file.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method of programming a computer, comprising the steps of: (a) receiving a series of programming language statements comprising a source program into a memory of the computer, wherein at least one of the received statements includes a file-system identifier that permits selection of a file system for performing input and output operations in the source program and the file-system identifier is selected from a group comprising a literal, an environment variable, and a data name; and (b) compiling the source program into an object program in the memory of the computer, wherein the object program includes instructions for performing the input and output operations according to the file-system identifier that permits the selection of the file system.
2. The method of claim 1 above, wherein the literal stores a file system name therein.
3. The method of claim 1 above, wherein the environment variable stores a file system name therein.
4. The method of claim 3 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of specifying the file system name stored in the environment variable in conjunction with the executing step and performing the input and output operations according to the file system name stored in the environment variable.
5. The method of claim 1 above, wherein the data name stores a file name therein.
6. The method of claim 5 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of storing the file name in the data name in conjunction with the executing step, and performing the input and output operations according to a file system associated with the file name.
7. The method of claim 1 above, further comprising the step of coupling the object program to a specified one of a plurality of file-systems residing in the memory of the computer.
8. The method of claim 1 above, further comprising the step of executing a file-system adapter in the memory of the computer for interfacing between the object program and the file-system.
9. The method of claim 8 above, further comprising the step of dynamically loading the file-system adapter at the executing step according to the selection of the file-system.
10. The method of claim 1 above, wherein the compiling step comprises the step of creating an I/O address vector for the object program, the I/O address vector comprising a list of addresses, each of the addresses representing a unique verb in the source program corresponding to one of the input and output operations, each of the addresses being assigned at the executing step, and each of the addresses corresponding to functions that perform the input and output operations associated with the represented verb.
11. The method of claim 10 above, wherein the addresses correspond to functions in a file-system adapter executed by the computer that interface to the file-system.
12. The method of claim 10 above, wherein the addresses correspond to functions in the file-system that perform the input and output operations.
13. The method of claim 10 above, wherein the addresses correspond to functions executed by a computer that perform error handling for the input and output operations.
14. The method of claim 10 above, further comprising the step of filling in the addresses in the I/O address vector after a successful open operation has been performed using the specified file-system.
15. A computer programming apparatus, comprising: (a) a computer having a memory; (b) means, performed by the computer, for receiving a series of programing language statements comprising a source program into the memory of the computer, wherein at least one of the received statements includes a file-system identifier that permits selection of a file system for performing input and output operations in the source program and the file-system identifier is selected from a group comprising a literal, an environment variable, and a data name; (c) means, performed by the computer, for compiling the source program into an object program in the memory of the computer, wherein the object program includes instructions for performing the input and output operations according to the file-system identifier that permits the selection of the file system.
16. A program storage device, readable by a computer having a memory, tangibly embodying a program of instruction executable by the computer to perform the steps of: (a) receiving a series of programming language statements comprising a source program into the memory of the computer, wherein at least one of the received statements includes a file-system identifier that permits selection of a file system for performing input and output operations in the source program and the file-system identifier is selected from a group comprising a literal, an environment variable, and a data name; and (b) compiling the source program into an object program in the memory of the computer, wherein the object program includes instructions for performing the input and output operations according to the file-system identifier that permits the selection of the file system.
17. The apparatus of claim 15 above, wherein the literal stores a file system name therein.
18. The apparatus of claim 15 above, wherein the environment variable stores a file system name therein.
19. The apparatus of claim 18 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of specifying the file system name stored in the environment variable in conjunction with the executing step and performing the input and output operations according to the file system name stored in the environment variable.
20. The apparatus of claim 15 above, wherein the data name stores a file name therein.
21. The apparatus of claim 20 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of storing the file name in the data name in conjunction with the executing step, and performing the input and output operations according to a file system associated with the file name.
22. The apparatus of claim 15 above, further comprising the step of coupling the object program to a specified one of a plurality of file systems residing in the memory of the computer.
23. The apparatus of claim 15 above, further comprising the step of executing a file system adapter in the memory of the computer for interfacing between the object program and the file system.
24. The apparatus of claim 23 above, further comprising the step of dynamically loading the file system adapter at the executing step according to the selection of the file system.
25. The apparatus of claim 15 above, wherein the compiling step comprises the step of creating an I/O address vector for the object program, the I/O address vector comprising a list of addresses, each of the addresses representing a verb in the source program corresponding to one of the input and output operations, each of the addresses being assigned at the executing step, and each of the addresses corresponding to functions that perform the input and output operations associated with the represented verb.
26. The apparatus of claim 25 above, wherein the addresses correspond to functions in a file system adapter executed by the computer that interface to the file system.
27. The apparatus of claim 25 above, wherein the addresses correspond to functions in the file system that perform the input and output operations.
28. The apparatus of claim 25 above, wherein the addresses correspond to functions executed by a computer that perform error handling for the input and output operations.
29. The apparatus of claim 25 above, further comprising the step of filling in the addresses in the I/O address vector after a successful open operation has been performed using the specified file system.
30. The programmable storage device of claim 16 above, wherein the literal stores a file system name therein.
31. The programmable storage device of claim 16 above, wherein the environment variable stores a file system name therein.
32. The programmable storage device of claim 31 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of specifying the file system name stored in the environment variable in conjunction with the executing step and performing the input and output operations according to the file system name stored in the environment variable.
33. The programmable storage device of claim 16 above, wherein the data name stores a file name therein.
34. The programmable storage device of claim 33 above, further comprising the step of executing the object program in the memory of the computer, further comprising the steps of storing the file name in the data name in conjunction with the executing step, and performing the input and output operations according to a file system associated with the file name.
35. The programmable storage device of claim 16 above, further comprising the step of coupling the object program to a specified one of a plurality of file systems residing in the memory of the computer.
36. The programmable storage device of claim 16 above, further comprising the step of executing a file system adapter in the memory of the computer for interfacing between the object program and the file system.
37. The programmable storage device of claim 36 above, further comprising the step of dynamically loading the file system adapter at the executing step according to the selection of the file system.
38. The programmable storage device of claim 16 above, wherein the compiling step comprises the step of creating an I/O address vector for the object program, the I/O address vector comprising a list of addresses, each of the addresses representing a verb in the source program corresponding to one of the input and output operations, each of the addresses being assigned at the executing step, and each of the addresses corresponding to functions that perform the input and output operations associated with the represented verb.
39. The programmable storage device of claim 38 above, wherein the addresses correspond to functions in a file system adapter executed by the computer that interface to the file system.
40. The programmable storage device of claim 38 above, wherein the addresses correspond to functions in the file system that perform the input and output operations.
41. The programmable storage device of claim 38 above, wherein the addresses correspond to functions executed by a computer that perform error handling for the input and output operations.
42. The programmable storage device of claim 38 above, further comprising the step of filling in the addresses in the I/O address vector after a successful open operation has been performed using the specified file system.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
August 12, 1998
February 25, 2003
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.