× 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.



Are you reading the replies? :)

1. Don't put a space between the two NewLine.
2. Call QtmhWrStout with just the header.

Example:

>  C                   EVAL      WrtData ŠNewLine + NewLine
>  C                   eval      WrtDtaLen Š%len(%trim(WrtDta))
>  C                   CALLB     'QtmhWrStout'
>  C                   PARM                    WrtData
>  C                   PARM                    WrtDtaLen
>  C                   Parm                    QUSEC

3. Now do your html stuff, and call the api again.

Example:

>  C                   eval      wrtdta Š'<html><body>HelloWorld +
>  C                             </body></html>'
>  C                   eval      WrtDtaLen Š%len(%trim(WrtDta))
>  C                   CALLB     'QtmhWrStout'
>  C                   PARM                    WrtData
>  C                   PARM                    WrtDtaLen
>  C                   Parm                    QUSEC

Phil

> -----Original Message-----
> From: web400-admin@midrange.com [mailto:web400-admin@midrange.com]On
> Behalf Of Mangavalli, Ramanujam
> Sent: Tuesday, September 18, 2001 5:16 PM
> To: 'web400@midrange.com'
> Subject: RE: [WEB400] HTTP Server Problems.
>
>
> Yes actually 3 empty lines.
>
> Here is the code:
> D NewLine         C                   X'15'
> D Httpheader      C                   'Content-type: text/html'
>
>  C                   EVAL       WrtData
>  C                                         NewLine   + ' ' + newline
>
>  C                   EVAL       WrtDtaLen
>  C                   WRITE     RCD001                               77
>
>  C                   IF        PageOverFlow
>
>  C                   WRITE     Header
>
>  C                   EVAL      PageOverFlow
>  C                   ENDIF
>
>  C                   CALLB     'QtmhWrStout'
>
>  C                   PARM                    WrtData
>
>  C                   PARM                    WrtDtaLen
>
>  C                   Parm                    QUSEC
>
>    .....
>    ......
> How do I determine an error? I put the program in debug. No errors at all.
> Or atleast no messages in the job log.
>
>
> -----Original Message-----
> From: Anton Gombkötö [mailto:Gombkoetoe@ASsoft.com]
> Sent: Tuesday, September 18, 2001 5:01 PM
> To: web400@midrange.com
> Subject: Re: [WEB400] HTTP Server Problems.
>
>
> At 16:40 18.09.01 -0400, you wrote:
> >Folks, I tried posting this on the RPG400 group. But I think this is the
> >right place since the RPG program seems to work fine.
>
> I do think so, too. But i'm not confessed that the RPG is right :-)
>
> >I have an RPG program that reads an HTML source member from a source
> >physical file and writes to the Standard Output using the
> QtmhWrStout API.
> I
> >have been told in the RPG 400 forum that I need the Content
> Type: text/html
> >header in the HTML member. I checked that.
>
> And you have an empty line after it?
> something like contenttype + CRLF + CRLF ?
>
> >But when the RPG CGI program is invoked from the browser using the POST
> >method, the program runs but IE6.0 returns error 500.
> >NS6.1 also returns 500 but also has a line that says "Interal error:
> >execve() failed. Any clues? The HTML member contains a lot of
> Java Script.
>
> This is definitely not a JavaScript issue.
>
> 500 means that there has been a problem on the server.
>
> Normally, when i receive 500's, i have something wrong in my RPG programs.
> Check out the joblog of your HTTP-server jobs. (When you used defaults,
> then you can use WRKACTJOB JOB(DEFAULT) to find them.) User is QTMHHTTP.
> When you're the only user, it's the BCI-job with more than 0.0
> CPU seconds.
>
> >Also, do I need to "turn on" logging? I had specified the log
> file name but
> >nothing is being created.
>
> That is another issue. But you won't see anything else than the 500,
> nothing that helps you. Just for statistical purposes.
>
> >To make sure that the configuration is right, I wrote another program to
> >display Hello World. This one works. But the first one does not.
>
> Well, that proves that the second program is working, not necessarily the
> first one. Could be security issues etc.
>
>
> Mit freundlichen Grüssen / best regards
> Anton Gombkötö
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/web400
> or email: WEB400-request@midrange.com
> 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 ...

Follow-Ups:
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.