<snip> > >As to the initial question, as pointed out, it depends on the type of the SVC. >The SVC owner knows what type it is (because they defined it) and can look in >the right place for that type of SVC, just as they look in the right place for >the caller's regs (for which the answer is different than the psw/key, but >similarly depends on the type of the SVC. > </snip>
I had the idea that this code in the SVC would give me the key the SVC caller was executing in: USING RBBASIC,R5 POINT TO REQUEST BLOCK L R7,RBLINK LOAD CALLER RB IN REG 7 DROP R5 DROP SVC RB MAPPING USING RBBASIC,R7 AND NOW MAP CALLER RB L R1,RBOPSW GET CALLER PSW AND PUT IN REG 1 N R1,=X'00F00000' ONLY PSW KEY SRL R1,16 SHIFT TO 000000K0 ST R1,KEY STORE CALLER KEY DC H'0' FORCE ABEND However, when I call this SVC from an problem program the switches to key 9 before the call: SPKA X'90'(0) SWITCH TO KEY 9 SVC 255 I see that R1 has a value of x'00000080' (key 8) at the time of the abend, where I was expecting x'00000090'. Is see that it is possible that there are more request blocks. I'm I not looking at the right one, and if so, how do you know if you reached the top RB, or is my approach really wrong? Kind regards, Erik Janssen. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN