Focal Point
[CLOSED] Using APP QUERY How to display All .mas files in All application folders

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1471054482

May 16, 2008, 11:47 PM
saikumar
[CLOSED] Using APP QUERY How to display All .mas files in All application folders
Hi,

We are working on a task to display all MasterFiles available in the all application directories useig APP QUERY command.
Remember there is no input to list out and need to display all .mas files by app folder.

Any suggestions would be helpful.

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


WebFOCUS 8103 Appstudio, Dev Studio MRE
Client Windows 7, Serveron Unix.
Excel, PDF, HTML,AHTML
May 17, 2008, 02:15 AM
Alan B
Use APP LIST, followed by APP QUERY, using the output of APP LIST as the input for APP QUERY

APP LIST HOLD
TABLE FILE FOCAPPL
PRINT APPNAME
ON TABLE SAVE
END
-RUN

-SET &APPLINE = ' ';
-REPEAT :LAB1 &LINES TIMES
-READ SAVE &APP.64
-SET &APPLINE = &APPLINE | ' ' | &APP ;
-:LAB1

APP QUERY &APPLINE HOLD
TABLE FILE FOCAPPQ
PRINT FILENAME
BY APPNAME
IF FILENAME CONTAINS '.mas'
END



Alan.
WF 7.705/8.007
May 18, 2008, 06:01 PM
Waz
Although, this doesn't use APP QUERY it does list all masters in the path.
TABLE FILE SYSFILES
PRINT *
END



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!

May 19, 2008, 02:26 PM
N.Selph
SYSTABLES also gives you all masters on the app path. It has different information than SYSFILES. You might use it depending on what you want to do.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
May 20, 2008, 10:36 AM
walker
quote:
Originally posted by N.Selph:
SYSTABLES also gives you all masters on the app path. It has different information than SYSFILES. You might use it depending on what you want to do.


N.Selph,

I tried follow up with your information about SYSTABLES but got a message :
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SYSTABLES.
Could you please explain it?
By the way, when I've got output from SYSFILES table I found in this list master file neither for SYSFILES nor for SYSTABLES.


WebFocus 7.1.4
Windows XP
May 20, 2008, 11:06 AM
GinnyJakes
TABLE FILE SYSTABLE  


Take the trailing 'S' off. I do this all the time.

Another technique is to use an operating system command and pipe the output to a file. You can then use a generic master (I call mine LINE80) and use GETTOK and SUBSTR to extract the different pieces and do reports. I also do this all the time. Works great!


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
May 20, 2008, 12:50 PM
walker
Thank you Ginny,

It works just fine! Smiler


WebFocus 7.1.4
Windows XP
May 20, 2008, 11:24 PM
Waz
There is a distinct difference between SYSTABLE and SYSFILES

SYSTABLE is used as a catalog of datasources.
SYSFILES is catalog of files, tthe default is Master files. it also shows the location of the file, where SYSTABLE does not.

You can set SYSFILES to show other files like Focexecs with the code
SQL FMI SET SYSFILES FOCEXEC



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!

March 02, 2013, 01:27 PM
Ian Dalton
We have all our .mas files in one apps folder. What I would like, is to determine all masters that are NOT referenced within any .fex files contained in all folders under ibi\apps. This is to weed out redundant and obsolete master files that are clogging up our masters directory. Alan B's suggestion list all masters in all folders but we don't know if any .fex files references these.


_______________________
*** WebFOCUS 8.1.05M ***
March 03, 2013, 08:28 AM
Alex
There's nothing inherently built in WF to allow you to do that. The only thing you can do is develop a FOCEXEC that reads in each FOCEXEC that you have and form a list of Masters from each line that has a 'TABLE FILE' contained in it and then compare it to the list gnerated by SYSTABLE or SYFILES.


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
March 03, 2013, 11:53 AM
Ian Dalton
Yes sadly that's what I thought. Thanks for the confirmation Alex. I was probably expecting too much. Ian


_______________________
*** WebFOCUS 8.1.05M ***