|
Yes, Scott, that reaffirms what I was mumbling about in my response. My last experience with variable-length fields was that you had to manually update the 2-byte length at the beginning of such a field when writing or updating it in RPG, and now RPG-IV handles that automatically. (Although I may be confusing variable-length database fields and VARYING program-defined fields.) Why be "silly" and "search something you just added"? Cuz I didn't write the %scan and %replace code and am still trying to get trying to get my brain wrapped around the new things added since v3r2. Which I was stuck at up until three months ago - so while all you guys & gals were posting your real life experiences with v4 & v5 stuff, I was relegated to reading and wishing. You were "there" before awhile ago, weren't you Scott? Anyways, add VARYING to the mix, and my feeble mind just starts to overload. I've got a lot of catching up to do. We're at v4r5 now, and are upgrading to v5r2 this weekend! I can't remember the last time I've worked in a shop that was at the most current release. - Dan --- Scott Klement <klemscot@klements.com> wrote: > > On Wed, 29 Jan 2003, Dan wrote: > > > > This is where it gets a little confusing to me. I never get to 100, > > let alone 2048. > > You aren't exceeding 2048, you're exceeding the length of the string. > The string is VARYING. That means that the length of it can vary between > 0 bytes long and 2048 bytes long. > > However, if the string is (for example) 100 bytes long, you cannot begin > a %scan in position 101. It's that simple, the string is only 100 bytes > long so you can't scan position 101. > > Since you haven't reached the max size of your VARYING field, you COULD > increase the size of the field so that it is now 101 bytes long. That > would work (tho it seems silly to search something you just added!) and in > fact that's what you accomplish by concatenating the blank to the end... > the string becomes one byte longer, and that new byte is guaranteed not > to be a quote... > > Does that explanation help? __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
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.