Table of Contents
RECIDreport - database recid report generator
RECIDreport < list_of_tuples
> recid_report
This program generates a report on the
LABELREC,
DESCREC, and
DATAREC tables. The report is sorted in DataRec.RecId order
with I/O address information appearing first followed by Label, RefName,
Offset and size information.
A set of SQL queries and other tools are used
to extract the necessary information from the database and massage it into
a form suitable for use with this program.
The input should contain one
tuple per line. Lines are terminated by a newline. Fields within a tuple
are separated by a |.
The following fields from the
LABELREC,
DESCREC, and
DATAREC tables are used and appear as input to this program
in this order:
DataRec.RecId
DataRec.DTkey
DataRec.Driver
DataRec.Crate
DataRec.Slot
DataRec.ChanNo
DataRec.DevType
DescRec.OffSet
DescRec.Size
DescRec.Label
RefKeys.RefVal
DescRec.RefName
RefKeys.RefAttNme
DescRec.Llabel
DescRec.LrefName
# generate RecId report
#
# pull all DATARECs out of database in RecId order
#
psql -d testdb -f data2a.pqry -qt -o f1
#
# pull all DATARECs w/ associated DESCRECs out of database in RecId order
# use gawk to remove extra field
#
psql -d testdb -f data2b.pqry -qt | gawk -f field2.awk | uniq > f2
#
# filter out common members of both files (leave only differences)
# massage output file to clean up comm’s output and also to make file
# look like output from data2.qry
#
comm -3 f1 f2 | sed -f escript2 > f3
#
# pull all DATARECs with DESCs out of database
#
psql -d testdb -f data2.pqry -qt -o f4
#
# pull all DATARECs with DESCs out of database
#
psql -d testdb -f data2_L.pqry -qt -o f5
#
# merge the DATARECs with null DATAREC list
# sort it to make sure
#
cat f3 f4 f5 | sort > f6
#
# trim trailing whitespace
#
WStrim trimRECID < f6 > f7
#
# generate report
#
RECIDreport < f7 > RecId.lst
$Id: RECIDreport.8,v 1.0 1999/02/09 18:16:21 kitchen
Exp $
Table of Contents