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


  • Subject: RE: Problems writing persistent CGI
  • From: "Stone, Brad V (TC)" <bvstone@xxxxxxxxxxxxxx>
  • Date: Mon, 10 Apr 2000 15:19:17 -0500

The persitent header should be written after the text/html header (with one
new line character in between), then the last header should be followed by
two new line characters.

Brad

> -----Original Message-----
> From: Bob Clark [mailto:bclark@ussafety.com]
> Sent: Monday, April 10, 2000 2:47 PM
> To: Midrange-L
> Subject: Problems writing persistent CGI
> 
> 
> I posted this to the Ignite list earlier today.  Was 
> wondering if anyone
> on this list might have a suggestion.
> 
> I'm trying to write my first Persistent CGI program in RPGLE.  It
> appears as if the links in my resulting Web page have the handle
> embedded in them correctly, but the Accept-HTSession: directive is
> appearing as plain text in the first line of the page.  I am writing
> this directive to standard output before I write anything 
> else(including
> header information).  I have included the a snippet from my program,
> maybe someone can tell me what I am doing wrong?
> 
> 
> C     $Main         BEGSR
>  *
>  *
> C     USERID        CHAIN     INTUSRRD
>  *
> C                   IF        (not %found) or (PASSWORD <> IUPWD)
> C                   eval      WrtMbr = 'HEADER    '
> C                   CALLP     #WrtSrcMbr(WrtLib : WrtFil : WrtMbr)
> *#WRTSRCMBR procedure writes static HTML to from a source member
> C                   eval      WrtDta=
> C                             '<center>' +
> C                             'ERROR!' +
> C                             '<br>' +
> C                             'Invalid User ID or Password!' +
> C                             '</center>' +
> C                             NewLine
> C                   else
> C                   if        (IUSTAT <> ' ')
> C                   eval      WrtMbr = 'HEADER    '
> C                   CALLP     #WrtSrcMbr(WrtLib : WrtFil : WrtMbr)
> C                   eval      WrtDta=
> C                             '<html>' +
> C                             '<center>' +
> C                             '<font size="+2">' +
> C                             'Welcome ' +
> C                             %trim(IUFNAM) + ' ' +
> C                             %trim(IULNAM) + ',' +
> C                             '<br><br>' +
> C                             'We are sorry, but your account'+'<br>'+
> C                             ' has not been activated yet.' +
> C                             '  Please try back later.' +
> C                             '</font>' +
> C                             NewLine
> C                   else
> C                   EXSR      GetDate
> C                   EXSR      MakeHandle
> C                   eval      WrtDta = 'Accept-HTSession:' +
> C                             %trim(Handle) + NewLine
> C                   EXSR      $WrtStout
> C                   eval      WrtMbr = 'HEADER    '
> C                   CALLP     #WrtSrcMbr(WrtLib : WrtFil : WrtMbr)
> C                   eval      WrtDta = '<html>' +
> C                             '<center>' +
> C                             '<font size="+2">' +
> C                             'Welcome ' +
> C                             %trim(IUFNAM) + ' ' +
> C                             %trim(IULNAM) + ',' +
> C                             '</font>' +
> C                             '<br><br>' +
> C                             '<a href="/cgi-bin/items.pgm/' +
> C                             %trim(Handle) +
> C                             '?userid=' +
> C                             %trim(IUUSID) + '">' +
> C                             'Go Shopping!' + '</a>' +
> C                             '</center>' +
> C                             '</html>' +
> C                             NewLine
> C                   endif
> C                   ENDIF
>  *
> C                   EXSR      $WrtStout
> 
> --
> Bob Clark
> Programmer/Analyst
> U.S. Safety
> 8101 Lenexa Dr.
> Lenexa Ks  66214
> Phone: (800) 821-5218 ext. 274
> Fax: (603) 761-6978
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.