<?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: Convert All Variables in Dataset to Character without Loosing any original formatting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595794#M171482</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Please note that after the conversions, the final SAS dataset containing all character variables with $1000. format will be appended to a Teradata table with corresponding varchar(1000) fields.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Wouldn't that also need a transpose, as such structures are usually used in name/value tables?&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2019 15:48:17 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-10-11T15:48:17Z</dc:date>
    <item>
      <title>Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595743#M171459</link>
      <description>&lt;P&gt;I have a dataset with ten variables, VAR1-VAR10. Four of the variables are numeric dates and have a MMDDYYD10. format and the other six are character and have a $1000. format. My objective is to convert all ten of the variables to character with a $1000. format.&amp;nbsp;It is necessary, however, that the dates maintain their originally formatting after being converted to character.&amp;nbsp; For example if a date displays as 10-11-2019 before the conversion, it must display as 10-11-2019 after the conversion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to convert all variables at once to character $1000.? Please provide code examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595743#M171459</guid>
      <dc:creator>ijm_wf</dc:creator>
      <dc:date>2019-10-11T14:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595745#M171460</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a dataset with ten variables, VAR1-VAR10. Four of the variables are numeric dates and have a MMDDYYD10. format and the other six are character and have a $1000. format. My objective is to convert all ten of the variables to character with a $1000. format.&amp;nbsp;It is necessary, however, that the dates maintain their originally formatting after being converted to character.&amp;nbsp; For example if a date displays as 10-11-2019 before the conversion, it must display as 10-11-2019 after the conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the best way to convert all variables at once to character $1000.? Please provide code examples.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First, you can't convert numeric variables to character, this is not possible. You can create new character variables of the desired length, that look identical to the formatted numeric variable, but why bother? It seems like unnecessary work. Why do you need numeric variables as character with format $1000.?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595745#M171460</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-11T14:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595758#M171470</link>
      <description>&lt;P&gt;The best way is to not do that. Character variables with a defined length of 1000 waste 996 (!) bytes when dates are stored there (numeric variables containing dates can be defined with a length of just 4), and you lose all the fine methods (functions, calculations, formats) of dealing with SAS date values.&lt;/P&gt;
&lt;P&gt;Don't waste your time on something stupid.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:52:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595758#M171470</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T14:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595759#M171471</link>
      <description>&lt;P&gt;1. Query SASHELP.VCOLUMN or PROC CONTENTS to get the list of variables and types, and number of variables&lt;/P&gt;
&lt;P&gt;2. Use VVALUEX to convert to formatted character value&lt;/P&gt;
&lt;P&gt;3. Drop old variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rough sketch of what that may look like.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;

set have;

array _haveN(*) _numeric_;
array _haveC(*) _character_;

array newVar(*) $100. newVar1-newVar10;

do i= 1 to dim(_haveN);
newVar(i) = vvaluex(vname(_haveN(i)));
end;

do j=i to dim(_haveC);
newVar(j) = vvaluex(vname(_haveC(i)));
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a dataset with ten variables, VAR1-VAR10. Four of the variables are numeric dates and have a MMDDYYD10. format and the other six are character and have a $1000. format. My objective is to convert all ten of the variables to character with a $1000. format.&amp;nbsp;It is necessary, however, that the dates maintain their originally formatting after being converted to character.&amp;nbsp; For example if a date displays as 10-11-2019 before the conversion, it must display as 10-11-2019 after the conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the best way to convert all variables at once to character $1000.? Please provide code examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:53:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595759#M171471</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-11T14:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595766#M171473</link>
      <description>&lt;P&gt;Paige, what is the recommended way to "create new character variables of the desired length, that look identical to the formatted numeric variable"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595766#M171473</guid>
      <dc:creator>ijm_wf</dc:creator>
      <dc:date>2019-10-11T15:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595768#M171474</link>
      <description>&lt;P&gt;I believe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;answered this. The recommended way to do this conversion so you have character variables that appear to be identical to the formatted numeric variables is NOT doing it at all.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595768#M171474</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-11T15:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595770#M171476</link>
      <description>I don't recommend this either by the way and in 15 years don't think I've ever needed this. I've done similar things partially, creating data sets that have the raw value and the formatted value but that's usually when I need to transfer it to someone else who may not have SAS or to explore in Excel.</description>
      <pubDate>Fri, 11 Oct 2019 15:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595770#M171476</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-11T15:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595774#M171477</link>
      <description>&lt;P&gt;It is easy with PROC TRANSPOSE and there are valid reasons for doing.&amp;nbsp; Notice variable names and labels remain the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
   _obs_ + 1;
   set sashelp.cars;
   run;
proc transpose data=cars out=flip;
   by _obs_;
   var _all_;
   run;
