how to generate records to fill up a table

Chris Sharman chris.sharman@ccagroup.co.uk
Tue, 08 Mar 2005 17:26:45 +0000


shulbert@littlejohnfrazer.com wrote:
> 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.

On 7.10G3 on VMS 7.3, it doesn't work much - I'd be surprised if it 
doesn't have similar problems on most systems.

Chris

> Q U I Z   (7.10.G3)
> Copyright 1998 COGNOS INC. (ALPHA)
> Licensed PH-AXP-RUNTIME-WITH-REPORTING for customer: 7053780001 CCA STATIONERY LIMITED 2/300
> 
> Qz> cancel clear
> Qz> set report nolimit
> Qz> def counter integer size 4 = 1
> Qz> set subfile keep name counting
> Qz> rep sum counter
> Qz> go
> 
> Records selected: 0
> Records written:  1
> 
> Qz> access *counting
> Qz> def counter2 integer size 4 = counter + 1
> Qz> set subfile append name counting
> Qz> rep sum counter2
> Qz> go
> *W* Data access error. (COUNTING)
> %RMS-E-FLK, file currently locked by another user
> %SYSTEM-W-ACCONFLICT, file access conflict
> Qz> access *counting
> Qz> def limit1 integer size 4 = parm prompt "Limit [1000]:"
> Qz> def limit2 integer size 4 = 1000 &
> Qz>                          if limit1 = 0 &
> Qz>                        else limit1
> Qz> def counter2 integer size 4 = counter + 2
> Qz> select counting if counter < limit2 - 1
> Qz> set subfile append name counting
> Qz> rep sum counter2
> Qz> go
> 
> Limit [1000]:
> *W* Data access error. (COUNTING)
> %RMS-E-FLK, file currently locked by another user
> %SYSTEM-W-ACCONFLICT, file access conflict



-----------------------------------------------------------------------

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.