%macro ZipNameL(_zipcode, _stateNamel); /********************************************************************************************/ /* _ZipCode = the 5 digit zipcode in character format to be looked up. */ /* _StateNamel = the Upper/lower case state name in var _statecode. */ /* */ /* Name: ZipNamel.sas */ /* Data: Sourced from BrainyZip online. Auth: Phil Rack */ /* Date: 5/6/2007 Revd: */ /* */ /* Copyright (C) 2007 by MineQuest, LLC. All Rights Reserved. */ /********************************************************************************************/ IF (&_zipcode ge '00210' ) and ( &_zipcode le '00215' ) then &_statenamel = 'New Hampshire' ; IF (&_zipcode ge '00501' ) and ( &_zipcode le '00544' ) then &_statenamel = 'New York' ; IF (&_zipcode ge '01001' ) and ( &_zipcode le '02791' ) then &_statenamel = 'Massachusetts' ; IF (&_zipcode ge '02801' ) and ( &_zipcode le '02940' ) then &_statenamel = 'Rhode Island' ; IF (&_zipcode ge '03031' ) and ( &_zipcode le '03897' ) then &_statenamel = 'New Hampshire' ; IF (&_zipcode ge '03901' ) and ( &_zipcode le '04992' ) then &_statenamel = 'Maine' ; IF (&_zipcode ge '05001' ) and ( &_zipcode le '05495' ) then &_statenamel = 'Vermont' ; IF (&_zipcode ge '05501' ) and ( &_zipcode le '05544' ) then &_statenamel = 'Massachusetts' ; IF (&_zipcode ge '05601' ) and ( &_zipcode le '05907' ) then &_statenamel = 'Vermont' ; IF (&_zipcode ge '06001' ) and ( &_zipcode le '06389' ) then &_statenamel = 'Connecticut' ; IF (&_zipcode ge '06390' ) and ( &_zipcode le '06390' ) then &_statenamel = 'New York' ; IF (&_zipcode ge '06401' ) and ( &_zipcode le '06928' ) then &_statenamel = 'Connecticut' ; IF (&_zipcode ge '07001' ) and ( &_zipcode le '08989' ) then &_statenamel = 'New Jersey' ; IF (&_zipcode ge '10001' ) and ( &_zipcode le '14925' ) then &_statenamel = 'New York' ; IF (&_zipcode ge '15001' ) and ( &_zipcode le '19640' ) then &_statenamel = 'Pennsylvania' ; IF (&_zipcode ge '19701' ) and ( &_zipcode le '19980' ) then &_statenamel = 'Delaware' ; IF (&_zipcode ge '20001' ) and ( &_zipcode le '20099' ) then &_statenamel = 'District of Columbia' ; IF (&_zipcode ge '20101' ) and ( &_zipcode le '20199' ) then &_statenamel = 'Virginia' ; IF (&_zipcode ge '20201' ) and ( &_zipcode le '20599' ) then &_statenamel = 'District of Columbia' ; IF (&_zipcode ge '20601' ) and ( &_zipcode le '21930' ) then &_statenamel = 'Maryland' ; IF (&_zipcode ge '22002' ) and ( &_zipcode le '24658' ) then &_statenamel = 'Virginia' ; IF (&_zipcode ge '24701' ) and ( &_zipcode le '26886' ) then &_statenamel = 'West Virginia' ; IF (&_zipcode ge '27006' ) and ( &_zipcode le '28909' ) then &_statenamel = 'North Carolina' ; IF (&_zipcode ge '29001' ) and ( &_zipcode le '29945' ) then &_statenamel = 'South Carolina' ; IF (&_zipcode ge '30002' ) and ( &_zipcode le '31999' ) then &_statenamel = 'Georgia' ; IF (&_zipcode ge '32004' ) and ( &_zipcode le '34997' ) then &_statenamel = 'Florida' ; IF (&_zipcode ge '35004' ) and ( &_zipcode le '36925' ) then &_statenamel = 'Alabama' ; IF (&_zipcode ge '37010' ) and ( &_zipcode le '38589' ) then &_statenamel = 'Tennessee' ; IF (&_zipcode ge '38601' ) and ( &_zipcode le '39776' ) then &_statenamel = 'Mississippi' ; IF (&_zipcode ge '39901' ) and ( &_zipcode le '39901' ) then &_statenamel = 'Georgia' ; IF (&_zipcode ge '40003' ) and ( &_zipcode le '42788' ) then &_statenamel = 'Kentucky' ; IF (&_zipcode ge '43001' ) and ( &_zipcode le '45999' ) then &_statenamel = 'Ohio' ; IF (&_zipcode ge '46001' ) and ( &_zipcode le '47997' ) then &_statenamel = 'Indiana' ; IF (&_zipcode ge '48001' ) and ( &_zipcode le '49971' ) then &_statenamel = 'Michigan' ; IF (&_zipcode ge '50001' ) and ( &_zipcode le '52809' ) then &_statenamel = 'Iowa' ; IF (&_zipcode ge '53001' ) and ( &_zipcode le '54990' ) then &_statenamel = 'Wisconsin' ; IF (&_zipcode ge '55001' ) and ( &_zipcode le '56763' ) then &_statenamel = 'Minnesota' ; IF (&_zipcode ge '57001' ) and ( &_zipcode le '57799' ) then &_statenamel = 'South Dakota' ; IF (&_zipcode ge '58001' ) and ( &_zipcode le '58856' ) then &_statenamel = 'North Dakota' ; IF (&_zipcode ge '59001' ) and ( &_zipcode le '59937' ) then &_statenamel = 'Montana' ; IF (&_zipcode ge '60001' ) and ( &_zipcode le '62999' ) then &_statenamel = 'Illinois' ; IF (&_zipcode ge '63001' ) and ( &_zipcode le '65899' ) then &_statenamel = 'Missouri' ; IF (&_zipcode ge '66002' ) and ( &_zipcode le '67954' ) then &_statenamel = 'Kansas' ; IF (&_zipcode ge '68001' ) and ( &_zipcode le '69367' ) then &_statenamel = 'Nebraska' ; IF (&_zipcode ge '70001' ) and ( &_zipcode le '71497' ) then &_statenamel = 'Louisiana' ; IF (&_zipcode ge '71601' ) and ( &_zipcode le '72959' ) then &_statenamel = 'Arkansas' ; IF (&_zipcode ge '73001' ) and ( &_zipcode le '73199' ) then &_statenamel = 'Oklahoma' ; IF (&_zipcode ge '73301' ) and ( &_zipcode le '73344' ) then &_statenamel = 'Texas' ; IF (&_zipcode ge '73401' ) and ( &_zipcode le '74966' ) then &_statenamel = 'Oklahoma' ; IF (&_zipcode ge '75001' ) and ( &_zipcode le '79999' ) then &_statenamel = 'Texas' ; IF (&_zipcode ge '80001' ) and ( &_zipcode le '81658' ) then &_statenamel = 'Colorado' ; IF (&_zipcode ge '82001' ) and ( &_zipcode le '83128' ) then &_statenamel = 'Wyoming' ; IF (&_zipcode ge '83201' ) and ( &_zipcode le '83888' ) then &_statenamel = 'Idaho' ; IF (&_zipcode ge '84001' ) and ( &_zipcode le '84791' ) then &_statenamel = 'Utah' ; IF (&_zipcode ge '85001' ) and ( &_zipcode le '86556' ) then &_statenamel = 'Arizona' ; IF (&_zipcode ge '87001' ) and ( &_zipcode le '88441' ) then &_statenamel = 'New Mexico' ; IF (&_zipcode ge '88510' ) and ( &_zipcode le '88595' ) then &_statenamel = 'Texas' ; IF (&_zipcode ge '88901' ) and ( &_zipcode le '89883' ) then &_statenamel = 'Nevada' ; IF (&_zipcode ge '90001' ) and ( &_zipcode le '96162' ) then &_statenamel = 'California' ; IF (&_zipcode ge '96701' ) and ( &_zipcode le '96898' ) then &_statenamel = 'Hawaii' ; IF (&_zipcode ge '97001' ) and ( &_zipcode le '97920' ) then &_statenamel = 'Oregon' ; IF (&_zipcode ge '98001' ) and ( &_zipcode le '99403' ) then &_statenamel = 'Washington' ; IF (&_zipcode ge '99501' ) and ( &_zipcode le '99950' ) then &_statenamel = 'Alaska' ; /********************************************************************************************/ /* ZipNameL is copyright (c) 2007 by MineQuest, LLC. All Rights Reserved. */ /* MineQuest, LLC, 1939 Queensbridge Dr., Columbus, OH USA. */ /* This Macro Program is proprietary software and is licensed property of MineQuest, LLC. */ /********************************************************************************************/ %mend zipnamel;