Creating a file from existing files

Chris Sharman Chris.Sharman@ccagroup.co.uk
Wed, 8 Jul 1998 09:46:04 +0100


>I need to populate the fields of a file from the contents of 2 others. 
>The file to be populated is empty and has a key to each of the other 
>files. A smaple of each layout is a follows:-
>
>PART-DETAIL FILE
>
>part-number       x(10)  key
>part-desc           x(20)
>...........
>
>TECHNICIAN FILE
>
>tech-id               x(6)   key
>tech-name         x(20)
>..........
>
>TECH-PART-FILE
>part-number       x(10)  key
>tech-id               x(6)   key
>qoh                    9(6)
>.............
>
>The PART-DETAIL file has records as does the TECHNICIAN file. I need to 
>be able to populate the TECH-PART FILE with a combination of all TECHs 
>and all PARTS.

>How can this be done in Powerhouse? Effectively I need to be able to 
>read sequentially thru the TECHNICIAN file and for each TECH retrieve 
>sequentially all PART-DETAIL records and combining the TECH and PART 
>numbers plus static data, populate TECH-PART file.

quiz
> access part-detail
> def dummy int*4 = 1
> set rep nolim subfile name xpart index dummy
> rep sum dummy part-number
> go
> access technician link (1) to dummy of *xpart
> set subfile name techpart keep
> rep sum part-number tech-id ...
> go
> exit
Then use whatever database tool to load your database from the techpart
subfile.
If that's not possible on HP then write the database directly by doing the
second pass in QTP.

______________________________________________________________________
Chris Sharman			Chris.Sharman@CCAgroup.co.uk
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.