RE: [U2] Dymanic vs Dimenssioned

2005-05-14 Thread Ray Wurlod
Two wonderful new data types.

Dymanic arrays presumably store data that are changing extremely rapidly.

I guess Dimenssioned arrays store Scandinavian data.

=8^D
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Dymanic vs Dimenssioned

2005-05-14 Thread Clifton Oliver
Dude, you've been working with NLS too much.
;-)
--
Regards,
Clif
On May 14, 2005, at 4:51 PM, Ray Wurlod wrote:
Two wonderful new data types.
Dymanic arrays presumably store data that are changing extremely 
rapidly.

I guess Dimenssioned arrays store Scandinavian data.
=8^D
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Marilyn Hilb
I am by far from a 'smart person'. But when I was first learning I was told if 
you were only going to use values in the first few a/m or if was simply a short 
item, less than 10 or so a/m then you can use dynamic. Anything more than that 
use dimensioned. 

If you are going to use say a/m 50 and you use a dynamic array, every time it 
actually has to start at 1 and work through to find 50. Were if you use a 
dimensioned array it will go straight to (50). I was shown a nifty table when 
learning this where it showed all the values the program uses being put into 
buckets. If you use a dynamic read, it all goes into one bucket. If you use 
Dimensioned it each goes into it's own bucket. 

This is my 'simple' minded understanding.  I am sure many more answers will be 
posted on this topic. 

Thanks,

Marilyn A. Hilb 
Value Part, Inc
Direct: 847-918-6099
Fax: 847-367-1892
[EMAIL PROTECTED]
www.valuepart.com

 -Original Message-
