× 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.



Yes, but defining a table as

        NAME            100                     VARLEN(30)

Would enable you to store 'Mike Smith' and 'Pete Johnson' without a problem,
while still supporting 'Dr. Mahesh "Bug" Vijayaraghavensatyanaryanamurthy'
when necessary.

-Walden


------------
Walden H Leverich III
President
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)



-----Original Message-----
From: Paul Tuohy [mailto:tuohyp@attglobal.net]
Sent: Tuesday, September 03, 2002 13:22
To: midrange-l@midrange.com
Subject: Re: Justa note of thanks


Hi Nelson,

I think(?) Barbara was referring to Varying fields in RPG as opposed to
Varying fields defined in a database.

The use of varying fields in a database are still a large "depends". There
is an overhead with any field whose contents exceed the constant portion
defined for every record. The extra characters are stored in an overflow
area. Therefore, reading a record would probably require two pages being
input to memory.

e.g.
                        NAME                     30
VARLEN(5)

If NAME has a value of "Paul Tuohy", then "Paul " is stored in the record
and "Tuohy" is stored in the overflow. Both the record and the overflow must
be accessed to get the complete field.

There is also an additional overhead in that the DBM must maintain a pointer
from the record to the overflow area.

HTH

Paul Tuohy

"Smith, Nelson" wrote:

> Excellent article Jon (I have a large collection of Jon & Susan
> tomes), but I was inquiring more about Barbara's comment about
> routinely using the Varying keyword.
>
> I notice in many (or most?) PC languages they seem to routinely use
> VarChar types everywhere.  Do you think that is something we should do
> in RPG on all but the smallest of fields (flags, indicators, or code
> fields) on a more routine basis.  I think we have traditionally
> thought of using Varying only on big text descriptions fields, and
> such.  But there must be millions of files out there with 30 char name
> and address lines and that sort of thing. Making these variable length
> would have probably saved a few disk drives over the years.  Do you
> find yourself using Varying on more of these types of fields "just for
> the sake of it"?
>
> > -----Original Message-----
> > From: Jon Paris [SMTP:Jon.Paris@Partner400.com]
> > Sent: Friday, August 30, 2002 6:38 PM
> > To:   midrange-l@midrange.com
> > Subject:      Justa note of thanks
> >
> >  >> is that something we should begin doing routinely?
> >
> > If you check this wee article
> > (http://www.eservercomputing.com/iseries/articles/index.asp?id=146)
> > Nelson,
> > you'll see why I love VARYING fields.  There are many many uses for
> > them, but don't just use them for the sake of it - use them where
> > they make sense.
> >
> > Jon Paris
> > Partner400
> >


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.