GsFileStatus - 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

Returns if the files successfully opened, and the date of the USPS data used in generating the primary GSD file.

Syntax

intsu GsFileStatus(GsId gs, gs_const_str stateCode, intsu *date);

Arguments

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

gs_const_strstateCode   State FIPS or abbreviation (this argument is now ignored). Input.

intsu *date   Publish date of the USPS data used in the current GeoStan release. Output.

Return Values

The return value is a series of bit-flags. The following GS_ENUMs are used to test these flags:

GS_FILE_EXISTS

Opened a primary GSD file (us.gsd, use.gsd, usw.gsd).

GS_CENTRUS_ALIAS_EXISTS

Loaded the Centrus Alias file (usca.gsi).

GS_SUPP_EXISTS

Opened a supplemental GSD file (ust.gsd, uste.gsd, uswt.gsd).

GS_STATEWIDE_EXISTS

Initialized a state-wide intersection file* (us.gsi, use.gsi, usw.gsi).a

GS_GSL_EXISTS

Opened eLOT and Z4Change data b (us.gsl).

GS_EWS_MATCH_EXISTS

Loaded a valid, unexpired EWS file (ews.txt).

GS_ZIPMOVE_EXISTS

Opened ZIPMove data file (us.gsz).

GS_ZIP9_IDX_EXISTS

Opened ZIP9 index file (ZIP9.gsu, ZIP9e.gsu, ZIP9w.gsu).

GS_AUXILIARY_EXISTS

Opened an auxiliary file (.gax).

GS_EXP_CENTROIDS_EXISTS

Opened the Expanded Centroids file (us_cent.gsc - file included in the Master Location Structure Centroid Data Set (MLDB)).

GS_REV_PBKEY_EXISTS

Opened a Reverse PreciselyID Lookup file (*.pbk in DVDMLDR folder)a.

a: You must have an additional license to use this file

b: eLOT data requires an additional license. However, the Z4Change data is alwaysenabled.

Note: Additional file status information is available through GSErrorGetEx().

Prerequisites

GsInitWithProps()

Notes

The date argument indicates the creation date the primary GSD file. The date argument and the GS_INIT_RELDATE initialization property value can be evaluated as follows:

Year

(date/384) + 1990

Month

((date % 384) / 32) + 1

Day

date % 32

Example

/* This example tests for the primary GSD file and eLOT files. */

intsu fileStatus, date;

fileStatus = GsFileStatus(gs, "", &date);
if(!(fileStatus & GS_GSL_EXISTS))
printf("eLOT file not initialized. \n");
if(!(fileStatus & GS_FILE_EXISTS))
printf("Primary GSD file not initialized.\n");