You're right, Shmuel. The TIOT is where the search begins.
The COBOL program has a static mapping of TCB and TIOT in the LINKAGE section.
It gets the TIOT address from the TCB, then scans the TIOT, looking for a
specific DDNAME. It then calls an assembler program to do the RDJFCB for that
DDNAME.
SAVEXIT EQU *
L 4,DCBADDR
>>> LA 4,36(4) INC PTR TO EXIT LIST AREA
IC 6,0(4) PICK DCB RECFM, INSERT EXIT
LA 9,EXLIST LIST ADDRESS IN R9 IN DCBEXLST
ST 9,0(4)
STC 6,0(4) RESTORE DCB RECFM
L 4,DCBADDR
The instruction "LA 4,36(4)" concerns me (hard-coded offset). The kind of
thing that works for years (decades, even), but that's not good programming.
Stan
mailto:[email protected]
(613) 941-8091
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of
Shmuel Metz (Seymour J.)
Sent: June 23, 2011 7:00 PM
To: [email protected]
Subject: Re: Obtaining System Information from a COBOL program
In <[email protected]>,
on 06/23/2011
at 09:09 AM, "Haynes, Stan" <[email protected]> said:
>Interestingly, this is something being discussed in our shop right
>now. We have an application with code that extracts a DSN by
>searching through the TIOT,
The DSN isn't in the TIOT, it's in the JFCB. There's no need to search
the TIOT to locate the SVA of the JFCB; RDJFCB will do it for you,
even if IBM remaps the TIOT.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
ISO position; see <http://patriot.net/~shmuel/resume/brief.html>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html