Changes
were made in Language Environment for
OS/390, Version 2 Release 9 that affect the AMODE upon return from a COBOL
program to an assembler program. The changes were made in response to the
problem reported in APAR PQ05151. The changes make Language Environment behave
like the VS COBOL II run
time, and provide consistent behavior regardless of the compiler used to compile
the COBOL programs.
The change in behavior affects calls from assembler to COBOL only when
there is a mode switch from AMODE 31 to AMODE 24 or from AMODE 24 to AMODE
31.
With
Language Environment for
OS/390, Version 2 Release 8 or earlier, the behavior for CALL statements between
COBOL and assembler is as follows:
- When a VS COBOL II or
COBOL/370 subprogram returns to an assembler program caller, the AMODE is
set based on the high-order bit in the R14 slot of the assembler program's
save area. If the bit is on, control is returned in AMODE 31; otherwise control
is returned in AMODE 24.
- When an OS/VS COBOL,
COBOL for MVS & VM, or COBOL for OS/390 & VM subprogram returns to
an assembler program caller, the AMODE is set to the same AMODE that was in
effect when the COBOL program was entered.
- When you use the COBOL reusable environment (RTEREUS, IGZERRE, or ILBOSTP0),
and a COBOL program that is called by an assembler driver returns control
to the assembler driver, the AMODE is set based on the high-order bit in the
R14 slot of the assembler driver's save area. If the bit is on, control is
returned in AMODE 31; otherwise control is returned in AMODE 24.
With
Language Environment for
OS/390, Version 2 Release 9 and later, the behavior for CALL statements between
COBOL and assembler is as follows:
- When a COBOL subprogram returns to an assembler program caller, the AMODE
is set to the same AMODE that was in effect when the COBOL program was entered.
Note that the behavior is the same regardless of which compiler was used.
- When you use the COBOL reusable environment (RTEREUS, IGZERRE, or ILBOSTP0),
and a COBOL program that is called by an assembler driver returns control
to the assembler driver, the AMODE is set to the same AMODE that was in effect
when the COBOL program was entered.