Start of change

Other considerations and restrictions

This topic lists AMODE 31 and AMODE 64 considerations and restrictions.

Performance

There is an extra overhead to transition between AMODE 31 and 64. Avoid crossing AMODE in performance sensitive areas and group programs that need to call each other frequently into the same AMODE.

In the CALL statement, use CALL ... BY REFERENCE whenever possible. This requires less processing when the parameters are accessed in the other AMODE. Instead of using the RETURNING phrase, return the data item as a BY REFERENCE parameter. This avoids additional copying when the call is returned. CALL ...BY VALUE is not supported.

Multi-threading

Programs running in AMODE 31 must be single threaded. If the multi-threading is used in AMODE 64, only one thread can contain AMODE switching calls. AMODE switching calls in other threads are not allowed.

Condition handling

The condition handling support does not extend across AMODE 31/64 boundary. When processing a condition, Language Environment does not traverses stack frames to find a condition handler until an AMODE 31 and AMODE 64 boundary is reached. If a handler is not found at this point, the condition is treated as unhandled. Applications that rely on condition handling might need to be modified.

Additional information

For more information about AMODE 31/64 inter operation, see Introduction to AMODE 31 and AMODE 64 programs interoperability on Language Environment Vendor Interface for AMODE 31 and AMODE 64 Interoperability.

End of change