GsFormatCASSHeader - geostan_1 - 2024.01

GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS

Product type
Software
Portfolio
Locate
Product family
GeoStan Geocoding Suite
Product
GeoStan Geocoding Suite > GeoStan
Version
2024.01
Language
English
Product name
GeoStan
Title
GeoStan Geocoding Suite Reference for Windows, Linux, and z/OS
Copyright
2024
First publish date
1994
Last updated
2024-07-29
Published on
2024-07-29T23:01:18.924000

Writes a CASS 3553 report to the header buffer argument.

Syntax

GsFunStat GsFormatCASSHeader(GsId gs,GsExtendCASSData *pData, int dataSize, pstr headerBuffer,int bufSize);

Arguments

  • gs: ID returned by GsInitWithProps for the current instance of GeoStan. Input.
  • *pData:   Writes the CASS information to the header buffer using the data passed in GsExtendCASSData. This structure contains the following (lengths are in brackets):

    char CASS_Z4CompanyName[40]

    Name of the company requesting certification. Input.

    char CASS_Z4Config[4]

    CASS Z4Change configuration. Input.

    char CASS_Z4SoftwareName[30]   

    Name of the CASS Z4Change software. Input.

    char DPV_FileFormat   

    DPV date file format: F - Full, S - Split, and L - Flat. Input.

    char certificationDate[24]

    Date of certification. Input.

    intlu DPVDatabaseDate   

    DPV database date. Input.

    intlu EWS_Denial

    Number of matches denied due to a matching address found in Ews.txt. Input.

    char listName[20]

    Name of the list. Input.

    char listProcessorName[25]

    Name of the list processor. Input.

    intlu LOTDatabaseDate

    eLOT database date. Input.

    char LOT_DPCCompanyName[40]

    Name of the company requesting eLOT & DPC Utility certification. Input.

    char LOT_DPCConfig[4]   

    eLOT & DPC Utility configuration. Input.

    char LOT_DPCSoftwareName[30]

    Name of the eLOT & DPC Software. Input.

    char LOTVersion[12]

    eLOT software version. Input.

    char version[12]

    Software version. Input.

    intlu nCarrt

    Number of Carrier Routes coded records. Input.

    intlu nDpbc

    Number of delivery point coded records. Input.

    intlu nHighRiseDefault

    Number of records that matched to the default highrise record. Input.

    intlu nHighRiseExact

    Number of records that matched to an exact highrise record. Input.

    intlu nLACS

    Number of LACSLink converted addresses, if LACSLink is loaded. If LACSLink is not loaded, the number of records that match to a LACS ZIP + 4 record. Input.

    intlu nLot

    Number of eLOT coded records. Input.

    intlu nRecs

    Number of processed records. Input.

    intlu nRuralRouteDefault   

    Number of records matched to a default rural route record. Input.

    intlu nRuralRouteExact   

    Number of records matched to an exact rural record. Input.

    intlu nSuiteLink

    Number of records processed through SuiteLink. Input.

    intlu nTotalDPV

    Deprecated. Number of DPV confirmed addresses. Input.

    intlu nZIP

    Number of records with an output 5-digit ZIP Code. Input.

    intlu nZIP4

    Number of records with an output ZIP+4. (number of DPV confirmed records). Input.

    intlu nZ4Changed

    Number of records skipped (not reprocessed) because the ZIP + 4 did not change. Input.

    char pSearchPath[256]

    Location of GeoStan data. Input.

    intlu structVersion

    Set equal to GS_GEOSTAN_VERSION. Input.

    char templateName[256]

    Full path and name of cass3553.frm template file. Input.

    intlu zip4DatabaseDate   

    ZIP + 4 database date. Input.

    char z4ChangeVersion[12]

    Z4Change software version. Input.

  • dataSize: Size of the CASS report data structure. Input.
  • headerBuffer: Buffer containing the CASS header line from the Stage file. Input, Output.
  • bufSize: Length of the header buffer. Input.

Return Values

GS_SUCCESS

GS_ERROR   Call GsErrorGetEx for more information.

GS_WARNING   Call GsErrorGetEx for more information.

Prerequisites

GsInitWithProps( )

Notes

When you specify a version number for either version, z4ChangeVersion or LOTVersion, GeoStan updates the corresponding fields in the header buffer similar to GsWriteExtendCASSReport. For example, entering a version number for z4ChangeVersion prompts GeoStan to fill the following fields in cass3553.frm:

  • Section "B. List", Item "2b": Date List Processed Z4Change

  • Section "B. List", Item "3b": Date of Database Product Used Z4Change

  • Section "C. Output", Item "1b": Total Coded Z4Change Processed

To develop CASS certified applications in GeoStan, you must have the correct license agreement with Precisely. You must also obtain CASS certification from the USPS for your application. Using GeoStan does not make an application CASS certified.

For information on becoming CASS certified, see CASS certification

This data is defined in geostan.h in the data structure GsExtendCASSData.

Example

/* assign outCASSHeader flag to process->writeCASSHeader */
/* open address input file */
/* if writeCASSHeader flag is set to 1 read and store headerline first */
/* otherwise ignore it */
if(process->writeCASSHeader == 1)
  {
  process->headerBuffer = (pstr)malloc(process->inRecLen + 1);

  /* get the headerline */
  fgets(process->headerBuffer, process->inRecLen,process->inputFile);
             
  /* write the header line as is to the output file as a spaceholder */
  fwrite(process->headerBuffer, process->inRecLen, 1, process->outputFile);
  fputs("\n", process->outputFile);
  }
.
.
.
/* Geocode each address line and write its output record to the output file */
.
.
.
/* if writeCASSHeader flag is set to 1 -> write the CASS header to the output file... */
if(process->writeCASSHeader == 1)
  {
  /* copy the data from CASSData structure into the correct positions in the header as defined by USPS */
  GsFormatCASSHeader(process->gs, &CASSData, sizeof( CASSData ), process->headerBuffer, process->inRecLen);
             
  /* set the file pointer to the beginning of the file */
  fseek(process->outputFile, 0L, SEEK_SET);
             
  /* - write the formatted header line to the output file */
  fwrite(process->headerBuffer, process->inRecLen, 1,process->outputFile);
  }