Thanks very much. It seems to be working at least for this one example.
Mike
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Murphy/STAR BASE Consulting Inc.
Sent: Wednesday, June 29, 2016 11:29 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: RE: XML processing from a field
Look at the datasubf option of the XML-INTO op code.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----"Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx> wrote: -----
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
From: "Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx>
Date: 06/29/2016 10:49AM
Subject: RE: XML processing from a field
Well, I've finally got a chance to work on this again and I think I'm very close. I think I'm failing on the last value(code) in my data structure, but not sure why.
Here is the xml document :
<GPCodedValueDomain2 xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:typens="
http://www.esri.com/schemas/ArcGIS/10.1" xsi:type="typens:GPCodedValueDomain2">
<DomainName>Yes No Indicator</DomainName>
<FieldType>esriFieldTypeString</FieldType>
<MergePolicy>esriMPTDefaultValue</MergePolicy>
<SplitPolicy>esriSPTDuplicate</SplitPolicy>
<Description />
<Owner>DBO</Owner>
<CodedValues xsi:type="typens:ArrayOfCodedValue">
<CodedValue xsi:type="typens:CodedValue">
<Name>No</Name>
<Code xsi:type="xs:string">N</Code>
</CodedValue>
<CodedValue xsi:type="typens:CodedValue">
<Name>Yes</Name>
<Code xsi:type="xs:string">Y</Code>
</CodedValue>
</CodedValues>
</GPCodedValueDomain2>
I pick up everything until the 'N' in the <Code> then I get an error.
The XML document does not match the RPG variable; reason code 6.
Data structures are setup as follows.
D GPCODEDVALUEDOMAIN2...
D ds qualified
D domainname 50A
D fieldtype 50A
D mergepolicy 50A
D splitpolicy 50A
D description 50A
D owner 10A
D codedvalues LikeDS(val_T)
* this is the coded values datastructure
D val_T ds Template qualified
D xsi_type 50A
d codedvalue LikeDS(cod_T) Dim(5)
* this is the codedvalue datastructure
D cod_T ds Template qualified
D xsi_type 50A
D name 50A
D code LikeDs(codexsi_t)
D codexsi_t ds Template qualified
D xsi_type 50A
D code 50A This field doesn't populate
I appreciate the help
for any subscription related questions.
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
--
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.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
--
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.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
As an Amazon Associate we earn from qualifying purchases.