This code:
Produces this error:
Length or start position is out of range for the string operation
When:
D1RCODE = '20121018 '
The fields are defined as follows:
Not sure why I get the Length or start position is out of range for the string operation error. D1RCODE is a subfield in a data structure. Don't know if that enters into it.
Code:
Monitor ;
[COLOR="#0000FF"]wkCode10 = %Subst(%Trim(D1rcode):1:10);[/COLOR]
P_UGLN = %int(wkCode10);
On-error *all ;
Clear P_UGLN ;
Length or start position is out of range for the string operation
When:
D1RCODE = '20121018 '
The fields are defined as follows:
Code:
D D1rcode 20
Code:
D wkCode10 S 10







Comment