A DSS catalog is a list of the pathnames in a DSS file. In version 7, the catalog is part of the internal table structure, whereas in version 6, the catalog was saved as a separate file with the extension .dsc.

Obtaining a catalog takes significant resources, especially if the catalog is to be sorted. Use catalog functions sparingly; refrain from searching the catalog for a pathname. It is much more efficient to check for its existence using the function zcheck(ifltab, pathname).

In version 7, when a full catalog is requested, the sort order is saved in the file. Future catalogs will use that sort order if there are no changes, or will use that order as a basis for the next sort to make cataloging more efficient. A file "squeeze" will remove the sort order.

The primary catalog function is zcatalog, which returns the number of pathnames in the catalog. Catalog information, including the list of pathnames, is passed in a "zStructCatalog" structure. You can define a filter for pathnames using the argument "pathWithWild". Function zcatalogFile can also be used when you want to write the catalog list to an external file. Then functions are:

zStructCatalog* zstructCatalogNew();

int zcatalog(long long *ifltab, const char *pathWithWild, zStructCatalog *catStruct, int sortCollectionFlag);

int zcatalogFile(long long *ifltab, const char *catalogFilename, int boolSorted, const char *pathWithWildChars)

where:

const char pathWithWild is either null (for ignore), or a character string that represents a pathname with wild characters represented by a star (*) to match any string in the pathname part. Wild characters can be at the beginning or end of a part, not inside of a string. As an example, "/*/*/*Flow/*/*/*/" will match all pathnames that have "Flow" anywhere in the C part, such as "Flow", "Inflow", "Outflow-Reg", etc. A part such as "Flow*Reg" is not legal. A null (//) will only match a null, where only a star (*) will match all.

int sortCollectionFlag indicates if the pathname list should be sorted or sorted for collections.
       Sorting takes considerable more resources, so use only when needed.
              0: Do not sort (fastest)
              1: Normal sort
              2: Collection sort (slowest)

int boolSorted indicates if the pathname list should be sorted using the pathname parts in the following order "ABCFED". Sorting takes considerable more resources, so use only when needed.

const char *catalogFilename . If you want the catalog to be written to a file other than the default (".dsc"), such as a temporary file, then provide the file name here; otherwise null for the default.

zStructCatalog

typedef struct {

       //  Private
       int structType;

       //  Optional input
       //  For normal catalog, statusWanted = 0, and typeWanted = 0.
       int statusWanted;
       int typeWantedStart;
       int typeWantedEnd;

       //  Search according to record last write time (e.g., records written to
       //  since a previous time (using file header write time)
       //  Times are system times, in mills
       //  lastWriteTimeSearch == 0 for ignore (default)
       //  lastWriteTimeSearchFlag:
       //           -2:          time <  lastWriteTimeSearch
       //           -1:          time <= lastWriteTimeSearch
       //           0:          time == lastWriteTimeSearch
       //           1:          time >= lastWriteTimeSearch
       //           2:          time >  lastWriteTimeSearch
       long long lastWriteTimeSearch;
       int lastWriteTimeSearchFlag;

       //  Output
       //  An array of the pathnames in the DSS file
       char **pathnameList;
       int numberPathnames;  //  number of valid pathnames in list
       int boolSorted;
       int boolIsCollection;

       //  Attributes are descriptors for records, usually used for searching in a list,
       //  but are not used for unique identity.
       //  "::" separates key from attribute, ";;" separates attribute sets
       //  For example
       //  pathnameList[43] = /Tulare/Delano/Flow/01Jan1980/1Day/Obs/"
       //  attribues[43] = "County::Kern;;State::CA;;Region::Southern"
       //  pathnameList[78] = /American/Fair Oaks Local/Flow/01Jan2200/1Hour/ReReg/"
       //  attribues[78] = "Type::Subbasin;;Order::142"
       int boolHasAttribues;
       char **attributes;

       //  If boolIncludeDates == 1 on input, then startDates and endDates
       //  will be int arrays of the Julian first and last date for each
       //  record (pathname)
       int boolIncludeDates;
       int *startDates;
       int *endDates;

       //  Always returns these (right there)
       int *recordType;
       long long *pathnameHash;
       long long *lastWriteTimeRecord;
       long long lastWriteTimeFile;

       //  CRC values - Resource intensive!  Only use if you really needed
       unsigned int *crcValues;
       int boolGetCRCvalues;   //  Set to 1 to have CRC values computed

       //  Private
       int listSize;  // size allocated
       long long *sortAddresses;  //  Used for sorting
       char *pathWithWildChars;  //  Only for info
       char allocated[zSTRUCT_length];

} zStructCatalog;
CODE


Example: Simple Catalog


#include <stdio.h>
#include "heclib.h"

//  A short example of getting a catalog or list of pathnames in a DSS file

int ExampleCatalog1()
{
         long long ifltab[250];
         zStructCatalog *catStruct;
         int status;
         int i, number;

         //  Open the DSS file
         status = zopen(ifltab, "C:/temp/Sample7.dss");
         if (status != STATUS_OKAY) return status;

         //  Create a catalog struct
         catStruct = zstructCatalogNew();
         // int zcatalog(long long *ifltab, const char *pathWithWild,
         //        zStructCatalog *catStruct, int sortCollectionFlag);
         status = zcatalog(ifltab, (const char *)0, catStruct, 1);
         if (status < 0) {
                 printf("Error during catalog.  Error code %d\n", status);
                 return status;
         }

         number = 20;
         if (catStruct->numberPathnames < 20) number = catStruct→numberPathnames;
         printf("First %d pathnames are:\n", number);
         for (i = 0; i < number; i++) {
                 printf("%s\n", catStruct->pathnameList[i]);

         }

         zstructFree(catStruct);
         zclose(ifltab);
         printf("\nCompleted catalog example\n");
         return 0;
}
CODE

First 20 pathnames are:
//SACRAMENTO/PRECIP-INC/01Jan1905/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1906/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1907/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1908/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1909/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1910/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1911/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1912/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1913/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1914/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1915/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1916/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1917/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1918/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1919/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1928/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1929/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1932/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1933/1Day/OBS/
//SACRAMENTO/PRECIP-INC/01Jan1934/1Day/OBS/

Example: Catalog Functions

#include <stdio.h>
#include "heclib.h"

//  A short example to demonstrate catalog functions

int ExampleCatalog2()
{
         long long ifltab[250];
         zStructCatalog *catStruct;
         char *dssFilename;
         int status;
         int version;
         int i, number;

         //  Open the DSS file. It must exist for this example
         dssFilename = mallocAndCopy("C:/temp/Sample7.dss");
         version = zgetFileVersion(dssFilename);
         if (version != 7) {
                 printf("Error, %s must exist and be a version 7 file\n", dssFilename);
                 return -1;
         }
         status = zopen(ifltab, dssFilename);
         if (status != STATUS_OKAY) return status;

         //  Create a catalog struct
         catStruct = zstructCatalogNew();
         //  Generic full sorted catalog
         status = zcatalog(ifltab, (const char *)0, catStruct, 1);
         if (status < 0) {
                 printf("Error during catalog.  Error code %d\n", status);
                 return status;
         }
         else if (status == 0) {
                 printf("There are no records in DSS file %s\n", dssFilename);
                 return status;
         }
         else {
                 printf("There are %d records in DSS file %s\n", status, dssFilename);
         }

         //  Now get all pathnames with an F part of "obs" and a C part that contains "flow"
         zstructFree(catStruct);
         catStruct = zstructCatalogNew();
         status = zcatalog(ifltab, "/*/*/*flow*/*/*/obs/", catStruct, 1);
         if (status < 0) {
                 printf("Error during catalog.  Error code %d\n", status);
                 return status;
         }
         else if (status == 0) {
                 printf("There are no records in DSS file %s with wild path /*/*/*flow*/*/*/obs/\n", dssFilename);
                 return status;
         }
         else {
                 printf("There are %d records in DSS file %s with wild path /*/*/*flow*/*/*/obs/\n", status, dssFilename);
         }

         number = 20;
         if (catStruct->numberPathnames < 20) number = catStruct→numberPathnames;
         printf("First %d wild character pathnames are:\n", number);
         for (i = 0; i < number; i++) {
                 printf("%s\n", catStruct→pathnameList[i]);
         }

//  Now write all pathnames to a text file
         status = zcatalogFile(ifltab, "C:/temp/Sample7.txt", 0, (const char *)0);
         if (status < 0) {
                 printf("Error during catalog.  Error code %d\n", status);
                 return status;
         }
         else if (status == 0) {
                 printf("There are no records in DSS file %s\n", dssFilename);
                 return status;
         }
         else {
                 printf("There were %d pathnames written to file C:/temp/Sample7.txt\n", status);
         }

         zstructFree(catStruct);
         free(dssFilename);
         zclose(ifltab);
         printf("\nCompleted catalog example\n");
         return 0;
}
CODE

There are 601 records in DSS file C:/temp/Sample7.dss
There are 160 records in DSS file C:/temp/Sample7.dss with wild path /*/*/*flow*/*/*/obs/
First 20 wild character pathnames are:
/AMERICAN/FOLSOM/FLOW-RES IN/01Jan2006/1Day/OBS/
/AMERICAN/FOLSOM/FLOW-RES IN - FLOW-RES OUT///OBS/
/AMERICAN/FOLSOM/FLOW-RES OUT/01Jan2006/1Day/OBS/
/GREEN RIVER/GLENFIR/FLOW/01Apr1992/1Hour/OBS/
/GREEN RIVER/GLENFIR/FLOW/01May1992/1Hour/OBS/
/GREEN RIVER/OAKVILLE/FLOW-RES OUT/01May1992/1Hour/OBS/
/GREEN RIVER/WALNUT/FLOW-RES OUT/01Apr1992/1Hour/OBS/
/GREEN RIVER/WALNUT/FLOW-RES OUT/01May1992/1Hour/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1861/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1862/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1863/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1864/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1865/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1866/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1867/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1868/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1869/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1870/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1871/1Day/OBS/
/MISSISSIPPI/ST. LOUIS/FLOW/01Jan1872/1Day/OBS/
There were 601 pathnames written to file C:/temp/Sample7.txt

What Changed?

Sometimes one is interested in which records have changed in a DSS file from an earlier point in time. It may be a program "looking" at a DSS file in order to process data that another program has entered, or a modeling program wants to know if a dataset at a computation point has changed, requiring a recompute. This can be determined by using the "what changed" function, a subset of the catalog function.

The zwhatChanged function will report back pathnames for all records that have changed since a start point based on either a last write time, or on a CRC (Cycle Redundancy Check) value for data within the record. The last write time basis is fast, but will return pathnames for datasets that have been written to, regardless if the actual data has changed (.e.g, zeros written over with zeros). Using CRC values is slower, but will return pathnames for the datasets that have actually changed, not just written to. If the process to be performed subsequently were slow, such as transferring the data over a network, you would want to use the CRC option.

This method requires two calls: set a start point, then later calling get pathnames for changed records call. Usually, the file last write time is checked to determine if the file has been updated by another process or not. For example:

zwhatChangedSetStart(…)
long long lastWriteTimeStart = zgetLastWriteTimeFile(ifltab);
while(1) {
       long long lastWriteTime = zgetLastWriteTimeFile(ifltab);
       if (lastWriteTimeStart != lastWriteTime) break;
       // Assume that another process is writing to the file.
       Sleep(1000);
}
zwhatChanged();

The zwhatChangedSetStart function has the following arguments; a zStructCatalog to hold the starting information for comparison, or null if you want DSS to hold that information in memory. If you close the file or you want to do more than one comparison, you must use a zStructCatalog struct. The next is a pathname string with wild characters to search for, or null for all records. The third is a boolean set to true to indicate if CRC values should be calculated and used for each record with a pathname that matches the pathname with wild characters, or false to indicate that just a last write time should be used. Wild characters have been discussed previously. zwhatChangedSetStart returns the number of pathnames matching the pathnameWithWildChars, or a negative number for an error. The call is:

int zwhatChangedSetStart(long long *ifltab, zStructCatalog *catStruct, const char *pathWithWildChars, int boolUseCRC)

The call to obtain the list of pathnames for records that have changed since the setStart is:

int zwhatChanged(long long *ifltab, zStructCatalog *catStructChanged)

Often, a lot of different data types may be written to the file. You can have several different zStructCatalog structs for different types of datasets, instead of having to test the individual records yourself. For example, you may have one for flows and another for precipitation. To test for different types of data sets, use a new zStructCatalog and a pathWithWildChars in zwhatChangedSetStart for each type of data set you are interested in, then use zwhatChangedCompare instead of zwhatChanged.

The zwhatChangedCompare declaration is:

int zwhatChangedCompare(long long *ifltab, zStructCatalog *catStructBefore, zStructCatalog *catStructChanged, const char *pathWithWild, int boolUseCRC);

Where catStructChanged is a new, empty struct that will contain the changed pathnames.

You can either use a single zStructCatalog for the start, or use a different one for each data type. Using separate zStructCatalogs is generally faster and requires less memory, depending on the number of records to be compared.

For example, if we are interested in Flow-In and Flow-Out, we could do the following:

catStruct = zstructCatalogNew();
status = zwhatChangedSetStart(ifltab, catStruct, "/*/*/Flow*/*/*/*/", 1);
startTime = zgetLastWriteTimeFile(ifltab); 
// Do stuff here with wait loop
... 
lastWriteTime = zgetLastWriteTimeFile(ifltab);
if (lastWriteTime != startTime) {
       catStruct1 = zstructCatalogNew();
       numberIn = zwhatChangedCompare(ifltab, catStruct, catStruct1, "///Flow-In///*/", 1);
       if (numberIn > 0) {
              // Process those records
              . . .
       } 
       zstructFree(catStruct1);
       catStruct1 = zstructCatalogNew();
       numberOut = zwhatChangedCompare(ifltab, catStruct, catStruct1, "///Flow-Out///*/", 1);
       if (number > 0) {
              // Process those records
              . . .
       }
       zstructFree(catStruct1);
       if ((numberIn > 0) || (numberOut > 0)) {
              // Reset the dataset
              zstructFree(catStruct1);
              catStruct = zstructCatalogNew();
              status = zwhatChangedSetStart(ifltab, catStruct, "///Flow*///*/", 1);
       }
       startTime = zgetLastWriteTimeFile(ifltab); 
}
CODE

Example: What Changed Functions

#include <stdio.h>
#include "heclib.h"

//  A short example to demonstrate the what changed functions

int ExampleCatalog3()
{
         long long ifltab[250];
         zStructCatalog *catStruct;
         zStructTimeSeries *tss;
         char *dssFilename;
         int status;
         int version;
         long long startTime;
         long long lastWriteTime;
         int count;
         int i, number;

         //  Open the DSS file. It must exist for this example
         dssFilename = mallocAndCopy("C:/temp/Sample7.dss");
         version = zgetFileVersion(dssFilename);
         if (version != 7) {
                 printf("Error, %s must exist and be a version 7 file\n", dssFilename);
                 return -1;
         }
         status = zopen(ifltab, dssFilename);
         if (status != STATUS_OKAY) return status;

         //  Set our start point
         status = zwhatChangedSetStart(ifltab, (zStructCatalog*)0, (const char*)0, 0);
         if (status != STATUS_OKAY) {
                 printf("Error during zwhatChangedSetStart.  Error code %d\n", status);
                 return status;
         }
         //  Get the starting file last write time
         startTime = zgetLastWriteTimeFile(ifltab);

         //  Loop, checking last write time, then waiting a second
         count = 0;
         //  Note - we are using 1 for demo; you wouldn't normally have a non-exit loop
         while (1) {
                 printf("waiting...\n");
                 _sleep(1000);
                 lastWriteTime = zgetLastWriteTimeFile(ifltab);
                 if (lastWriteTime != startTime) break
                 //  Pretend that another process is writing to the file
                 if (count == 5) {
                          tss = zstructTsNew("//SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/");
                          status = ztsRetrieve(ifltab, tss, 0, 1, 0);
                          if (status != STATUS_OKAY) return status;
                          //  Add one to all values, then store again.
                          for (i = 0; i < tss->numberValues; i++) {
                                  tss->floatValues[i] += (float)1.0;
                          }
                          status = ztsStore(ifltab, tss, 0);
                          if (status != STATUS_OKAY) return status;
                          zstructFree(tss);
                 }
                 count++;
         }

         //  What has changed since the start?
         catStruct = zstructCatalogNew();
         number = zwhatChanged(ifltab, catStruct);
         if (number < STATUS_OKAY) return number;
         printf("\nThe file has been written to and %d records have changed\n", number);
         printf("Those records are:\n");
         for (i = 0; i < catStruct->numberPathnames; i++) {
                 printf("%s\n", catStruct→pathnameList[i]);
         }

         zstructFree(catStruct);
         free(dssFilename);
         zclose(ifltab);
         printf("\nCompleted what changed example\n");
         return 0;
}
CODE

12:20:38.363      -----DSS--- zopen   Existing file opened,  File: C:\temp\Sample7.dss
12:20:38.363                         Handle 3;  Process: 24676;  DSS Versions - Software: 7-HI, File:  7-HI
12:20:38.364                         Single-user advisory access mode
waiting...
waiting...
waiting...
waiting...
waiting...
waiting...
12:20:44.369      -----DSS--- zread   Handle 3;  Version 2:  //SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/
12:20:44.370      -----DSS--- zwrite  Handle 3;  Version 3:  //SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/
waiting...

The file has been written to and 1 records have changed
Those records are:
//SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/

Example: What Changed Functions – Different types of data

#include <stdio.h>
#include "heclib.h"

//  A similar example to ExampleCatalog3, but check for different types of data

int ExampleCatalog4()
{
         long long ifltab[250];
         zStructCatalog *catStruct1, *catStruct2, *catStruct;
         zStructTimeSeries *tss;
         char *dssFilename;
         int status;
         int version;
         long long startTime;
         long long lastWriteTime;
         int count;
         int i, number;

         //  Open the DSS file. It must exist for this example
         dssFilename = mallocAndCopy("C:/temp/Sample7.dss");
         version = zgetFileVersion(dssFilename);
         if (version != 7) {
                 printf("Error, %s must exist and be a version 7 file\n", dssFilename);
                 return -1;
         }
         status = zopen(ifltab, dssFilename);
         if (status != STATUS_OKAY) return status;

         //  For this example, we will be using different structs, which is more efficient
         //  both in speed and memory.  However, you can use just one if you want (e.g., a small file.)
         //  Set our start point for temperature.  Use CRC
         catStruct1 = zstructCatalogNew();
         status = zwhatChangedSetStart(ifltab, catStruct1, "/*/*/Temp*/*/*/*/", 1);
         if (status < STATUS_OKAY) {
                 printf("Error during zwhatChangedSetStart.  Error code %d\n", status);
                 return status;
         }

         //  Now the start point for precip. 
         catStruct2 = zstructCatalogNew();
         status = zwhatChangedSetStart(ifltab, catStruct2, "/*/*/Precip*/*/*/*/", 1);
         if (status < STATUS_OKAY) {
                 printf("Error during zwhatChangedSetStart.  Error code %d\n", status);
                 return status;
         }

         //  Get the starting file last write time
         startTime = zgetLastWriteTimeFile(ifltab);

         //  Loop, checking last write time, then waiting a second
         count = 0;
         while (count < 12) {
                 printf("waiting...\n");
                 _sleep(1000);
                 lastWriteTime = zgetLastWriteTimeFile(ifltab);
                 if (lastWriteTime != startTime) {
                          //  A lot of stuff could be changing in the file, but we are only interesed in two data types
                          //  We'll use the compare function to see if it is one of the ones we want
                          catStruct = zstructCatalogNew();
                          number = zwhatChangedCompare(ifltab, catStruct1, catStruct, "/*/*/Temp*/*/*/*/", 1);
                          if (number < STATUS_OKAY) return number;
                          if (number > 0) {
                                  printf("\nTemperature data has been written to and %d records have changed\n", number);
                                  printf("Those records are:\n");
                                  for (i = 0; i < catStruct->numberPathnames; i++) {
                                           printf("%s\n", catStruct→pathnameList[i]);
                                  }
                                  //  Since we've processed these records, reset the original struct
                                  zstructFree(catStruct1);
                                  catStruct1 = zstructCatalogNew();
                                  status = zwhatChangedSetStart(ifltab, catStruct1, "/*/*/Temp*/*/*/*/", 1);
                                  if (status < STATUS_OKAY) return status;
                          }
                          zstructFree(catStruct);
                          catStruct = zstructCatalogNew();
                          number = zwhatChangedCompare(ifltab, catStruct2, catStruct, "/*/*/Precip*/*/*/*/", 1);
                          if (number < STATUS_OKAY) return number;
                          if (number > 0) {
                                  printf("\nPrecipitation data has been written to and %d records have changed\n", number);
                                  printf("Those records are:\n");
                                  for (i = 0; i < catStruct->numberPathnames; i++) {
                                           printf("%s\n", catStruct→pathnameList[i]);
                                  }
                                  zstructFree(catStruct2);
                                  catStruct2 = zstructCatalogNew();
                                  status = zwhatChangedSetStart(ifltab, catStruct2, "/*/*/Precip*/*/*/*/", 1);
                                  if (status < STATUS_OKAY) return status;
                          }
                          zstructFree(catStruct);
                          //  Reset the start time
                          startTime = zgetLastWriteTimeFile(ifltab);
                 }

                 //  Pretend that another process is writing to the file
                 if (count == 4) {
                          tss = zstructTsNew("//SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/");
                          status = ztsRetrieve(ifltab, tss, 0, 1, 0);
                          if (status != STATUS_OKAY) return status;
                          //  Add one to all values, then store again.
                          for (i = 0; i < tss->numberValues; i++) {
                                  tss->floatValues[i] += (float)1.0;
                          }
                          status = ztsStore(ifltab, tss, 0);
                          if (status != STATUS_OKAY) return status;
                          zstructFree(tss);
                 }

                 if (count == 8) {
                          tss = zstructTsNew("//SACRAMENTO/PRECIP-INC/01Jan1980/1Day/OBS/");
                          status = ztsRetrieve(ifltab, tss, 0, 1, 0);
                          if (status != STATUS_OKAY) return status;
                          //  Add .05 to all values, then store again.
                          for (i = 0; i < tss->numberValues; i++) {
                                  tss->floatValues[i] += (float)0.05;
                          }
                          status = ztsStore(ifltab, tss, 0);
                          if (status != STATUS_OKAY) return status;
                          zstructFree(tss);
                 }
                 count++;
         }

         zstructFree(catStruct1);
         zstructFree(catStruct2);
         free(dssFilename);
         zclose(ifltab);
         printf("\nCompleted what changed example\n");
         return 0;
}
CODE

13:04:45.106      -----DSS---zopen   Existing file opened,  File: C:\temp\Sample7.dss
13:04:45.107                         Handle 3;  Process: 13700;  DSS Versions - Software: 7-HI, File:  7-HI
13:04:45.107                         Single-user advisory access mode
waiting...
waiting...
waiting...
waiting...
waiting...
13:04:50.144     -----DSS--- zread   Handle 3;  Version 6:  //SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/
13:04:50.146     -----DSS--- zwrite  Handle 3;  Version 7:  //SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/
waiting...

Temperature data has been written to and 1 records have changed
Those records are:
//SACRAMENTO/TEMP-MAX/01Jan1960/1Day/OBS/
waiting...
waiting...
waiting...
13:04:54.217     -----DSS--- zread   Handle 3;  Version 4:  //SACRAMENTO/PRECIP-INC/01Jan1980/1Day/OBS/
13:04:54.219     -----DSS--- zwrite  Handle 3;  Version 5:  //SACRAMENTO/PRECIP-INC/01Jan1980/1Day/OBS/
waiting...
Precipitation data has been written to and 1 records have changed
Those records are: //SACRAMENTO/PRECIP-INC/01Jan1980/1Day/OBS/
waiting...
waiting...
13:04:57.254      -----DSS---zclose  Handle 3;  Process: 13700;  File: C:\temp\Sample7.dss