<?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: ERROR: PUT function reported 'ERROR: Invalid value for width specified - width out of range' whi in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/964083#M375496</link>
    <description>&lt;P&gt;Thanks a lot. It's very helpful!&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 22:52:30 GMT</pubDate>
    <dc:creator>qinghe</dc:creator>
    <dc:date>2025-04-10T22:52:30Z</dc:date>
    <item>
      <title>ERROR: PUT function reported 'ERROR: Invalid value for width specified - width out of range' while p</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963947#M375482</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know how to solve the error " Invalid value for width specified" in the following program:&lt;/P&gt;&lt;P&gt;data A;&lt;BR /&gt;input record_id name $ mark;&lt;BR /&gt;cards;&lt;BR /&gt;1100111 A 99&lt;BR /&gt;1100112 B 78&lt;BR /&gt;2100111 C 60&lt;BR /&gt;2100100 D 78&lt;BR /&gt;2100112 E 91&lt;BR /&gt;3100111 F 40&lt;BR /&gt;3011112 G 36&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data B (rename=(record_id=start));&lt;BR /&gt;retain fmtname "select" label "A";&lt;BR /&gt;set test;&lt;BR /&gt;where mod(record_id,10) in (0, 1);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc format cntlin=B;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table A_selected as&lt;BR /&gt;select * from test&lt;BR /&gt;where put(record_id, select.)="A";&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the correct output, but with error messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Qinghe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 02:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963947#M375482</guid>
      <dc:creator>qinghe</dc:creator>
      <dc:date>2025-04-10T02:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: PUT function reported 'ERROR: Invalid value for width specified - width out of range' whi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963949#M375483</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry that there is a typo in the program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"select * from test" should be "select * from A"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Qinghe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 02:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963949#M375483</guid>
      <dc:creator>qinghe</dc:creator>
      <dc:date>2025-04-10T02:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: PUT function reported 'ERROR: Invalid value for width specified - width out of range' whi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963957#M375484</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67872"&gt;@qinghe&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid the error message, specify a sufficient default length (such as 7 characters if this is the maximum number of digits in the RECORD_ID values) for your format:&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#999999"&gt;retain fmtname "select" label "A"&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;default 7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#999999"&gt;;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Without this specification the default length is 1, which is insufficient to write the RECORD_IDs which are &lt;EM&gt;not&lt;/EM&gt; classified as "A", hence the error message.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 07:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/963957#M375484</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-04-10T07:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: PUT function reported 'ERROR: Invalid value for width specified - width out of range' whi</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/964083#M375496</link>
      <description>&lt;P&gt;Thanks a lot. It's very helpful!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 22:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-PUT-function-reported-ERROR-Invalid-value-for-width/m-p/964083#M375496</guid>
      <dc:creator>qinghe</dc:creator>
      <dc:date>2025-04-10T22:52:30Z</dc:date>
    </item>
  </channel>
</rss>

