title: SAS: Characters appear to be cut off in data set
body: <p>When I set a character's variable length to 2 bytes, the data set only shows one character.  However, when I print it, the full input displays.  To make things even weirder, when I change only the variable name, the problem goes away.  Below are code samples accompanied by screen shots of my data views and PROC PRINT results.</p>
  
  <p>I am using SAS 9.4 on Windows 7.  I'm not sure what encoding is being used.  As I've never changed it, I assume my encoding is <code>wlatin1</code>, as per this <a href="http://www.pharmasug.org/proceedings/2016/BB/PharmaSUG-2016-BB15.pdf" rel="nofollow noreferrer">white paper</a>.  This should mean that each ASCII character is 7 bits.  So, a <code>length</code> of <code>2.</code> should be 16 bits, leaving 2 bits remaining when storing "AA".</p>
  
  <p>I'm at a loss to explain what is going on and am concerned that I may be inadvertantly losing data.</p>
  
  <pre><code>data test1;
    length  cut   $ 1.
            full  $ 2.
            ;
  
    cut   = "AA";
    full  = "AA";
  run;
  
  proc print data = test1;
  run;
  </code></pre>
  
  <p>I find that if I change the name of the variable, but keep everything else the same, the input displays properly in the data set as well as the output.</p>
  
  <pre><code>data test2;
    length  one_byte   $ 1.
            two_bytes  $ 2.
            ;
  
    one_byte   = "AA";
    two_bytes  = "AA";
  
  run;
  
  proc print data = test2;
  run;
  </code></pre>
  
  <p>Below are screen shots of my data views and results window.</p>
  
  <p><a href="https://i.stack.imgur.com/TeGYM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TeGYM.png" alt="data set views"></a>
  <a href="https://i.stack.imgur.com/r6bf1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r6bf1.png" alt="results"></a></p>