IMB

Returns a string of digits, each digit from 0 to 3, representing the bars in the Intelligent Mail Barcode, including any start/stop characters and characters for error detection or correction. Use the output from the IMB function as values in the <ADDPART> tag when creating an Intelligent Mail Barcode.

Use the IMB function if you are creating an Intelligent Mail Barcode for use in the U.S. If you are creating a barcode for use in the U.K., use the FOURSTATE function to create a 4-state barcode.

Note: EngageOne™ Enrichment does not validate the data you put into barcodes. It simply takes the data provided and converts it to the barcode form. You must verify that the data you are encoding meets the Intelligent Mail Barcode requirements of the USPS. Refer to the USPS documentation on the Intelligent Mail Barcode for information on data and layout requirements.

Syntax

IMB (string)

Arguments

Argument Description Default
string An input string to be encoded. The string consists of five fields concatenated together:
  • Barcode identifier—2 digits (the second digit must be 0 through 4)
  • Service type identifier—3 digits
  • Mailer identifier—6 or 9 digits
  • Serial number—9 digits when using a six-digit mailer ID; 6 digits when using a nine-digit mailer ID
  • Delivery point ZIP Code™—0, 5, 9 or 11 digits
If the value of a field contains fewer digits than the number of digits assigned to that field, the field must be padded with leading zeros. For example, if your special services number is 12, the number in the string should be 012.

For information on Intelligent Mail Barcode use, see the USPS® website.

None

Results

Result Description
Return A string of digits from 0 to 3 that represent the bars in the 4-State bar code. The numbers indicate the following:
0 Full bar
1 Ascender
2 Descender
3 Tracker
%%RC One of the following:
-3 Invalid string length
-4 Invalid barcode identifier. The barcode identifier is the 2nd digit in string. It must be between 0 and 4
0 No error
1 Invalid data found in string.
%%RM A null string ('').
%%RV This value will be 65 if the call was successful. There are 65 digits (bars) in the Intelligent Mail Barcode.

Examples

Function Call Return %%RC
IMB('0123456709498765432101234567891')
1123002032123112113023221
11223233210121222300
0