s*********y 发帖数: 34 | 1 Raw Data:
"MARKETING_ID","CUSTOMER_NAME","Mail_ADDRESS","Mail_CITY","Mail_STATE","Mail
_POSTAL_CODE"
"EA00000","JAMES J IANAZONE","1238 LAKE FRONT BLVD","NORTH LIMA","OH","44452"
"EA00001","MARK A PETERSEN","6715 ERIE AV NW","CANAL FULTON","OH","44614"
"EA00002","BRANDON S BURGER","1694 TANGLEWOOD DR","AKRON","OH","44313"
data edsion;
infile " C:\Documents and Settings\Toledo_Edison_MailingList_03_09_2012 7MWH
.txt" delimiter=",";
input MARKETING_ID $ 2-8 +3 CUSTOMER_NAME $ 11. Mail_ADDRESS $ 17. @44
Mail_CITY $ Mail_STATE $ Mail_POSTAL_CODE$;
run;
OUTPUT:
87515 EJ26791 LAURIE A BA SDEN","19520 W ST ROUTE 51 "
ELMORE" "OH"
87516 EJ26792 JAMES S SPI TNALE","545 COUNT 32" "
HELENA" "OH"
87517 EJ26794 JOHN WINDSO R","2824 N SCOTT "GENOA" "
OH" "43430"
87518 EJ26795 MARK D ANKE NBRANDT","2825 N T CT" "
GENOA" "OH"
87519 EJ26796 JAMES S VIS CHER","2868 N SCO T" "
GENOA" "OH"
87520 EJ26797 JAMES HOFFM AN","395 STATE RO 635" "
HELENA" "OH"
Name and Address are not right. Who could tell me how to input this txt file? | c****y 发帖数: 94 | 2 Try this:
data fun;
infile "C:\Documents and Settings\Toledo_Edison_MailingList_03_09_2012 7MWH
.txt" dsd firstobs=3 dlm=",";
length Marketing_ID $7 customer_Name $20 Mail_address $30 Mail_City $10
Mail_state $2 post_code $5;
input Marketing_ID $ Customer_Name $ Mail_Address $ Mail_City $ Mail_State
$ post_code $;
run; | c****y 发帖数: 94 | 3 by the way dlm="," is unnecessary. dsd imply that |
|