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

Determines whether a house number falls within a range.

Syntax

01 GSID                      PIC S9(9) BINARY.
01 GSFUNSTAT                 PIC S9(9) BINARY.
01 NUM-STRING                PIC X(user len).
01 NUM-RANGE-LO              PIC X(user len).
01 NUM-RANGE-HI              PIC X(user len).
*
CALL "GSTSTRNG" USING GSID, NUM-STRING, NUM-RANGE-LO,NUM-RANGE-HI, GSFUNSTAT.

Arguments

GSID   ID returned by GSINITWP for the current instance of GeoStan. Input.

GSFUNSTAT   Return value for the procedure. Output.

NUM-STRING   House number to test. Input.

NUM-STRING-LO    Low house number in the range. Input.

NUM-STRING-HI    High house number in the range. Input.

Return Values

Non-zero   Number is within the range.

0   Number is not within the range or the comparison cannot be made.

Prerequisites

GSINITWP

Notes

This procedure tests to see if the house number is within the range defined by NUM-STRING-HI and NUM-STRING-LO. It handles all valid house number patterns, such as

123

123A

A123

1A23

A1B23

1A23B

1-23

AB

This procedure uses USPS rules defined in Publication 28, "Postal Addressing Standards", for determining whether number is in range or not. Some patterns are not comparable with other patterns; for example, 123 is not comparable to a range of 1A01 to 1A99.