Fundamental Technologies

Ulysses HISCALE Pages

A5.6 STATMRG

Document revision 8/20/85

A5.6.1 Overview

General: The program STATMRG merges status temporary files into the status database. It must be run every time a status temporary is created, which is every time the ARCGEN program is run. (Note: one can re-run STATMRG without problem. Re-merging STAT.TMP will not change the database.)

STATMRG reads the temporary file and the database file, comparing each record using its spacecraft clock value. It writes a merged file which is time ordered and has all overlap times removed.

STATMRG prints out a status listing of the status data base. This details the total amount of storage required by the database as well as indicates its start and end times.

For example:

% statmrg

Status File Merge Program ver 7-12-85
There are 32 status records available.
They total 0.88 Kbytes of storage.
The data base starts 1984/326 19:47:43
and ends 1984/326 22:31:59

%
% rm STAT.TMP
%

Programming Level

Files needed to create STATMRG are as follows:

statmrg.f STATMRG main program
statblk.inc Status record definition
Makefile Input file to UNIX 'make' utility to produce ARCGEN production programs

Files needed to run STATMRG are

STAT.TMP A temporary file produced by ARCGEN
STATLOG.DAT The status database file

Routines in statmrg.f:

1. Program statmrg

The main program section for STATMRG does the following:

a) Sequentially reads both the STAT.TMP file and the STATLOG.DAT file.
b) It writes out to a temporary file whichever is earlier; in the case of equal records it writes out the information read from STAT.TMP replacing that which is in the database.
c) Finally, it copies the information back from the temporary into the STATLOG.DAT file.

Next: A5.7 SYNCHK

Return to HISCALE Data Analysis Handbook Table of Contents.
Return to HISCALE Data Production Center Main Page.

Updated 11/21/02, T. Hunt-Ward