Description
The State macro is used to insert state names into strings generated with the Custom String generator.
The macro is an analog of the State data generator.
Syntax
The macro has the following syntax:
%STATE(Format, *xN)
Parameters
Format
Optional parameter. Specifies the format of state names to be generated:
Value | Description |
---|---|
FULL |
Default. The macro generates full state names (for instance, Florida, Texas and so on). |
Abbreviated (or ABBR ) |
The macro generates abbreviated state names (for instance, FL, TX and so on). |
The values are case-insensitive.
If you specify any other value, the macro will use the default format - FULL.
*xN
Optional parameter. Specifies the number of possible repetitions of each value in series of generated strings. N is a positive number that specifies the number of repetitions: 1, 2, 3, and so on. The default parameter value is *x1
(no repetitions).
Examples
The following example demonstrates how to use the State macro:
-
%STATE(FULL, *x2)
Generates full state names. Each of the names will be repeated twice in the series of generated custom strings.
-
%STATE(ABBR)
Generates abbreviated state names.
-
%STATE
Generates full state names (in this case, the default parameter value is used).
-
%STATE(COUNTY) <— Invalid value
Generates full state names (in this case, the default parameter value,
FULL
, is used).
Remarks
-
For more information on adding macros to custom strings, see About Custom String Generator
-
For more information on general rules used for specifying macro parameters, see Custom String Generator Rules .
See Also
Macro Reference
Custom String Generator Rules
Custom String Generator
State Generator
Using Data Generators
Generating Values