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 = '<HTML><TITLE>TEST</TITLE><BODY> C <H1>Test --- Test<BR></BODY></HTML>' 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
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.