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.
Hi I need to convert all the master files into XML file format.This XML file should have the Column names , Column alais , Column Data type and database conncetion details .
How to achive this one?.Please help me on this.
Thanks Gobinath VelusamyThis message has been edited. Last edited by: Kerry,
Waz, I'm curious about this. SYSTABLE does give me a list of tables, but SYSCOLUM returns no rows. Do I have to allocate something before querying SYSCOLUM?
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
Below you'll find an example of how to get the info. I'm not sure if all the data is in the end report, but maybe you can use this as a first step. And ofcourse, the end XML file has to be created.
Cheers,
-Fred-
PS: Tested this on my laptop with a limited number of files. Not sure how this will act on environments with hundreds of mas/acx files
-* --- Get all acx files from server-path
SQL FMI SET SYSFILES ACCESS
TABLE FILE SYSFILES
PRINT
FILENAME
PHNAME
ON TABLE HOLD AS HLDACX FORMAT ALPHA
END
-RUN
-SET &ACX_COUNT = &LINES;
-* --- Assign ALL acx-files to variables
-REPEAT :ACX_READ FOR &I FROM 1 TO &ACX_COUNT;
-READ HLDACX &FINA.&I.A64 &PHNA.&I.A80
-:ACX_READ
-* --- Create default MASTER for ACX-files
FILEDEF masforacx DISK masforacx.mas
-RUN
-WRITE masforacx FILENAME=MASFORACX, SUFFIX=DFIX , $
-WRITE masforacx SEGMENT=MASFORACX, SEGTYPE=S0, $
-WRITE masforacx FIELDNAME=E1, ALIAS=E01, USAGE=A64, ACTUAL=A64, $
-WRITE masforacx FIELDNAME=E2, ALIAS=E02, USAGE=A64, ACTUAL=A64, $
-WRITE masforacx FIELDNAME=DELIMITER ,ALIAS=',' ,USAGE=A1 ,ACTUAL=A1 ,$
-* --- Get ACX-files 1-by-1 and append to HOLD-file
FILEDEF ACXTOTAL DISK acxtotal.ftm (APPEND
-RUN
-*--- Loop for each found ACX-file
-REPEAT :ACX_WRITE FOR &I FROM 1 TO &ACX_COUNT;
FILEDEF masforacx DISK &PHNA.&I
-RUN
TABLE FILE masforacx
PRINT
COMPUTE FILENAME/A80 = '&FINA.&I';
COMPUTE PHNAME/A80 = '&PHNA.&I';
COMPUTE CONN/A80 = IF E01 CONTAINS 'CONNECTION' THEN E01 ELSE
IF E02 CONTAINS 'CONNECTION' THEN E02 ELSE '';
WHERE TOTAL CONN NE '';
ON TABLE HOLD AS ACXTOTAL FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
-:ACX_WRITE
-* --- Dump to HOLD-file for MATCHing
TABLE FILE ACXTOTAL
PRINT
PHNAME
CONN
BY FILENAME AS TBNAME
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS ACXFILES FORMAT ALPHA
END
-RUN
-* --- Get all column info for MATCHing
TABLE FILE SYSCOLUM
PRINT
TBNAME/A80
NAME AS 'COLUMNNAME'
ALIAS
COLNO
COLTYPE
LENGTH
NULLS
ON TABLE HOLD AS COLNAMES FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
END
-RUN
-*--- Match both HOLD-files
MATCH
FILE ACXFILES
SUM
PHNAME
CONN
BY TBNAME
RUN
FILE COLNAMES
PRINT
COLUMNNAME
ALIAS
COLNO
COLTYPE
LENGTH
NULLS
BY TBNAME
AFTER MATCH HOLD AS HLDTOTAL
END
-RUN
TABLE FILE HLDTOTAL
PRINT *
BY TBNAME NOPRINT
END
This message has been edited. Last edited by: <FreSte>,
I found this old question and tried the solution FreSte has posted. It works perfect even on tons of masters The only change I made was to read more fields form the Acx file, since some have 3 or more fields . The is one thing I need to solve and in my case some Acx files have also sometimes more then one line, and I did not get all these lines in my report. I suppose there is a way to change that and get it done. I try to add one other functionality and that would be to find all the fexes related to a certain master file. I know it can be done by a text search, but I hope there is a better way, if I use the resource analyser in combination with the above. Any suggestions are welcome.
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