z/OS Language Environment Writing Interlanguage Communication Applications
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


COBOL to Fortran condition handling

z/OS Language Environment Writing Interlanguage Communication Applications
SA38-0684-00

This section provides two scenarios of condition handling behavior in a COBOL to Fortran ILC application. If an exception occurs in a COBOL routine, the set of possible actions is as described in Exception occurs in COBOL. If an exception occurs in a Fortran program, the set of possible actions is as described in Exception occurs in Fortran.

Keep in mind that some conditions can be handled only by the HLL of the routine in which the exception occurred. Two examples are:
  • In a COBOL program, if a statement has a condition handling clause added to a verb (such as ON EXCEPTION), the condition is handled within COBOL. For example, the ON SIZE clause of a COBOL DIVIDE verb (which includes the logical equivalent of the zero divide condition) is handled completely within COBOL.
  • When the Fortran ERR or IOSTAT specifier is present on a Fortran I/O statement, and an error is detected while executing that statement, the Fortran language semantics take precedence over Language Environment condition handling. Control returns immediately to the Fortran routine and no condition is signaled to Language Environment.

See z/OS Language Environment Programming Guide for a detailed description of Language Environment condition handling. For information about Fortran condition handling semantics, see VS FORTRAN Version 2 Language and Library Reference.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014