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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WF8 fex to read the files in the app folders

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] WF8 fex to read the files in the app folders
 Login/Join
 
Expert
posted
Is it possible for a fex to read the contents of the app folders for PDF files? Something like syscolum? What is the source table for such a request? I want to do an APP DELETEF on a bunch of files the have been held on the data servers and need a good way to see what's there.

Thanks in Advance for your insight...

This message has been edited. Last edited by: <Kathryn Henning>,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
This creates a report for all the app folders. It uses FOCAPPL AND FOCAPPQ commands (heaven knows where these are documented). I hope the comments in the code are self-explanatory. You can use the last TABLE FILE to narrow your search and then use a DIALOGUE MANAGER loop to delete your files.

-* list files in all app folders

-SET &ECHO=ON;

-* determine list of app folders
APP LIST HOLD
-RUN

-* allocate hold file that will contain focappq info for all app folder * important: append
FILEDEF HOLDFOCAPPQ DISK holdfocappq.ftm (APPEND
-RUN

-* read an app folder name into a variable
-READFILE FOCAPPL
-RUN

-* process each app folder
-REPEAT LOOP_END WHILE &IORETURN EQ 0;

-* create a list of all files in the specified app folder
APP QUERY '&APPNAME' HOLD
-RUN

-* add the list of files of the specified app folder to the list of files for all folders (appended)
TABLE FILE FOCAPPQ
PRINT *
ON TABLE HOLD AS HOLDFOCAPPQ FORMAT ALPHA
END
-RUN

-* read an app folder name into a variable
-READFILE FOCAPPL
-LOOP_END

-* create a report
TABLE FILE HOLDFOCAPPQ
PRINT *
WHERE FILENAME CONTAINS '.pdf'
END
-RUN


And, Heavens to Betsy, it works in WF 8.0.08.


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
The FOCAPPL AND FOCAPPQ commands are documented in "Developing Reporting Applications Release 8.0 Version 08".


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
Thanks Francis,
quote:
heaven knows where these are documented
I see that you were in touch with Heaven... Smiler
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
That's GREAT Francis... I did need to add a -SET for &APPNAME as it prompted me for it as an undeclared variable. But, this is in 8004. tahnks Again...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
OK, I know this is pushing my original request... But, how about something similar for fexes in the content folders? Big Grin
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I haven't done that yet, but I am quite interested in doing so.

The content is in a database, so I think you can add a data adapter connection to the CONTENT REPOSITORY (I'm capitalizing until I get bored, this appears to be the almighty location for life, the universe and everything) and then create metadata for the tables in the database.


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
Thanks Francis, That's what I suspected... We should, imho, have easy access to that DB... I'll be checking this out as well and checking back often... Smiler

quote:
the almighty location for life, the universe and everything
... and even Heaven itself if they get do that...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
BTW: I added a bunch or DEFINEs to do a count by appname across filetype and it works well... thanks again
DEFINE FILE HOLDFOCAPPQ
FILETYPE/A16 = IF FILENAME CONTAINS '.acx'  THEN 'ACX'
          ELSE IF FILENAME CONTAINS '.mas'  THEN 'MAS'
          ELSE IF FILENAME CONTAINS '.foc'  THEN 'FOC'
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
Doug,

Are you in WF8 or WF7? In 8 you should be able to query the table that holds the fex's directly, although I haven't had enough time with 8 yet to know what I need to ask for. I feel like Wep or someone else posted a thread about doing just that a while back.

If you figure it out, let me know because that will be something I'll want to know eventually.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report 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     [SOLVED] WF8 fex to read the files in the app folders

Copyright © 1996-2020 Information Builders