Or you could check if R14 is pointing to a SVC 3 instruction.

Actually the routine (not written by me) was using the FSA to retrieve the
pointer to the value of the PARM= parameter (saved R1).
Presumably that's a valid use as well.

It would make sense if the FSA is always below the line.  Although
theoretically the system could check the AMODE of the first program and
allocate the SA accordingly.

On 13 February 2018 at 13:02, Bernd Oppolzer <bernd.oppol...@t-online.de>
wrote:

> Hi,
>
> IMO, the first save area should always be below the line.
> It is provided by the operating system so that the main program of the
> called application (EXEC PGM=...) can store the registers on call there.
> And the first program may be AMODE 24 :-)
>
> On the other hand, I would never use TCBFSA to do anything with it.
> Because, for example, you would try to walk the save area chain from there,
> you are stuck, because the forward pointers are not set correctly by LE
> and others.
> What you should do instead: fetch register 13 and walk back, by using the
> backward
> pointers, which are much more reliable in the general case. When doing
> this,
> you could check for the value in TCBFSA to see, if you arrived at the
> first save
> area. But you could also check for NULL in the backward pointer.
>
> HTH, kind regards
>
> Bernd
>
>
>
> Am 13.02.2018 um 10:07 schrieb Steff Gladstone:
>
>> Hi,
>>
>> I am in the process of converting several routines to AMODE=31 RMODE=ANY.
>> One of them references the address of the first problem program save area
>> found in the TCB.
>>
>> The field is defined as follows:
>>
>> TCBFSA   DS    0A -    ADDRESS OF THE FIRST PROBLEM PROGRAM SAVE AREA
>>
>>                  DS    FL1 -   FIRST BYTE OF TCBFSA
>> @G381P9A
>>
>> TCBFSAB  DS    AL3 -   ADDRESS OF THE FIRST PROBLEM PROGRAM SAVE AREA
>>
>> My question:  what is the status of the first byte?  It does not seem to
>> contain flag bits as is often the case.  On the other hand, defining the
>> field TCBFSAB seems to imply that the address is a 24-bit address.  So in
>> AMODE=31 can the first problem program save area (which is provided by the
>> system to the top-level program) be above the line?  Should I relate to
>> all
>> four bytes as the address of the FSA?  Or could the first byte contain
>> garbage?
>>
>> Thanks,
>> Steff
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>
>>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

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