Don't confuse Dimensioned (fixed) arrays with dynamic arrays.
REC<0> is a dynamic array reference and would always return the entire
record.
REC(0) references a dimensioned array and, apparently, in UV holds all
fields that could not fit into the dimension of the array. UniData does
not work this way, it puts it into the last dimension of the array which
could result in data loss if you change that array position. We have
confirmed this on our system as we are faced with the same problem.
----------------------------------------------
Here is a question to the group. Is this a behavior in UD that can be
changed in a configuration setting?
Rich Taylor | Senior Programmer/Analyst| VERTIS
250 W. Pratt Street | Baltimore, MD 21201
P 410.361.8688 | F 410.528.0319
[EMAIL PROTECTED] | http://www.vertisinc.com
Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.
"The more they complicate the plumbing
the easier it is to stop up the drain"
- Montgomery Scott NCC-1701
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ed Clark
Sent: Thursday, May 12, 2005 1:46 PM
To: [email protected]
Subject: RE: [U2] I'm in an Array quandry, any suggestions...
Sometimes, REC<0> returns the entire string too. I ran into this once
converting a program that actively used the assumption that REC<0> would
return nothing. Having REC(0) reserved for overflow seems convenient
though.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson
Sent: Thursday, May 12, 2005 11:51 AM
To: [email protected]
Subject: Re: [U2] I'm in an Array quandry, any suggestions...
I don't think MV participates with the OPTION BASE 0 or 1 that allows the
use of REC(0) that VB etc does. MV tends to count things starting with 1
and
MS starts with 0. REC<0> etc tends to be confusing as it's not the primary
key either.
I use OPTION BASE 1 to keep my head on straight when progamming in VB.
My 1 cent.
----- Original Message -----
From: "George Gallen" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 12, 2005 12:04 PM
Subject: RE: [U2] I'm in an Array quandry, any suggestions...
> OK. ours is being stored in element zero. None of the programming use
element
> zero
> so that is good.
>
> George
>
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED] Behalf Of Brian Leach
> >Sent: Thursday, May 12, 2005 11:36 AM
> >To: [email protected]
> >Subject: RE: [U2] I'm in an Array quandry, any suggestions...
> >
> >
> >George,
> >
> >It really matters what flavor you're running.
> >
> >If you run a flavor that puts the overspill in element zero,
> >you may be ok.
> >If you run a flavor that puts the overspill into the last element, that
> >might mess up any accesses to that element in the existing code.
> >
> >Brian
> >
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED] On Behalf Of
> >George Gallen
> >> Sent: 12 May 2005 16:01
> >> To: [email protected]
> >> Subject: RE: [U2] I'm in an Array quandry, any suggestions...
> >>
> >> WOW. I just found an interesting "feature" of UV.
> >>
> >> You can MATREAD a record that has more fields than are dimensioned,
> >> and you can MATWRITE that record back out INTACT without
> >> getting an error,
> >>
> >> It only bombs with an out of bounds error when you try to
> >> reference a subscript
> >> past the dimension.
> >>
> >> So....as long as any of those program dont try to mess with
> >> data it doesn't know
> >> about, we "should" be safe.
> >>
> >> George
> >>
> >> >-----Original Message-----
> >> >[mailto:[EMAIL PROTECTED] Behalf Of
> >George Gallen
> >> >
> >> >I'm modifying some programs that were written about 15-20
> >years ago,
> >> >there must be 30 or 40 that
> >> > interact with each other.
> >> >
> >> >Here is the problem.
> >> >All the programs use dimensioned arrays, and they were
> >> dimensioned to
> >> >exactly what was needed at the time, now I need to add 4
> >> fields to one
> >> >program. But I'm afraid if another program reads this
> >newly created
> >> >array, it will bomb out with an array out of bounds error.
> >> >
> >> >What is on my side, is all the programs that reference these
> >> files, all
> >> >use the same variable name.
> >> >
> >> >My initial thought was to write a small program that will
> >> > 1. open a program
> >> > 2. search for a dimension of the suspect variable(s)
> >> > 3. increase it's dimension level
> >> > 4. write the program back out
> >> > 5. recompile the program (I don't believe any are cataloged)
> >> >
> >> >Any other ideas?
> >> -------
> >> 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/
> -------
> 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/
-------
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/