|
Hi, Brad.
This same subject has recently been discussed in more detail in Yahoo's
Easy400Group.
Netting it out, there is a WrtNoSection subprocedure, which I forgot to add to
the documentation. It is documented in the PROTOTYPEB QRPGLESRC member.
Mixing WrtSection with #WrStout, which I assume uses QtmhWrStout, could be
tricky, because WrtSection's output is buffered until section *fini is written.
So, if the #WrStout output is to appear between WrtSection outputs, you have
to flush CGIDEV2's output buffer by writing *fini before calling #WrStout.
WrtNoSection, on the other hand, adds its output to CGIDEV2's output buffer.
The following would work:
Callp WrtSection('A *fini')
Callp #WrStout(parms)
Callp WrtSection('B C D *fini')
return
The following would not work as expected. #WrStout's output would appear
first, followed by A, B, C, and D.
Callp WrtSection('A')
Callp #WrStout(parms)
Callp WrtSection('B C D *fini')
return
The following would work (assuming somevar is varying):
Callp WrtSection('A')
Callp WrtNoSection(%addr(somevar)+2:%len(somevar))
Callp WrtSection('B C D *fini')
return
--
Mel Rothman, CGIDEV2 Author
http://www.easy400.ibm.it/en
Brad Stone wrote:
>
> I know Mel mentioned there was, but I couldn't find it in
> the docs.
>
> Either way, creating your own is very simple. You could
> even use my #WrStout subprocedure and use that. That's the
> beauty of ILE. I have both CGIDEV2 and my suprocedures
> availble and it makes life much easier. Because there are
> times when directly writing out HTML is more feasible that
> using a template. At least in IMHO.
>
> You can find my stuff in my books or at www.bvstools.com.
>
> Brad
> www.bvstools.com
>
> On Fri, 28 Jun 2002 15:10:50 -0700
> "Hatzenbeler, Tim" <thatzenbeler@clinitech.net> wrote:
> > This message is in MIME format. Since your mail reader
> > does not understand
> > this format, some or all of this message may not be
> > legible.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > Is there a way with the cgidev2 api's to directly write
> > hmtl code within the
> > RPG?
> >
> > I know I can create an html string, and then substitute,
> > into a variable in
> > the HTML template file, but I would like to skip that
> > step for some of my
> > code.
> >
> > I would like to be able to something like this.. And it
> > would write the
> > string to the output buffer. I looked at all the
> > provided prototypes and I
> > just couldn't see a match.
> > c callp wrthtml('<td>blah</td>')
> >
> > instead of:
> > c callp updhtmlvar('subvar':'<td>blah</td>')
> > c callp wrtsection('header *fini')
> >
> > Is this possible? Thanks, tim
> > This e-mail message, including any attachments, is for
> > the sole use of the
> > intended recipient(s) and may contain confidential or
> > privileged
> > information. Any unauthorized review; use, disclosure or
> > distribution is
> > prohibited. If you are not the intended recipient,
> > please contact the
> > sender by reply e-mail and destroy the message.
>
> Bradley V. Stone
> BVS.Tools
> www.bvstools.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.