LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 May 2010 09:45:02 -0700
Reply-To:     Sterling Paramore <gnilrets@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sterling Paramore <gnilrets@GMAIL.COM>
Subject:      Import when only first comma is delimiter
Content-Type: text/plain; charset=ISO-8859-1

Dear SAS-L,

I'm trying to import a file where only the first column in a row is a delimiter, but can't quite seem to get the import working correctly. Here's an example of some rows that are causing problems:

314,Other circulatory system diagnoses w MCC 315,Other circulatory system diagnoses w CC 316,Other circulatory system diagnoses w/o CC/MCC 326,Stomach, esophageal & duodenal proc w MCC 327,Stomach, esophageal & duodenal proc w CC 328,Stomach, esophageal & duodenal proc w/o CC/MCC

I tried:

data MSDRG3_v26; infile "/sas/DataStore/SAS_ETL/Supplemental_Xwalks/RawFiles/msdrg3.v26" lrecl=2000;

input START $ 1-3 @5 LABEL $80.; ; run;

but since there's a carriage return after each line, I get output that looks like this:

314 315,Other circulatory system diagnoses w CC 316 326,Stomach, esophageal & duodenal proc w MCC 327 328,Stomach, esophageal & duodenal proc w/o CC/MCC

Any ideas?

Thanks, Sterling


Back to: Top of message | Previous page | Main SAS-L page