Instruction manual

SECTION 7. DATA COLLECTION (DBSELECT)
7-2
A typical data collection sequence would be:
1. A Data Advise is sent to each station.
2. DLSMGR polls for data at the user entered
interval.
3. When data is received DLSMGR sends the
data to the module (i.e., DBSelect) that
requested the data.
4. If DBSelect detects that the data it received
was not the data it expected (i.e., one or
more records are missing) a hole collection
is started.
5. The polled data is stored in the shadow files
or sent through the Named Pipe.
6. When hole collection data is received, it is
also stored in the current shadow file or
sent through the Named Pipe. Polling
continues during the hole collection
sequence.
7.2 DATA FILE NAMES, HEADERS,
BALING, AND ARCHIVING
Data files are stored in ASCII in a comma
delineated format. Each file has an ASCII
header describing the field's names of data
contained in the file. Section 8.6 gives a
detailed description of the header and file
format. The DBSelect ASCII Data files are
suitable for archiving or importing to spread-
sheet or other analysis software
When ASCII data files are created, DBSelect
continuously stores the data. Periodically it
produces (bales) data files that the user (or user
application) can access.
DBSelect stores the baled files for a particular
station in a subdirectory with the station's name.
A data file name consists of a filename (up to 8
characters) and a 3 character extension
(name.ext). The filename matches the table
name and the extension is a 3 digit number
(000-999) chosen to make the filename with
extension unique. For example, the first baled
data file from a table named 'HOURLY' in a
station named 'Dallas' will be stored in a sub
directory DALLAS\ in a file named
'HOURLY.000'. When data from a different
table at the 'Dallas' station is collected it is
stored in the same sub directory with an
appropriate filename. DBSelect will store the
next baled file with the next available extension.
When all 1000 file extensions are used the
oldest file will be overwritten.
DBSelect should produce a complete set of
data, however the records may not be sorted by
time and may be found across multiple baled
files. This is due to hole collection. A separate
utility EXTRACT.EXE can be used to sort,
merge, and check baled files producing a single
data file (see Section 8.2). DBSelect does not
use these files once they are baled. The baling
takes place on a user specified interval.
Between the times when DBSelect bales files
(during the baling interval), DBSelect stores the
data it collects in temporary or 'shadow' files.
These files, located in user selected directories,
should not be accessed by anything other than
DBSelect. A BALE NOW button is available if
current data is needed before the next time to bale.
After each baling, DBSelect will start execution of a
REXX file named "BALEEXIT.CMD". This can be
used to process or move the baled files.
7.3 RUNNING DBSELECT
Double click on the DBSelect icon. If DBSelect
has been run before, it will use the same settings
it used previously and resume collecting data
automatically.
7.3.1 SELECTING THE DATA'S PRIMARY
DESTINATION
DBSelect will collect and deliver a complete set
of the selected data to one of two destinations;
ASCII files or an Acknowledged Named Pipe.
DBSelect can only supply a complete set of
data to the selected destination. Only one of
these destinations maybe selected. When this
destination is changed, DBSelect will not resend
all data that was previously sent, so it is
important to have this set correctly.
7.3.2 ACKNOWLEDGED NAMED PIPE
The Acknowledged Named Pipe is used with
TCP\IP links to other computers or with custom
user supplied software such as a program to
feed the data to a commercial database (see
Figure 7-1). Select NAMED PIPE
ACKNOWLEDGED from the FILE menu to
enable the acknowledged named pipe. The
software receiving the data from the named
pipe (Named Pipe Client program) must also be
started. The protocol used with the named pipe
is found in Section 8.5. Sample source code for
client software is available, including C source
code for TCP\IP server and REXX source code
for an IBM DB/2 database feed program. The
pipe name is "\PIPE\RTMS."