<?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: Unexpected behaviour  when trying to create a manual sas table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862515#M340707</link>
    <description>&lt;P&gt;Your code works for me.&lt;/P&gt;
&lt;P&gt;I suspect that one of the three characters past the end of the data on your data line is not actually a space. Notice how this FORUM's editor is highlighting that area in yellow.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1678119538494.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81114iA1DD95138104596D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1678119538494.png" alt="Tom_0-1678119538494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I replace it with something I can see&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data customer_from_to_table; 
	LENGTH customer_id 8 segment_generation $ 100 segment_belonging $ 1 valid_from_date 8 valid_to_date 8;
	input customer_id segment_generation $ segment_belonging $ valid_from_date :yymmdd10. valid_to_date :yymmdd10.;
	format valid_from_date yymmdd10. valid_to_date yymmdd10.;
datalines;
111 segment_generation_1 A 2023-01-01 2023-01-10|	
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get an error:&lt;/P&gt;
&lt;PRE&gt;6673   data customer_from_to_table;
6674     LENGTH customer_id 8 segment_generation $ 100 segment_belonging $ 1 valid_from_date 8 valid_to_date 8;
6675     input customer_id segment_generation $ segment_belonging $ valid_from_date :yymmdd10. valid_to_date :yymmdd10.;
6676     format valid_from_date yymmdd10. valid_to_date yymmdd10.;
6677   datalines;

NOTE: Invalid data for valid_to_date in line 6678 39-49.
RULE:        ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
6678         111 segment_generation_1 A 2023-01-01 2023-01-10|
customer_id=111 segment_generation=segment_generation_1 segment_belonging=A valid_from_date=2023-01-01 valid_to_date=. _ERROR_=1
_N_=1
NOTE: The data set WORK.CUSTOMER_FROM_TO_TABLE has 1 observations and 5 variables.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2023 17:23:52 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-03-06T17:23:52Z</dc:date>
    <item>
      <title>Unexpected behaviour  when trying to create a manual sas table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862512#M340706</link>
      <description>&lt;P&gt;I write the following SAS code:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data customer_from_to_table; 
	LENGTH customer_id 8 segment_generation $ 100 segment_belonging $ 1 valid_from_date 8 valid_to_date 8;
	input customer_id segment_generation $ segment_belonging $ valid_from_date :yymmdd10. valid_to_date :yymmdd10.;
	format valid_from_date yymmdd10. valid_to_date yymmdd10.;
	datalines;
	111 segment_generation_1 A 2023-01-01 2023-01-10	
	;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I get the following result:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasStatistics_0-1678119135290.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81113iB22186AAB6E80548/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasStatistics_0-1678119135290.png" alt="SasStatistics_0-1678119135290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For some reason, the last column:&amp;nbsp;valid_to_date is empty whereas it should be 2023-01-10.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any advice on what is wrong?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 16:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862512#M340706</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2023-03-06T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected behaviour  when trying to create a manual sas table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862515#M340707</link>
      <description>&lt;P&gt;Your code works for me.&lt;/P&gt;
&lt;P&gt;I suspect that one of the three characters past the end of the data on your data line is not actually a space. Notice how this FORUM's editor is highlighting that area in yellow.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1678119538494.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81114iA1DD95138104596D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1678119538494.png" alt="Tom_0-1678119538494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I replace it with something I can see&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data customer_from_to_table; 
	LENGTH customer_id 8 segment_generation $ 100 segment_belonging $ 1 valid_from_date 8 valid_to_date 8;
	input customer_id segment_generation $ segment_belonging $ valid_from_date :yymmdd10. valid_to_date :yymmdd10.;
	format valid_from_date yymmdd10. valid_to_date yymmdd10.;
datalines;
111 segment_generation_1 A 2023-01-01 2023-01-10|	
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get an error:&lt;/P&gt;
&lt;PRE&gt;6673   data customer_from_to_table;
6674     LENGTH customer_id 8 segment_generation $ 100 segment_belonging $ 1 valid_from_date 8 valid_to_date 8;
6675     input customer_id segment_generation $ segment_belonging $ valid_from_date :yymmdd10. valid_to_date :yymmdd10.;
6676     format valid_from_date yymmdd10. valid_to_date yymmdd10.;
6677   datalines;

NOTE: Invalid data for valid_to_date in line 6678 39-49.
RULE:        ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
6678         111 segment_generation_1 A 2023-01-01 2023-01-10|
customer_id=111 segment_generation=segment_generation_1 segment_belonging=A valid_from_date=2023-01-01 valid_to_date=. _ERROR_=1
_N_=1
NOTE: The data set WORK.CUSTOMER_FROM_TO_TABLE has 1 observations and 5 variables.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 17:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862515#M340707</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-03-06T17:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unexpected behaviour  when trying to create a manual sas table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862517#M340708</link>
      <description>&lt;P&gt;That was the problem. Time to go home... &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;Many thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 16:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unexpected-behaviour-when-trying-to-create-a-manual-sas-table/m-p/862517#M340708</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2023-03-06T16:22:20Z</dc:date>
    </item>
  </channel>
</rss>

