I don't get the intent of your 'oh dear' reply.

When I suspect that I will be appending a bunch as in the earlier posts, I
use my DIM method instead of appending to a dynamic array with <-1>. It's
progress is consistent instead of progressively slower.

Your reply says to use MATREAD?MATWRITE but the next sentence seems to the
contrary.

I use READ/WRITE for data records pretty exclusively. I use DIM dimensioned
arrays for the larger expected items like EDI in or HTML output. I don't
like using DIM arrays on a normal basis due to their limitations. Not
counting the large size concerns, dynamic arrays are, shall we say, more
dynamic.

IMHO, the only useful reason for MATREAD instead of READ is if your system
has a well established set of includes to reference those attributes by name
using the alias EQUATES. I've worked with them and I've found that they are
only truly the best if every program participates with a common set of
INCLUDES defining the human names for the fields. I've worked on systems
that have the EQUATES local per program with the expected different variable
names for the same fields. And to use them numerically is no greater value
than using dynamic arrays for data records.

BTW. I was there when Microdata rolled out the <> replacement for the
EXTRACT, REPLACE, DELETE and INSERT functions back in 1979, the same release
that they introduced PQN proc. Programmers who got tired of typing EXTRACT
either went the MATREAD direction or got fancy using the FIELD function to
extract (no pun intended) the 4th attribute like PRINT
FIELD(REC,CHAR(254),4). By the time MCD released <>, many habits were
established and as such, unbreakable and carried forward as gospel.

My 2 cents
Mark Johnson

----- Original Message -----
From: "Kevin King" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, March 05, 2007 3:07 PM
Subject: RE: [U2] Universe vs. Unidata


> >Another method that I use when building a large dynamic array
> (assuming that it's going to be written somewhere) is to create a
> large DIM variable, say DIM OUT(100000) and increment a index pointer.
> Then I MATWRITE OUT and be done with it.
>
> Oh dear.  If you're building something for output like this, use
> MATREAD/MATWRITE and be done with it.  Large dimensioned variables
> only increase the memory footprint and impose an artificial limit.
> Even if they're massively oversized, it's still a limit.
>
> -Kevin
> [EMAIL PROTECTED]
> http://www.PrecisOnline.com
>
> ** Check out scheduled Connect! training courses at
> http://www.PrecisOnline.com/train.html.
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to