|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hi Everyone, I just created a CGI Program that will read two items: ITEM NUMBER(IMITM) and ITEM DESCRIPTION(IMDESC) from file P3030L1. I have ran a debug on the program and everything looks like it should run correctly. But after I call the CGI Program on the web, I get a HTTP 500 Error. Please look to see if there is a problem with my code......Thanks F*////////////////////////////////////////////////////////////////////* F* F*Program Name:ITEMINQ F*Date Created:4/4/2002 F*Programmer:Justin Houchin(JHOUCHIN) F*Description:This CGI Program will look up a list of available items F*by the category F* F*Remember to bind QHTTPSVR/QZHBCGI Service Program F* F*////////////////////////////////////////////////////////////////////* F* F*Setup Files to be used F* FP3030l1 IF E K DISK F Rename(I3030:I3030L1) D* D*Setup Query_String Receive Data Structure D* D EnvDS E DS ExtName(RTEKCOMP) D EnvFile DS D File 1 10 Inz('RTEKCOMP ') D Lib 11 20 Inz('PCSTORE ') D* D WpError DS D EBytesP 1 4B 0 Inz(40) D EBytesA 5 8B 0 D EMsgID 9 15 D EReserved 16 16 D EData 17 56 D* D*Constants for writing HTML Head D* D HTTPHeader C CONST('Content-type:text/html') D NewLine C CONST(X'15') D* D*Setup the environmental vaiable buffer D* D EnvRec S 1024 D EnvLen S 9B 0 D EnvRecLen S 9B 0 Inz(%size(EnvRec)) D EnvName S 12 Inz('QUERY_STRING') D EnvNameLen S 9B 0 Inz(%size(EnvName)) D* D*Setup Convert to Database API Fields D* D CvtLen S 9B 0 Inz(%size(EnvDS)) D CvtLenAv S 9B 0 D CvtStat S 9B 0 D* D*Fields for HTML Data getting written to the Web D* D WrtDta S 1024 D WrtDtaLen S 9B 0 D* D*Define Generic Stand Alone Fields D Wsco S 2A D Wsdiv S 2A C*/////////////////////START OF MAIN LOGIC///////////////////////////// C* C*Setup Item Master Key List C* C Itemkey Klist C Kfld Wsco C Kfld Wsdiv C Kfld Xcat C* C Eval Wsco = '15' C Eval Wsdiv = '10' C* C* C*Read Query_String Variables C* C CallB 'QtmhGetEnv' C Parm EnvRec C Parm EnvRecLen C Parm EnvLen C Parm EnvName C Parm EnvNameLen C Parm WPError C* C*Convert to Database C* C If (EnvLen = 0) C Eval EnvLen = %size(EnvRec) C EndIf C* C CallB 'QtmhCvtDb' C Parm EnvFile C Parm EnvRec C Parm EnvLen C Parm EnvDS C Parm CvtLen C Parm CvtLenAv C Parm CvtStat C Parm WPError C* C*Write the HTML Header C* C Eval WrtDta = %trim(HTTPHeader) + C NewLine C ExSr $WrStout C* C Eval WrtDta = '<html><head>' + C '<title>' + C 'ReliaTeK, Inc. "Providing' + C 'Reliable Technology to' + C 'Businesses"' + C '</title></head><body>' + C NewLine C* C ExSr $WrStout C* C*Start of Main Logic Processing C* C ItemKey SetLL I3030L1 C ItemKey ReadE I3030L1 30 C* C *in30 DowNe *on C* C IMDIV IfEq '10' C XCAT AndEq IMCAT C Eval WrtDta = '<TR>' + NewLine + C '<TD>' + %trim(IMITM) + '</TD>'+ C '<TD>' + %trim(IMDSC) + '</TD>'+ C NewLine + '</TR>' C C* C ExSr $WrStout C* C Else C EndIf C ItemKey ReadE I3030L1 30 C EndDo C* C*Write the HTML Footer C* C Eval WrtDta = '</body></html>' + C NewLine C ExSr $WrStout C* C Seton LR C* C******************************************************************** C*Start of Write Standard Out Sub-Routine C* C $WrStout BegSr C* C Eval WrtDtaLen = %len(%trim(WrtDta)) C* C CallB 'QtmhWrStout' C Parm WrtDta C Parm WrtDtaLen C Parm WPError C* C EndSr Thanks For the Help Justin Houchin Programmer Reliatek, Inc
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.