× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey  Mike;

You can use the RPG CGI, but you have to set the contentstype in the HTTP-header for the right MIME type

for rtf it is "application/rtf" or "text/richtext"



----- Original Message ----- From: "Mike Cunningham" <MCUNNING@xxxxxxx>
To: "Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx>
Sent: Wednesday, March 15, 2006 5:04 AM
Subject: [WEB400] using rpg cgi to send a .csv or .rtf file


I have done some RPG CGI to sent html files but I would now like to send
the user a .csv file that will open in Excel or a .rtf file that will
open in Word or a .vcs file that will open in Outlook. Is it possible to
use the same RPG CGI technique to do this (e.g. load a base file from
the IFS and use the CGI commands to replace the variable data and then
send the file like it was HTML) ? Or would I need to save the file back
to the IFS in a directory that the Apache server can serve from and then
do an HTML redirect to get he users browser pointed to that file ? In my
case I want to be able to let a student click on a button on a web page
and then convert the students class schedule into a .vcs file (already
have that code) that will be sent immediately and present the student
with the normal "Open" or "Save" prompt from their browser.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.