Quiz/QTP help

Richard Witkopp witkopp@idt.com
Wed, 9 Dec 1998 09:51:45 -0800


Ugh, I've had to do this before. A slight variation on Arthur's
solution that I have used is to just put the dummy index in 1 file
with a value of "1" and link "1" to the dummy index.

> Hi Tracy,
> 
> if you want to get ALL possible combinations of STORE-NO X 
> ITEM-NO, you need 2
> files, one containing ALL stores (which you have) and one 
> containing ALL items
> (which you do not, so will have to create), I assume here 
> that you want all
> items in the inventory rather than just the ones present in 
> the sales file,
> plus your SALES file. Additionally, the the 2 files should 
> have a dummy
> repeating index field with the same value for all records to 
> link the 2 files
> together. Then you can do something as follows:
> 
> access STORE-FILE &
>     link DUMMY-FIELD &
>     to   DUMMY-FIELD of   ITEM-FILE &
>     link STORE-NO of STORE-FILE, ITEM-NO of ITEM-FILE &
>     to    STORE-NO, ITEM-NO of SALES-FILE optional
> 
> define D-QTY-SOLD int*16 = QTY-SOLD of SALES-FILE &
>           if record SALES-FILE exists else 0
> 
> Note: current versions of Powerhouse support INDEXED 
> SUBFILES, so the syntax
> would be the same for subfiles (apart from putting "*" before 
> the subfile
> name).
> 
> Arthur Kogan
> Westpac Financial Services
> Sydney Australia
> 
> Tracy White wrote:
> 
> > We have been flummoxed at my office by what sounds like it
> > ought to be easy:
> >
> > >From a subfileA containing sales data by store and item:
> > STORE-NO ITEM-NO QTY-SOLD
> > 1                10001    5
> > 2                10003    7
> > 4                10004    6
> >
> > and a subfileB containing a list of all stores:
> > 1
> > 2
> > 3
> > 4
> >
> > we wish to create a subfile of all item and store
> > combinations, with QTY-SOLD = 0 for the 'dummy' records:
> > STORE-NO ITEM-NO QTY-SOLD
> > 1                10001    5
> > 2                10001    0
> > 3                10001    0
> > 4                10001    0
> > 1                10003    0
> > 2                10003    7
> > 3                10003    0
> > 4                10003    0
> > 1                10004    0
> > 2                10004    0
> > 3                10004    0
> > 4                10004    6
> >
> > Does anyone have any advice on how to reach this final
> > state?
> >
> > PH7.29x on HP3000.
> >
> > Thanks,
> > Tracy White
> >
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
> = = = = = = = =
> > Subscribe: "subscribe powerh-l" in message body to 
> majordomo@lists.swau.edu
> > Unsubscribe: "unsubscribe powerh-l" in message to 
> majordomo@lists.swau.edu
> > powerh-l@lists.swau.edu is gatewayed one-way to 
> bit.listserv.powerh-l
> > This list is closed, thus to post to the list, you must be 
> a subscriber.
> 
> 
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
> = = = = = = =
> Subscribe: "subscribe powerh-l" in message body to 
> majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to 
> majordomo@lists.swau.edu
> powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
> This list is closed, thus to post to the list, you must be a 
> subscriber.
> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.