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     [CLOSED] Master file to XML Format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Master file to XML Format
 Login/Join
 
Platinum Member
posted
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 Velusamy

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


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
You could use SYSTABLE and SYSCOLUM, and hold the report FORMAT XML.

Not sure about the connection details


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
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
SYSCOLUM is a multisegment file, if you used print * it will probably not work.

Try
TABLE FILE SYSCOLUM
PRINT SEG.NAME
END


or use SET ALL=ON

Come of the child segments are very specific to certain masters.


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
<FreSte>
posted
Gobinath,

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>,
 
Report This Post
Platinum Member
posted Hide Post
Hi Waz

For the particular Table how to modify the above code

Thanks
Gobinath Velusamy


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
CHECK FILE CAR HOLD

TABLE FILE HOLD
PRINT
*
ON TABLE PCHOLD FORMAT XML
END


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Guru
posted Hide Post
You might have to get the necessary coulmns instead of * .

Save this to an EXCEL anf get the reqd column names.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
 
Posts: 394 | Location: Chennai | Registered: December 02, 2009Report This Post
Expert
posted Hide Post
quote:
For the particular Table how to modify the above code


Hi Gobinath,

Which table, and is it Freds code above ?


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
Virtuoso
posted Hide Post
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, 2006Report 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     [CLOSED] Master file to XML Format

Copyright © 1996-2020 Information Builders