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.
I have hundreds of files that are being read from Oracle. I am using the following code to produce a report that contains the names of all the tables:
SQL SQLORA SELECT OWNER, TABLE_NAME FROM ALL_TABLES; TABLE FILE SQLOUT BY TABLE_NAME WHERE TABLE_NAME NOT CONTAINS '$' OR '/' OR 'SMP'; WHERE OWNER CONTAINS 'OMS_OWNER'; END
How do I create a report against all of the masters in my application to capture the FIELD_NAME, ALIAS, USAGE, ETC. IN a report?This message has been edited. Last edited by: Kerry,
If you create your reports based on the direct SQL, you do not have a master file. What you seem to want is a information from the master files.
You can create a master file description for every view or database table on your oracle database. How? It highly depends on what software components you have from IBI. I use the gui to create a synonym (which is both the MAS and the ACX file.
The ACX holds the basic connection information (Where is the system, what is the name of the table etc, number of keyfields) In the master file you describe the record layout, the fieldnames used by Oracle, the field size from Oracle and the name you want to give to these fields, description, indexes etc.
(there is a separate book only on this issue)
I hope this gives you an idea...
And please update your signature as asked in the top issue on this forum.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
There exists an ancient IBI-created Master called comaster.mas that I found in one of the sample app folders a long time ago (I don't know if a newer one exists). It describes the different attributes of a master file. You can use that to do what you need.
-SET &ECHO=ALL;
TABLE FILE SYSCAT_TABLES
PRINT
TABNAME
HEADING
"WEBFOCUS REPORT"
WHERE READLIMIT EQ 5
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-*?FF HOLD
-*-RUN
-READ HOLD NOCLOSE &TABNAME.A128
-REPEAT END_LOOP1 WHILE &IORETURN EQ 0;
-SET &TABNAMEF = LOCASE(&TABNAME.LENGTH, &TABNAME, 'A&TABNAME.LENGTH') || '.mas';
FILEDEF COMASTER DISK basel/basel_&TABNAMEF
-RUN
TABLE FILE COMASTER
PRINT
FILENAME
FIELDNAME
ALIAS
FORMAT
ACTUAL
END
-RUN
-READ HOLD NOCLOSE &TABNAME.A128
-END_LOOP1
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
Unfortunately, neither suggestion did the trick. Perhaps I am not explaing it correctly. I have 1,000 .mas files. Without looking at each .mas, how do I find out the information in each .mas? I expect to see the following on the report:
FIELDNAME ALIAS FORMAT ACTUAL INDEX BODYTYPE TYPE A12 A012 SEATS SEAT I3 A003 DEALER_COST DCOST D7 A007
There are 2 mfds' worth looking at, sysfiles.mas and syscolum.mas. These have a suffix of FMI, a special one for running internal processes. sysfiles searches the current path for .mas files.
Try:
TABLE FILE SYSFILES
PRINT FILENAME
ON TABLE HOLD
END
TABLE FILE SYSCOLUM
PRINT ALIAS COLTYPE LENGTH
BY TBNAME
BY NAME
WHERE TBNAME IN FILE HOLD;
END
You can of course play with the code to get exactly what you want.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Alan's suggestion is the best and correct one, it reads the DBMS system tables to provide information about the tables.
I was misdirected by you wanting to read the WebFOCUS Masters, which my example DOES and which gives you all you need EXCEPT whether or not the field is an index.
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
They should always be there, in ibi\srvnn\home\catalog, but are always accessible from the server, you don't need to do anything special to access them, though they are worth looking at.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Alan, aren't these DBMS tables and therefore dependent on each of the defined adapters? Do you think WebFOCUS automatically generates the Master and Access files for these?
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
Thanks for pointing us to these Masters. Interesting stuff.
What I've figured out so far:
sysfiles gives you a list of all the files of a particular type in the app path. By default it displays .mas, but you can easily run a command to make it display focexecs, which would resolve the issue in Is it possible. As documented in the master comments, just add SQL FMI SET SYSFILES FOCEXEC before the TABLE FILE and you get focexecs!
syscolum gives you a list of columns. If the master is for a DBMS, it uses the acx file to connect to the database to read the dbms system table!
syskeys gives you a list of table keys. If the master is for a DBMS, it uses the acx file to determine the keys.
systable gives you a list of tables in the app path.
Gosh, this needs to be documented somewhere!
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
CHECK FILE fn HOLD is fine for a one off, and has been mentioned on the FORUM before, but if you have hundreds of masters it will be unwieldy; this technique works very well, and simply.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007