|
I'm guessing it's a PTF issue, but I usually do this:
C IF piString = '' or %Len(piString)=0
> -----Original Message-----
> From: rpg400-l-admin@midrange.com
> [mailto:rpg400-l-admin@midrange.com] On Behalf Of
> Kirk.Palmer@Walsworth.com
> Sent: Friday, May 17, 2002 12:06 PM
> To: rpg400-l@midrange.com
> Subject: Varying Length Parameters on Procedures
>
>
> I have created a service program to handle some of my string handling
> functions: Lower case, upper case, mixed case ...
>
> The service program used to run as expected when we were on
> V4R4. Since we upgraded to V4R5 it is sometimes aborting.
>
> If the program that references the service program is
> compiled under our security officer profile (All authority),
> the program runs fine like before. This allows us to use it
> in our production system without problems. However, if the
> calling program is compiled by any other user profile, it
> compiles fine, but when the program calls the procedure in
> the service program, the service program aborts with an
> RNX0115 message:
> Message ID . . . . . . : RNX0115 Severity . . . . . . . : 50
> Message type . . . . . : Escape
> Date sent . . . . . . : 05/17/02 Time sent . . . . . . :
> 11:53:26
> Message . . . . : Length of varying length variable is out of range.
> Cause . . . . . : The length of a varying length character or DBCS
> variable is less than 0 or greater than its declared maximum
> length in RPG procedure @MIXEDCASE in program MFGDBLIB/UTU210R.
>
> Here is the code affected:
>
> P @MixedCase B EXPORT
>
> D @MixedCase PI 512A VARYING
> D piString 512A VALUE VARYING
>
> D* Local Fields
> D String S 512A VARYING
> D Start S 5I 0
> D StringLength S 5I 0
>
> D wkCheckString S 3A VARYING
> D CheckLength S 5I 0
> D CheckPrev S 5I 0
> D CheckFollow S 5I 0
>
> D* Constants
>
> C IF piString = *Blanks <===
> This is the
> line where it is aborting.
> C RETURN piString
> C ENDIF
>
> The first time the parameter is touched, it aborts with the
> RNX0115 message.
>
> Is there an object or internal service program that is needed
> to use VARYING fields as parameters to procedures? If there
> is, what authority is missing??
>
> Thanks for your help,
> Kirk
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> 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-2025 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.