SPACE Statement as a Boolean Function

The SPACE statement can be used as a Boolean function. You cannot use a SPACE statement inside another file I/O statement. When the statement fails, the value TRUE is returned. When the statement is successful, the value FALSE is returned. The SPACE statement returns a value identical to that returned by the file attribute STATE. For more information, refer to the discussion of the STATE attribute in the File Attributes Programming Reference Manual.

The file designator must not reference a direct file or a direct switch file. For more information on the file designator see SWITCH FILE Declaration.