.lm5;.rm75
.autoparagraph
.b2
[VAX83D.NIH]AAAREADME.TXT
.B2
 Contributions from National Institutes of Health, Arthritis Institute,
Laboratory of Molecular Biology, Molecular Structure
.skip
.set paragraph 0,1,3
.tab 8
.nofill
Author:	Dr Gerson H Cohen
	NIH, Bldg 2, Room 312
	Bethesda, MD##20205
.skip
.fill
.left margin 8
.skip
.center; Subdirectory - ACCOUNTS
 This is a set of command files and programs which we run periodically to
analyse our system usage and tune system parameters.
.skip
.indent -2
o Files:
.skip
ACC.COM - This file analyses the system accounting file.
.skip
ACCOUNTS.COM - This is the top level procedure.
.skip
BIGFILES.DOC,
BIGFILES.EXE,
BIGFILES.MAR,
FSPEC.MAR - These four files comprise the program BIGFILES found on the
fall 1982 tape. They are repeated here due to an error which I found in the
file BIGFILES.MAR relating to the calculation of the header number for a given
file.
.skip
MONSTAT.EXE,
MONSTAT.FOR - These files comprise the program MONSTAT which analyses the
results from MONITOR (see that subdirectory) for the purpose of fine tuning
some of the system parameters.
.skip 3
.center; Subdirectory - CVTLOG
 The program CVTLOG converts a file in VFC format such as a .LOG file
or a .LIS file from an execute (@) instruction output into a variable
length line FORTRAN carriage control type. This is frequently usefull
because the carriage control of such files is generally hidden to
FORTRAN users (the FORTRAN User's Guide, AA-D035C-TE, sec 3.5.10,
implicitly shows how this may be
accomplished in FORTRAN, with the use of a USEROPEN routine).
By defining a symbol CVTLOG == "@CVTLOG", the command procedure
CVTLOG.COM will run the program in a manner similar to the use of a
system utility.
.skip 3
.center; Subdirectory - FETCH
 This subdirectory contains several files which we wrote to learn how
to use private section files. We have an application that wants to use
10**6 to 10**7 bytes of data, but the data are not necessarily all
referenced. Since the larger amount would exhaust our data space
and we reasoned that not reading data which we didn't want anyway
would save time, we thought of the private section file with a read
on reference. The procedure proves to be an improvement over the
best fortran reads that we have been able to manufacture. The paging
rate is, of course, down since the system doesn't have to write
out "used" pages and we like the final implimentation, which is not
just exactly what is here but is pretty close. Some of the structure
in the subroutine FETCH is historical for compatibility with the
ultimate product and any applications developed based on this code
should, of course, be tailored in a better way!
 The program TNUMRECS tests the subroutine NUMRECS which may be of some
general utility, itself. It is designed to enable the calling program
to get the number of records in a fixed length file and was a step along
the way in the thoughts about FETCH.
 The program JULDATE was a test to learn how to generate the Julian date.
This form for the day-of-year is sometime usefull, as for an IBM tape
label. I have not yet incorporated the code into the subroutine in [-.tape]
but intend to.
.skip 3
.center; Subdirectory - FLECS
 The FLECS (Fortran Language Extended Control Structure) preprocessor,
version 22.69,
of the University of Oregan is in this directory. Both the FLECS source and
the FORTRAN translations are provided. The source is presented in two parts:
the main - C, and the subroutines - SC. The runoff files correspond to
an earlier RSX version of mine but have the advantage of being machine
readable. Just ignore the parts regarding MACRO sources and MCR, etc.
SC has been optimized somewhat to take advantage of the VAX's capabilities
with character strings.
 The file FLECS.COM, if invoked via the symbol FLECS == "@FLECS",
permits the use of FLECS to take on the characteristics of a system
language processor.
.skip 3
.center; Subdirectory - MONITOR.DIR
 Monitor is run as a detached process. It is invoked by the command procedure
MONITOR.COM, which also contains the procedure itself. It is used to sample
some system states via the commands: SHOW SYSTEM and SHOW MEMORY. These are
later tabulated by the program MONSTAT (see the subdirectory ACCOUNTS).
 The procedure is also used to alter the state of some of the QUEUES, depending
on time of day, to HOLD or RELEASE certain jobs (via MANIPQUE.COM) and to
ensure that a single user does not hog any of our longer QUEUES (see
SHUFQUE.COM which alters the access priority of pending jobs in the
specified QUEUES).
 Since we cannot FORCEX on DCL, instead of pausing by means of a WAIT (which
puts the process into an LEF state) we run the program SLEEPSOME which
HIBernates a specified amount of time. The time is variable and is passed
to the program by means of a logical definition. This also permits purging
the working set.
 The FORCEX is executed by the program CLEANSTOP which sends a control-y
with a warning severity so that the DCL can flag it and exit.
.skip 3
.center; Subdirectory - PLOTQMAN
.skip
.center; A Queue Manager
 This is a resubmission from fall 1981 due to an error in the original code.
The file PLOTQMAN.COR shows the corrections to the original code and has been
included in the version of the program given here.
.skip
.indent -2
o A package for managing a queue of requests to a special device.
 We have a Versatec printer/plotter which is used as the system printer
as well as a plotter. Short of writing a proper symbiont for it
which would handle both print and plot requests,
a task which is currently beyond my capabilities, I have developed
a plotter__queue__manager.
The queue__manager sleeps all day until hearing a request via a mailbox,
whereupon it wakes up and dispatches it in a reasonable fashion via
a subprocess.
The facility to abort an active subprocess (a plot actually coming out),
cancel an entry in the queue and interogate the queue are all provided. The
queue__manager's log also receives a time stamp about once every hour.
 By changing the nature of the subprocess scheduled by the queue__manager,
