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



Larry, is this that Vertex stuff again? <g>

Can you remind us the prototype you're using? We need to know how this field is being used (In, Out, In/Out). If the XmlResult is something YOU built, and are needing to pass into this Vertex api, are you using Options(*String) to append the x'00'. If not using Options(*String), but you are passing this IN to vertex, then make sure to add a x'00' character before you pass.

If Vertex holds true to their standards, I imagine they're expecting to find a null character somewhere before they get to your "ResultSize". Not seeing a null before they scanned "ResultSize" bytes, they error...

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Larry Moore
Sent: Thursday, October 03, 2013 2:45 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: %SIZE

I tried it several ways but keep getting the same message. I've tried
%len(...) , %len(%trim(...)), %size() and changing value in debug.


Here are the notes that I have on the two fields in question.

XmlResult - The pointer to the character string buffer where the result
is stored.
This must be large enough to hold all the results.
Recommended minimum size is 128K.

Caution: Estimate carefully your buffer size. If the buffer
size is
inadequate to hold all the results, then the
system
copies over as much as it can hold. The
remainder of
the results are lost.

pResultSize - On input, the size of the XmlResult buffer.

Ensure that the XmlResult buffer is big enough to hold all the results
of your
query. If you perform a query which potentially could return a large
result set,
the XmlResult buffer should increase proportionately.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Thursday, October 03, 2013 3:31 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: %SIZE

Try %Len(%Trim(...))


On Thu, Oct 3, 2013 at 3:18 PM, Larry Moore
<moolar@xxxxxxxxxxxxxxxxxxxxx>wrote:

Thanks Tommy. I changed it %len() and I'm still getting the same
error.
It could be a different issue.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent: Thursday, October 03, 2013 2:59 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: %SIZE

You should be using %LEN() not %SIZE(). %SIZE is determined at
compile time & %LEN() is determined at run-time. Since the result
size can differ on each call you'll get this type of thing.


Thanks,
Tommy Holden



From: "Larry Moore" <moolar@xxxxxxxxxxxxxxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>
Date: 10/03/2013 01:56 PM
Subject: %SIZE
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I'm interfacing a RPGLE program with a 3rd party program written in C
but I'm having issues with one of the programs. I'm not sure if it's
an issue with the prototype or if the data that I'm passing in the is
incorrect. VPrtXML is called to perform several different functions
(Open Connection, Close Connection, Query, etc.). I'm able to get the

Open and Close function to work so I've almost eliminated a prototype
error. However, the Query function returns "UNKNOWN ERROR" no matter
what I try. The vendor says that the buffer size parameter
(pResultSize) must match the size of the return buffer (pXmlResult)
each time the program is called or it could cause "UNKNOWN ERROR".
Before each call I set pResultSize = %size(XmlResult);. Am I missing
something here?





D VprtXML PR EXTPROC('VprtXML')

D pConn * value

D pSession *

D pXmlBuffer * value options(*string)

D pXmlResult * value options(*string)

D pResultSize 10I 0 value



* VPrtXML parm definitions

*---------------------------

D pSession s *

D pXmlBuffer s *

D pXmlResult s *

D pResultSize s 10I 0



* Work Fields

*-------------

D Session s 100a

D xmlBuffer s 65500a inz(NULL)

D XmlResult s 65500a inz(NULL)

D NULL C CONST(x'00')



/free

............................

............................

.............................



pXmlResult = %addr(XmlResult);

pResultSize = %size(XmlResult);



VprtXML(pConnectionHandle: pSession: xmlBuffer:

pXmlResult: pResultSize);



Thanks,



Larry




______________________________________________________________________
This communication and the information transmitted is intended solely
for the individual or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of or taking action in reliance upon this
information by persons or entities other than the intended recipient
is prohibited. If you have received this email in error please contact

the sender immediately and delete the material from any computer. As a

recipient of this email, you are responsible for screening its
contents and the contents of any attachments for the presence of
viruses.
Covenant Transportation Group, Inc. and it's subsidiary Covenant
Transport, Inc.
accept no liability for any damages caused by any virus transmitted by

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


______________________________________________________________________
This e-mail has been scanned by MCI Managed Email Content Service,
using
Skeptic(tm) technology powered by MessageLabs. For more information on

MCI's Managed Email Content Service, visit http://www.mci.com.
______________________________________________________________________

______________________________________________________________________
This communication and the information transmitted is intended solely
for the individual or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of or taking action in reliance upon this
information by persons or entities other than the intended recipient
is prohibited. If you have received this email in error please contact

the sender immediately and delete the material from any computer. As a

recipient of this email, you are responsible for screening its
contents and the contents of any attachments for the presence of
viruses. Covenant Transportation Group, Inc. and it's subsidiary
Covenant Transport, Inc.
accept no liability for any damages caused by any virus transmitted by

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




--
Jeff Young
Sr. Programmer Analyst
--
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 e-mail has been scanned by MCI Managed Email Content Service, using
Skeptic(tm) technology powered by MessageLabs. For more information on
MCI's Managed Email Content Service, visit http://www.mci.com.
______________________________________________________________________

______________________________________________________________________
This communication and the information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender immediately and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. Covenant Transportation Group, Inc. and it's subsidiary Covenant Transport, Inc. accept no liability for any damages caused by any virus transmitted by this email.

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.