<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: proc import csv file in sas studio healthcare data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304668#M60850</link>
    <description>Hi Reeza,&lt;BR /&gt;Thank you for clarifying that. I later looked at the file and figure out the problem. It was with titles, I should not have space or symbols within it. So I manually opened the file in excel and rename (or deleted spaces) from titles. Then I imported file again in SAS and it worked.</description>
    <pubDate>Fri, 14 Oct 2016 14:02:41 GMT</pubDate>
    <dc:creator>pandyat0</dc:creator>
    <dc:date>2016-10-14T14:02:41Z</dc:date>
    <item>
      <title>proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302222#M60689</link>
      <description>&lt;DIV class="sasSource"&gt;Hello,&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;I am using proc import a file and I cleaned up titles (headers) with no space and headers no more than 13 letters. I also have code below. Just so you know, I am running SAS Studio on SAS Academy on Linux. Does it matter? Can you please tell me what is the problem and how do I resolve it? Thank you in advance. I also have head of data set for you to see below.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;PRE&gt;Libname OP2013"/saswork/SAS_work6A1C0000FE43_odaws04-prod-us/SAS_work0D5C0000FE43_odaws04-prod-us";
FILENAME op2013"/home/pandyat0/sasuser.v94/Outpatient_2013.txt" TERMSTR=CRLF;
/** Import the CSV file.  **/
PROC IMPORT DATAFILE=op2013
		    OUT=WORK.op2013
		    DBMS=CSV
		    REPLACE;
		    GETNAMES=Yes;
RUN;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ERROR SHOWN BELOW:&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;PRE&gt;NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.
 Unable to sample external file, no data in first 5 records.
 ERROR: Import unsuccessful.  See SAS Log for details.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.03 seconds
       user cpu time       0.01 seconds
       system cpu time     0.02 seconds
       memory              8451.00k
       OS Memory           36124.00k
       Timestamp           10/04/2016 02:27:57 AM
       Step Count                        37  Switch Count  50
       Page Faults                       0
       Page Reclaims                     925
       Page Swaps                        0
       Voluntary Context Switches        158
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           48
       
 62         
 63         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 75         &lt;/PRE&gt;NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;WORK.PARMS.PARMS.SLIST.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Unable to sample external file, no data in first 5 records.&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;DATASET:&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;&lt;PRE&gt;APCG,ProvId,ProvName,ProvStrAd,ProvCity,ProvSt,ProvZipC,ProvHRR,OPServs,AvgEstSubChrg,AvgTotPay
0013-LevelIIDebridement&amp;amp;Destruction,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,639,$391.64,$54.94
0015-LevelIIIDebridement&amp;amp;Destruction,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,503,$595.82,$83.51
0019-LevelIExcision/Biopsy,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,23,$3531.88,$254.15
0020-LevelIIExcision/Biopsy,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,32,$4596.94,$507.30
0078-LevelIIIPulmonaryTreatment,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,142,$218.82,$87.60
0096-LevelIINoninvasivePhysiologicStudies,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,363,$988.04,$93.59
0204-LevelINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,385,$2084.46,$147.57
0206-LevelIINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,67,$1438.85,$240.75
0207-LevelIIINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,3169,$2228.79,$480.49
"0209-LevelIIExtendedEEG,Sleep,andCardiovascularStudies",10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,729,$4468.12,$697.15
0265-LevelIDiagnosticandScreeningUltrasound,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,279,$805.98,$56.25
0267-LevelIIIDiagnosticandScreeningUltrasound,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,1737,$858.17,$134.91
0269-LevelIIEchocardiogramWithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,844,$2024.28,$339.31
0270-LevelIIIEchocardiogramWithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,40,$2968.67,$486.59
0336-MagneticResonanceImagingandMagneticResonanceAngiographywithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,1656,$3729.89,$300.47&lt;/PRE&gt;Thank you for your time and suggestions.&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Oct 2016 02:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302222#M60689</guid>
      <dc:creator>pandyat0</dc:creator>
      <dc:date>2016-10-04T02:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302228#M60690</link>
      <description>&lt;P&gt;Verify your TERMSTR with a text editor. If you can post a sample of the text file itself.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 03:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302228#M60690</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-04T03:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302250#M60693</link>
      <description>&lt;P&gt;is this what you mean?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;APCG,ProvId,ProvName,ProvStrAd,ProvCity,ProvSt,ProvZipC,ProvHRR,OPServs,AvgEstSubChrg,AvgTotPay&lt;BR /&gt;0013-LevelIIDebridement&amp;amp;Destruction,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,639,$391.64,$54.94&lt;BR /&gt;0015-LevelIIIDebridement&amp;amp;Destruction,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,503,$595.82,$83.51&lt;BR /&gt;0019-LevelIExcision/Biopsy,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,23,$3531.88,$254.15&lt;BR /&gt;0020-LevelIIExcision/Biopsy,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,32,$4596.94,$507.30&lt;BR /&gt;0078-LevelIIIPulmonaryTreatment,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,142,$218.82,$87.60&lt;BR /&gt;0096-LevelIINoninvasivePhysiologicStudies,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,363,$988.04,$93.59&lt;BR /&gt;0204-LevelINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,385,$2084.46,$147.57&lt;BR /&gt;0206-LevelIINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,67,$1438.85,$240.75&lt;BR /&gt;0207-LevelIIINerveInjections,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,3169,$2228.79,$480.49&lt;BR /&gt;"0209-LevelIIExtendedEEG,Sleep,andCardiovascularStudies",10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,729,$4468.12,$697.15&lt;BR /&gt;0265-LevelIDiagnosticandScreeningUltrasound,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,279,$805.98,$56.25&lt;BR /&gt;0267-LevelIIIDiagnosticandScreeningUltrasound,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,1737,$858.17,$134.91&lt;BR /&gt;0269-LevelIIEchocardiogramWithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,844,$2024.28,$339.31&lt;BR /&gt;0270-LevelIIIEchocardiogramWithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,40,$2968.67,$486.59&lt;BR /&gt;0336-MagneticResonanceImagingandMagneticResonanceAngiographywithoutContrast,10001,SOUTHEASTALABAMAMEDICALCENTER,1108ROSSCLARKCIRCLE,DOTHAN,AL,36301,AL-Dothan,1656,$3729.89,$300.47&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I have used this code to make it work but did not understand guessingrows? and later found out i am using Linux, so use TERMSTR=LF&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME op2013"/home/pandyat0/sasuser.v94/Outpatient_2013.csv" TERMSTR=LF;
