Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Thanks for your quick response. I verified the V6r1 field size is 16m (16,773,104)
Debug shows the stmt number for the " Length or start position is out of range for the string operation", is 286400. The CPF4102 is from QDMSIGNL.
Thanks again for looking into this.
Larry
ORIGINAL ISSUE.
We have been using iSockets for sometime, without issues. Today we started getting
"Message . . . . : Length or start position is out of range for the string
operation.
Cause . . . . . : One of the following has occurred in RPG procedure
parseHTTPR in program ISOCKETS/ISOCKETS: " AND,
"File QISOCKETS in library ISOCKETS with member ISOCKETS not found".
We are at V6.1 latest ptf's. In debug on the nRtnLen = postUrlData(url : service : reqData : %addr(rtnXML) : %size(rtnXML): 0 : 819 ); line the nRtnLen is 143662.
nRtnLen is 10i.
We are consuming a inhouse created web service that returns A/P invoices. The issue seems to be with the date range request returning a large number of invoices.
Thank you in advance for your hlep/suggestions on resolving this issue
Larry Taylor
Hobby Lobby Stores
The code doesn't look like it is within the parseHTTP routine.
It is actually in the parseURL routine. Could be a version/source difference...
But is the domain name (url) goofy in some way? Can you post it perhaps without the real URL but perhaps with something like: xxx.xxxxx.xxx:8086
Here's what its doing at that point in the iSockets code:
NOTE: Full iSockets source code is available for a small fee.
2850.00 for i = (%Len(szURL)-1) DownTo 1; 2851.00 if %subst(szURL:i:1) = COLON; 2852.00 // If a colon is detected, get the following digits 2853.00 nPos = %check(DIGITS:%subst(szURL:i+1)); 2854.00 // If there are digits, capture them, else it's not a port. 2855.00 if nPos = 0; 2856.00 port = %subst(szURL:i+1); 2857.00 elseif nPos > 0; 2858.00 port = %subst(szURL:i+1:nPos-1); 2859.00 else; 2860.00 port = ' '; 2861.00 endif; 2862.00 if port <> *blanks; 2863.00 nPort = %int(%trimR(port)); 2864.00 szDomain = %subst(szURL:1: i - 1); 2865.00 else; 2866.00 szDomain = szURL; 2867.00 endif; 2868.00 leave; 2869.00 endif; 2870.00 endfor;
url is like this: http://DEVxxxxxxxxx03.xxxxxxxxxx.xxxx:8001
We've been using this url for several weeks in development for this project. We started having issues when the request was for a large number of invoices. Request for a single invoice works just fine. And this date range request worked on a invoice returning 79 items.
As far as source code - boss says that would be a good thing. What is the procedure for purchase?
Just an update for this issue. I thought we had the latest iSockets library, but maybe not.
We purchased the source and re-created the service program. All is well.
Thanks for looking into this Bob, but it looks like the issue was on our end -not having the latest version.