<?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: proc transpose in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795046#M81545</link>
    <description>&lt;P&gt;the problem is importing from excel&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I import the date will be a text&amp;nbsp;$1.&lt;/P&gt;
&lt;P&gt;I have this error from you program&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: "20" is not a valid name.&lt;/P&gt;
&lt;P&gt;thanks for your help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 18:03:16 GMT</pubDate>
    <dc:creator>sasphd</dc:creator>
    <dc:date>2022-02-08T18:03:16Z</dc:date>
    <item>
      <title>proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795041#M81541</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to run proc transpose but it does not work. there is no erro in log but the data generated is empty.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my data looks like. the problem is that the date format is&amp;nbsp;$12. as I import it as text from excel&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/****** TRANSPOSER LA TABLE  **********/
proc transpose data=Global_MS out=style_box    ;
by SecId;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have&lt;/P&gt;
&lt;P&gt;secid 20020201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301 20020401&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Large&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;large&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;large&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;secid&amp;nbsp; date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; style&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020201&amp;nbsp;&amp;nbsp;Large&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301&amp;nbsp; &amp;nbsp;&amp;nbsp;small&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020401&amp;nbsp; &amp;nbsp; large&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020201&amp;nbsp; small &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301&amp;nbsp; &amp;nbsp;&amp;nbsp;small&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020401&amp;nbsp; &amp;nbsp; large&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795041#M81541</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-08T17:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795043#M81542</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=Global_MS out=style_box prefix=D_    ;
by SecId;
ID date;
value style;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How does that work for you?&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/4327"&gt;@sasphd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to run proc transpose but it does not work. there is no erro in log but the data generated is empty.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my data looks like. the problem is that the date format is&amp;nbsp;$12. as I import it as text from excel&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
/****** TRANSPOSER LA TABLE  **********/
proc transpose data=Global_MS out=style_box    ;
by SecId;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have&lt;/P&gt;
&lt;P&gt;secid 20020201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301 20020401&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Large&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;large&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;small&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;large&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want&amp;nbsp;&lt;/P&gt;
&lt;P&gt;secid&amp;nbsp; date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; style&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020201&amp;nbsp;&amp;nbsp;Large&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301&amp;nbsp; &amp;nbsp;&amp;nbsp;small&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020401&amp;nbsp; &amp;nbsp; large&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020201&amp;nbsp; small &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020301&amp;nbsp; &amp;nbsp;&amp;nbsp;small&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20020401&amp;nbsp; &amp;nbsp; large&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795043#M81542</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-08T17:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795044#M81543</link>
      <description>&lt;P&gt;thanks for your help&lt;/P&gt;
&lt;P&gt;No it does not work&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an error in the log: variable date not found and value is not valid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795044#M81543</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-08T17:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795045#M81544</link>
      <description>&lt;P&gt;How can HAVE be your source data?&amp;nbsp; The column headers in your listing are not valid variable names.&amp;nbsp; Did you accidently set the VALIDVARNAME option to ANY?&lt;/P&gt;
&lt;P&gt;Remember that if you don't use a VAR statement in PROC TRANSPOSE then it will transpose all of the NUMERIC variables. So if you want to transpose those character variables you need to include a VAR statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;
data have;
  input secid ('20020201'n '20020301'n '20020401'n) (:$10.);
cards;
1         Large                   small       large
2         small                   small       large
;

proc transpose data=have 
  name=date
  out=want(rename=(col1=style)) 
;
  by secid;
  var '20'n: ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;Obs    secid      date      style

 1       1      20020201    Large
 2       1      20020301    small
 3       1      20020401    large
 4       2      20020201    small
 5       2      20020301    small
 6       2      20020401    large

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795045#M81544</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-08T17:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795046#M81545</link>
      <description>&lt;P&gt;the problem is importing from excel&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I import the date will be a text&amp;nbsp;$1.&lt;/P&gt;
