<?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: CSV Import Log 'Import unsuccessful. See SAS Log for details.' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941969#M369470</link>
    <description>&lt;P&gt;I cannot recreate an issue where the PROC IMPORT generates that ERROR and NOTHING ELSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you seem to be able to read the file then just SKIP THE PROC IMPORT.&amp;nbsp; It is not needed (and frequently will cause problems).&amp;nbsp; Just write the step to READ the file instead of asking PROC IMPORT to GUESS how to read the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data step to read a CSV file is trivial.&amp;nbsp; You just need DATA, INFILE, LENGTH and INPUT statements. If there are any variables that need special instructions for how to convert from text into values you can add an INFORMAT statement.&amp;nbsp; If there are variables you need displayed in a special way you can add a FORMAT statement. If there are variables you want to attach a descriptive label to then add a LABEL statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example let's assume your file has 4 variables, 2 are character strings and 2 are numbers. One of the numbers is a date which is written in the CSV file with values like 01JAN1980 that the DATE informat will recognize as a DATE value.&amp;nbsp; Then your program to read the file might look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HCP_Eng;
  infile "C:\foldername\HCP_English.csv" dsd firstobs=2 truncover ;
  length charvar $20 numvar 8 datevar 8 lastvar $4 ;
  input charvar -- lastvar;
  informat datevar date.;
  format datevar date9.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't know what the variable names are just copy and paste the first line of the CSV file into you program and convert it into the LENGTH statement.&amp;nbsp; If you are not sure what is in the variables then just make them character strings to begin with and then LOOK at the values and decide what they are.&amp;nbsp; You can then change the data step and run it again.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 13:47:16 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-08-30T13:47:16Z</dc:date>
    <item>
      <title>CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941659#M369416</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a bit of trouble importing a CSV file. I don't even get as far as importing it into SAS!&lt;/P&gt;
&lt;P&gt;Here's the code I used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT datafile = "C:\Users\&lt;EM&gt;foldername&lt;/EM&gt;\Pulmonologists_Hung.csv"&lt;BR /&gt;DBMS = CSV&lt;BR /&gt;out = work.pulmon_hung;&lt;BR /&gt;guessingrows=MAX; &lt;BR /&gt;getnames=yes;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only message in the log is this: 'Import unsuccessful. See SAS Log for details.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me with this? I don't know what the problem might be (for a beginner).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 09:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941659#M369416</guid>
      <dc:creator>Sofie3</dc:creator>
      <dc:date>2024-08-29T09:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941697#M369418</link>
      <description>&lt;P&gt;Are you sure you have the right filename?&lt;/P&gt;
&lt;P&gt;What happens if you try to read the file directly with a data step?&lt;/P&gt;
&lt;P&gt;Try dumping the first 3 lines of the file to the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "C:\Users\foldername\Pulmonologists_Hung.csv" obs=3 ;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Aug 2024 12:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941697#M369418</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-29T12:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941698#M369419</link>
      <description>&lt;P&gt;1. Post the full log please.&lt;/P&gt;
&lt;P&gt;2. Did you check the data? This message can simply mean that the data was imported but some &lt;SPAN&gt;unexpected&lt;/SPAN&gt; values were found. Please check.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 12:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941698#M369419</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-08-29T12:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941706#M369421</link>
      <description>&lt;P&gt;Please post the log.&amp;nbsp; Often in the log there are multiple error messages which explain the problem, or even one one error messages and one note or warning.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, when I run your code, because I don't have the csv files, I get the following in the log:&lt;/P&gt;
&lt;PRE&gt;1    PROC IMPORT datafile = "C:\Users\foldername\Pulmonologists_Hung.csv"
2    DBMS = CSV
3    out = work.pulmon_hung;
4    guessingrows=MAX;
5    getnames=yes;
6    run;

ERROR: Physical file does not exist, C:\Users\foldername\Pulmonologists_Hung.csv.
ERROR: Import unsuccessful.  See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
&lt;/PRE&gt;
&lt;P&gt;So the first error message explains the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 12:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941706#M369421</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-08-29T12:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941939#M369462</link>
      <description>&lt;DIV&gt;Hi all&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;To answer to the replies of Tom, ChrisNZ and Quentin:&lt;/DIV&gt;
