Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FIND OUT THE ISPF TABLE NAME ?? 1

Status
Not open for further replies.

tecrm33

Technical User
Jul 30, 2004
1
US
I'm working with a vendor product and wish to add a field or two of data to their table, but I don't know how to find out their table name - short of asking the vendor and I'm sure that won't help.

 
Doug Nadel has a routine which lists all the tables currently open. Search the web for Sillysot Software to find Doug's pages.

Once you identify the table name, TBQUERY it to find the names of the fields, or use my TBLOOK at
Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
I've checked with all my sources and everyone denies owning the code I have. Since it doesn't belong to anyone, I have no compunctions about distributing it. Here it is. Use at your own risk, of course -- no guarantees.
Code:
/* REXX  - show open ISPF tables - assumes exec run from ISPF        */
tcb=ptr(132+ptr(540))                  /* parent of tcb of rexx exec */
tld = ptr(ptr(24+ptr(112+tcb)))        /* screen tld                 */
tld = ptr(128+ptr(60+ptr(56+tld)))     /* parent tld (TLD0)          */
Say 'Global '
Call listtables
tcb = ptr(136+ptr(132+tcb))
Do While tcb \= 0
   tld = ptr(ptr(24+ptr(112+tcb)))
   If stg(tld,3) = 'TLD' Then Say 'Screen 'stg(tld+3,1)
   Call listtables
   tcb = ptr(128+tcb)
End
Exit
listtables:  Procedure Expose tld
If stg(tld,3) = 'TLD' Then
   Do
     dtb = ptr(44+ptr(76+tld))
     Do While dtb \= 0
       Say '   'stg(dtb+6,8)
       dtb = ptr(68+dtb)
     End
   End
Return
ptr:  Return c2d(storage(d2x(Arg(1)),4)) /* return pointer at offset*/
stg:  Return storage(d2x(Arg(1)),Arg(2))     /* Return storage */

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top