The United States ZIP Code macro is used to insert United States ZIP codes into the strings generated by a data source using the Custom String data generator.
The macro is an analog of the United States ZIP Code data generator.
Syntax
The macro has the following syntax:
%USZIP(CodeFormat)
Parameters
CodeFormat
Specifies the format of the ZIP codes that will be generated.
Available values of the parameter:
-
XXXXX
– generates five digits ZIP codes. -
XXXXX-XXXX
– generates ZIP+4 codes. -
All
– Default. Generates five digits ZIP and ZIP+4 codes.
The parameter is case-sensitive. |
Examples
The following examples demonstrate how to use the United States ZIP Code macro:
-
ZIP Code: %USZIP(All)
Generates a string containing a ZIP code in the
XXXXX
orXXXXX-XXXX
format. -
%USZIP(XXXXX-XXXX)
Generates ZIP+4 codes.
-
%USZIP(xxxxx) <- Invalid value
The parameter is case-sensitive, so ReadyAPI will not parse the custom string.
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
United States ZIP Code Generator
Custom String Generator
Macro Reference