File Table Name CONNECTION
----- ---------- ----------
ALERT myschema.ALERT MYCONN
I searched and saw some threads regarding reporting from a MASTER file, but couldn't quite ascertain how to pull data from an ACCESS file.This message has been edited. Last edited by: David Briars,
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
August 07, 2013, 01:21 PM
j.gross
The content of an access file follows the rules for a comma-delimited data file.* The attributes can vary, depending on the SUFFIX in the Master file. To the best of my recollection, it always corresponds to a single-segment COM file.
If you set up a Master for a single-segment data file, covering every possible attribute (the NAME part of NAME=VALUE), it should be straightforward to filedef the access file and report its content.
Note that, in multiple-segment synonyms (e.g., cluster joins and business views), there can be multiple segments, and the filename may be absent from the text of the access file. So reporting on a whole library's worth of access files in a single TABLE FILE would take a little more doing.
--- *That used to be true of Master files as well, until DEFINE was introduced.
August 07, 2013, 04:03 PM
susannah
get a list of them first
APP QUERY yourapp HOLD TABLE FILE FOCAPPQ PRINT * IF FILENAME CONTAINS '.acx'
-*ON TABLE HOLD AS HHOLD FORMAT ALPHA END
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 07, 2013, 04:03 PM
Rakesh P
I think your acx file should have the DB connection information and not the table/column names. so i am not sure what you are going to report from the access file.
Webfocus 7.1.6, Webfocus 7.7, Webfocus 8
August 07, 2013, 05:25 PM
Waz
Yes you can create that report.
Just use SYSTABLE. This assumes that your masters and access files are in the path.
e.g.
TABLE FILE SYSTABLE
PRINT NAME
SERVER REALNAME
WHERE NAME EQ '{insert table name here}'
END
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
August 07, 2013, 06:53 PM
David Briars
Thank you Waz and Susannah!
Putting your two code samples together, looks exactly like what I needed:
APP QUERY MYPATH HOLD
-RUN
DEFINE FILE FOCAPPQ
MYNAME/A70 = GETTOK(FILENAME, 70, 1, '.', 70, MYNAME);
END
-*
TABLE FILE FOCAPPQ
PRINT MYNAME
IF FILENAME CONTAINS '.acx'
ON TABLE SAVE AS FNAMES
END
-RUN
-*
APP PATH MYPATH
TABLE FILE SYSTABLE
PRINT NAME AS 'ACX File'
REALNAME AS 'Relational Schema.Table Name'
SERVER AS 'Connection'
IF NAME EQ (FNAMES)
END
-EXIT
August 08, 2013, 11:54 AM
Francis Mariani
David,
This is great - I've made a copy of the code.
Unfortunately, this doesn't handle multiple-segment synonyms.
KEYCOLUMNS displays the correct number of keys in a multiple-segment synonym, but that's all it does for these types of acx files.
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
August 08, 2013, 12:44 PM
susannah
glad we could help #transhemispherical_fistbump!
July 10, 2014, 06:22 AM
atturhari
How to match the segment names and DB table names in the cluster join master (or multi-segment synonym)?
I have looked into all internal tables as well.
Any help?
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
February 01, 2018, 08:31 AM
Veeramani Karuthapandian
Hi All,
Any solution for the above mentioned issue?.
By Veeramani
WebFOCUS 8 Windows, All Outputs
October 26, 2018, 10:26 AM
Siva1925
If you need SEGMENT from the cluster masterfile you can use the column SEGNAME from SYSCOLUM table