&lt;DIV&gt;- &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;I checked the folder and filename and it is correct (i changed it here because there are some names in that cannot be shared)&lt;/DIV&gt;
&lt;DIV&gt;- &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;,&amp;nbsp;when I used your statement, i don't receive an error, and I can read all the lines in the SAS log.&lt;/DIV&gt;
&lt;DIV&gt;- &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;To be complete, these are the statement &amp;amp; SAS log:&lt;/DIV&gt;
&lt;DIV&gt;PROC IMPORT DATAFILE= "C:\Users\foldername\&lt;SPAN&gt;HCP_English.csv&lt;/SPAN&gt;"&lt;BR /&gt;DBMS=csv&lt;BR /&gt;OUT= HCP_Eng;&lt;BR /&gt;guessingrows=MAX;&lt;BR /&gt;getnames=yes;&lt;BR /&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This is the SAS log:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;PROC IMPORT DATAFILE= "C:\Users\foldername\&lt;SPAN&gt;HCP_English.csv&lt;/SPAN&gt;"&lt;BR /&gt;1166 DBMS=csv&lt;BR /&gt;1167 OUT= HCP_Eng;&lt;BR /&gt;1168 guessingrows=MAX;&lt;BR /&gt;1169 getnames=yes;&lt;BR /&gt;1170 RUN;&lt;/P&gt;
&lt;P&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;What do you mean with 'did you check the data?' The import was not successful, so i don't have a database in SAS to check. The CSV file however seems normal.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Aug 2024 12:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941939#M369462</guid>
      <dc:creator>Sofie3</dc:creator>
      <dc:date>2024-08-30T12:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941945#M369465</link>
      <description>&lt;P&gt;Another thing to test is whether the data dataset exists already or not.&amp;nbsp; If it does you need to add the REPLACE option to the PROC IMPORT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But that would yield a different message.&lt;/P&gt;
&lt;PRE&gt;80   proc import file=csv dbms=csv out=class;
81   run;

NOTE: Import cancelled.  Output dataset WORK.CLASS already exists.  Specify REPLACE option to overwrite it.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Another possibility is that the file only has ONE line.&amp;nbsp; For example if you used EXCEL on a MAC to write the CSV file and&amp;nbsp;accidentally picked the wrong format then it will make a file with only CR as the end of line marker. (Apparently EXCEL never realized that MacOS is now a flavor of Unix.)&amp;nbsp; In that case PROC IMPORT cannot run because there are no data lines.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;212  proc import file=csv2 dbms=csv out=class replace;
213  run;

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.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;You can fix that by defining a FILEREF so you can use the RECFM=CR option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename csv "C:\Users\foldername\HCP_English.csv" termstr=cr;
PROC IMPORT DATAFILE= csv DBMS=csv OUT=HCP_Eng replace;
  guessingrows=MAX;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note if that is the issue you should have seen it when running the code to dump the first three lines.&amp;nbsp; The data step would have shown there was only one line.&lt;/P&gt;
&lt;PRE&gt;220  data _null_;
221    infile csv2 obs=3;
222    input;
223    list;
224  run;

NOTE: The infile CSV2 is:
      (system-specific pathname),
      (system-specific file attributes)

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0

1   CHAR  Name,Sex,Age,Height,Weight.Alfred,M,14,69,112.5.Alice,F,13,56.5,84.Barbara,F,13,65.3,98.Carol,F,14,6
    ZONE  4666256724662466667256666704667662423323323332304666624233233232330467667624233233232330467662423323
    NUMR  E1D5C358C175C859784C759784D1C6254CDC14C69C112E5D1C935C6C13C56E5C84D2122121C6C13C65E3C98D312FCC6C14C6

     101  2.8,102.5.Henry,M,14,63.5,102.5.James,M,12,57.3,83.Jane,F,12,59.8,84.5.Janet,F,15,62.5,112.5.Jeffrey
    ZONE  3232333230466772423323323233323046667242332332323304666242332332323323046667242332332323332304666767
    NUMR  2E8C102E5D85E29CDC14C63E5C102E5DA1D53CDC12C57E3C83DA1E5C6C12C59E8C84E5DA1E54C6C15C62E5C112E5DA566259

     201  ,M,13,62.5,84.John,M,12,59,99.5.Joyce,F,11,51.3,50.5.Judy,F,14,64.3,90.Louise,F,12,56.3,77.Mary,F,15
    ZONE  2423323323233046662423323323323046766242332332323323047672423323323233046767624233233232330467724233
    NUMR  CDC13C62E5C84DAF8ECDC12C59C99E5DAF935C6C11C51E3C50E5DA549C6C14C64E3C90DCF5935C6C12C56E3C77DD129C6C15

     301  ,66.5,112.Philip,M,16,72,150.Robert,M,12,64.8,128.Ronald,M,15,67,133.Thomas,M,11,57.5,85.William,M,1
    ZONE  2332323330566667242332332333056667724233233232333056666624233233233305666672423323323233056666662423
    NUMR  C66E5C112D089C90CDC16C72C150D2F2524CDC12C64E8C128D2FE1C4CDC15C67C133D48FD13CDC11C57E5C85D79CC91DCDC1

     401  5,66.5,112. 411
    ZONE  32332323330
    NUMR  5C66E5C112D
NOTE: 1 record was read from the infile (system-specific pathname).
      The minimum record length was 411.
      The maximum record length was 411.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941945#M369465</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-30T13:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941955#M369467</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I added the replace option, however 'REPLACE' has not the typical blue color (like datafile) and this is the log. Again, it does not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1576 PROC IMPORT DATAFILE= "C:\foldername\HCP_English.csv"&lt;BR /&gt;1577 DBMS=csv&lt;BR /&gt;1578 OUT= HCP_Eng&lt;BR /&gt;1579 REPLACE;&lt;BR /&gt;1580 guessingrows=MAX;&lt;BR /&gt;1581 getnames=yes;&lt;BR /&gt;1582 RUN;&lt;/P&gt;
