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




I'm trying to create an XML document using CGIDEV2.

My first section is coming up incomplete.
All other sections are not coming out at all.
The latter sections, I'm getting the message in CGIDEBUG:

WrtSection: Section AUTH not found.
(for every other section.)

My XML source (OPXMLBCH) looks like this:

<AS400>TOP
<?xml version="1.0" encoding="UTF-8"?>
<transRequest RequestCount=/%OCOUNT%/>
<AS400>AUTH
<newOrder BatchRequestNo=/%OCBCH#%/>
<industryType>/%OCINDS%/</industryType>
<transType>/%OCTRTP%/</transType>
</newOrder>
<AS400>MARK
<markForCapture BatchRequestNo=/%OCBCH#%/>
<txRefNum>/%OCTREF%/</txRefNum>
</markForCapture>
<AS400>ENDDAY
<endOfDay BatchRequestNo=/%OCBCH#%/>
<bin>/%OCCBIN%/</bin>
<merchantID>/%OCMRID%/</merchantID>
<terminalID>/%OCTRID%/</terminalID>
</endOfDay>
<AS400>BOTTOM
</transRequest>


In my RPG program I'm doing this:

DocName = 'OPXMLBCH';
callp gethtml('HTMLSRC': '*LIBL' : DocName: '<AS400>');
CodePage = 819;
callp UpdHtmlVar('OCOUNT':OCOUNT);
callp wrtsection('TOP');

I loop through the various sections, doing a callp to UpdHtmlVar for all my variables and then calling
Wrtsection for each:

callp wrtsection('AUTH');

And then at the end

rc = WrtHtmlToStmf(XML_Output:CodePage);

All I get in the file is PART of Top, specifically:

<?xml version="1.0" encoding="UTF-8"?>

I don't get my <transRequest RequestCount=/%OCOUNT%/> line...

And every other section it says "WrtSection: Section AUTH not found." in CGIDEBUG.

Has anyone seen this?
Any suggestions?

Thanks,
Charlie

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.