Creating a file from existing files
Arthur Kogan
akogan@westpac.com.au
Thu, 09 Jul 1998 09:38:01 +1000
Hi Wayne,
the simplest solution is to do it with the Quick screen, i.e.
screen abc
file PART-DETAIL designer
file TECHNICIAN designer
file TECH-PART designer
procedure internal store_TECH-PART
begin
while retrieving PART-DETAIL sequential
begin
... do all your let statements here, assigning the values from
either PART-DETAIL or TECHNICIAN to TECH-PART...
put TECH-PART reset
end
end
procedure entry
begin
while retrieving TECHNICIAN sequential
begin
do internal store_TECH-PART
end
commit
end
build abc
Regards,
Arthur Kogan
Westpac Financial Services
Sydney, Australia
Wayne.Laughton@southcorp.com.au wrote:
> 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.
>
> This is on an IMAGE database on HP3000.
>
> Any help greatly appreciated.
>
> Regards,
> Wayne Laughton
>
> Manager, Business Systems
> Southcorp Water Heaters Australia
> --------------------------------------------------
> Phone: + 61 2 9684 9140
> Fax : + 61 2 9684 4270
> Mobile: 0412 254 484
> Inet : wayne.laughton@southcorp.com.au
> Mail: Southcorp Water Heaters Australia
> P.O. Box 6
> Rydalmere NSW 2126
> AUSTRALIA
>
> ------------------------------------------------------------------------
>
> Name: WINMAIL.DAT
> WINMAIL.DAT Type: application/x-openmail-1734
> Encoding: base64
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.