Some other things I would try:

Change the statement
  0054.00 C                   CallP     SetNoDebug(*on)
to
  0054.00 C                   CallP     SetNoDebug(*off)

Turn debugging on (CGIDEBUG *ON), run the program, display the debugging output
(CGIDEBUG *DSPDATA), including the HTML written by the CGI program to see if it
is complete and, if not, where it failed.

If this give no hints, then use STRSRVJOB and STRDBG to debug the CGI program
and step through the code until the failure occurs.

I hope this helps.

Mel Rothman, CGIDEV2 Author
IBM eServer Custom Technology Center (eCTC), Rochester, Minnesota
http://www-1.ibm.com/servers/eserver/iseries/service/ctc/
http://www.easy400.ibm.it/en




Justin Houchin wrote:
>
> Mel I tried this and it still doesn't work....
>
> > <as400>Header
> > Content-type: text/html
> > <html>
> >  <head>
> >   <title>Reliatek, Inc. "Provinding Reliable Technology to
> Businesses"</title>
> >   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> >  </head>
> > <body>
> etc....
> ----- Original Message -----
> From: "Mel Rothman" <mel@rothmanweb.com>
> To: <web400@midrange.com>
> Sent: Tuesday, May 14, 2002 11:35 AM
> Subject: Re: [WEB400] CGIDEV2 Problems
>
> When the externally described HTML is in the IFS, make sure there are no
> blanks
> in the line following the Content-Type header.  In other words, the
> Content-Type
> header should be followed by two new lines, not a newline, some number of
> blanks, and another newline.
>
> Mel Rothman, CGIDEV2 Author
> IBM eServer Custom Technology Center (eCTC), Rochester, Minnesota
> http://www-1.ibm.com/servers/eserver/iseries/service/ctc/
> http://www.easy400.ibm.it/en
>
> Justin Houchin wrote:
> >
> > This is a multi-part message in MIME format.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > I am trying to run this CGIDEV2 program. When I execute the CGI, I get an
> HTTP500 Internal Server Error. I check the joblogs and the CGI program runs
> and ends normally, I think my problem is with the HTML, but am not
> positive..Any help would be great!!! Here is the CGI source....
> >
> > This source gets executed by this link
> http://68.59.64.83/cgi-bin/iteminq?XCAT=MOD
> >
> > 0015.00  /copy rtekcgi,hspecs
> > 0016.00 FP3030L1   IF   E           K DISK    UsrOpn
> > 0017.00 F                                     Rename(I3030:I3030L1)
> > 0018.00  /COPY RTEKCGI,C.PROTO
> > 0019.00  /copy rtekcgi,prototypeb
> > 0020.00  /copy rtekcgi,usec
> > 0021.00  *copy rtekcgi,variables1
> > 0022.00  *
> > 0023.00  *Number of variables
> > 0024.00 D nbrVars         S             10I 0
> > 0025.00  *
> > 0026.00  *Saved Query String
> > 0027.00 D savedquerystring...
> > 0028.00 D                 S          32767    Varying
> > 0029.00
> *---------------------------------------------------------------------
> > 0030.00  *Setup stand alone fields
> > 0031.00
> *---------------------------------------------------------------------
> > 0032.00 D Wsco            S              2A
> > 0033.00 D Wsdiv           S              2A
> > 0034.00 D XQty            S              5P 0
> > 0035.00 D StkStatus       S             25A
> > 0036.00 D Xsell           S              7P 2
> > 0037.00 D Xcat            S              3A
> > 0038.00 D Clearance       S              1A
> > 0039.00
> *---------------------------------------------------------------------
> > 0040.00  *Setup constant fields
> > 0041.00
> *---------------------------------------------------------------------
> > 0042.00 D initHTMlVars    C                   '0'
> > 0043.00
> *////////////////////////////////////////////////////////////////////*
> > 0044.00  *Setup Item Master Key List
> > 0045.00
> *////////////////////////////////////////////////////////////////////*
> > 0046.00 C     Itemkey       Klist
> > 0047.00 C                   Kfld                    Wsco
> > 0048.00 C                   Kfld                    Wsdiv
> > 0049.00 C                   Kfld                    Xcat
> > 0050.00 C*
> > 0051.00
> *////////////////////////////////////////////////////////////////////*
> > 0052.00  *Start Main Program Logic
> > 0053.00
> *////////////////////////////////////////////////////////////////////*
> > 0054.00 C                   CallP     SetNoDebug(*on)
> > 0055.00  *
> > 0056.00  *Add PCSTORE to library list
> > 0057.00 C                   CallP     #PushLib('PCSTORE')
> > 0058.00  *
> > 0059.00  *Set company and division to 1510
> > 0060.00 C                   Eval      Wsco = '15'
> > 0061.00 C                   Eval      Wsdiv = '10'
> > 0062.00  *
> > 0063.00  *Read output skeleton html from IFS into memory
> > 0064.00 C                   CallP     gethtmlifs('/rtekweb/test.html':
> > 0065.00 C                             '<as400>')
> > 0066.00  *
> > 0067.00  *Get input
> > 0068.00 C                   Eval      nbrVars =
> > 0069.00 C                             zhbgetinput(savedquerystring:qusec)
> > 0070.00 C***********        Eval      XCat = getenv('Query_String':qusec)
> > 0071.00  *
> > 0072.00  *Parse Input
> > 0073.00 C                   Eval      Xcat = zhbgetvar('XCAT')
> > 0074.00  *
> > 0075.00  *Write the HTML Header
> > 0076.00 C                   CallP     WrtSection('Header')
> > 0077.00  *
> > 0078.00  *Write the Item Number,Description,Availibility,Price Banner
> > 0079.00 C                   CallP     WrtSection('Banner')
> > 0080.00  *
> > 0081.00  *Read the Item Master File by Category
> > 0082.00 C                   Open      P3030L1
> > 0083.00 C     ItemKey       SetLL     I3030L1
> > 0084.00 C     ItemKey       ReadE     I3030L1
> > 0085.00  *
> > 0086.00 C                   Dow       (not %Eof)
> > 0087.00  *
> > 0088.00  *Check to see if item is a clearence item
> > 0089.00 C                   EvalR     Clearance = IMITM
> > 0090.00  *
> > 0091.00 C     IMDIV         IfEq      '10'
> > 0092.00 C     Xcat          AndEq     IMCAT
> > 0093.00 C     IMWEBS        AndEq     '1'
> > 0094.00 C     Clearance     AndEq     *Blank
> > 0095.00  *
> > 0096.00  *Check to see if item is "Available" or "In Stock"
> > 0097.00 C                   Eval      XQty = 0
> > 0098.00 C                   Eval      XQty = #CalcInv(Wsco:WsDiv:Imitm)
> > 0099.00 C                   If        XQty > 0
> > 0100.00 C                   Eval      StkStatus = 'In Stock'
> > 0101.00 C                   Else
> > 0102.00 C                   Eval      StkStatus = 'Available'
> > 0103.00 C                   EndIf
> > 0104.00  *
> > 0105.00  *Calculate the seling price
> > 0106.00 C                   Eval      Xsell = #PrceCalc(Wsco:WsDiv:Imitm)
> > 0107.00  *
> > 0108.00  *Update html skeleton buffer with values
> > 0109.00 C                   CallP     updHTMLvar('Item':IMITM)
> > 0110.00 C                   CallP     updHTMLvar('Desc':IMDSC)
> > 0111.00 C                   CallP     updHTMLvar('StkStatus':StkStatus)
> > 0112.00 C                   CallP     updHTMLvar('Price':IMITM)
> > 0113.00  *
> > 0114.00  *Write the Table Row
> > 0115.00 C                   CallP     WrtSection('TableRow')
> > 0116.00  *
> > 0117.00 C                   EndIf
> > 0118.00  *
> > 0119.00 C     ItemKey       ReadE     I3030L1
> > 0120.00 C                   EndDo
> > 0121.00  *
> > 0122.00 C                   Close     P3030L1
> > 0123.00  *
> > 0124.00  *Write the HTML Footer
> > 0125.00 C                   CallP     WrtSection('Footer')
> > 0126.00  *
> > 0127.00  *Remove PCSTORE from library list
> > 0128.00 C                   CallP     #PopLib('PCSTORE')
> > 0129.00  *
> > 0130.00  *Write the HTML Buffer to the Web Browser
> > 0131.00 C                   CallP     WrtSection('*fini')
> > 0132.00 C                   Return
> >
> > Here is the HTML that is located in my IFS....
> >
> > <as400>Header
> > Content-type: text/html
> >
> > <html>
> >  <head>
> >   <title>Reliatek, Inc. "Provinding Reliable Technology to
> Businesses"</title>
> >   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> >  </head>
> > <body>
> >
> > <as400>Banner
> > <table width="100%" bgcolor="000080">
> >  <tr>
> >   <td width="34%"><font color="#FFFFFF">ITEM NUMBER</font></td>
> >   <td width="43%"><font color="#FFFFFF">ITEM DESCRIPTION</font></td>
> >   <td width="9%"><font color="#FFFFFF"><div
> align="right">AVAILIBILTY</div></font></td>
> >   <td width="15%"><font color="#FFFFFF"><div
> align="right">PRICE</div></font></td>
> >  </tr>
> > </table>
> >
> > <as400>tablerow
> >  <table width="100%"bgcolor="lightsteelblue">
> >   <tr>
> >   <td width="26%">/%Item%/</td>
> >   <td width="46%"><a
> href="/cgi-bin/itemdsc?XITM=/%Item%/">/%Desc%/</a><br></td>
> >   <td width="6%"><div align="right">/%StkStatus%/</div></td>
> >   <td width="11%"><div align="right">/%Xsell%/</div></td>
> >  </tr>
> > </table>
> >
> > <as400>footer
> > </body>
> > </html>
> >
> > Thanks,
> >
> > Justin Houchin
> > Programmer
> > Reliatek, Inc
> > jhouchin9@charter.net
> >


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.