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] Use DOS command to generate XML file listing

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Use DOS command to generate XML file listing
 Login/Join
 
Master
posted
I would like to create a FEX file that uses a DOS command to generate a listing of data files from a WebFOCUS reporting server. The files would correspond to the files found under EDASERVE in a particular folder.

My end goal is to use the file listing to populate an HTML select control with filename choices. So the FEX would output the list of files in XML format.

So here are some data files under EDASERVE in a folder called "csv" under the main folder "sankey":

(Windows DOS command on WebFOCUS server...)

E:\>DIR E:\ibi\apps\sankey /b /s

(Result...)

E:\ibi\apps\sankey\csv\sankey_data_1.csv
E:\ibi\apps\sankey\csv\sankey_data_2.csv
E:\ibi\apps\sankey\csv\sankey_data_3.csv
E:\ibi\apps\sankey\csv\subfolder\sankey_data_4.csv

Ideally, my HTML application would populate a select box with the following choices based on the XML with the above filenames in it:

(Select control choices...)

sankey_data_1.csv
sankey_data_2.csv
sankey_data_3.csv
subfolder/sankey_data_4.csv

The HTML application would then use a D3 javascript library to load the selected CSV file's data to generate a Sankey diagram. I just need the relative path folder/filename XML info from the FEX.

Anybody done anything like this before?

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


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
Instead of DOS, can you try the WF APP command?:
APP QUERY IBISAMP HOLD
-RUN
TABLE FILE FOCAPPQ
PRINT FILENAME
IF FILENAME CONTAINS '.fex'
END 

or
TABLE FILE _EDAHOME/CATALOG/SYSAPPS 
PRINT APPLOC
      FNAME
      FEXT
IF APPNAME EQ ibisamp
IF FEXT EQ fex
END  

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
Master
posted Hide Post
Thanks, David. That's close. I need something that will report on *.txt or *.csv files that are in subfolders as well.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
Hey, David, I found that this is good enough:

APP QUERY SANKEY/CSV HOLD
-RUN
TABLE FILE FOCAPPQ
PRINT FILENAME
ON TABLE PCHOLD FORMAT XML
END

This retrieves any filename in folder "csv" under "sankey" in EDASERVE. That is good enough, as I'm requiring my two users of this application to put their data in the "csv" folder.

Thanks for the quick response!


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
I was able to populate an HTML select control with a list of filename choices residing in a particular folder under EDASERVE.

The HTML app with the control then launches another HTML app and passes it a filename; the second HTML app uses that file as a data source for creating a Sankey chart.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
SHARING:

AS A FORMER IBI'er I WOULD RECOMMEND DISABLING THE USE OF THE DOS (!) COMMAND. I WILL NOT GO INTO DETAIL BUT USE THEM AT YOUR OWN RISK AS THEY ARE A SECURITY RISK.

INSTEAD WHAT I WOULD DO AND HAVE DOME IS CREATE A PROGRAM THAT CAN BE CALLED WITH CALLPGM OR CALLJAVA THEY WAY THEY CANNOT DO SOMETHING THEY SHOULD NOT DO.




Scott

 
Posts: 865 | Registered: May 24, 2004Report 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] Use DOS command to generate XML file listing

Copyright © 1996-2020 Information Builders