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



That did it. Quick question, why do I need two?

Thanks for the Help
Chris

>>> jmpenasse@xxxxxxxx 10/10/03 07:56AM >>>
Try to had a second Newline at the end of the http header :
 
.../...
C                   EVAL      WrtDta = HTTPHeader                       
C                   EVAL      WrtDta = %TRIM(WrtDta) + NEWLINE 
C                                               + NEWLINE          
C                   EXSR      WRSTDOUT                           
.../...       

Chris Piper <Cpiper@xxxxxxxxxxxx> wrote:
Can someone point me in the right direction with my first RPG CGI. I am having 
problems with my CGI RPG program. I am getting 500 error when I get there. The 
program is a SQL RPG which I compiled to a module (with CRTSQLRPGI *MODULE), 
then bound with the service program QZHBCGI in QHTTPSVR using CRTPGM. I know 
the web server is running the program, it appears I am having problems with 
QtmhWrStout. I have included the code snippets ...

RPG:
D NEWLINE C CONST(X'15') 
D HTTPHeader C CONST('Content-type: text/html') 
D APIOut C CONST('QtmhWrStout') 
D WPError DS 
D EBytesP 1 4B 0 
D EBytesA 5 8B 0 
D EMsgID 9 15 
D EReserverd 16 16 
* 
D WrtDta S 1024A 
D WrtDtaLen S 9B 0 INZ(1024) 

C EVAL WrtDta = HTTPHeader 
C EVAL WrtDta = %TRIM(WrtDta) + NEWLINE 
C EXSR WRSTDOUT 
C EVAL WrtDta = ' 
C Test --- Test
' 
C EVAL WrtDta = %TRIM(WrtDta) + NEWLINE 
C EXSR WRSTDOUT 

C WRSTDOUT BEGSR 
* 
C EVAL EBytesP = %SIZE(WPError) 
C EVAL WrtDtaLen = %LEN(%TRIM(WrtDta)) 
C CALLB APIOut 
C PARM WrtDta 
C PARM WrtDtaLen 
C PARM WPError 
* 
C ENDSR 

If someone thinks it may be elsewhere, let me know what you need to see.

Thanks For the Help
Chris


Chris Piper
Systems Analyst
Stant Manufacturing, Inc.
765.827.8121
cpiper@xxxxxxxxxxxx 


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





---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
_______________________________________________
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 ...

Follow-Ups:

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.