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



Hi Charles,

I'm trying to reproduce your problem, but I cannot. Here's the RPG code I used (I did my best to derive this from your posts):

H DFTACTGRP(*NO)

/copy hspecsbnd
/copy prototypeb
/copy usec

D DocName s 10a
D CodePage s 10i 0
D rc s 10i 0
D Xml_Output s 100a varying
D OCOUNT s 10a varying inz('123')

/free
Xml_Output = '/home/klemscot/xmltest.xml';

DocName = 'OPXMLBCH';
callp gethtml('HTMLSRC': '*LIBL' : DocName: '<AS400>');
CodePage = 819;
callp UpdHtmlVar('OCOUNT':OCOUNT);
callp wrtsection('TOP');
callp wrtsection('AUTH');
rc = WrtHtmlToStmf(XML_Output:CodePage);
*inlr = *on;
/end-free

When I run this, I get no errors. My 'xmltest.xml' file is written successfully to the IFS and contains data from /both/ the TOP and AUTH sections. Granted, several of the variables say **Missing Data** because I didn't add the extra UpdHtmlVar() lines, but this doesn't seem to be related to the problem you describe.

So I'm at a loss... all I can say is "works for me, using your code".

And you're absolutely right that using <AS400>AUTH should (and does!) work fine. It looks idiotic, IMHO... but it certainly works.


On 6/2/2010 3:21 PM, Versfelt, Charles wrote:
Hi,

Thanks for all the replies.

All of my<AS400> lines start with the first character, no spaces before.
Exactly like this:

<AS400>TOP
<AS400>AUTH
<AS400>MARK
<AS400>AUTHMARK
<AS400>ENDDAY
<AS400>BOTTOM

Subsequent lines (the XML content) are indented.
I tried moving the first and last lines of the XML content also to character 1. No impact.
I don't think all the XML has to start in character 1?

Here are all my beginning and ending tags. (I left out some of the XML fields for space sake)

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

To those who suggested different syntax: That's not how it was done in the CGIDEV2 sample programs,
I'm not sure why the syntax would have to be different.

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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.