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



Make sure you don't have any spaces in front of or behind the <AS400>
tags. '<AS400>' is not the same as ' <AS400>'. I've seen this in the past.



From:
Florin Todor - YYZ Concord <ftodor@xxxxxxxxxxxxxxxx>
To:
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Date:
06/02/2010 01:49 PM
Subject:
RE: CGIDEV2 XML Section Not Found
Sent by:
<rpg400-l-bounces@xxxxxxxxxxxx>



I never used this kind of syntax for a CGIDEV2 XML (could be okay, but
I've never seen it).
The Section names are usually declared like:

<!-- $AUTH$ -->

Probably this is your problem; my .02 cents...


Florin Todor



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Versfelt, Charles
Sent: Wednesday, June 02, 2010 2:34 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: CGIDEV2 XML Section Not Found



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

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.