From:	AITGW::"bed_gdg@SHSU.edu" "George D. Greenwade"  6-DEC-1991 11:45:25.93
To:	madison@vms.ecs.rpi.edu
CC:	mx-list@vms.ecs.rpi.edu
Subj:	Re: MX tuning

Received: by AITGW.DECnet (utk-mail11 v1.5) ; Fri, 6 Dec 91 11:43:48 EST
Received: from vms2.ecs.rpi.edu by aitgw.ge.com (5.65/GE Gateway 1.4)
	id AA18262; Fri, 6 Dec 91 11:43:41 -0500
Errors-To: list-mgr@vms.ecs.rpi.edu
X-Listname: Message Exchange discussion list <MX-List@vms.ecs.rpi.edu>
Received: from odin.shsu.edu ([192.92.115.4]) by vms.ecs.rpi.edu (MX Z3.0) with
          SMTP; Fri, 06 Dec 1991 10:28:43 EST
Received: by SHSU.edu (MX Q3.0) id 30672; Thu, 05 Dec 1991 16:27:11 CST
Sender: <bed_gdg@SHSU.edu>
Date: Thu, 05 Dec 1991 16:26:21 CST
From: "George D. Greenwade" <bed_gdg@SHSU.edu>
Reply-To: "George D. Greenwade" <bed_gdg@SHSU.edu>
To: madison@vms.ecs.rpi.edu
Cc: mx-list@vms.ecs.rpi.edu
Message-Id: <00952AA7.D3CB2A60.30672@SHSU.edu>
Subject: Re: MX tuning
 
In <4_rqppf@rpi.edu> (5 Dec 91 20:48:46 GMT), madison@mdmvs.ecs.rpi.edu
(Matt Madison) posted:
> Unfortunately, the revised queuing software won't be in the V3.0 release. I
> just didn't have time to get it written _and_ thoroughly tested.  But it's
> coming.  Until then, RMS indexed file tuning expertise will be handy to
> have for really busy systems.
 
Attached below my sig is a *very* handy DCL command file I use each morning
to RMS optimize our FLQ_DIR:SYSTEM_QUEUE.FLQ_CTL file.  Be absolutely sure
that all MX processes are down and that the file is not locked by a user
sending mail or it will abort.  Also, it is advisable to do FLQ PURGE prior
to running the file to get the smallest file possible (we go from ~5,000
blocks each morning to an optimized size of ~50 blocks -- a real nice
result). The file is handy for optimizing all RMS indexed files, so it has
more applications than merely MX (and many of you gurus out there already
probably have one of these, but...).
 
Regards,  George
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
George D. Greenwade, Ph.D.                            Bitnet:  BED_GDG@SHSU
Department of Economics and Business Analysis         THEnet: SHSU::BED_GDG
College of Business Administration                    Voice: (409) 294-1266
P. O. Box 2118                                        FAX:   (409) 294-3612
Sam Houston State University              Internet:        bed_gdg@SHSU.edu
Huntsville, TX 77341                      bed_gdg%SHSU.decnet@relay.the.net
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$! File name: OPTIMIZE.COM
$ON WARNING THEN GOTO ERR
$IF "''P1'" .EQS. "" THEN INQUIRE P1 "Enter the file name to be optimized"
$IF "''P1'" .EQS. "" THEN EXIT
$DOT = F$LOC(".","''P1'")
$IF DOT .EQS. F$LEN(P1) THEN P1 = P1 + ".DAT"
$OPEN/READ XXX 'P1
$CLOSE XXX
$ORG = f$file_attributes("''p1'","ORG")
$IF "''ORG'" .NES. "IDX" THEN GOTO NOTIND
$BEGALQ = F$FILE("''P1'","ALQ")
$BEGEOF = F$FILE("''P1'","EOF")
$WRITE SYS$OUTPUT "File uses " + "''BEGEOF'" + " of " + "''BEGALQ'" + -
     " blocks allocated"
$WRITE SYS$OUTPUT "Analyzing input file..."
$ANALIZE/RMS/FDL/OUTPUT=TEMP.FDL 'P1
$WRITE SYS$OUTPUT "Optimizing file definition..."
$EDIT/FDL/NOINT/ANAL=TEMP.FDL TEMP.FDL
$WRITE SYS$OUTPUT "Converting file using optimized definition..."
$SET RMS_DEFAULT/BUFFER=40/INDEXED
$SET RMS_DEFAULT/BUFFER=40
$SET RMS/BLOCK=40
$SET WORK/LIM=1000
$CONVERT/FDL=TEMP.FDL 'P1 'P1
$WRITE SYS$OUTPUT "Conversion finished."
$ENDALQ = F$FILE("''P1'","ALQ")
$ENDEOF = F$FILE("''P1'","EOF")
$RECL = BEGALQ - ENDALQ
$WRITE SYS$OUTPUT "Optimized file uses " + "''ENDEOF'" + " of " + -
     "''ENDALQ'" + " blocks allocated"
$WRITE SYS$OUTPUT "Optimization reclaimed " + "''RECL'" + " blocks"
$DEL/NOLOG TEMP.FDL.*
$INQUIRE IPT "Purge file [N]"
$IF "''IPT'" .EQS. "Y" .OR. "''IPT'" .EQS. "Y" THEN PURGE/LOG 'P1
$SET RMS_DEFAULT/BUFFER=0/INDEXED
$SET RMS_DEFAULT/BUFFER=0
$SET RMS/BLOCK=0
$SET WORK/LIM=800
$EXIT
$NOTIND:
$BADFIL = "''P1'" + " IS NOT AN INDEXED FILE...ABORTING"
$WRITE SYS$OUTPUT BADFIL
$EXIT
$ERR:
$WRITE SYS$OUTPUT F$MES("''$STATUS'")
$WRITE SYS$OUTPUT "Error has occured...Aborting"
$EXIT
