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



Peter,

I've been working alot with debugging CGI programs.  Here's what I do.  I
use QCMDEXC to delay the job for 60 seconds, and then I'll look in the
subsystem QHTTPSVR for the job that is currently delayed.  Then use the
STRSRVJOB and STRDBG to debug the program.  Hope this helps.  I'm on V5R3
is there an easier option?

Ciao!
Michael Schutte
Classic Italian dishes with a Bob Evans Twist - Enjoy our new Homestyle
Pastas!


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/20/2006 04:21:48 PM:

Hi list:

My BIG issue here is on the calculations, but let me present the
scenario.

Background
This program was working perfectly before we had our High Availability
Project and now we have a test box and a production box.  We use ALDON
LM(i) to maintain our programs.  Two days ago we had to update the source

and eliminate an obsolete file and add the new one.  Looked like a simple

task to do.  We compiled and promoted to production.  By the way, the
binding directory is called CGIBNDDIR in QGPL and it has QTMHCGI *SRVPGM
from QTCP library.

Objective of the program
This is supposed to list manufacturing detail data on the browser,
depending on the manufacturing order number that is coming from a
previous
screen.

Issue
The variable below called "EnvDataLen" is returning a zero.  I know this
because if it was not zero, I would have data displayed on the browser.
As
I explained before, it was working before.  I do not why is not working.

See the following specifications:

     hDftActGrp(*No) BndDir('CGIBNDDIR')
     fitmrval0  if   e           k disk    usropn prefix(i)
     fmomast    if   e           k disk    usropn prefix(m)
     fmorout    if   e           k disk    usropn prefix(r)
     fpstdtll0  if   e           k disk    usropn prefix(d)
     fmomastz3  if   e           k disk    usropn
     fmohmstz3  if   e           k disk    usropn
      *
      * QtmhWrStout
      * API that the program will use to pass
      * the HTML text back to the server
     DWriteWebData     PR                  ExtProc('QtmhWrStout')
     D  Data                               Like(WebData)
     D  Length                       10I 0 Const
     D  Error                              Like(APIError)
      *
      * QtmhGetEnv
      * API that the program will use to retrieve the query string
     DGetEnvData       PR                  ExtProc('QtmhGetEnv')
     D  Data                               Like(EnvData)
     D  AvailLen                     10I 0 Const
     D  ReturnedLen                  10I 0
     D  EnvName                      30A   Const
     D  EnvNameLen                   10I 0 Const
     D  Error                              Like(APIError)
      *
      *
     DAPIError         DS
     D  EBytesP                      10I 0 Inz(40)
     D  EBytesA                      10I 0
     D  EMsgID                        7A
     D  EReserved                     1A
     D  EData                        40A
      *
      * The WebOut variable is used to build the HTML string.
      * The subfields WebDataLen and WebData are what are
      * actually passed to the API.
     D                 DS
     DWebOut                       2048A   Varying
     D  WebDataLen                    5I 0 Overlay(WebOut)
     D  WebData                    2048A   Overlay(WebOut:*Next)
      *
      *   Constants for HTTP output
     DHTTPHeader       C                   'Content-type: text/html'
     DNewLine          C                   X'15'
      *
      *   Constants and storage for the query string
     DQueryString      C                   'QUERY_STRING'
     DEnvDataLen       S             10I 0
      *
     DEnvData          DS
     D   StartAtOrd                        Like(mordno) inz
     D   StartAtStep                       Like(ropseq) inz
      *-----------------------------------------------------------
      * --- M A I N   L O G I C ---
      *-----------------------------------------------------------
     C                   Exsr      Inzsr
      * Determine if a key was supplied and if so position to
      * the appropriate record. If no key supplied position to
      * beginning of file.
     C                   CallP     GetEnvData(EnvData : %Len(EnvData) :
     C                             EnvDataLen : QueryString :
     C                             %Len(QueryString) : APIError )
      *
      * Prepare and write titles for page
     C                   Exsr      HTML_Headings
      *
      * Get Item Information
     C                   If        EnvDataLen <> 0
     .
     .
     .



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.