|
Thanks Tommy. I changed it %len() and I'm still getting the sameerror.
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 itsviruses.
contents and the contents of any attachments for the presence of
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 itsCovenant Transport, Inc.
contents and the contents of any attachments for the presence of
viruses. Covenant Transportation Group, Inc. and it's subsidiary
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.
As an Amazon Associate we earn from qualifying purchases.
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.