<?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: Data format for string defined in a libname for GCP dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899331#M355479</link>
    <description>&lt;P&gt;Thanks for your response. I think in our Big Query environment, there is DefaultStringLength = 2000 defined somewhere. This caused all string type field created with default length of 2000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked at this SAS doc&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_044/ds2ref/n08ihhj1d03nlnn13zv4tnp69t8l.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_044/ds2ref/n08ihhj1d03nlnn13zv4tnp69t8l.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and add&amp;nbsp;&lt;SPAN&gt;SCANSTRINGCOLUMNS=yes in my libname definition, the actual length of the string is populated which resolved my problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks. Shan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 03:38:12 GMT</pubDate>
    <dc:creator>shan4</dc:creator>
    <dc:date>2023-10-20T03:38:12Z</dc:date>
    <item>
      <title>Data format for string defined in a libname for GCP dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899303#M355466</link>
      <description>&lt;P&gt;I am defining a libname which pointing to a GCP bigquery table with slibref.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed the string column all have a format/length of 2000 where the actual length is 15.&lt;/P&gt;&lt;P&gt;Is it expected ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We also tried option&amp;nbsp;&lt;SPAN&gt;scanstringcolumns=yes, it does not make any difference.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shan4_0-1697737127146.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88973i9762C7989A846DE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shan4_0-1697737127146.png" alt="shan4_0-1697737127146.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 17:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899303#M355466</guid>
      <dc:creator>shan4</dc:creator>
      <dc:date>2023-10-19T17:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data format for string defined in a libname for GCP dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899325#M355477</link>
      <description>&lt;P&gt;Refer to the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p0ho57qb6krkrfn1lu15k8gllg3o.htm" target="_blank" rel="noopener"&gt;BigQuery SAS doc&lt;/A&gt; for an explanation of how SAS defines the type and length of BigQuery data read into SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to change the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0mqfxkym1ut8pn1k3eb7x1foil5.htm" target="_blank" rel="noopener"&gt;MAX_CHAR_LEN&lt;/A&gt; option from the default 2000 value.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 00:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899325#M355477</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-10-20T00:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Data format for string defined in a libname for GCP dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899330#M355478</link>
      <description>&lt;P&gt;The problem is not FORMAT (or the INFORMAT) that is attached to variable.&amp;nbsp; Instead it is the LENGTH that was chosen for the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that BIGDATA seems to be using a VARCHAR variable type that does not include metadata about the maximum length that SAS can use to pick a smaller LENGTH to use when defining the fixed length character variable that SAS uses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The $2000 length is probably the setting you have for the default length to use for really long strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might have to do more work defining the variables if you need to pull it into SAS datasets.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 03:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899330#M355478</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-20T03:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data format for string defined in a libname for GCP dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899331#M355479</link>
      <description>&lt;P&gt;Thanks for your response. I think in our Big Query environment, there is DefaultStringLength = 2000 defined somewhere. This caused all string type field created with default length of 2000.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked at this SAS doc&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_044/ds2ref/n08ihhj1d03nlnn13zv4tnp69t8l.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_044/ds2ref/n08ihhj1d03nlnn13zv4tnp69t8l.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and add&amp;nbsp;&lt;SPAN&gt;SCANSTRINGCOLUMNS=yes in my libname definition, the actual length of the string is populated which resolved my problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks. Shan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 03:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899331#M355479</guid>
      <dc:creator>shan4</dc:creator>
      <dc:date>2023-10-20T03:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data format for string defined in a libname for GCP dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899579#M355560</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/458733"&gt;@shan4&lt;/a&gt;&amp;nbsp;Please update your problem as being answered in that case.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 21:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-format-for-string-defined-in-a-libname-for-GCP-dataset/m-p/899579#M355560</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-10-22T21:32:35Z</dc:date>
    </item>
  </channel>
</rss>

