<?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: entire observations are not reflecting. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530605#M5771</link>
    <description>&lt;P&gt;Another method to set the lengths is the use of formats in the input statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ch;
infile " ";
input subjid :$5. form :$20. cmstat :$3. cmspecify :$57.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The colon modifier prevents true formatted input (where exactly the number of bytes as stated in the format are read); instead it is still list input, and the delimiters are observed.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 12:52:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-01-28T12:52:23Z</dc:date>
    <item>
      <title>entire observations are not reflecting.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530585#M5764</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;my observation is like 'Absolute Sexual Abstinences,Use of condom with spermicide'&lt;/P&gt;&lt;P&gt;and I have provided the length as 57 also, still in results its showing like 'Absolute'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below&amp;nbsp; is the code:&lt;/P&gt;&lt;P&gt;Data CH;&lt;BR /&gt;infile " ";&lt;BR /&gt;input SUBJID$ FORM$ CMSTAT$ CMSPECIFY$;&lt;BR /&gt;LENGTH SUBJID$ 5 FORM$ 20 CMSTAT$ 3 CMSPECIFY$ 57;&lt;BR /&gt;run;&lt;BR /&gt;title "Frequency table of Contraceptive Hisory";&lt;BR /&gt;Proc freq data = work.CH;&lt;BR /&gt;tables CMSTAT CMSPECIFY/ NOCUM;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 11:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530585#M5764</guid>
      <dc:creator>shyamtawde</dc:creator>
      <dc:date>2019-01-28T11:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: entire observations are not reflecting.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530592#M5765</link>
      <description>&lt;P&gt;AVOID USING CAPITILISATION!&lt;/P&gt;
&lt;P&gt;The reason being is because it is like shouting at the reader.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, in your problem, you have defined the length&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;after&lt;/STRONG&gt;&lt;/U&gt; the input statement.&amp;nbsp; If a variable is not defined, then it will be defined with default values at the first instance it is used.&amp;nbsp; So the datastep gets to the input and finds the cmspecify variable is not defined, so assigns it as $8 which is the default for character strings.&amp;nbsp; Here I move the length before the input, so the first time the compiler sees the variable is when the length is defined:&lt;/P&gt;
&lt;PRE&gt;data ch;
  length subjid $5 form $20 cmstat $3 cmspecify $57;
  infile " ";
  input subjid $ form $ cmstat $ cmspecify $;
run;

title "Frequency table of Contraceptive Hisory";
proc freq data=ch;
  tables cmstat cmspecify / nocum;
run;&lt;/PRE&gt;
&lt;P&gt;You can get a code window up by clicking the {i} on the toolbar above post area.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 11:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530592#M5765</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-01-28T11:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: entire observations are not reflecting.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530605#M5771</link>
      <description>&lt;P&gt;Another method to set the lengths is the use of formats in the input statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ch;
infile " ";
input subjid :$5. form :$20. cmstat :$3. cmspecify :$57.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The colon modifier prevents true formatted input (where exactly the number of bytes as stated in the format are read); instead it is still list input, and the delimiters are observed.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 12:52:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530605#M5771</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-01-28T12:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: entire observations are not reflecting.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530914#M5837</link>
      <description>Thank you so much&lt;BR /&gt;The code is working ##- Please type your reply above this line. No&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 29 Jan 2019 11:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/entire-observations-are-not-reflecting/m-p/530914#M5837</guid>
      <dc:creator>shyamtawde</dc:creator>
      <dc:date>2019-01-29T11:17:50Z</dc:date>
    </item>
  </channel>
</rss>

