× 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 to Jon Paris, I have made great strides in getting the op-code to work. But I am stuck on this one:

The structure looks like this:

------------------------------------------------------------------------------------
d OTLocation_t...
d ds template
d qualified
d DisplayName...
d 10a
d Protocol...
d 10a
d ServerName...
d 10a
d ServerPort...
d 5a
d imageURL...
d 256a
d Name...
d 10a
d URL...
d 256a
d Value...
d likeds(value_source_t)
d Data...
d 256a
* ------------------------------------------------------------------------
d Value_Source_t...
d ds
d qualified
d Source...
d 10a
d Data...
d 256a
* ------------------------------------------------------------------------

The XML look like:
------------------------------------------------------------------------------

<OTLocation DisplayName="Location" Protocol="http" ServerName="otd2" ServerPort="80" imageURL="/img/webdoc/folder.gif" Name="Policy" URL="/otcs/cs.exe?func=ll&amp;objId=663526&amp;objAction=browse" >
<![CDATA[2000 152748 663513 663526 810132]]>
<Value source="core">2000 152748 663513 663526 810132</Value>
</OTLocation>
------------------------------------------------------------------------------

The error messages looks like:

-------------------------------------------------------------------------------
Additional Message Information

Message ID . . . . . . : RNX0353 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 07/12/19 Time sent . . . . . . : 10:58:56

Message . . . . : The XML document does not match the RPG variable; reason
code 7.
Cause . . . . . : While parsing an XML document, the parser found that the
XML document does not correspond to RPG variable "output" and the options do
not allow for this. The reason code is 7. The exact subfield for which the
error was detected is
"output.searchresults.searchresult(1).otlocation.data". The options are "
doc=file datasubf=data case=any". The XML document name is
/OpenTextRequests/2019-07-10.14.35.21.MISW0473A1.MR0473.971049.OpenText.txt;
*N indicates that the XML document was not an external file.
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.

Technical description . . . . . . . . : Reason codes and their meanings are
as follows:
1. The specified path to the XML element was not found in the XML document.
2. The XML document contains too few array elements for array subfields of a
data structure.
3. The XML document contains too many array elements for array subfields of
a data structure.
4. The XML document is missing XML attributes or elements to match
subfields.
5. The XML document contains extra XML attributes or elements that do not
match subfields.
6. The XML document contains text content within the content for the
subfields of a data structure.
7. The XML document contains unexpected attributes or child elements for XML
elements that match RPG scalar fields, subfields or array elements.
8. The XML document contains data that cannot be successfully assigned to
the RPG variable. The RPG status code associated with the failure is 0.
9. The XML document contains a special attribute (such as fmt or adjust)
that is not relevant or does not have a valid value.
10. An XML child element was found for a data structure having a subfield
matching the datasubf option.
11. An XML attribute was found having the same name as the datasubf option.
12. An XML attribute or element was found having the same name as a subfield
that is identified by the countprefix option. For example, if option
"countprefix=n_" was specified, and there exist subfields "xyz" and
"n_xyz", it is not valid to have an XML attribute or element with the name
"n_xyz".
13. The countprefix and datasubf options identified the same subfield.
-------------------------------------------------------------------------------

I am using the op-code like this:

-----------------------------------------------------------------------------------
xml-into output %xml(%trim(resultxml) :
' doc=file '
+ ' datasubf=data '
+ ' case=any ' );
-----------------------------------------------------------------------------------

And debug reveals this:

-----------------------------------------------------------------------------------
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.DISPLAYNAME(1) = 'Location '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.PROTOCOL(1) = 'http '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.SERVERNAME(1) = 'otd2 '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.SERVERPORT(1) = '80 '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.IMAGEURL(1) =
1 '/img/webdoc/folder.gif '
61 ' '
121 ' '
181 ' '
241 ' '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.NAME(1) = 'Policy '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.URL(1) =
....5...10...15...20...25...30...35...40...45...50...55...60
1 '/otcs/cs.exe?func=ll&objId=663526&objAction=browse '
61 ' '
121 ' '
181 ' '
241 ' '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.VALUE.SOURCE(1) = ' '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.VALUE.DATA(1) =
....5...10...15...20...25...30...35...40...45...50...55...60
1 ' '
61 ' '
121 ' '
181 ' '
241 ' '
OUTPUT.SEARCHRESULTS.SEARCHRESULT.OTLOCATION.DATA(1) =
....5...10...15...20...25...30...35...40...45...50...55...60
1 ' '
61 ' '
121 ' '
181 ' '
241 ' '
-----------------------------------------------------------------------------------

I think the problem is in the definition of the Value inside of OTLocation.

Anyone have any suggestions?

Thanks,

Marvin
No trees were killed in the sending of this message, but a large number of electrons were terribly inconvenienced, traumatized, triggered, and crying for their safe spaces.
Notice: This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. This message may also contain Protected Health Information (PHI) and must be treated confidentially and handled in accordance with HIPAA and other federal and state privacy laws. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately and delete this e-mail (and any accompanying attachments).

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.