Focal Point
[SOLVED] WF8 fex to read the files in the app folders

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

September 03, 2014, 04:36 PM
Doug
[SOLVED] WF8 fex to read the files in the app folders
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
September 03, 2014, 05:57 PM
Francis Mariani
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
September 04, 2014, 01:00 PM
Francis Mariani
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
September 05, 2014, 11:11 AM
Doug
Thanks Francis,
quote:
heaven knows where these are documented
I see that you were in touch with Heaven... Smiler
September 05, 2014, 01:32 PM
Doug
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...
September 05, 2014, 01:39 PM
Doug
OK, I know this is pushing my original request... But, how about something similar for fexes in the content folders? Big Grin
September 05, 2014, 02:23 PM
Francis Mariani
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
September 05, 2014, 02:37 PM
Doug
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...
September 05, 2014, 02:39 PM
Doug
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'

September 15, 2014, 10:54 AM
eric.woerle
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