You are here: Development Standards > Routines > General Routines > GENADDR.PUB

# GENADDR.PUB

GENADDR.PUB is a public program that properly formats a given name and address to a given number of lines based on US Postal Service regulations. Use this program where you print address lines that require adherence to USPS rules.

`0100 ENTER FILE[ALL],NA$,ADDRESS$[ALL],LINES,WIDTH,MSG$`

Variable | Description
FILE[ALL] | Standard file array
NA$ | Template containing information to be formatted
ADDRESS$[ALL] | Array containing properly formatted name and address
LINES | Number of lines to be returned to the calling program
WIDTH | Number of characters wide the address lines need to be
MSG$ | Error message returned to the calling program

Exit Points | Explanation
EXIT | GENADDR.PUB does not return any errors.

This chart breaks down the NA$ template:

Field | Description
ATTN:C(50) | Attention
NAME:C(50) | Name
ADDR1:C(50) | Address Line 1
ADDR2:C(50) | Address Line 2
ADDR3:C(50) | Address Line 3
CITY:C(50) | City
STATE:C(3) | State
ZIP:C(12) | Zip Code
CTRY:C(2) | Country
PRTNAME:N(1) | Boolean whether or not to print name in address lines