write to file with quick

Deskin, Bob Bob.Deskin@Cognos.COM
Mon, 20 Sep 2004 09:44:29 -0400


I checked the bug in QUICK. It dates back to the mid-90s. There was a problem with sequential files where the last buffer load was not being posted in certain cases. To solve this problem, the buffer was posted on every write. This, of course, resulted in a performance issue where large numbers of records were written. Unfortunately, it seems to be a case of catch 22 and the bug was never resolved completely. Most files declared as SEQUENTIAL should actually be declared as DIRECT because they're used that way. SEQUENTIAL is actually used for things like tape files that cannot be updated in place.

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 Jari.Kaljunen@teliasonera.com
Sent: September 20, 2004 9:27 AM
To: wilbert.vissers@hp.com; powerh-l@lists.sowder.com
Subject: SV: write to file with quick


Hello and thank for the suggestions.

I have now learned that the reason is an old bug in quick. The output file should be declared as direct in dictionary and the record length should be fixed. The performance is still not very goot but it will do just now.

/Jari

-----Ursprungligt meddelande-----
Från: Vissers, Wilbert [mailto:wilbert.vissers@hp.com]
Skickat: den 17 september 2004 04:17
Till: powerh-l@lists.sowder.com
Ämne: 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.

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.