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



I think you need two newlines after your httpheader


Andrew Renk
Sr. Programer
Chambers & Owen, Inc.
P.O.Box 1489
1733 Morse Street
Janesville, Wi 53547-1489

Voice: (608) 752-7865 x252
Fax: (608) 752-3126
Email: acr12345@chambers-owen.com
http://www.chambers-owen.com

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.  If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.  Please note
that any views or opinions presented in this email are solely those of
the author and do not necessarily represent those of the company.



-----Original Message-----
From: web400-admin@midrange.com [mailto:web400-admin@midrange.com] On
Behalf Of Justin Houchin
Sent: Friday, April 12, 2002 8:18 AM
To: web400@midrange.com
Subject: [WEB400] HTTP 500 Error

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








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

----------------------------------------
The attachment 'message_body' was successfully scanned for known
viruses.  It is not guaranteed, however, to be virus-free.


----------------------------------------



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.