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     System Tables [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
System Tables [SOLVED]
 Login/Join
 
Guru
posted
Hi All.

By referencing the SYSFILES table you can get info on .MAS

what i need to do is get the details of .FOC files instead is there a system table that has this info?

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


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Expert
posted Hide Post
Nubi,

You could always utilise the fact that SYSFILES includes the full path to the .mas file and read them all!

TABLE FILE SYSFILES
PRINT PHNAME
BY FILENAME
-*IF RECORDLIMIT EQ 100
ON TABLE SAVE AS SYSMASTS FORMAT COMMA
END
-RUN
-READ SYSMASTS, NOCLOSE &Filename, &FilePath
-REPEAT :Loop WHILE &IORETURN EQ 0;
-SET &FileLoc = STRREP(&FilePath.LENGTH, &FilePath, 1, '"', 1, HEXBYT(32,'A1'), &FilePath.LENGTH, 'A&FilePath.LENGTH');
-SET &FileLoc = TRUNCATE(&FileLoc);
FILEDEF MASFILE DISK &FileLoc
-RUN
-READ MASFILE &Fst_Line.A80.
-SET &FileType = GETTOK(&Fst_Line, 300, 3, '=', 4, 'A4');
-IF &FileType OMITS 'FOC' THEN :Next;
-TYPE &Filename &FileType
-:Next
-READ SYSMASTS, NOCLOSE &Filename, &FilePath
-:Loop

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Nubi,

What are the "details" of the .FOC files that you want? Do you want to know which files are FOC? Where they are?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Guru
posted Hide Post
Thanks Tony,

i will give this a try, well once i understand everything it's doing, i get the concept but find i don't like including code i don't fully understand (makes things a 'mare to maintain!!)

Danny,

what im doing is trying to use the contents of a foc as a data source but want it to be controlled by &Variables..

i have set up a number of focs which are field lists of databases on various different connections and want to be able to get a list of all the focs ive done into a drop-down - without hardcoding anything

my solution was to run a query against a SYSFILES like table but get the FOC's out instead of the .MAS's.

I've got round it by using GETTOK on a SYSFILES path field but wanted something moe robust as that will probably fail if we create any subdirectories below those we currently use.


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Expert
posted Hide Post
Search on APP QUERY for a list of masters in the application folders...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Tom,

That would still only give Nubi what SYSFILES would give - matser files only.

My understanding was that he wants to know which of those master files pertains to a FOCUS or XFOCUS file?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Nubi,
If I get your meaning, you want a list of all the FOC files. Here is an idea:
  
-* File sysfocfiles.fex
SET HOLDLIST=PRINTONLY

-* Get a list of all masters
TABLE FILE SYSFILES
PRINT
 FILENAME

-* I added this condition to retrieve only masters in one application directory
WHERE PHNAME CONTAINS 'srlsamp'
ON TABLE HOLD AS MAS FORMAT ALPHA
END
-RUN
-* Number of Master files
-SET &F=&RECORDS;

-* File to accumulate all the FOC files names
FILEDEF FOCS DISK FOCS.TXT (APPEND

-* Loop on all Master names
-REPEAT #GETFOCS FOR &I FROM 1 TO &F;
-READ MAS,&FN

-* Use CHECK FILE HOLD to get all the data on the file
CHECK FILE &FN HOLD

-* Find out if the file is FOC or not
TABLE FILE HOLD
PRINT FILENAME
IF SUFFIX EQ 'FOC'

-* If it is save that name in the FOCS.TXT file
ON TABLE SAVE AS FOCS 
END
-#GETFOCS
-RUN
!TYPE FOCS.TXT


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Tony,

Thanks for pointing out I mistyped.

 
APP QUERY Folder1 Folder2 Folder3 HOLD
TABLE FILE FOCAPPQ
PRINT  
   FILENAME 
WHERE FILENAME CONTAINS '.foc';
 ON TABLE HOLD AS FOC_LIST
END
-RUN
DEFINE FILE FOC_LIST
  FOC_NAME/A25 = GETTOK(FILENAME, 70, 1, '.', 25, FOC_NAME);
END
TABLE FILE FOC_LIST
PRINT 
  FOC_NAME
END
-EXIT


Works for me every time...

EDIT: I thought I would elaborate:

We have user profiles for everyone, we then FILEDEF DRIVE:/ibi/srv76/profiles/USERID.prf
where, in USERID.prf, we have APP PATH appfolder1 appfolder2 etc
and put the folder names in an AMPER, then do the above, with this actual code:
 
APP QUERY &FOLDERS.EVAL HOLD


This ONLY gives them access to files they should have access to; SYSFILES gives everything...

FYI

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
If you want to get a list of all FOCUS files in the path, you can still use SYSFILES

Try this
SQL FMI SET SYSFILES FOCUS

TABLE FILE SYSFILES
PRINT *
END


SYSFILES can work on many file types.

Here are some.

ACCESS    ACCESSU   ADR       AFM       BMP       BST       CONTROL   DATA      DDS    
DTD       EDANLS    EDAPRFU   EDAPROF   EDAPROFW  EDASYNA   EDASYNM   EDASYNR   EPS    
ERRNLS    ERRORS    ETG       ETL       EXCEL     FMU       FOCCOMP   FOCCOMPW  FOCDEF 
FOCEXEC   FOCEXECU  FOCFTMAP  FOCPSB    FOCSQL    FOCSTYLE  FOCSTYLU  FOCTEMP   FOCUS  
GIF       GIFU      HLI       HOLDACC   HOLDMAST  HTML      HTMLU     IBICPG    JPG    
LSN       MAINTAIN  MAINTAIU  MASTER    MASTERU   MNTPAINT  OMI       PDF       PFA    
PFB       PS        SMARTLBW  SMARTLIB  SVG       TABS      TDL       TRF       TTEDIT 
TXT       WINFORMS  WINFORMU  WSDL      XHT       XML       XSD       XSL


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
Guru
posted Hide Post
Waz this is exellent stuff!! very useful!

cheers


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Gold member
posted Hide Post
Another way to do this is...
TABLE FILE SYSTABLE
PRINT NAME
WHERE TBTYPE EQ 'FOC'
END


It doesn't list the actual ".foc" files, but shows the masters in the path that are for FOCUS files. After all, the actual focus file does not have to be in the current path, but could be filedef'd or have the location specified in the master anywhere else on the drive or the network.



Windows: WF 7.6.2: SQL Server 2008 R2
 
Posts: 86 | Location: Chicago | Registered: August 03, 2007Report 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     System Tables [SOLVED]

Copyright © 1996-2020 Information Builders