|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hi Everyone, Is it possible to write an HTML page to the IFS and to display another HTML page in the same program? I am trying to do this and am having problems. When my CGI program executes, if the user had entered a "Ship to Zip Code", the program calls this sub procedure. 0001.00 H NOMAIN 0002.00 *--------------------------------------------------------------------- 0003.00 *Sub Procedure Name:F.CTUPSXML 0004.00 *Programmer: Justin Houchin(JHOUCHIN) 0005.00 *Description: This Sub Procedure will accept a postal code, service 0006.00 *code, and package weight and create a XML file to submit to UPS for 0007.00 *shipping rate calculation 0008.00 *Parms passed into procedure: postal code, service code, package 0009.00 *weight 0010.00 *--------------------------------------------------------------------- 0011.00 /copy jcopysrc,hspecs 0012.00 *--------------------------------------------------------------------- 0013.00 *--------------------------------------------------------------------- 0014.00 *Copy in prototypes 0015.00 *--------------------------------------------------------------------- 0016.00 /COPY JSUBSRC,C.PROTO 0017.00 /copy jcopysrc,prototypeb 0018.00 /copy jcopysrc,usec 0019.00 *--------------------------------------------------------------------- 0020.00 *Setup stand alone fields 0021.00 *--------------------------------------------------------------------- 0022.00 D Job S 15A 0023.00 D OutPath S 1024 0024.00 D rc S 10I 0 0025.00 D Code S 10U 0 Inz(819) 0026.00 *////////////////////////////////////////////////////////////////////* 0027.00 *(#CrtUpsXml) Create UPS XML File in the IFS to send to UPS 0028.00 *////////////////////////////////////////////////////////////////////* 0029.00 P #CrtUpsXml B Export 0030.00 *====================================================================* 0031.00 D #CrtUpsXml PI 0032.00 D ZipCode 5A 0033.00 D ServiceCode 2A 0034.00 D Weight 7P 2 0035.00 *====================================================================* 0036.00 * 0037.00 *Retrieve the current job number. I do this so that each XML file 0038.00 *that is created in the IFS is attached to the job that created it. 0039.00 C Eval Job = GetSessionId 0040.00 C CallP ClrHTMLBuffer 0041.00 *Read the UpsSendTemplate from the IFS into memory 0042.00 C CallP GetHtmlIfs('/rtekweb/cgihtmlsrc/+ 0043.00 C UpsSendTemplate.xml') 0044.00 C CallP UpdHtmlVar('ZipCode':ZipCode) 0045.00 C CallP UpdHtmlVar('ServiceCode':ServiceCode) 0046.00 C CallP UpdHtmlVar('Weight':%char(Weight)) 0047.00 C CallP WrtSection('all') 0048.00 * 0049.00 C Eval OutPath = '/rtekweb/xml/'+ Job +'.xml' 0050.00 C Eval rc = WrtHtmlToStmf(%trim(OutPath):Code) 0051.00 ***Call GETURI Next 0052.00 C Return 0053.00 *====================================================================* 0054.00 P #CrtUpsXml E After this sub procedure runs, it returns back to the main program and writes a message to the browser that the page in the IFS was created.. 0142.00 *///////////////////////////////////////////////////////////////////// 0143.00 C CallP ClrHTMLBuffer 0144.00 C CallP GetHtmlIfs('/rtekweb/cgihtmlsrc/+ 0145.00 C basket.htm') 0146.00 *///////////////////////////////////////////////////////////////////// Update HTML Stuff here 0418.00 C CallP WrtSection('footer *fini') The problem is that when this procedure runs, I get a message in the CGIDEBUG file that Permission was denied. I made sure that the file didn't already exist before the sub procedure ran. My message page displays correctly but no file in the IFS. Here is the catch, I modified this same sub procedure to run as a standalone app, I call it from the command line, and it works great, my file is created and everything looks correct. Any ideas? Justin Houchin Programmer and Web Developer ReliaTek, Inc justin@reliatek.com --
As an Amazon Associate we earn from qualifying purchases.
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.