Using R13 can be an issue if the linkage stack is used instead of the save area.
Dennis Roach, CISSP AIG Identity & Access Management | Technology Services 2929 Allen Parkway, America Building, 3rd Floor | Houston, TX 77019 Phone: 713-591-1059 (cell) [email protected] | www.aig.com -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Steff Gladstone Sent: Tuesday, February 13, 2018 6:44 AM To: [email protected] Subject: Re: TCBFSA field in the TCB DSECT On 13 February 2018 at 13:02, Bernd Oppolzer <[email protected]> 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 [email protected] with the message: INFO >> IBM-MAIN >> >> > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