data flip;
   set flip;
   where upcase(_name_) ne '_OBS_';
   col1 = left(col1);
   run;
proc transpose data=flip out=flop(drop=_name_);
   by _obs_;
   var col1;
   run;
proc contents varnum;
proc print;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 317px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33075i26FD7B7C7449600C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33078i4437D17E2C3193BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595774#M171477</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-10-11T15:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595783#M171479</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... there are valid reasons for doing.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since no reasons were given, I see it as my duty here to protect a newbie from doing something that is, ahem, not very efficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595783#M171479</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595791#M171481</link>
      <description>&lt;P&gt;Please note that after the conversions, the final SAS dataset containing all character variables with $1000. format will be appended to a Teradata table with corresponding varchar(1000) fields.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595791#M171481</guid>
      <dc:creator>ijm_wf</dc:creator>
      <dc:date>2019-10-11T15:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595794#M171482</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Please note that after the conversions, the final SAS dataset containing all character variables with $1000. format will be appended to a Teradata table with corresponding varchar(1000) fields.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Wouldn't that also need a transpose, as such structures are usually used in name/value tables?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595794#M171482</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-11T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595809#M171483</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Please note that after the conversions, the final SAS dataset containing all character variables with $1000. format will be appended to a Teradata table with corresponding varchar(1000) fields.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There is no need to make the variables all have a length of 1000 just because you are going to insert the values into a field that has that length.&amp;nbsp;&amp;nbsp;Now if some of the variables have a length that is &lt;STRONG&gt;greater than 1000&lt;/STRONG&gt; then you might have an issue with trying to insert that value into your Teradata table.&amp;nbsp; In that case you might need to change the LENGTH of the variable (and lose some of the data).&amp;nbsp; Just changing the format attached wouldn't truncate the values.&amp;nbsp; Note that there is no need to attach a $1000. format to any character variable, SAS already knows how to display character variables so no special formatting instructions are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However depending on how you do the conversion it might be easier to just make them all have the same length than take the effort to make the length match the length of the target variable in Teradata table.&amp;nbsp; Note that the double transpose method proposed on this thread will make the length of all of the variable long enough for the longest value of any of the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 16:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595809#M171483</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-11T16:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595964#M171531</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; Why not use&amp;nbsp;&lt;SPAN&gt;VVALUE() which convert variable into character variable with its format .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2019 11:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595964#M171531</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-12T11:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595967#M171532</link>
      <description>&lt;P&gt;If you get a list of the names of the variables you can use that to generate code.&amp;nbsp; PROC TRANSPOSE is an easy way to get the list of variable names.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dsn=sashelp.class;
proc transpose data=&amp;amp;dsn(obs=0) out=names;
  var _all_; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then use that list to generate code to convert the values to character using the&amp;nbsp;VVALUE() function. Just makeup a new name for each new character variable and then rename it back to the original name.&amp;nbsp; You might want to make a VIEW that does this instead&amp;nbsp;of making a permanent copy of the original dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set names end=eof;
  varnum+1;
  length newname $32 oldname $64;
  newname=cats('__v',varnum);
  oldname=nliteral(_name_);
  if _n_=1 then call execute("data converted/view=converted; set &amp;amp;dsn;");
  call execute(catx(' '
   ,'length',newname,'$1000;'
   ,newname,'=vvalue(',oldname,');'
   ,'keep',newname,';'
   ,'rename',newname,'=',oldname,';'
  )); 
  if eof then call execute('run;');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then just push the data from the view into your TD database.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=TDLIB.TD_table_name data=converted force;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Oct 2019 15:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595967#M171532</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-12T15:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595972#M171534</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp; VVALUE requires a literal name, VVALUEX takes an expression/formula, such as the result from VNAME().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; Why not use&amp;nbsp;&lt;SPAN&gt;VVALUE() which convert variable into character variable with its format .&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2019 19:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/595972#M171534</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-12T19:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/596332#M171685</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp; VVALUE requires a literal name, VVALUEX takes an expression/formula, such as the result from VNAME().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; Why not use&amp;nbsp;&lt;SPAN&gt;VVALUE() which convert variable into character variable with its format .&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; is saying you could have done it more directly using an array reference in VVALUE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   vvalue(_haveC[I]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Oct 2019 17:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/596332#M171685</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-10-14T17:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert All Variables in Dataset to Character without Loosing any original formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/596395#M171709</link>
      <description>Ah...thanks for the correction!</description>
      <pubDate>Tue, 15 Oct 2019 00:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-All-Variables-in-Dataset-to-Character-without-Loosing/m-p/596395#M171709</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-15T00:07:40Z</dc:date>
    </item>
  </channel>
</rss>

