write to file with quick

Deskin, Bob Bob.Deskin@Cognos.COM
Fri, 17 Sep 2004 10:38:58 -0400


This is consistent with my understanding of what happens. For direct
files, we post the end-of-file marker on each write. That's because if
we don't and the file is shared, the record just written may not be
available to other users. This would be the case if the records are
blocked. Normally, the block isn't posted until full or the file is
closed. This causes additional output to the file. In QUIZ, the file is
opened for output only and there is no need to do this posting, or any
locks around the output.

Bob Deskin              
Senior Product Manager, Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 7268 FAX: (613) 727-1178
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA

-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Vissers, Wilbert
Sent: September 16, 2004 10:17 PM
To: powerh-l@lists.sowder.com
Subject: RE:write to file with quick



Hi Jari,  these options may help,  we think from your ref to RMS that
you may be working on a Vax, so this is from Michael and I:

Options:

(a) Pre-allocate disc space for the file.  The reason being that on a
VAX the file may be being continuously extended by the operating system
1 record at a time because that's what quick would be writing.  That's
what the system administrator could have been seeing.

(b) Write to an indexed file instead of a sequential file, then extract
the data part afterwards with a utility or Quiz.  Set a simple key to
the record number to keep the index clean.  The reason for this idea is
that indexed files are more normal and there may well be something
unusual about what quick needs to do when working with sequential files.


Couldn't resist doing this at lunchtime, so we had a little play and ran
some tests on a very slow old machine we have here, for 20,000 records:

(1) Quiz to subfile          = 25 seconds
(2) Quick to sequential file = 32 minutes yes minutes  
(3) Quick to indexed file    =  7 minutes 

Quiz code:
----------
ACCESS GL-BATCH
REPORT SUMMARY ALL
SET REPORT LIMIT 20000
SET SUBFILE 
GO

Quick code:
-----------
LET WK-COUNT = 0
INFO = "STARTING " + ASCII(SYSTIME,8) NOW RESPONSE
WHILE WK-COUNT < 20000
BEGIN
  LET WK-COUNT = WK-COUNT + 1
  LET BATCH-KEY OF GL-BATCH  = ASCII(WK-COUNT)
  PUT GL-BATCH RESET     ; <---- DESIGNER FILE

  END
INFO="FINISHED " + ASCII(SYSTIME,8) NOW RESPONSE

Hope something in this helps, best regards.
Wilbert

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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. 
  
       This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.