<?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: How to convert csv column names to lower case in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-csv-column-names-to-lower-case/m-p/903508#M356996</link>
    <description>&lt;P&gt;You could make a copy of the dataset (or a view that is a copy of the dataset) and either change the names to be lowercase.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data for_csv;
  retain name age;
  set temp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or attach labels using the lowercase version of the names and use the labels as the column headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But since CSV files are trivial to write yourself you could do that.&amp;nbsp; Which means you can add aline to convert the names to lowercase before writing them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=temp(obs=0) out=names; 
  var _all_;
run;
data _null_;
  file '/out/temp.csv' dsd ;
  set names;
  _name_=lowcase(_name_;
  put _name_ @;
run;
data _null_;
  set temp;
  file '/out/temp.csv' dsd mod ;
  put (_all_) (+0);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 Nov 2023 15:08:35 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-11-16T15:08:35Z</dc:date>
    <item>
      <title>How to convert csv column names to lower case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-csv-column-names-to-lower-case/m-p/903494#M356993</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating a csv file from sas dataset using ds2csv utility.&lt;/P&gt;
&lt;P&gt;I want the column names of this csv file to be lower case. I have given a sample code as well&lt;/P&gt;
&lt;P&gt;Can someone please help me with this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
input NAME $ AGE;
datalines;
ram 21
ravi 34
;
run;

%ds2csv(data=temp,labels=N,runmode=b,csvfile=/out/temp.csv)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Nov 2023 14:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-csv-column-names-to-lower-case/m-p/903494#M356993</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-11-16T14:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert csv column names to lower case</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-csv-column-names-to-lower-case/m-p/903508#M356996</link>
      <description>&lt;P&gt;You could make a copy of the dataset (or a view that is a copy of the dataset) and either change the names to be lowercase.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data for_csv;
  retain name age;
  set temp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or attach labels using the lowercase version of the names and use the labels as the column headers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But since CSV files are trivial to write yourself you could do that.&amp;nbsp; Which means you can add aline to convert the names to lowercase before writing them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=temp(obs=0) out=names; 
  var _all_;
run;
data _null_;
  file '/out/temp.csv' dsd ;
  set names;
  _name_=lowcase(_name_;
  put _name_ @;
run;
data _null_;
  set temp;
  file '/out/temp.csv' dsd mod ;
  put (_all_) (+0);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Nov 2023 15:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-csv-column-names-to-lower-case/m-p/903508#M356996</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-16T15:08:35Z</dc:date>
    </item>
  </channel>
</rss>