From:   Stevenson, Charles [mailto:[EMAIL PROTECTED] 
Sent:   Friday, May 13, 2005 2:50 PM
To: u2-users@listserver.u2ug.org
Subject:RE: [U2] I'm in an Array quandry, any suggestions...

Maybe the Smart People on this list can give a good rule of thumb for
deciding when to READU/WRITE vs. MATREADU/MATWRITE.   After all these
years, I still don't have one.

From: Richard Taylor

 We are faced with this same situation and the thought behind this
 truly baffles me.

I will admit to some of the same bafflement.

 Why take a flexible, dynamic database system 

The syntax for dynamic arrays is more natural for the language, too
(e.g., XYZ(17)1,5  vs. XYZ17,5).
Readability makes for maintainability, generally the most important
contributor to software quality.

 and force it to be fixed length.

well, sorta.  Each element of the dimensioned array is a variable length
dynamic array.  ( See my previous post for how to complicate your life
by inserting attribute marks. )

 This is what you are doing using dimensioned arrays and MATREADs.  The
most 
 common justification I have heard is performance and this simply does
not hold
 water.

Within limits (but I don't know the limits).
If you have a program that manipulates many attributes many times, then
it makes sense to matread them into a dimensioned array up front, and
matwrite them in the end, thereby limiting big string manipulations.
People forget or newbies don't know that CUST.REC117 is really
EXTRACT( CUST.REC, 117,0,0) or REPLACE(...,CUST.REC,117,0,0).  That can
be very expensive when you do that for many attributes many times, with
large dynamic arrays.   By contrast, each dimensioned array element has
its own memory address, so references and assignments can jump straight
to it.

But I do not have a good appreciation for what limits, many, big
really mean in my previous paragraph.  Does anyone have a good
heuristic?

  I started in Pick in R83 and have never used a dimensioned array to
 hold record structure and I have not seen performance issues.  This to
the
 extent that we ran an MRP run on a 286 Wyse PC that choked the
mainframe at
 this company.

Ah-ha, my dear Watson, then you don't really know how that system would
have screamed if you'd used dimensioned arrays instead, do you?


 The more they complicate the plumbing
   the easier it is to stop up the drain

Yeah.  What I said about dynamic array syntax being more natural.

cds

P.S.  Why are we limited to 1- or 2-dimensioned arrays?
  E.g.,  DIM XYZ( 5,10,2,3,8 ) would be a 5-dimensional array.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Dan Fitzgerald
Do we have archives somewhere? IIRC correctly, Glenn Herbert posted a great 
description of dynamic array optimization some time ago. I believe the 
upshot was, bowing to Yogi Berra on his 80th, that the difference ain't what 
it used to be.


Our greatest duty in this life is to help others. And please, if you can't 
help them, could you at least not hurt them? - H.H. the Dalai Lama
When buying  selling are controlled by legislation, the first thing to be 
bought  sold are the legislators - P.J. O'Rourke
Dan Fitzgerald



From: Marilyn Hilb [EMAIL PROTECTED]
Reply-To: u2-users@listserver.u2ug.org
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Dymanic vs Dimenssioned
Date: Fri, 13 May 2005 15:40:17 -0500
I am by far from a 'smart person'. But when I was first learning I was told 
if you were only going to use values in the first few a/m or if was simply 
a short item, less than 10 or so a/m then you can use dynamic. Anything 
more than that use dimensioned.

If you are going to use say a/m 50 and you use a dynamic array, every time 
it actually has to start at 1 and work through to find 50. Were if you 
use a dimensioned array it will go straight to (50). I was shown a nifty 
table when learning this where it showed all the values the program uses 
being put into buckets. If you use a dynamic read, it all goes into one 
bucket. If you use Dimensioned it each goes into it's own bucket.

This is my 'simple' minded understanding.  I am sure many more answers will 
be posted on this topic.

Thanks,
Marilyn A. Hilb
Value Part, Inc
Direct: 847-918-6099
Fax: 847-367-1892
[EMAIL PROTECTED]
www.valuepart.com
 -Original Message-
From:   Stevenson, Charles [mailto:[EMAIL PROTECTED]
Sent:   Friday, May 13, 2005 2:50 PM
To: u2-users@listserver.u2ug.org
Subject:RE: [U2] I'm in an Array quandry, any suggestions...
Maybe the Smart People on this list can give a good rule of thumb for
deciding when to READU/WRITE vs. MATREADU/MATWRITE.   After all these
years, I still don't have one.
From: Richard Taylor

 We are faced with this same situation and the thought behind this
 truly baffles me.
I will admit to some of the same bafflement.
 Why take a flexible, dynamic database system
The syntax for dynamic arrays is more natural for the language, too
(e.g., XYZ(17)1,5  vs. XYZ17,5).
Readability makes for maintainability, generally the most important
contributor to software quality.
 and force it to be fixed length.
well, sorta.  Each element of the dimensioned array is a variable length
dynamic array.  ( See my previous post for how to complicate your life
by inserting attribute marks. )
 This is what you are doing using dimensioned arrays and MATREADs.  The
most
 common justification I have heard is performance and this simply does
not hold
 water.
Within limits (but I don't know the limits).
If you have a program that manipulates many attributes many times, then
it makes sense to matread them into a dimensioned array up front, and
matwrite them in the end, thereby limiting big string manipulations.
People forget or newbies don't know that CUST.REC117 is really
EXTRACT( CUST.REC, 117,0,0) or REPLACE(...,CUST.REC,117,0,0).  That can
be very expensive when you do that for many attributes many times, with
large dynamic arrays.   By contrast, each dimensioned array element has
its own memory address, so references and assignments can jump straight
to it.
But I do not have a good appreciation for what limits, many, big
really mean in my previous paragraph.  Does anyone have a good
heuristic?
  I started in Pick in R83 and have never used a dimensioned array to
 hold record structure and I have not seen performance issues.  This to
the
 extent that we ran an MRP run on a 286 Wyse PC that choked the
mainframe at
 this company.
Ah-ha, my dear Watson, then you don't really know how that system would
have screamed if you'd used dimensioned arrays instead, do you?

 The more they complicate the plumbing
   the easier it is to stop up the drain
Yeah.  What I said about dynamic array syntax being more natural.
cds
P.S.  Why are we limited to 1- or 2-dimensioned arrays?
  E.g.,  DIM XYZ( 5,10,2,3,8 ) would be a 5-dimensional array.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Gordon J Glorfield
I was also taught the same thing, back in the day.  But, I think nowadays, 
what with the faster processor and disk speeds, it doesn't really matter 
that much anymore.  About 15 years ago, working on a Sequoia, it was 
proven that by using dimensioned arrays for reads and writes in a OLTP 
system, a huge speed gain was realized over the use of dynamic arrays.

Now on Sun boxen and UV we don't use dimensioned arrays anymore.  We've 
found that for ease of software maintenance, dynamic arrays are the best 
fit for us.


Gordon J. Glorfield
Sr. Applications Developer
MAMSI (A UnitedHealth Company)
301-360-8839

[EMAIL PROTECTED] wrote on 05/13/2005 04:40:17 PM:

 I am by far from a 'smart person'. But when I was first learning I 
 was told if you were only going to use values in the first few a/m 
 or if was simply a short item, less than 10 or so a/m then you can 
 use dynamic. Anything more than that use dimensioned.

 If you are going to use say a/m 50 and you use a dynamic array, 
 every time it actually has to start at 1 and work through to find 
 50. Were if you use a dimensioned array it will go straight to 
 (50). I was shown a nifty table when learning this where it showed 
 all the values the program uses being put into buckets. If you use a
 dynamic read, it all goes into one bucket. If you use Dimensioned it
 each goes into it's own bucket.

 This is my 'simple' minded understanding.  I am sure many more 
 answers will be posted on this topic.

 Thanks,

 Marilyn A. Hilb
 Value Part, Inc
 Direct: 847-918-6099
 Fax: 847-367-1892
 [EMAIL PROTECTED]
 www.valuepart.com

 -Original Message-
 From:  Stevenson, Charles [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 13, 2005 2:50 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] I'm in an Array quandry, any suggestions...

 Maybe the Smart People on this list can give a good rule of thumb for
 deciding when to READU/WRITE vs. MATREADU/MATWRITE.   After all these
 years, I still don't have one.

[snip]


This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Archives (was RE: [U2] Dymanic vs Dimenssioned)

2005-05-13 Thread Wendy Smoak
Dan Fitzgerald wrote:
 
 Do we have archives somewhere?


If it's fairly recent, (since Jan 2005?) mail-archive.com should have
it:
http://www.mail-archive.com/u2-users%40listserver.u2ug.org/

This one goes back further, but the search doesn't work as well:
http://www.indexinfocus.com/

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Clifton Oliver
That is correct. I think it was at release 7, a field cache pointer 
was introduced. If you walk down a dynamic array thus

   for i = 1 to n
  fieldStuff = dynArrayi
   next i
the run-machine does not re-scan from the beginning of the string. It 
moves down the string remembering where it was. The performance is 
almost as good as using REMOVE. So if you have a large record with a 
lot of fields and you are only going to use the first few fields, a 
READ and i technique is faster than a MATREAD (which is basically a 
READ followed by a MATPARSE). I think they tweeked this some more at 
release 8 to include backward referencing and some other tricks.

So are dimensioned arrays better than dynamic arrays, or the reverse? 
It depends on the situation, the data, the statistical likelihood of 
certain string lengths, whether or not it is an even numbered Tuesday 
that falls on the 23rd day of the Feast of the Goddess Eris, and who 
knows what else.

Then things change at each release and everything we know, is wrong.
It's like I used to tell my students when I was teaching the BASIC 
programming classes:

Always remember that you should never believe any rule containing the 
words 'always' or 'never'.

--
Regards,
Clif
~~~
W. Clifton Oliver, CCP
CLIFTON OLIVER  ASSOCIATES
Tel: +1 619 460 5678Web: www.oliver.com
~~~
On May 13, 2005, at 1:52 PM, Dan Fitzgerald wrote:
Do we have archives somewhere? IIRC correctly, Glenn Herbert posted a 
great description of dynamic array optimization some time ago. I 
believe the upshot was, bowing to Yogi Berra on his 80th, that the 
difference ain't what it used to be.


Our greatest duty in this life is to help others. And please, if you 
can't help them, could you at least not hurt them? - H.H. the Dalai 
Lama
When buying  selling are controlled by legislation, the first thing 
to be bought  sold are the legislators - P.J. O'Rourke
Dan Fitzgerald



From: Marilyn Hilb [EMAIL PROTECTED]
Reply-To: u2-users@listserver.u2ug.org
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Dymanic vs Dimenssioned
Date: Fri, 13 May 2005 15:40:17 -0500
I am by far from a 'smart person'. But when I was first learning I 
was told if you were only going to use values in the first few a/m or 
if was simply a short item, less than 10 or so a/m then you can use 
dynamic. Anything more than that use dimensioned.

If you are going to use say a/m 50 and you use a dynamic array, every 
time it actually has to start at 1 and work through to find 50. 
Were if you use a dimensioned array it will go straight to (50). I 
was shown a nifty table when learning this where it showed all the 
values the program uses being put into buckets. If you use a dynamic 
read, it all goes into one bucket. If you use Dimensioned it each 
goes into it's own bucket.

This is my 'simple' minded understanding.  I am sure many more 
answers will be posted on this topic.

Thanks,
Marilyn A. Hilb
Value Part, Inc
Direct: 847-918-6099
Fax: 847-367-1892
[EMAIL PROTECTED]
www.valuepart.com
 -Original Message-
From:   Stevenson, Charles [mailto:[EMAIL PROTECTED]
Sent:   Friday, May 13, 2005 2:50 PM
To: u2-users@listserver.u2ug.org
Subject:RE: [U2] I'm in an Array quandry, any suggestions...
Maybe the Smart People on this list can give a good rule of thumb for
deciding when to READU/WRITE vs. MATREADU/MATWRITE.   After all these
years, I still don't have one.
From: Richard Taylor

 We are faced with this same situation and the thought behind this
 truly baffles me.
I will admit to some of the same bafflement.
 Why take a flexible, dynamic database system
The syntax for dynamic arrays is more natural for the language, too
(e.g., XYZ(17)1,5  vs. XYZ17,5).
Readability makes for maintainability, generally the most important
contributor to software quality.
 and force it to be fixed length.
well, sorta.  Each element of the dimensioned array is a variable 
length
dynamic array.  ( See my previous post for how to complicate your life
by inserting attribute marks. )

 This is what you are doing using dimensioned arrays and MATREADs.  
The
most
 common justification I have heard is performance and this simply 
does
not hold
 water.

Within limits (but I don't know the limits).
If you have a program that manipulates many attributes many times, 
then
it makes sense to matread them into a dimensioned array up front, and
matwrite them in the end, thereby limiting big string manipulations.
People forget or newbies don't know that CUST.REC117 is really
EXTRACT( CUST.REC, 117,0,0) or REPLACE(...,CUST.REC,117,0,0).  That 
can
be very expensive when you do that for many attributes many times, 
with
large dynamic arrays.   By contrast, each dimensioned array element 
has
its own memory address, so references and assignments can jump 
straight
to it.

But I do not have a good appreciation for what limits, many, big
really mean in my previous

RE: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Kevin King
From: Clifton Oliver
Always remember that you should never believe any rule containing the
words 'always' or 'never'.
---

Or as I say in my classes now... There's a time and place for
everything, and it's not always and not never.  I would have used
yours Clif, but if I follow the rule I can't believe it. ;-)

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 5/12/2005
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread Clifton Oliver
On May 13, 2005, at 4:38 PM, Kevin King wrote:
From: Clifton Oliver
Always remember that you should never believe any rule containing the
words 'always' or 'never'.
---
Or as I say in my classes now... There's a time and place for
everything, and it's not always and not never.  I would have used
yours Clif, but if I follow the rule I can't believe it. ;-)
-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com
I was always amused to see which ones caught that and which ones just 
wrote it down in their notes.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Dymanic vs Dimenssioned

2005-05-13 Thread FFT2001
In a message dated 5/13/2005 2:00:51 PM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:

 I believe the 
 upshot was, bowing to Yogi Berra on his 80th, that the difference ain't what 
 
 it used to be.
 

True and false.
If you are processing, sequentially, elements of a list then it probably 
makes no difference.  However most UPDATE programs actually touch elements in a 
semi-random fashion.  So you might have something like
Inventory(3) = price
Inventory(10) = onhand
Inventory(21) = lastpo

This type of update, not being in order, would exhibit much greater speed 
than the same update using a dynamic array.

That being said, it's possible that the majority of an UPDATE type process 
isn't actually pushing values into cells, but doing lots of other things that 
changing the type of array would not affect.

But simply saying that it makes no difference in any case is not true.
Will Johnson
Fast Forward Technologies
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/