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



Thanks Henrik,
That certainly helped. Not sure why it came in with the wrong CCSID but
I'm thinking we'll have to incorporate a fix for that.

Now I just have to figure out why its not reading the file LOL



Try to change the IFS file to CCSID 1208 (CHGATR)


On Thu, Aug 29, 2013 at 2:18 PM, RPGLIST <rpglist@xxxxxxxxxxx> wrote:

Scott,
I always appreciate your responses. I opened the document in a web
broswer and then copied and pasted it in my email response.... my
apologies I will avoid doing that in the future.

Those (+) and (-) are not in my file.

The original file from the shipper appears as one long string and I was
trying to make it more readable.

I just checked the encoding on the file in the IFS and its 819.


Dutch,

This isn't a valid XML document. This looks like the result you'd get
if you opened an XML document in a web browser, then copy/pasted from
the display into a file and saved it to disk.

The problem that causes is that the web browser adds expand/collapse
icons to the left-hand side of the display. They look like little +
or
- signs -- and when you copy/paste that into a file, you add the
little
symbols to your XML

In your example (which is quoted below) you'll see that there's a -
(minus) symbol in between the <?xml?> processing information and the
<TransactionSet> tag -- this is not allowed by XML standards.

If you remove those, it should parse, unless you also have a CCSID
problem.

It's important to understand that XML-INTO/XML-SAX ignore the
'encoding="UTF-8"' that's at the top of the XML document. Instead,
they
use the CCSID that's configured in the file description on disk. So
you
should make sure that the CCSID on the actual disk file is set to the
proper encoding for your data. (And, make sure you know what that
encoding is!)


On 8/28/2013 12:07 PM, RPGLIST wrote:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <TransactionSet
xmlns="http://www.blahblahblah.com/transaction/tscfeed/1.0";>
- <InterchangeHeader>
<GUID>6f58f8674a7ef23</GUID>
<TransDate>2012-09-21</TransDate>
<TransTime>18:26:39:38</TransTime>
<Version>V2.0</Version>
<TransCode>LIC</TransCode>
<Sender>WALMT</Sender>
<Receiver>CWTS</Receiver>
<TestProdInd>P</TestProdInd>
</InterchangeHeader>
</TransactionSet>

There is more to the doc but this is all I'm trying to capture right
now.

Here is the code I'm using (modified from a Klemment example:

0002.01 D TransactionSet ds qualified
0002.02 D dim(999)
0002.03 D InterchangeHeader...
0002.04 D likeds(IntChgHeader_t)
0002.05 D
0002.06 D IntChgHeader_t ds qualified
0002.07 D based(template)
0002.08 D GUID 15a
0002.09 D TransDate 10a
0002.10 D TransTime 11a
0002.11 D Version 4a
0002.12 D TransCode 3a
0002.13 D Sender 5a
0002.14 D Receiver 5a
0002.15 D TestProdInd 1a
0002.16
0020.00
0021.00 D x s 10i 0
0022.00 D xmlfile s 1000a varying
0023.00 D options s 100a varying
0024.00 D divider s 52a
0025.00
0026.00 /free
0029.00 xmlfile = '/HOME/WALMT.XML';
0030.00
0031.00 options = 'doc=file +
0033.00 case=any +
0034.00 allowextra=yes +
0035.00 allowmissing=yes';

0037.00 xml-into TransactionSet %xml(xmlfile: options);


--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.