&lt;P&gt;I have this error from you program&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: "20" is not a valid name.&lt;/P&gt;
&lt;P&gt;thanks for your help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 18:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795046#M81545</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-08T18:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795047#M81546</link>
      <description>&lt;P&gt;If you want to use a non-standard name in code you need to use a name literal.&amp;nbsp; Which is a quoted string with the letter n appended.&amp;nbsp; Just like a date literal is a quoted string (with the string being something the DATE informat can read) with letter d appended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are having trouble with PROC IMPORT that is a different issue or the XLSX libname engine then that is a different issue.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 18:12:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795047#M81546</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-08T18:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795051#M81547</link>
      <description>&lt;P&gt;I have this error in the log when importing&lt;/P&gt;
&lt;P&gt;OTE: One or more variables were converted because the data type is not supported by the V9 engine.&lt;BR /&gt;For more details, run with options MSGLEVEL=I.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 18:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795051#M81547</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-08T18:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795054#M81548</link>
      <description>&lt;P&gt;That is not an error.&amp;nbsp; &lt;STRONG&gt;That is SAS just being stupid.&lt;/STRONG&gt;&amp;nbsp; A SAS dataset only have two types of variables, floating point numbers and fixed length character strings.&amp;nbsp; For some reason SAS is trying to tell you that it interpreted the character strings in your EXCEL file as &lt;STRONG&gt;variable length&lt;/STRONG&gt; strings (VARCHAR type) but it will create fixed length stings (CHAR type) in the SAS dataset.&amp;nbsp; As if it could do anything else.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795054#M81548</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-08T19:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795057#M81549</link>
      <description>&lt;P&gt;but the proc transpose does not work&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795057#M81549</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-08T19:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795060#M81550</link>
      <description>&lt;P&gt;You need to provide more relevant information.&lt;/P&gt;
&lt;P&gt;What does the source dataset you get from the EXCEL file actually look like?&lt;/P&gt;
&lt;P&gt;Run PROC CONTENTS on it.&amp;nbsp; Print a few lines.&lt;/P&gt;
&lt;P&gt;What does the SAS log tell you happened?&lt;/P&gt;
&lt;P&gt;Show the lines from the SAS log for both the step that is creating the original file and the PROC TRANSPOSE step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When sharing information on this site make sure to copy the text as actual text and not photographs.&amp;nbsp; Use the Insert Code or Insert SAS Code buttons in the forum so you can get a pop-up window where you can paste and/or edit the text you want to share.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 19:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795060#M81550</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-08T19:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795061#M81551</link>
      <description>Please post the code and log. &lt;BR /&gt;</description>
      <pubDate>Tue, 08 Feb 2022 20:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795061#M81551</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-08T20:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795093#M81553</link>
      <description>&lt;P&gt;the log give this&lt;/P&gt;
&lt;PRE&gt;  Physical Name: C:\MaRecherche\IPO\data_full_sample
38   proc import datafile = 'C:\MaRecherche\IPO\data_full_sample\PMS_data_MS_Global.xlsx' DBMS = xlsx
38 ! OUT = Global_MS ; options msglevel=i; sheet="Monthly_equity_style_box";
39

NOTE: VARCHAR data type is not supported by the V9 engine. Variable SecId has been converted to CHAR
      data type.
NOTE: VARCHAR data type is not supported by the V9 engine. Variable 19840101 has been converted to
      CHAR data type.
NOTE: VARCHAR data type is not supported by the V9 engine. Variable 19840201 has been converted to
      CHAR data type.
NOTE: VARCHAR data type is not supported by the V9 engine. Variable 19840301 has been converted to
      CHAR data type.
NOTE: VARCHAR data type is not supported by the V9 engine. Variable 19840401 has been converted to
      CHAR data type.
NOTE: VARCHAR data type is not supported by the V9 engine. Variable 19840501 has been converted to
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc transpose does not give any error in the log just the file is empty&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=Global_MS out=_7_Morningstar_Data  ;
by Secid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;91   /****** TRANSPOSER LA TABLE  **********/
92   proc transpose data=Global_MS out=_7_Morningstar_Data  ;
93   by Secid;
94   run;

