Federal Information Processing Standards (FIPS) Codes for the Identification of the States, the District of Columbia and the Outlying Areas of the United States, and Associated Areas, Publication #5-2, May, 1987, may be used for 'state' codes.
The United States Postal Service online ZIP code lookup system or AIS viewer is a possible replacement for U.S. postal codes.