Hi, The code below sets up data for measuring the driving distances between two addresses. It currently works using datalines but filling in those datalines can be onerous. How would I go about updating this code so that I can import a csv that creates the same result? Is there any special format I need to have my csv in? I plan to have it laid out similar to the code below where each row has the ID, the starting address, and then the destination address. I tried using an infile statement but the output that resulted from using it looks different from the output of the code below. Any help is much appreciated. data addresses;
length addr1 addr2 $50;
input
@01 id $9.
@11 addr1 $40.
@60 addr2 $40.
;
zip = input(scan(addr1,-1),5.);
set sashelp.zipcode (keep=zip poname statecode) key=zip / unique;
addr1 = catx(' ',catx(',+',scan(addr1,1,','),poname,statecode),zip);
zip = input(scan(addr2,-1),5.);
set sashelp.zipcode (keep=zip poname statecode) key=zip / unique;
addr2 = catx(' ',catx(',+',scan(addr2,1,','),poname,statecode),zip);
keep id addr: ;
datalines;
199580996 726 5th St 95901 2615 Chester Ave 93301
199580996 726 5th St 95901 700 River Drive 95437
199580996 726 5th St 95901 869 North Cherry St 93274
199580996 726 5th St 95901 1141 Rose Avenue 93662
;
... View more