NOTE: No variables to transpose.
NOTE: There were 27177 observations read from the data set WORK.GLOBAL_MS.
NOTE: The data set WORK._7_MORNINGSTAR_DATA has 0 observations and 3 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
      real time           0.11 seconds
      cpu time            0.06 seconds
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I run proc contents I have&lt;/P&gt;
&lt;PRE&gt;Alphabetic List of Variables and Attributes 
# Variable Type Len Format Informat Label 
2 30682 Char 1 $1. $1. 30682 
3 30713 Char 1 $1. $1. 30713 
4 30742 Char 1 $1. $1. 30742 
5 30773 Char 9 $9. $9. 30773 
6 30803 Char 9 $9. $9. 30803 
7 30834 Char 11 $11. $11. 30834 
8 30864 Char 1 $1. $1. 30864 
9 30895 Char 1 $1. $1. 30895 
10 30926 Char 11 $11. $11. 30926 
11 30956 Char 11 $11. $11. 30956 
12 30987 Char 9 $9. $9. 30987 
13 31017 Char 11 $11. $11. 31017 
&lt;/PRE&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 01:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795093#M81553</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-09T01:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795095#M81554</link>
      <description>&lt;P&gt;please see message above&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 01:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795095#M81554</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-02-09T01:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795097#M81555</link>
      <description>&lt;P&gt;We answered that question already.&amp;nbsp; If you do not include a VAR statement then PROC TRANPOSE will only transpose the NUMERIC variables. You have ZERO numeric variables and you did not include a VAR statement. So you asked PROC TRANSPOSE to do NOTHING.&amp;nbsp; So it did nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing you can tell from what you posted is that your column headers in your spreadsheet have Excel DATE values instead of NAMES.&amp;nbsp; When SAS sees a NUMERIC value (like SAS EXCEL will store dates as NUMBERS) in a cell that it is interpreting as character (again, variable names are character strings) then it uses the character representation of the actual number being in the cell and ignores any formatting Excel might be using to display the number on the screen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is why your variables are named&amp;nbsp;&amp;nbsp;30682 and 30682 etc instead of&amp;nbsp;19840101 and 19840201 etc.&amp;nbsp; (This actually shows another place where PROC IMPORT is giving confusing messages.&amp;nbsp; In the NOTE it is calling the variable '19840101' but it looks like the variable is really named '30682'.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case we can deal with that AFTER you have transposed the data to get the date out of the metadata (variable name) and into actual data (value of a variable).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your listing of the contents is not showing the name for the first variables (VARNUM=1).&lt;/P&gt;
&lt;P&gt;Let's assume it is actually named SECID, like in your code attempt and you just didn't get that far in the lines you copied.&lt;/P&gt;
&lt;P&gt;One way to make sure all of the variables are transposed is to use the _ALL_ variable list in the VAR statement.&amp;nbsp; Note that this will also include the BY variable, but we can deal with that later when we fix the DATE values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=Global_MS 
  out=step1 
;
  by Secid;
  var _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now you should get something.&amp;nbsp; So if your original dataset had&amp;nbsp;27,177 observations and at least 13 variables then your new dataset should have at least 13 *&amp;nbsp;27,177 observations;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now let's fix it up a little.&amp;nbsp; Let's convert the strings in the _NAME_ variable that PROC TRANSPOSE generated into actual DATE values.&amp;nbsp; (You need to add that date constant to adjust for difference in how SAS and Excel store dates).&amp;nbsp; And fix the name of the COL1 variable PROC TRANSPOSE will create.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _7_Morningstar_Data;
  set step1;
  if upcase(_name_)='SECID' then delete;
  date = input(_name_,32.) + '30dec1899'd ;
  style=col1;
  format date yymmdd10.;
  drop _name_ col1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 01:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-transpose/m-p/795097#M81555</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-09T01:59:19Z</dc:date>
    </item>
  </channel>
</rss>

