dbTalk Databases Forums  

Simple Dictionary question

comp.databases.pick comp.databases.pick


Discuss Simple Dictionary question in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Baker
 
Posts: n/a

Default Simple Dictionary question - 02-23-2007 , 07:52 AM






All,
I have a question that I am assuming has a simple answer. I have a
file with 2 attributes. One attribute is the date the record was
created, the other attribute is a multi-valued list of product
numbers. I want to create dictionary which concatenates the 2 with an
exclamation point. I.e., PD223!12797 And, in the records where there
are multiple products, I would like to list the date next to each
value. i.e.:

PD223!12797
HG332!12797
BBB!12797

My initial attempt at this was a dictionary along the lines of:

PRODUCT:"!":INT.DATE

(with product being the product field and int.date being the date
field in internal format)

Using the data from above, this returns:

PD223
HG332
BBB!12797

I wrote a subroutine to do it, but, apparently when you are using
Uniobjects to write to a file and the file has an index on a field
that uses an external subroutine, Uniobjects blows up. I put this in
here because we ran into this problem and I could not find mention of
it anywhere. So, my question would be how to get the date
concatenation to replicate for each value in the product field. We are
running Unidata on AIX.

Thanks in advance for your assistance.

Baker


Reply With Quote
  #2  
Old   
dawn
 
Posts: n/a

Default Re: Simple Dictionary question - 02-23-2007 , 08:02 AM






On Feb 23, 7:52 am, "Baker" <wbn... (AT) hotmail (DOT) com> wrote:
Quote:
All,
I have a question that I am assuming has a simple answer. I have a
file with 2 attributes. One attribute is the date the record was
created, the other attribute is a multi-valued list of product
numbers. I want to create dictionary which concatenates the 2 with an
exclamation point. I.e., PD223!12797 And, in the records where there
are multiple products, I would like to list the date next to each
value. i.e.:

PD223!12797
HG332!12797
BBB!12797

My initial attempt at this was a dictionary along the lines of:

PRODUCT:"!":INT.DATE

(with product being the product field and int.date being the date
field in internal format)

Using the data from above, this returns:

PD223
HG332
BBB!12797

I wrote a subroutine to do it, but, apparently when you are using
Uniobjects to write to a file and the file has an index on a field
that uses an external subroutine, Uniobjects blows up. I put this in
here because we ran into this problem and I could not find mention of
it anywhere. So, my question would be how to get the date
concatenation to replicate for each value in the product field. We are
running Unidata on AIX.

Thanks in advance for your assistance.

Baker
I cannot answer your question, but in case you do not get an answer or
some work-around here, you might want to try u2-users (you can sign up
through u2ug.org).

I was unaware of this bug in UniData, not having tried such an update
with Uniobjects, but I think you should find out the status of this
bug. If it is still a bug (and there is no upgrade you can do to fix
it), then make sure it gets on the list for the Better & Better
subcommittee of the U2UG Board to help raise the visibility. IIRC,
you can make the subject of an e-mail to u2-users [BB] and then your
subject line once you know your issue is a current bug, which will
alert some folks to be sure to read it (including IBM U2 employees).

Best wishes. --dawn



Reply With Quote
  #3  
Old   
Richard Wilson
 
Posts: n/a

Default Re: Simple Dictionary question - 02-23-2007 , 08:18 AM



your looking for the -cats or !cats subr and REUSE(XX) which can be used in an I
type

I dont remember which one Unidata uses,hopefully this will help you find in the Docs

Rich

Baker wrote:

Quote:
All,
I have a question that I am assuming has a simple answer. I have a
file with 2 attributes. One attribute is the date the record was
created, the other attribute is a multi-valued list of product
numbers. I want to create dictionary which concatenates the 2 with an
exclamation point. I.e., PD223!12797 And, in the records where there
are multiple products, I would like to list the date next to each
value. i.e.:

PD223!12797
HG332!12797
BBB!12797

My initial attempt at this was a dictionary along the lines of:

PRODUCT:"!":INT.DATE

(with product being the product field and int.date being the date
field in internal format)

Using the data from above, this returns:

PD223
HG332
BBB!12797

I wrote a subroutine to do it, but, apparently when you are using
Uniobjects to write to a file and the file has an index on a field
that uses an external subroutine, Uniobjects blows up. I put this in
here because we ran into this problem and I could not find mention of
it anywhere. So, my question would be how to get the date
concatenation to replicate for each value in the product field. We are
running Unidata on AIX.

Thanks in advance for your assistance.

Baker



Reply With Quote
  #4  
Old   
Baker
 
Posts: n/a

Default Re: Simple Dictionary question - 02-23-2007 , 08:39 AM





Great. That was exactly what I needed, thanks Rich!

FYI, I used:

SUBR("-CATS",PRODUCT,REUSE(SUBR("-CATS","!",INT.DATE)))


Baker


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.