Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SELECT clause

Function

The SELECT clause is used to give a file a name.

Format


SELECT [ OPTIONAL ] file-name-1


Syntax rules

  1. file-name-1 is the name with which the file is referenced in the compilation unit. Within a program, a factory, an object or a method, file-name-1 may only occur in a SELECT clause.

  2. A file description entry (FD) must exist in the DATA DIVISION of the same program of the same program, the same factory, the same object or the same method for file-name-1.

General rule

  1. If the OPTIONAL phrase references to an external file, OPTIONAL must be specified in all programs which describe this external file.