GTXTWLookup returns an nine-digit key comprised of a two-digit Sovos state code, the five-digit ZIP Code, and two-digit Sovos geocode. If you own Sovos products, this key is used to find the appropriate taxing jurisdiction in Sovos lookup tables.
Syntax
GTXTWLookup (&stTWIn, &stTWOut, lFixedString);
Parameters
TWINPUT stTWIn; /* input structure for TWINPUT (see below) */
TWOUTPUT stTWOut; /* output structure for TWOUTPUT (see below) */
long lFixedString; /* String termination flag */Input Structure
Elements |
Data Type |
Description |
---|---|---|
cFunc |
char |
E Performs end-of-job functions, such as closing Sovos cross-reference file, as well as any platform-related end-of-job functions, while the calling program frees memory. Other Performs match to the Sovos cross-reference files. |
szFIPSState |
char[2+1] |
FIPS State Code |
szZIP |
char[5+1] |
ZIP Code |
szCountyCode |
char[3+1] |
FIPS County Code |
szPlaceCode |
char[5+1] |
FIPS Place Code |
szTaxDist |
char[10][5+1] |
Tax District Code. Up to 10 SPD numbers. |
Output Structure
Elements |
Data Type |
Description |
---|---|---|
cGenRC |
char |
GeoTAX return code denoting the level of match obtained against GTTAXW master file: E Exact match using all five input parameters—state, zip, county, place/city name, OCL, STD. (OCL and STD may not be present) P Partial match using the first four input fields—state, zip, county, place/city name N Default coded—state and zip blank Unsuccessful match; no output. |
szState |
char[2+1] |
Sovos State Code |
szZIP |
char[5+1] |
ZIP Code |
szGeoKey |
char[2+1] |
Sovos geocode |
szGTOVint |
char[20+1] |
Month, name, and year when the Sovos master file was created by the user. |
szGTOVer |
char[4+1] |
Software version used to build the GTTAXW file. |
Code Example
#include "geotax.h"
TWINPUT stTWIn;
TWOUTPUT stTWOut;
long lReturnCode;
long lFixedString;
.
.stTWIn.cFunc = 'O';
strcpy (stTWIn.szFIPSState, "24");
strcpy (stTWIn.szCountyCode, "033");
strcpy (stTWIn.szPlaceCode, "52975");
strcpy (stTWIn.szZIP, "20706");
strcpy (stTWIn.szZIP4, "1852");
strcpy (stTWIn.szPlaceName, "MITCHELVILLE");
stTWIn.cIncFlag = stTWOut.cIncFlag;
lFixedString = 0;
lReturnCode = GTXTWLookup (&stTWIn, &stTWOut, lFixedString);
if (lReturnCode = GTXAPI_SUCCESS)
{
printf ("\nReturn code: %c\n", stTWOut.cGenRC);
printf ("State, ZIP, Key: %s, %s, %s\n\n", stTWOut.szState, stTWOut.szZIP, stTWOut.szGeoKey);
}