<?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: Convert char to Varchar on SAS in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Convert-char-to-Varchar-on-SAS/m-p/898251#M2047</link>
    <description>&lt;P&gt;Use this option in your UPLOAD statement it will change CHAR to VARCHAR whenever the length is greater or equal to 17. A VARCHAR column has a 16byte overhead so it only makes sense to convert longer CHAR vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;importoptions={filetype="BASESAS" varcharConversion=17}&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Oct 2023 07:12:43 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2023-10-12T07:12:43Z</dc:date>
    <item>
      <title>Convert char to Varchar on SAS</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Convert-char-to-Varchar-on-SAS/m-p/898250#M2046</link>
      <description>&lt;P&gt;I have a daatset .sas7bdat and I need to convert the column format chart into varchar.&lt;/P&gt;
&lt;P&gt;If I create a structure table with SAS Studio receive this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;One or more variables were converted because the data type is not supported by the V9 engine.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand that is necessary to create the table structure on Cas, but I don't know a way for insert the data on the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is my code for insert dataset on CAS:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc cas;&lt;BR /&gt;upload / path="&amp;amp;path/inspection_question_answer.sas7bdat" casout={caslib="hseq" name="HSEQ4A_INSPECT_ANSWER_QUESTION1" replication=0};&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc casutil incaslib="hseq" outcaslib="hseq"; &lt;BR /&gt;droptable casdata="HSEQ4A_INSPECT_ANSWER_QUESTION" quiet; &lt;BR /&gt;promote casdata="HSEQ4A_INSPECT_ANSWER_QUESTION1" casout="HSEQ4A_INSPECT_ANSWER_QUESTION"; &lt;BR /&gt;save casdata="HSEQ4A_INSPECT_ANSWER_QUESTION" casout="HSEQ4A_INSPECT_ANSWER_QUESTION" replace; &lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this table is actually very large and my client asked to convert char columns to varchar, but at the moment I can’t get it done&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 06:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Convert-char-to-Varchar-on-SAS/m-p/898250#M2046</guid>
      <dc:creator>dipand</dc:creator>
      <dc:date>2023-10-12T06:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert char to Varchar on SAS</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Convert-char-to-Varchar-on-SAS/m-p/898251#M2047</link>
      <description>&lt;P&gt;Use this option in your UPLOAD statement it will change CHAR to VARCHAR whenever the length is greater or equal to 17. A VARCHAR column has a 16byte overhead so it only makes sense to convert longer CHAR vars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;importoptions={filetype="BASESAS" varcharConversion=17}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Oct 2023 07:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Convert-char-to-Varchar-on-SAS/m-p/898251#M2047</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2023-10-12T07:12:43Z</dc:date>
    </item>
  </channel>
</rss>

