> I'm wondering if the following is a good idea. I've been reading again. If I
> have a routine which does the following:
>
> ...
> CALL MYSUB,(PARMS,...),VL
> L R13,4(,R13)
> RETURN (14,12),T,RC=(15)
>
> and I'm using standard calling conventions and save areas, is there any
> reason why I shouldn't just:
>
> L R13,4(,R13)
> LM R14,R12,12(R13)
> CALL MYSUB,(PARAMS,...),LINKOP='15,15',LINKINST=BCR,VL
>
> The above call replaces the normal BALR 14,15 with BCR 15,15 and so goes to
> MYSUB, but removes the current program from the savearea chain. OK, so
> effectively it only saves one branch instruction. I guess I'm "over
> optimizing" again.
It is perfectly ok and not even particularly uncommon. The only down side is
that since your "current" program is effectively removed from the call chain it
can be extremely difficult to identify and diagnose any program errors arising
from whatever your code did before transferring control.
CC