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


Fortran to PL/I condition handling

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

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

Some conditions can be handled only by the HLL of the routine in which the exception occurred. For example, when ERR and IOSTAT specifiers are present on a Fortran I/O statement and an error is detected while executing that statement, Fortran condition handling semantics take precedence over Language Environment condition handling. Control returns immediately to the Fortran program and no condition is signaled to Language Environment.

If there is a PL/I routine currently active on the stack, PL/I language semantics can be applied to handle conditions that occur in non-PL/I routines within an ILC application. For example, PL/I semantics apply to Language Environment hardware conditions that map directly to PL/I conditions such as ZERODIVIDE, even if they occur in a non-PL/I routine. Also, PL/I treats any unknown condition of severity 2 or greater as the ERROR condition. In a case in which a Fortran-specific condition of severity 2 or greater is passed to a PL/I stack frame, an ERROR ON-unit can handle it on the first pass of the stack.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014