a queue for something other than our Versatec could be
maintained and, in principle, many such queues
could be maintained by one such manager.
 The queue__manager itself is run in a detached process.
 Unlike the system queues, which persist across a reboot, anything pending
must be rescheduled on reboot.
Other bells and whistles, like deferring a given entry in the queue,  
stopping the queue, ... could be coded into the program.
 The system overhead for running this process appears to be very small.
It is a significant improvement over our previous method
of having a process wake up every 5 minutes to
examine a special directory for the presence of plot files.
.skip
.indent -2
o Required files:
.skip
PLOT.COM - The user interface. Accepts commands from the world
and composes proper messages for the Queue__manager.
This file is put in SYS$MANAGER.
.skip
PLOTQMAN.* - The program and command files to link it.
.skip
IFERR.MAR - a modified version of that on the spring 1981 DECUS
contribution in the subdirectory NCAR. It repaires the v3.0 complaint
about an addressing problem.
.skip
PLOTIT.COM - The command procedure which gets used by the subprocess
submitted from the queue__manager.
This file is put in SYS$MANAGER.
.skip
RUNPLTQMN.COM - The procedure by which the queue__manager is started.
.skip
.indent -2
.tab 20
o Special symbols, definitions and directories:
.no fill
.skip
PLOT	:== @sys$manager:plot
PHELP	:== @sys$manager:plot help
PSTAT*US	:== @sys$manager:plot status
PABORT	:== @sys$manager:plot abort
PCANC*EL	:== @sys$manager:plot cancel
.skip
SYS$MANAGER	= 'f$logical("SYS$DISK")'[sysmgr]
.skip
The directory DBA0:[PLOT] is used.
.skip
.fill
.indent -2
o Other files:
.skip
IOPKG.CHG - This file shows a merged list of differences
between our version of the Versatec supplied routine IOPKG and the original.
The modifications permit the generation of plot files in any directory, passing
the relevant information to the plot file processor via logical names.
.skip
IOPKG.SLP - This file is suitable for application to an unmodified
VERSAPLOT-7 source for IOPKG.
.skip
PLOTS.CHG - This file shows a merged list of differences between our version
of the Versatec supplied routine PLOTS and the original. The modifications
permit the modification of various plot parameters, such as plot size,
from a batch job. The code is fully compatible with the default usage of
the routine, as in the Versatec supplied examples, and also permits the
interactive alteration of these values if the variable NCHANGE is set to -1
in the call.
.skip
PLOTS.SLP - This file is suitable for application to an unmodified
VERSAPLOT-7 source for PLOTS.
.skip
USEPLOTS.EXM - This file gives an example of the useage of the modified PLOTS
routine.
.skip 3
.center; Subdirectory - RESEQ
 The RESEQ program is a modification of the spring 1980 submission. We found
certain cases which would not function properly with the original, in particular
non-left-justified statement numbers. New features which we have installed
include a properly working /RIGHT switch, permitted use of lower case and
the flagging of unpaired quotes, as in a direct access read.
 The runoff files have been updated to this version. The original author
is noted in the source.
.skip 3
.center; Subdirectory - SD
 This subdirectory contains what may be the successor to the very first of
the Set Default quickies. I got it in December 1979 and have kept it functional,
incorporating whatever new DCL features were relevant. The TECO subroutine
is completely replaced; this one is from a PAGESWAPER (v.4, no.1, Aug, 1982).
It remains the simplest that I have seen and seems to do all that I would
ever need. Don't dismiss it without reading it to see its capabilities.
 Implimentation is with a symbol like SD#==#"@SYS$SYSTEM:SDD".
 LIBRARIAN'S NOTE:  Placed in the [.SETDEF] structure.
.skip 3
.center; Subdirectory - TAPE
 This subdirectory contains a collection of tape handling subroutines and
two programs which we use to read and write IBM Standard Labelled or
Unlabelled tapes, FB or VBS type. By using the program MLTAPE as a template,
it is possible to read and write binary, VBS tapes as well.
.skip
.indent -2
o Programs:
 CARDIN - This program reads ASCII or ECBDIC, FB or VBS, labelled or unlabelled
IBM type tapes. A tape is considered to have EBCDIC codes if it is called
labelled. The program does not handle IBM style ASCII tapes or tape labels.
We install a symbol CARDIN#==#"@CARDIN" to invoke the program via the command
file of the similar name. Files are transferred singly and the tape is
rewound after each transfer, a known inconvenience deriving from lack of
forsight 6 years ago.
 SPOUT - This program writes ASCII or ECBDIC, FB, labelled or unlabelled
IBM type tapes. A tape is considered to have EBCDIC codes if it is called
labelled.
We install a symbol SPOUT#==#"@SPOUT" to invoke the program via the command
file of the similar name. Files may be strung together in a concattenation
into a single output file on the tape. Each file on the tape is
transferred singly and the tape is
rewound after each transfer, a known inconvenience deriving from lack of
forsight 6 years ago.
 The program MLTAPE may be used as a template to write input and output
programs for IBM binary VBS tapes. The subroutine NUMCON contains the
entry points for the various numerical conversions. The source is not mine
but I have had it for so long that I can no longer remember to whom to
attribute it.
.skip 3
.center; File - XLIB
 This DCL command procedure was coded by Dr G Gilliland and began as an exercise
in DCL coding. It started with an implimentation of a procedure from the
FORTRAN User's course several years ago. In its present form, it presents
a convenient way to handle both source and object libraries, hence its name.
It is particularly good during development coding. For convenience, each project
is best kept in a subdirectory of that projects name having a library of the
same name and a main of the same name. Otherwise, the procedure permits
the user to reset these names as required.
