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     [CLOSED] Delivering files through WebFOCUS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Delivering files through WebFOCUS
 Login/Join
 
Member
posted
I have some files in folders that I would like to make available to users, but the files are stored in protected folders so I cannot simply redirect the browser to the file on the server. I am looking for a way to deliver the file to the browser through FOCUS.

I see that FOCUS uses PG_file and PG_func to deliver PDFs and XLS, but I can't find any documentation on accessing those functions myself.

Is there any way to send static files to the browser from FOCUS?

Thanks!

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


WebFOCUS 7.6.x
Windows
Output: Excel, PDF, HTML
 
Posts: 11 | Registered: November 07, 2007Report This Post
Virtuoso
posted Hide Post
Not really. FOCUS can deliver records from a file, but there is no mechanism to grab a file where it exists and deliver it to a browser. In any case, it would need to access the directory the same way that a browser would, so I think that's a double dead-end.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
You could try ...

FILEDEF RTNFILE DISK {file location}

SET HTMLFORMTYPE = {filetype}

-HTMLFORM RTNFILE


You would have to test for each file type to see if it works.


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
Virtuoso
posted Hide Post
Use can use the EDAGET command to deliver a file to the browser.

For example, if I have a file called "baseapp/filename.txt", the fex would be:
APP ENABLE
EX EDAGET TXT,baseapp/filename,T
  


FYI: this fex has to be a server based fex. I do not believe this command will work in MRE.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
@Darin Lee: Our fexes have access to all the folders, but the browser should not.

@Waz: This is the direction we've been trying. It _almost_ works, but FOCUS mangles any file that wasn't generated in FOCUS originally before it gets to the browser. IBI tech support says "HTMLFORMTYPE" is unsupported in WebFOCUS.

@dhagen: This looks promising, but I cannot find very little documentation on it. Do you know where I can find more info? I keep getting a FILE NOT FOUND error, even though the file is definitely there.

Thanks for all your help.


WebFOCUS 7.6.x
Windows
Output: Excel, PDF, HTML
 
Posts: 11 | Registered: November 07, 2007Report This Post
Member
posted Hide Post
I got EDAGET to work only as well as HTMLFORMTYPE/HTMLFORM. That is: WebFOCUS tries to send the file to the browser, but mangles the file before the browser gets it. The browser will attempt to open the file but cannot interpret it.

Any other suggestions?

Thanks again for any ideas. This is basic Web App 101 stuff, I don't know why this is so difficult in WebFOCUS.


WebFOCUS 7.6.x
Windows
Output: Excel, PDF, HTML
 
Posts: 11 | Registered: November 07, 2007Report This Post
Expert
posted Hide Post
quote:
IBI tech support says "HTMLFORMTYPE" is unsupported in WebFOCUS


This is quite annoying, as there are many techniques stating the use of HTMLFORMTYPE, and to say that it is unsupported in WebFOCUS, is surprising.

I think there may be a giveaway that it is.
"HTMLFORMTYPE" is unsupported in WebFOCUS

Simplistically I think that it only works on text based files, not binary types.

You may also find that EDAGET is only supported for internal use, as this is what I found when I asked about EDAPUT.


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
Expert
posted Hide Post
If your Webserver is on the same box as WebFOCUS, or at lease can access a location, could you just copy the file to a location accessible to the webserver.

The only issue after that would be removing the file later.

Also not sure if FOCCACHE could be used. (Don't think it is in 7.1)


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
Member
posted Hide Post
Thanks Waz, that's what I'm finding, as well: text-based files okay; binary-types no joy.

sad face.


WebFOCUS 7.6.x
Windows
Output: Excel, PDF, HTML
 
Posts: 11 | Registered: November 07, 2007Report This Post
<JG>
posted
use ASP or JSP depending on the APP server

That will download any filetype and ask the user to save it before opening.

Take a look at this post where I gave a solution for both methods

[SOLVED]How to change the suggested name of the file to be saved
 
Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by jkyle:
I got EDAGET to work only as well as HTMLFORMTYPE/HTMLFORM. That is: WebFOCUS tries to send the file to the browser, but mangles the file before the browser gets it. The browser will attempt to open the file but cannot interpret it.


What kind of files are these? I can figure out the proper syntax, but I need to know what you are working with.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
@dhagen: PDF, jpg, anything really. The problem seems to be with binaries.


WebFOCUS 7.6.x
Windows
Output: Excel, PDF, HTML
 
Posts: 11 | Registered: November 07, 2007Report This Post
Expert
posted Hide Post
I wonder if there is a way to send the files to the WebFOCUSxx/temp directory.

For those that do not know, this is where, for example, PDF reports are placed before returning to the browser.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Delivering files through WebFOCUS

Copyright © 1996-2020 Information Builders