dbTalk Databases Forums  

how to replicate single values to match multivalues

comp.databases.pick comp.databases.pick


Discuss how to replicate single values to match multivalues in the comp.databases.pick forum.



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

Default how to replicate single values to match multivalues - 10-28-2004 , 09:02 PM






Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The listing
will be fed into a flat file database.

tia

Larry at medease.com

Reply With Quote
  #2  
Old   
Bill H
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 10-28-2004 , 09:35 PM






SORT MYFILE BY-EXP MVATTR SINGLEVALUEDATTR MVATTR

Hope this helps.

Bill

"larry collier" <larry (AT) bigbird (DOT) medease.com> wrote

Quote:
Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The listing
will be fed into a flat file database.

tia

Larry at medease.com



Reply With Quote
  #3  
Old   
V Hill
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 11-05-2004 , 02:19 PM



You don't state which version of Pick you are using (i.e.
Universe,Unidata,etc), but in Universe you could setup a dictionary
item with an I descriptor that could match the multivalue attribute
with an occurance of the single value attribute.

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

Default Re: how to replicate single values to match multivalues - 11-05-2004 , 06:48 PM



larry collier <larry (AT) bigbird (DOT) medease.com> wrote in
newsan.2004.10.29.02.02.22.114429 (AT) bigbird (DOT) medease.com:

Quote:
Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The
listing
will be fed into a flat file database.

tia

Larry at medease.com
In short, no. To flatten a multi-value database requires programming.
I've had to do it and it's not exactly an afternoon project for a
quiet Sunday.

Regards,
Joe


Reply With Quote
  #5  
Old   
Art Martz
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 11-05-2004 , 11:36 PM



Sure! (in D3, anyhow)

It's an "R" code, next to the attribute number, if I recall correctly.

Art

Joe wrote:
Quote:
larry collier <larry (AT) bigbird (DOT) medease.com> wrote in
newsan.2004.10.29.02.02.22.114429 (AT) bigbird (DOT) medease.com:


Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The

listing

will be fed into a flat file database.

tia

Larry at medease.com


In short, no. To flatten a multi-value database requires programming.
I've had to do it and it's not exactly an afternoon project for a
quiet Sunday.

Regards,
Joe

Reply With Quote
  #6  
Old   
Kilo MicroAir
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 11-06-2004 , 01:56 AM



If attribute 4 contains single values and attribute 6 contains multi-values:

following sample dictionary item repeats value of attribute 4 concatenated
with a "*" and each
multi-value of 6

0 test
1 S
2 4
3
4
5
6
7
8 A4R:"*":6
9 L
10 20

If there is nothing in attribute 6 you will get attribute 4 and an "*" once.

Works on R83 thru D3.

larry collier wrote:
Quote:
Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The listing
will be fed into a flat file database.

tia

Larry at medease.com



Reply With Quote
  #7  
Old   
BobJ
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 11-06-2004 , 04:01 AM



The OP said "listing" implying, at least to me, that he wants to convert the
output from a proc or program. And probably that output is in a spooler
file. That's a whole different conversion task. It should be fairly easy
and it should actually be possible to write a relatively simple program
using the report itself as the only documentation. I don't know of any
tools for that task but perhaps someone does.

When the question is converting MV files as has been inferred by most then
there are several short answers and you have seen some of them. But the
long answer has a lot to do with the way the files were designed in the
first place. There is nothing in the Pick architecture that requires that
dictionaries and data files agree with each other or that dictionaries are
in any way a complete description of data files. And far more to the point,
there is rarely any indication in dictionaries of relationships. The real
definitions of the files and their relationships are embedded in the
programs and procedures. So expanding subvalues and values to become flat
files is trivial. But using the flattened files after they have been
generated is a horse of a different color. And the problem is deep. Many
tools will appear to do the job but if you run simple sums on the flat files
and compare to reports that have been run on the MV files you will rarely
get the same answer. Why? Because of relationships and because the simple
conversion tools often leave things behind because they don't see them. The
conversion of a system from MV to SQL compliant can be a major undertaking.
The bottom line?? MV files are easy to flatten but often difficult to
convert.
BobJ

"Kilo MicroAir" <kilomike[at]gci.net> wrote

Quote:
If attribute 4 contains single values and attribute 6 contains
multi-values:

following sample dictionary item repeats value of attribute 4
concatenated
with a "*" and each
multi-value of 6

0 test
1 S
2 4
3
4
5
6
7
8 A4R:"*":6
9 L
10 20

If there is nothing in attribute 6 you will get attribute 4 and an "*"
once.

Works on R83 thru D3.

larry collier wrote:
Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The listing
will be fed into a flat file database.

tia

Larry at medease.com





Reply With Quote
  #8  
Old   
Bill H
 
Posts: n/a

Default Re: how to replicate single values to match multivalues - 11-06-2004 , 11:03 AM



Larry:

Here's an example of a query (D3) that replicates a single valued attribute
to match a multi-valued attribute in a listing:

list apchecks '24*2068' ckdate invs_pd inv_descs inv_amts
Page 1 apchecks 09:00:59 06 Nov 2004

apchecks.. CK DATE. INVS.PD Invoice(s) Description............. Invoice Amts

24*2068 02-10-00 21434 WTR/SWR, 18-164-11-001-007 152.75
21435 WTR/SWR, 18-164-17-200-007 81.26
21436 WTR/SWR, 18-164-38-001-004 109.00
21437 WTR/SWR, 18-164-43-001-025 118.47
21438 WTR/SWR, 18-164-49-001-001 116.66
21439 WTR/SWR, 18-164-71-001-001 131.57
21440 WTR/SWR, 18-164-77-001-005 84.18
21443 WTR/SWR, 18-164-05-001-003 145.10
21444 WTR/SWR, 18-164-09-001-009 81.26

[405] 1 items listed out of 1 items.

I want the check date to be on each line so I add the "by-exp" modifier to
the query and get:

list apchecks '24*2068' by-exp invs_pd ckdate invs_pd inv_descs inv_amts
Page 1 apchecks 09:02:03 06 Nov 2004

apchecks.. CK DATE. INVS.PD Invoice(s) Description............. Invoice Amts

24*2068 02-10-00 21434 WTR/SWR, 18-164-11-001-007 152.75
24*2068 02-10-00 21435 WTR/SWR, 18-164-17-200-007 81.26
24*2068 02-10-00 21436 WTR/SWR, 18-164-38-001-004 109.00
24*2068 02-10-00 21437 WTR/SWR, 18-164-43-001-025 118.47
24*2068 02-10-00 21438 WTR/SWR, 18-164-49-001-001 116.66
24*2068 02-10-00 21439 WTR/SWR, 18-164-71-001-001 131.57
24*2068 02-10-00 21440 WTR/SWR, 18-164-77-001-005 84.18
24*2068 02-10-00 21443 WTR/SWR, 18-164-05-001-003 145.10
24*2068 02-10-00 21444 WTR/SWR, 18-164-09-001-009 81.26

[405] 9 items listed out of 1 items.

Hope this helps.

Bill

larry collier <larry (AT) bigbird (DOT) medease.com> wrote in
newsan.2004.10.29.02.02.22.114429 (AT) bigbird (DOT) medease.com:

Quote:
Is there an easy (i.e. not via basic) way to replicate single valued
attributes to match with a multivalued one in a listing? The
listing
will be fed into a flat file database.

tia

Larry at medease.com



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 - 2013, Jelsoft Enterprises Ltd.