sponsored links

Collapse

Announcement

Collapse
No announcement yet.

GetHtmlBufferP will not give buffer info

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • GetHtmlBufferP will not give buffer info

    Hi I have small cgidev2 based program to basically build xml - i plan to use the xml built to make soap call to webservice. I can compile and run program - it does not bomb/error but when i check the buffer info in debug it says *null. I am not sure what i am doing wrong. I can see output in html file that i output using writehtmltostmf though !!

    H*DFTACTGRP(*NO)
    /copy CGIDEV2/qrpglesrc,hspecs
    /copy CGIDEV2/qrpglesrc,hspecsbnd
    /copy CGIDEV2/qrpglesrc,prototypeb
    /copy CGIDEV2/qrpglesrc,usec
    FPOSTINF2 IF E DISK
    D 128A
    DP01_Rtn S 128A
    D OutBuffer s 32767 based(OutbufferP)
    D OutBufferInfo ds
    D OutBufferP *
    D OutBufferLen 10u 0
    D*GetHtmlBufferP pr 20

    /Free
    // Clear Html Buffer
    clrHtmlBuffer();

    GetHtml('HTMLSRC':'SRCLIB':'CNF':'/$');
    WrtSection('top');
    Setll 1 PostInf2;
    Read PostInf2;
    Dow not %EOF(PostInf2);
    UpdHtmlVar('d_name':name);
    UpdHtmlVar('d_value':valuesp);
    WrtSection('Display');
    Read PostInf2;
    EndDo;

    WrtSection('CloseDiv');
    Setll 1 PostInf2;
    Read PostInf2;
    Dow not %EOF(PostInf2);
    UpdHtmlVar('h_name':name);
    UpdHtmlVar('h_value':valuesp);
    WrtSection('Hidden');
    Read PostInf2;
    EndDo;

    WrtSection('End');
    OutBufferInfo = GetHtmlBufferP;
    WrtHtmlToStmf('/tmp/test.html': 819);

    WrtSection('*fini');

    *Inlr = *On;

    /End-Free

    Also, seems like the procedure is not available by itself to be used, we need to compile XXXWRKHTML to make it available???

    Appreciate any help that can be offered from forum !

  • #2
    Hello,

    When do you check the buffer? wrtHtmlToStmf will reset the buffer. When you check the buffer before excuting wrtHtmlToStmf, the address shouldn't be * NULL.

    Best regards

    Jan

    Comment


    • #3
      You are trying to use the data three different ways:
      Code:
      OutBufferInfo = GetHtmlBufferP;
      WrtHtmlToStmf('/tmp/test.html': 819);
      
      WrtSection('*fini');
      GetHtmlBufferP gets a pointer to the data. WrtHtmlToStmf writes the data to disk and WrtSection('*fini') forwards the data to Apache (typically used to return it from a browser session.)

      Surely you can't be using all of these?

      And your code does not use the OutBufferInfo data after it has retrieved it. That seems very strange to me, why do you retrieve it and then not use it?

      You're going to need to explain what you're trying to do, since this code doesn't make much sense.

      Comment

      sponsored links

      Collapse

      Working...
      X