Focal Point
Printing Database Schemas/Table listing
September 25, 2008, 09:38 AM
Jeff_RowlandPrinting Database Schemas/Table listing
I've searched theforums and on-line technical library but have been unable to find a answer to the following "HOW TO"
Is it possible to print a Database Schema that prints out a list of tables with field definitions/description?
7.7.02 Windows7
HTML/Excel/PDF
September 25, 2008, 09:50 AM
Francis MarianiJeff, it probably is difficult to design a tool that prints the schema of all the different types of databases that WebFOCUS can access, I suggest you use the supplied tools of the particular database you're working with.
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
September 25, 2008, 10:09 AM
Jeff_RowlandI might not have stated my requirement correctly and made is seem more complex than it really is. Basically what I would like to accomplish is just to be able to print out a list of fields in a particular table i.e. Field name, Type, size
Thanks
7.7.02 Windows7
HTML/Excel/PDF
September 25, 2008, 10:13 AM
Francis Mariani?FF master-file-name
e.g.: ?FF CAR
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
September 25, 2008, 10:24 AM
Jeff_RowlandTHANK YOU FRANCIS!
Just what I was looking for.
Jeff
7.7.02 Windows7
HTML/Excel/PDF
September 25, 2008, 10:29 AM
GinnyJakesCHECK FILE CAR HOLD
TABLE FILE HOLD
PRINT FIELDNAME
BY SEGNAME
END
This is a useful tool. You can find more description here:
http://documentation.informationbuilders.com/masterinde...g/source/topic89.htmHope this helps.
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 25, 2008, 10:29 AM
Francis MarianiI should mention where this is documented:
Creating Reports With WebFOCUS Language > Referring to Fields in a Report Request > Displaying a List of Field Names > Listing Field Names, Aliases, and Format Information
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
September 29, 2008, 05:16 AM
FrankDutchJeff
Tony S posted this little piece of coding to help me with a similar problem
-SET &ECHO = ON;
TABLE FILE SYSCOLUM
PRINT NAME
USAGE
BY SEGNAME NOPRINT
BY SEGNO NOPRINT
WHERE TBNAME EQ '&TABLENAME'
ON TABLE SAVE
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
TABLE FILE &TABLENAME
PRINT
-READ SAVE &FieldName.A66. &Format.A8.
-REPEAT :Loop WHILE &IORETURN EQ 0;
&FieldName AS '&FieldName - &Format'
-READ SAVE &FieldName.A66. &Format.A8.
-:Loop
HEADING
"&TABLENAME"
IF RECORDLIMIT EQ 10
END
What this does is displaying the fields of a database with the format in the header and the first 10 records from that database for a "&TABLENAME".
If you put the tablenames for a certain database in a small list, you can do this with an extra loop for all the tables all at once, and combine it with the other answers to build your documentation.
|
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 |
September 29, 2008, 10:50 AM
Jeff_RowlandThanks Frank.
Appreciate the help.
Jeff
7.7.02 Windows7
HTML/Excel/PDF