I must be doing something wrong, because if I do that it indicates key 0. I was 
expecting key 9 somewhere...

On Tue, 30 Apr 2024 08:50:13 -0500, Wayne Driscoll 
<wayne.drisc...@broadcom.com> wrote:

>If you are in a Type 2, 3 or 4 SVC, the PSW at the time of the SVC
>instruction is in the SVRB whose address is in R5 upon entry, that is the
>RBOPSW you would want to interrogate. Your code is looking at the PSW at
>the time the callers RB was created, mostly via a LINK or ATTACH SVC, since
>it was a problem program.
>Wayne Driscoll
>Note: all opinions are strictly my own.
>
>On Tue, Apr 30, 2024 at 4:02 AM Erik Janssen <
>0000062c999269e8-dmarc-requ...@listserv.ua.edu> wrote:
>
>> <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
>>
>
>
>-- 
>Wayne Driscoll
>Software Engineer | Mainframe Software Division
>Broadcom Software
>
>*Office: *630-300-1931* Mobile:* 630-247-1632
>wayne.drisc...@broadcom.com

----------------------------------------------------------------------
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