GsWriteExtendCASSReport - 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 USPS CASS report based on a specified template.

Syntax

GsFunStat GsWriteExtendCASSReport (GsId gs, GsExtendCASSData *pData, int dataSize,gs_const_str outputName);

Arguments

GsIdgs   ID returned by GsInitWithProps() for the current instance of GeoStan. Input.

GsExtendCASSData*pData   The structure allows you to specify the name of the template form. This structure is also defined in geostan.h. This function writes a CASS Report using the data passed in GsExtendCASSData. Input.

This structure contains the following:

char CASS_Z4CompanyName[40]    Name of the company requesting certification.

char CASS_Z4Config[3]    CASS Z4Change Configuration.

char CASS_Z4SoftwareName[30]    Name of the CASS Z4Change software.

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

char certificationDate[24]    Date of certification.

intlu DPVDatabaseDate    DPV database date.

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

char listName[20]    Name of the list.

char listProcessorName[25]    Name of the list processor.

intlu LOTDatabaseDate    eLOT database date.

char LOT_DPCCompanyName[40]    Name of the company requesting eLOT & DPC utility certification.

char LOT_DPCConfig[3]    eLOT & DPC Utility Configuration.

char LOT_DPCSoftwareName[30]    Name of the eLOT & DPC Software.

char LOTVersion[12]    eLOT software version.

char version[12]    Software version. Input.

intlu nCarrt   Number of records that are Carrier Routes coded.

intlu nDpbc   Number of records that are delivery point coded.

intlu nHighRiseDefault    Number of records matched to a default highrise record.

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

intlu nLACS   Number of old (usually rural-route) addresses converted.

intlu nLot   Number of records that are eLOT coded.

intlu nRecs   Number of records processed.

intlu nRuralRouteDefault    Number of records matched to a default rural route record.

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

intlu nSuiteLink    Number of records processed through SuiteLink. Input.

intlu nTotalDPV    Deprecated.

intlu nZIP4   Number of records with an output ZIP+4.

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

intlu nZ4Changed    Number of records skipped (not reprocessed) because the Z4 did not change.

char pSearchPath[256]    Location of the GeoStan data.

intlu structVersion    Set equal to GS_GEOSTAN_VERSION.

char templateName[256]    Full path and name of the cass3553.frm template.

char version[12]    CASS software version.

ntlu zip4DatabaseDate    ZIP + 4 database date.

char z4ChangeVersion[12]    Z4Change software version.

dataSize   Size of the CASS report data structure. Input

outputName   Path and name of the report file to write. Input.

Return Values

GS_SUCCESS

GS_ERROR

Prerequisites

GsInitWithProps()

Notes

Before running a CASS report, verify GeoStan has loaded the GSU, USPS.gdi, and GSZ files (ZIPMove data).

Note: See Appendix E: CASS certification overview for an example of a CASS 3553 form and more information on obtaining CASS certification.

When you specify a version number for either version, Z4ChangeVersion or LOTVersion, GeoStan updates the corresponding fields in the template cass3553.frm file. For example, entering a version number for Z4ChangeVersion prompts GeoStan to fill these fields on cass3553.frm:

  • B. List, 2b. Date List Processed Z4Change

  • B. List, 3b. Date of Database Product Used Z4Change

  • C. Output, 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 every application. Using GeoStan does not make an application CASS certified.

To receive a return value of GS_SUCCESS, the only members of the GsExtendCASSData struct that you MUST set are structVersion and templateName.

Example

/* get the file status and file Date of required files */
fileRet = GsFileStatus(process->gs, fileStateCode, &fileDate);
             
/* if the file status is GS_GSL_EXISTS fill in the data structure */
if( fileRet & GS_GSL_EXISTS )
{
/* fill CASSData structure */
CASSData.structVersion = GsGetLibVersion();
             
CASSData.nRecs = report.records;
strcpy( CASSData.listName, outListName );
strcpy( CASSData.pSearchPath, process->searchPath );
strcpy( CASSData.LOTVersion, CASSData.version );
strcpy( CASSData.CASS_Z4CompanyName, "Precisely" );
strcpy( CASSData.LOT_DPCCompanyName, "Precisely" );
strcpy( CASSData.CASS_Z4Config, "CAS" );
strcpy( CASSData.LOT_DPCConfig, "CAS" );
strcpy( CASSData.CASS_Z4SoftwareName, programName );
             
/* if doing z4Change - assign z4ChangeVersion */
if (process->lastZ4ChangeProcessDate[0])
{
strcpy( CASSData.z4ChangeVersion, CASSData.version );
}
             
strcpy( CASSData.LOT_DPCSoftwareName, programName );
strcpy( CASSData.listProcessorName, "" );
             
CASSData.zip4DatabaseDate = fileDate;
CASSData.LOTDatabaseDate = fileDate;
}
 .
 .
 .
/* calculate nRecs, nZip, nZip4... and set these in the CASSData structure */
Geocode( )
 .
 ..
/* write the CASS report from data in CASSData structure */
retval = GsWriteExtendCASSReport( process->gs, &CASSData, sizeof( CASSData ), process->CASSFile );
             
if( retval != GS_SUCCESS )
{
printf( " Error Writing CASS Report! \n" );
}