FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-12
BLOCK DATA Statement
°
In a UNIT compiler directive, as in:
UNIT (5, INPUT)
UNIT (6, OUTPUT)
For more information about using units 5 and 6 as shared files, see the OPEN 
Statement on page 7-70.
•
If a BACKSPACE statement causes unit 5 or unit 6 to be implicitly opened and your 
program is running as a NonStop process, the FORTRAN run-time library does a 
stack checkpoint to the backup process as a part of the implicit open.
•
Error conditions 
If you specify lbl, and an error occurs during backspacing, the BACKSPACE 
statement terminates, the file position becomes indeterminate, and FORTRAN 
transfers control to the statement identified by lbl. If you also specified ios, you 
can determine the error that occurred by analyzing ios.
If you specify ios, but not lbl, and an error occurs during backspacing, your 
program continues executing with the statement that follows the BACKSPACE 
statement. You can analyze ios to determine the error that occurred, if any.
If you do not specify ios or lbl, and an error occurs, FORTRAN terminates your 
program and displays a run-time diagnostic message.
Examples
BACKSPACE (3, IOSTAT=iproblem, ERR=450)
BACKSPACE (40)
BLOCK DATA Statement
The BLOCK DATA statement marks the beginning of a block data subprogram. A block 
data subprogram assigns initial values to entities in common blocks.
subprog-name
is the symbolic name of the block data subprogram.
Considerations
•
A block data subprogram is a nonexecutable subprogram. An executable program 
can include more than one block data subprogram.
•
The optional subprog-name has the scope of an executable program. 
subprog-name must be different from any global name or local name within the 
subprogram.
BLOCK DATA [ subprog-name ]