&lt;P&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second option, I'm not sure whether it is a file from a mac (it's an export from a website that collects my data).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I open the CSV in excel, it shows multiple lines.&lt;/P&gt;
&lt;P&gt;But, I also tested your option in SAS, but I receive the same result:&lt;/P&gt;
&lt;P&gt;1593 filename csv "C:\foldername\HCP_English.csv" termstr=cr;&lt;BR /&gt;15941595 PROC IMPORT DATAFILE=csv DBMS=csv OUT=HCP_Eng REPLACE;&lt;BR /&gt;1596 guessingrows=MAX;&lt;BR /&gt;1597 RUN;&lt;/P&gt;
&lt;P&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help already!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941955#M369467</guid>
      <dc:creator>Sofie3</dc:creator>
      <dc:date>2024-08-30T13:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941968#M369469</link>
      <description>&lt;P&gt;Maybe it's important to mention: when opening my CSV file, I receive the message, 'Possible data loss. Some features might be lost if you save this workbook in CSV format. To preserve these features, save it in Excel file format.'&lt;/P&gt;
&lt;P&gt;When I save it as an Excel file and import it into SAS, it works, and I get my database with multiple rows.&lt;/P&gt;
&lt;P&gt;Could this be the problem? How can I address the possible data loss? It is easier for me to upload all CSV files, as I have many that are updated every day.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941968#M369469</guid>
      <dc:creator>Sofie3</dc:creator>
      <dc:date>2024-08-30T13:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941969#M369470</link>
      <description>&lt;P&gt;I cannot recreate an issue where the PROC IMPORT generates that ERROR and NOTHING ELSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you seem to be able to read the file then just SKIP THE PROC IMPORT.&amp;nbsp; It is not needed (and frequently will cause problems).&amp;nbsp; Just write the step to READ the file instead of asking PROC IMPORT to GUESS how to read the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data step to read a CSV file is trivial.&amp;nbsp; You just need DATA, INFILE, LENGTH and INPUT statements. If there are any variables that need special instructions for how to convert from text into values you can add an INFORMAT statement.&amp;nbsp; If there are variables you need displayed in a special way you can add a FORMAT statement. If there are variables you want to attach a descriptive label to then add a LABEL statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example let's assume your file has 4 variables, 2 are character strings and 2 are numbers. One of the numbers is a date which is written in the CSV file with values like 01JAN1980 that the DATE informat will recognize as a DATE value.&amp;nbsp; Then your program to read the file might look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HCP_Eng;
  infile "C:\foldername\HCP_English.csv" dsd firstobs=2 truncover ;
  length charvar $20 numvar 8 datevar 8 lastvar $4 ;
  input charvar -- lastvar;
  informat datevar date.;
  format datevar date9.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you don't know what the variable names are just copy and paste the first line of the CSV file into you program and convert it into the LENGTH statement.&amp;nbsp; If you are not sure what is in the variables then just make them character strings to begin with and then LOOK at the values and decide what they are.&amp;nbsp; You can then change the data step and run it again.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941969#M369470</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-30T13:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941971#M369471</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335818"&gt;@Sofie3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Maybe it's important to mention: when opening my CSV file, I receive the message, 'Possible data loss. Some features might be lost if you save this workbook in CSV format. To preserve these features, save it in Excel file format.'&lt;/P&gt;
&lt;P&gt;When I save it as an Excel file and import it into SAS, it works, and I get my database with multiple rows.&lt;/P&gt;
&lt;P&gt;Could this be the problem? How can I address the possible data loss? It is easier for me to upload all CSV files, as I have many that are updated every day.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That message is something EXCEL will normally give you when you try to CREATE a CSV file.&amp;nbsp; Since you already have the data in an Excel worksheet where you can change the colors and other stuff it is just telling you that information will not make it into the CSV file since a CSV file is just TEXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have multiple CSV files that all have the same format (same columns in the same order) then you definitely do NOT want to use PROC IMPORT.&amp;nbsp; That will GUESS how to define the variables based on the values it sees in the ONE file you ask it to read.&amp;nbsp; So you could end up with variables defined differently when you read tomorrow's file and all of your old analysis steps will need to be rewritten.&amp;nbsp; If you write your own data step to read the file you will have full control over how the variables are named, typed, read from the CSV file, displayed.&amp;nbsp; You can even write a data step that will read multiple CSV files that share the same structure into a single data step.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 13:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941971#M369471</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-30T13:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Import Log 'Import unsuccessful. See SAS Log for details.'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941975#M369473</link>
      <description>I did not know this about the data &amp;amp; infile statement. Now I can continue. Thank you for your time to help me!</description>
      <pubDate>Fri, 30 Aug 2024 14:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-Import-Log-Import-unsuccessful-See-SAS-Log-for-details/m-p/941975#M369473</guid>
      <dc:creator>Sofie3</dc:creator>
      <dc:date>2024-08-30T14:10:29Z</dc:date>
    </item>
  </channel>
</rss>