/** Import the CSV file.  **/
PROC IMPORT DATAFILE=op2013
		    OUT=WORK.op2013
		    DBMS=CSV
		    REPLACE;
		    GETNAMES=Yes;
		    guessingrows=44353;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Let me know what you think and how I can make a choropleth map of US in gplot by using address on this file to locate each hospital.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 05:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302250#M60693</guid>
      <dc:creator>pandyat0</dc:creator>
      <dc:date>2016-10-04T05:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302258#M60694</link>
      <description>&lt;P&gt;GuessingRows tells SAS how many rows to read before it attempts to assign a variable type and format. It has nothing to do with your original issue, that was the TERMSTR.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 05:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/302258#M60694</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-04T05:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304668#M60850</link>
      <description>Hi Reeza,&lt;BR /&gt;Thank you for clarifying that. I later looked at the file and figure out the problem. It was with titles, I should not have space or symbols within it. So I manually opened the file in excel and rename (or deleted spaces) from titles. Then I imported file again in SAS and it worked.</description>
      <pubDate>Fri, 14 Oct 2016 14:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304668#M60850</guid>
      <dc:creator>pandyat0</dc:creator>
      <dc:date>2016-10-14T14:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304724#M60861</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;I have imported the file and now I am trying to separate the first column where '-' is. And then I wanted to make new column and save the column as AmbuCode. So far, I have done this. &amp;nbsp;I want to know how I can save a new column from existing column after separating it from the first column. Here is code so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/**Separate the codes from the Ambulatory cause. I will separate the first column in two, where the '-' is,
 so I can see codes and cause separately. **/
data WORK.op2013AmbulatoryTitleCodes;
 infile "/home/pandyat0/sasuser.v94/Outpatient_CY2013.csv";
 input AmbulatoryPaymentClassificationG $ 1-85;
 AmbulCode = compress(AmbulatoryPaymentClassificationG,'-');/* removes - from first column*/
 AmbulRemoveQuote=compress(AmbulCode, '" "'); /* Removes Quotes from 0209 code*/
 AmbCodeOnly = substr(AmbulRemoveQuote, 1, 4); /*saves first four characters as code  */
 run;
 proc sql outobs=100;
   title 'Ambulatory Codes';
   select 'Ambulatory Code is', AmbCodeOnly
      from WORK.OP2013AMBULATORYTITLECODES;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The outcomes shows as Codes but I wanted that column to be its own, new column within the main dataset. How do i add that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304724#M60861</guid>
      <dc:creator>pandyat0</dc:creator>
      <dc:date>2016-10-14T16:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc import csv file in sas studio healthcare data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304742#M60862</link>
      <description>&lt;P&gt;Your code doesn't make a whole lot of sense? Why are you importing all the characters as a single variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You appear to have variable names and a delimiter of comma between fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use SCAN() to separate components&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x=scan(variable, 1, "-");&lt;/P&gt;
&lt;P&gt;y=scan(variable, 2, "-");&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-csv-file-in-sas-studio-healthcare-data/m-p/304742#M60862</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-14T17:44:30Z</dc:date>
    </item>
  </channel>
</rss>

