× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Why is there no value in GH0100?
  • From: boldt@xxxxxxxxxx
  • Date: Thu, 3 Feb 2000 08:46:14 -0500



Rob wrote:
>The only reason I was using the varying length variable is to
>support a nice generic prototype that I could use wherever.
>When I read from a userspace I may want a larger or smaller size
>depending on what I am reading.  For example, even within the
>same list api, I choose to use a different size for the generic
>header than I do for the list entry.  In that program, to use
>CALLP, I would have to do 1 of 2 things.  1)  Set up multiple
>prototypes.  2)  Use one variable big enough for each case and
>move from/to the real variables.
>
>Now, if I slap that prototype in my /copy module and try to read
>from a user space in another application, and it needs a bigger
>area, then I have to change my prototype to this new size.  Still
>doing the moving from/to stuff.
>
>The other workaround is to just use the biggest size an alphanumeric
>variable can get.  You still have the moving from/to.  But, some
>string manipulation on large characters can get processor intensive.
>I wrote a generic center a character field routines with a stinking
>huge variable.  Limiting the variable improved the response time
>dramatically.  Oh well, in this case I wouldn't be doing some string
>manipulation, or would I?


What you should do is define the 4th parm of QUSRTVUS as
fixed length char with OPTIONS(*VARSIZE).  Then you can
pass whatever length variable you want and you can use
the PR def in any module you want.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.