Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Table indexes [solved]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Table indexes [solved]
 Login/Join
 
Silver Member
posted
I tried searching through the forum but have not been able to find much of anything of what I am looking for. Has anyone built or know a way, besides being an admin, to find out which fields are key fields and what indexes exist on a given table? I know I can see a key field in the report assistant in the MRE, but I cannot see the indexes and usually have to call up my system admin every time to find out. It would be really nice to be able to pull this info by running a fex and imputing a table name.

This message has been edited. Last edited by: j42p11,


WebFocus 7.7.03 - 7703_hotfix - Gen: 284
Dev Studio 7.7.03 - Gen: 06062011
Mainframe Focus 7.7.03
Windows WF Client Server
zOS Reporting server (hub-sub config)
Windows Reporting server
Windows RC Client Server
 
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009Report This Post
Expert
posted Hide Post
I assume these are relational tables ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Waz - yes, they are relational tables, however my company has chosen to not do any data governance, which makes things very difficult on the report developers. Majority of our tables are DB2, SQL, & Fix format flat files. In what I am after, is finding the keys & indexes on the DB2 & SQL tables. This way when I am joining tables together, I can join on the keys/indexes to keep performance optimal.


WebFocus 7.7.03 - 7703_hotfix - Gen: 284
Dev Studio 7.7.03 - Gen: 06062011
Mainframe Focus 7.7.03
Windows WF Client Server
zOS Reporting server (hub-sub config)
Windows Reporting server
Windows RC Client Server
 
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009Report This Post
Expert
posted Hide Post
You don't have access to DB2 through some sort of management console ?. You could easily get the indexes there.

Therewise a quick google search found this to show the inedexes on a specified table name.

(Untested)

SELECT 	INDNAME, DEFINER, TABSCHEMA, TABNAME, 
				COLNAMES, COLCOUNT, UNIQUERULE, INDEXTYPE 
FROM 	SYSCAT.INDEXES
WHERE 	TABSCHEMA NOT LIKE 'SYS%' AND
				TABNAME = 'TABLE_NAME'


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
No, my IT department has the DB2 console tool but they do not provide it to the business users who actually are developing the reports. I tried writing SQL in WebFocus using that code that you found, but it did not find the SYSCAT.INDEXES table for some reason.

I did find SYSCOLUMN, which got me part way to the info that I am looking for. However, it only seems to provide information that is listed on the master.

I guess I can try to put in a request to get access to the management console and see if they will change their minds about allowing access to it.


WebFocus 7.7.03 - 7703_hotfix - Gen: 284
Dev Studio 7.7.03 - Gen: 06062011
Mainframe Focus 7.7.03
Windows WF Client Server
zOS Reporting server (hub-sub config)
Windows Reporting server
Windows RC Client Server
 
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009Report This Post
Master
posted Hide Post
I used the FOCUS DB2 read/write interface, at my previous workplace, so going by memory..

As I recall, there is an IB MFD called 'DB2CAT'. DB2CAT describes the DB2 system catalogue tables.

I imagine the MFD would be install dependent, but you should see it, in your master library, as I seem to remember the AUTODB2 focexec uses it.

Your TABLE command would print out the columns naming/describing the indexes, and you would filter on things like tablename.

I support you, and your fellow developers, wanting to understand the table structure, keys, indexes, etc. If you can read the DB2 catalogue, through the IB MFD, you should be closer to where you want to go.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
j42p11, perhaps you need to set the default database connection (the WF DB adapter connection). Here's a working example:
SET PAGE=NOLEAD
SET LINES=999999
SET HTMLCSS=ON
SET BYDISPLAY=ON
-RUN

SET SQLENGINE=DB2
-RUN

ENGINE DB2 SET DEFAULT_CONNECTION CCM
-RUN

SQL
SELECT
INDNAME,
DEFINER,
TABSCHEMA,
TABNAME,
COLNAMES,
COLCOUNT,
UNIQUERULE,
INDEXTYPE

FROM
SYSCAT.INDEXES
WHERE
-*TABSCHEMA NOT LIKE 'SYS%'
-* AND TABNAME = 'VWTRANSACTION'
TABSCHEMA = 'SRS'
FOR FETCH ONLY;
TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

TABLE FILE H001
PRINT
UNIQUERULE
INDEXTYPE
COLCOUNT
COLNAMES
INDNAME
DEFINER

BY TABSCHEMA
BY TABNAME

ON TABNAME SUBHEAD
" "

ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL', SIZE=8, BORDER=1, BORDER-COLOR=SILVER, $
ENDSTYLE
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I would suggest that you tell your IT dep that to created these reports in FOCUS or SQL you need to know the DB schema, the key and the indexes, its a must.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
I agree Waz. Thanks for your help.


WebFocus 7.7.03 - 7703_hotfix - Gen: 284
Dev Studio 7.7.03 - Gen: 06062011
Mainframe Focus 7.7.03
Windows WF Client Server
zOS Reporting server (hub-sub config)
Windows Reporting server
Windows RC Client Server
 
Posts: 30 | Location: Portland, Oregon, USA | Registered: September 11, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Table indexes [solved]

Copyright © 1996-2020 Information Builders