No.   Because of how strings are implemented within universe, consisting 
of a structure containing a length value and a pointer to the string, a 
substring operation is simply an operation (nicely termed 'mid') that 
returns a new string structure with its pointer at your desired starting 
point, and setting the length to either the value you passed in or, if 
that exceeds the length of the original string minus your starting point 
plus 1, the length is set to that value.   When that new string structure 
pointer is placed into the runtime variable table, memory is allocated and 
copy of the string is saved and a strlen done (or if NLS some equivilent), 
creating your new variable.

By the way, a len() operation in universe is VERY fast, as it does not do 
a strlen() or any type of count operation; it simply returns the length 
value of the string structure set at definition time.  Using a len() as 
the second parameter is probably microseconds faster since the subtraction 
+1 doesn't have to get done; IMO I don't think it makes much difference.
_________________________________________________________
"I reject your reality and substitute my own" - Adam Savage

Glenn M. Herbert - Connectivity Development  Engineer
Information Integration Solutions, IBM Software Group
50 Washington Street Westboro, MA 01581
 508-599-7281 direct 


Is there any downside to having a very large number that exceeds the 
actual
length of a string to indicate the balance of the string in the [] 
function.

I see:
NEW="ABC":REC[15,LEN(REC)-15]
versus
NEW="ABC":REC[15,1000000]

Just curious.
Thanks.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to