[MAYBE SPAM] RE: how to generate records to fill up a table
Chris Sharman
chris.sharman@ccagroup.co.uk
Wed, 09 Mar 2005 10:50:39 +0000
brian_matthewsbrian matthews wrote:
> this is a slightly clearer offering than stephen's suggestion, no
> offence intended :)
Clarity (which may or may not be improved) is irrelevant, unless you've
got an environment where this code actually works.
The original quiz code generated a subfile with 1 record, containing 1.
Yours generates a subfile with 1 record, containing 0.
The OP wanted 100 records, containing 1-100 in sequence.
Chris
> can cle
>
>
> def a1 = 0
> set sub nam ademin keep
> rep summ a1 subtot
>
> go
>
> acc * ademin
>
> def a2 = 1
> set sub nam ademin keep append
> rep summ a2 subtot
>
> go
>
> can cle
>
> set rep lim 1000 - can be any val
>
> acc * ademin
>
> def ainit = 1
> def a2 = 1
> set sub nam ademin keep append
> rep summ a2 subtot init ainit
>
> go
>
>
>
> regards Bri,
>
>
>
>
>> From: shulbert@littlejohnfrazer.com
>> To: VNguyen@wsboces.org
>> CC: powerh-l@lists.sowder.com
>> Subject: RE: how to generate records to fill up a table
>> Date: 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.
>>
>> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
>> 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.
>
>
> _________________________________________________________________
> Stay in touch with absent friends - get MSN Messenger
> http://www.msn.co.uk/messenger
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> 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.
> --------------------------------------------------------------------------------
>
> Date: Tue, 08 Mar 2005 17:37:19 +0000
>
> .
>
-----------------------------------------------------------------------
Any views expressed in this message are those of the sender and not
necessarily those of CCA Group. The unauthorized use, disclosure,
copying or alteration of this message is forbidden. The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed. Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.