how to generate records to fill up a table

shulbert@littlejohnfrazer.com shulbert@littlejohnfrazer.com
Tue, 8 Mar 2005 15:10:41 +0000


try this in quiz. it will add as many records as you want to a subfile. from the subfile you can append to the table using qtp.
qtp won't do this because it reads all the records in before it starts processing them; ie it won't read records it's just written.
this is tested under aix, but i seem to remember that under mpe and vms the eof condition is read differently, and you can get away with only pass.

<quiz>
cancel clear
set report nolimit
def counter integer size 4 = 1
set subfile keep name counting
rep sum counter
go
access *counting
def counter2 integer size 4 = counter + 1
set subfile append name counting
rep sum counter2
go
access *counting
def limit1 integer size 4 = parm prompt "Limit [1000]:"
def limit2 integer size 4 = 1000 &
                         if limit1 = 0 &
                       else limit1
def counter2 integer size 4 = counter + 2
select counting if counter < limit2 - 1
set subfile append name counting
rep sum counter2
go
</quiz>

<qtp>
access *counting
select counting if counter < 101
output <table> add
  item <key> of <table> final counter of counting
go
</qtp>

regards,
stephen.






 -----Original Message-----
From: 	VNguyen@wsboces.org [mailto:VNguyen@wsboces.org] Sent:	Tuesday, March 08, 2005 2:06 PM
To:	powerh-l@lists.sowder.com
Subject:	how to generate records to fill up a table


Hi All,
I have a question:
I have a table named Scores with 1 field Score Inter size 4
How do I use powerhouse to generate 100 records and fill it with values
from 1 to 100 sequentiallly ?
Thank you.


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.


Littlejohn Frazer
Chartered Accountants
1 Park Place
Canary Wharf
London
E14 4HJ

Tel: 020 7987 5030
Fax: 020 7987 9707
Web: www.littlejohnfrazer.com


The information contained in this communication is confidential and may
be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it.  If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful.

Littlejohn Frazer reserves the right to monitor the content of any
message sent to or from littlejohnfrazer.com and its associate domains,
fmi-litjon.co.uk and litjon.co.uk

A list of partners may be inspected at the above address which is
also the address for serving documents.

Registered to carry on audit work by the Institute of Chartered
Accountants in England & Wales, and authorised and regulated by the
Financial Services Authority for investment business.