Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Using data in input and output operations

Define the data that you use in input and output operations in the FILE SECTION.

Provide the following information about the data:

Programs in the same run unit can refer to the same COBOL file-names.

You can use the EXTERNAL clause for separately compiled programs. A file that is defined as EXTERNAL can be referenced by any program in the run unit that describes the file.

You can use the GLOBAL clause for programs in a nested, or contained, structure. If a program contains another program (directly or indirectly), both programs can access a common file by referencing a GLOBAL file-name.

You can share physical files without using external or global file definitions in COBOL source programs. For example, you can specify that an application has two COBOL file-names, but these COBOL files are associated with one system file:

SELECT F1 ASSIGN TO MYFILE.
SELECT F2 ASSIGN TO MYFILE.

related concepts
Nested programs

related tasks
Sharing files between programs (external files)

related references
FILE SECTION entries


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)