So, as has been asked, what were the regs/PSW at the time of the PIC 6? 

It seems likely that the OP's code did not restore registers as the 
interface required it to do (particularly GR 2).
If you return via reg 14 and reg 14 points to CVTBSM2, then the next thing 
that will be issued is the instruction at CVTBSM which (not surprisingly) 
is BSM 0,2.
If GR 2 has not been restored, that may go off "anywhere" and could 
possibly get a PIC 6, although I'm not sure if that could happen on the 
BSM target itself or might be the result of some subsequent branch relying 
on the value in some register.

Assuming that you know where to return, and not using reg 14 when reg 14 
is documented as containing the return address, is dangerous at best. 

FWIW, returning to the "normal" reg 14 for a new RB is less efficient, not 
more efficient, than issuing SVC 3. Upon entry to a PRB's program, reg14 
points to an SVC 3, so it is only one instruction less efficient), but it 
would be silly to issue SVC 3 if you are not in full control of the 
environment because otherwise, as Binyamin pointed out, you could be 
terminating your caller too. It is only when a RB is exiting that SVC 3 is 
appropriate. Returning by reg 14 is surely the right thing to do in 
general

Peter Relson
z/OS Core Technology Design

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to