Focal Point
PCHOLD and file name
November 06, 2006, 11:14 AM
Francis MarianiPCHOLD and file name
I would like to run a request on my WebFOCUS server and hold the output on the local workstation.
TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE PCHOLD AS H001 FORMAT TAB
END
When I run this request, I get a Windows dialog box "File Download - Security Warning" with this message: "Do you want to save this file? Name: ibiweb, Type: Unknown File Type".
I would like the file name to be H001 with an extension of .tab and have the Windows dialog box specify that.
Does anyone know how to do this?
Thanks.
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
November 06, 2006, 11:48 AM
RichHI have seen this technique used. It may do the trick for you.
-SET &RADDR='Computer_pc_address';
-SET &A='\\' || &RADDR || '\' || 'C';
-SET &E='\bose.htm';
FILEDEF BOSE DISK &A&E
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD AS BOSEFORMAT HTML
END
Define RADDR in ibicommd.wfs to &REMOTE_ADDR.
Rich
WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
November 06, 2006, 04:55 PM
Francis MarianiRich,
Thanks - that's a very intriguing solution, unfortunately, since the request is made from a web browser URL on the UNIX server I cannot determine the name of the PC that the request was made from.
Thanks.
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
November 06, 2006, 05:11 PM
RichH-SET &RADDR=&REMOTE_ADDR;
The &REMOTE_ADDR should be a browser variable of the pc submitting the request that should get picked up if it's passed in the client.
WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
November 06, 2006, 05:15 PM
Francis MarianiRight! Thanks.
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
November 07, 2006, 09:46 AM
<lfrerker>Francis,
Did you get this to work? If so, would you please post your code -- I have end-users who need to access their hold files and at this point I have to ftp them to my hard drive and e-mail them to the users.
Thanks,
Linda Frerker
November 07, 2006, 11:23 AM
Francis MarianiNot exactly.
To activate what was discussed, this is what you do:
- Open the WebFOCUS Administration Console in a web browser window
Http://server-name/ibi_html/wfconsole.htm
- Login
- Click on Configuration
- CLick on Custom Settings
- Add the following line to the end of the text in the Custom Settings window:
<SET> REMOTE_ADDR = &REMOTE_ADDR (pass)
- Click Save to save your changes
- Click Logout
You should now have a Dialog Manager variable called &REMOTE_ADDR available every time a piece of WF code is run.
For some reason this does not work on my Dev server where the WF client is CGI. On my local server where the WF client is WFServlet, the
<SET> REMOTE_ADDR
command works correctly.
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
November 07, 2006, 11:36 AM
Tony ASetting the REMOTE_ADDR as Francis has stated is the suggested and prefered way to do it, as this updates the site.wfs file.
The method Rich suggested will still function, but the file is not normally accessible from standard administration screens and therefore one would require access to locate and write to the Server's files. The other aspect of this is that there are many other settings within the ibicommd.wfs file that should not be tampered with unless you know what you are doing.
I'm not advocating
not following Rich's suggestion, merely advising that you should follow Francis' lead in this respect.
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 | |
November 07, 2006, 01:48 PM
Francis MarianiTony, any guess as to why the custom setting is working on my WFServlet server and not on my CGI server?
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
November 08, 2006, 03:31 AM
Tony AFrancis,
Not sure, although I would use the
<SET>REMOTE_ADDR(PASS)
if you just want the variable passed with the same name. If you want to change the name then use -
<sendvar>
REM_ADDR=&REMOTE_ADDR
<endsendvar>
Unfortunately I don't use CGI (neither access it) as from release 7.1.1 the servlet is the way to go (?) and I don't really want to start changing my Client's settings, even for a short while. I only have apache installed locally without IIS so no CGI there anyway.
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 | |
November 08, 2006, 11:02 AM
Francis MarianiTony, thanks! Both your suggestions work in WFServlet.
As I pointed out in
https://forums.informationbuilders.com/eve/forums/a/tpc/...021071381#9021071381 the documentation is confusing regarding these HTTP Header Variables.
This works in WFServlet:
<SET> AUTH_TYPE (pass)
<SET> CONTENT_LENGTH (pass)
<SET> CONTENT_TYPE (pass)
<SET> DOCUMENT_ROOT (pass)
<SET> HTTP_ACCEPT (pass)
<SET> HTTP_ACCEPT_ENCODING (pass)
<SET> HTTP_ACCEPT_LANGUAGE (pass)
<SET> HTTP_USER_AGENT (pass)
<SET> HTTP_REFERER (pass)
<SET> PATH_INFO (pass)
<SET> PATH_TRANSLATED (pass)
<SET> QUERY_STRING (pass)
<SET> REMOTE_ADDR (pass)
<SET> REMOTE_HOST (pass)
<SET> REQUEST_METHOD (pass)
<SET> SCRIPT_NAME (pass)
<SET> SERVER_NAME (pass)
<SET> SERVER_PORT (pass)
<SET> SERVER_PROTOCOL (pass)
<SET> SERVER_SOFTWARE (pass)
<SET> URL_PROTOCOL (pass)
To get back to the original question, I don't see how RichH's suggestion would work -
-SET &HFILE='\\' || &REMOTE_ADDR || '\' || 'C\demo.htm';
FILEDEF DEMO DISK &HFILE
assumes that the workstation has sharing enabled on the C drive.
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
November 08, 2006, 11:32 AM
Tony AFrancis,
Glad it worked for you.
You're right regarding the implied share and it is always the thing that gets overlooked
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 | |