<?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: Reshape Datastream data for SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/352433#M262369</link>
    <description>&lt;P&gt;Hi &lt;IMG class="lia-user-rank-icon lia-user-rank-icon-left" src="https://communities.sas.com/html/rank_icons/contributor-rank.png" border="0" alt="Contributor" title="Contributor" /&gt; &lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30126" target="_self"&gt;&lt;SPAN class=""&gt;raqthesolid&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;see the other message on this community&lt;/P&gt;
&lt;P&gt;I posted a single step solution at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/datastream-into-SAS/m-p/346407/highlight/true#M44666" target="_self"&gt;https://communities.sas.com/t5/General-SAS-Programming/datastream-into-SAS/m-p/346407/highlight/true#M44666&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;peterC&lt;/P&gt;</description>
    <pubDate>Sat, 22 Apr 2017 14:49:31 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2017-04-22T14:49:31Z</dc:date>
    <item>
      <title>Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149436#M262360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Could someone help me with the following problem? It is urgent! Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have retrieved data about singapore equities from 1990 to 2012 from datastream, which is exported into excel files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The format of the data, however, is not compatible with SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, from datastream,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date1&amp;nbsp; date2&amp;nbsp; date3&lt;/P&gt;&lt;P&gt;comA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;comB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;comC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, i understand that for sas, it need to be transformed to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Company Date Price&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could i reshape the data? As I have large number of companeis and dates in my dataset, I cant really mannually change the format.&lt;/P&gt;&lt;P&gt;Is there any function in SAS that could help the reshaping?&lt;/P&gt;&lt;P&gt;Or could someone help with an excel marco that could fulfill the purpose?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Chloe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 05:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149436#M262360</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2013-11-20T05:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149437#M262361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To give you actual code very close to what you need I suggest that you attach some of the data for us (eg. a copy of your Excel with the first 200 lines populated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The approach I'm thinking about will include some array processing over all the date variables - but to then actually populate a date variable based on variable names we really need to see the actual data. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 05:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149437#M262361</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-11-20T05:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149438#M262362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;Attached is the screen shot of the sample data.&lt;/P&gt;&lt;P&gt;How can I attach excel worksheet?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sample.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4547_sample.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 11:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149438#M262362</guid>
      <dc:creator>chloe</dc:creator>
      <dc:date>2013-11-20T11:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149439#M262363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are a few steps you can take&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Delete rows 1 to 4 and column A of your Excel table and save the worksheet&lt;/LI&gt;&lt;LI&gt;Import the table into SAS - use Proc Import if you have installed the SAS Access to PC File formats&lt;/LI&gt;&lt;LI&gt;Otherwise export your dataset as a CSV or Tab delimited dataset and import it into SAS (Proc Export in its Bas cut down form)&lt;/LI&gt;&lt;LI&gt;In Proc Import you need to specify a table name - temp will do&lt;/LI&gt;&lt;LI&gt;Apart from the Name column, SAS will give unusual names to the weekly dates, like _2004_1_5&lt;/LI&gt;&lt;LI&gt;Now use Proc transpose to change rows to columns&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Proc transpose &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = temp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out = have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Noitsorted Name ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nearly there, just need to manage the dates, now held in the _NAME_ column :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date_Str = Substr (_Name_, 1, 11) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Translate (Date_Str, '-', '_') ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date = input (DateStr, YYMMDD10.) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop _NAME_ Date_str ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then sort it by name and date ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Sort&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name Date ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;[NB untested code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in NZ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 09:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149439#M262363</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-11-26T09:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149440#M262364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, change the name of the column with your data in the data step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data have ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $200.&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date YYMMDD10.&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1 comma12.2&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set want ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date_Str = Substr (_Name_, 1, 11) ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Translate (Date_Str, '-', '_') ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date = input (DateStr, YYMMDD10.) ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop _NAME_ Date_str ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rename Col1 = Price ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Run ;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Richard in OZ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 09:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/149440#M262364</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-11-26T09:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345744#M262365</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34372"&gt;@RichardinOz&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4063"&gt;@chloe&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;i am trying to do almost similar task but facing this issue. I will be thankful if anyone can guide. &amp;nbsp;Below is sas log file&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;80 Data want ;&lt;BR /&gt;81 Format Name $200.&lt;BR /&gt;82 Date YYMMDD10.&lt;BR /&gt;83 Col1 comma12.2&lt;BR /&gt;84 ;&lt;BR /&gt;85 Set have ;&lt;BR /&gt;86 Date_Str = Substr (_Name_, 1, 11) ;&lt;BR /&gt;87 = Translate (Date_Str, '-', '_') ;&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;88 date = input (DateStr, YYMMDD10.) ;&lt;BR /&gt;89 Drop _NAME_ Date_str ;&lt;BR /&gt;90 Rename Col1 = Price ;&lt;BR /&gt;91 Run ;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345744#M262365</guid>
      <dc:creator>raqthesolid</dc:creator>
      <dc:date>2017-03-30T13:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345949#M262366</link>
      <description>You can't start a line of SAS code with an equal sign, you need a variable name, like in log row 86.</description>
      <pubDate>Thu, 30 Mar 2017 19:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345949#M262366</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-03-30T19:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345982#M262367</link>
      <description>is that a header row of dates,  followed by 1 row for each company with price under the corresponding dates?&lt;BR /&gt;If that is the data structure, a short data step could read a .csv version of the datastream data and create thecrequested data structure  ---&lt;BR /&gt;except  we would have poorer performance if the row width is unknown.&lt;BR /&gt;Data ds1 ;&lt;BR /&gt;attrib co  length=$100   pdate format= date9. Informat= date11.  ;&lt;BR /&gt;array dates(10000) _temporary_ ; * allows 10,000 dates on a row.;&lt;BR /&gt;Infile "that .csv version of the input" dsd lrecl= 1000000 truncover  ;&lt;BR /&gt;If _n_ = 1 then do;&lt;BR /&gt;  Input co @;&lt;BR /&gt;   do c= 1 to dim(dates)  ;&lt;BR /&gt;       Input dates(c) @ ;&lt;BR /&gt;   end ;&lt;BR /&gt;   Delete ;&lt;BR /&gt;end ;&lt;BR /&gt;Input co @ ;&lt;BR /&gt;do c= 1 to dim(dates) ; &lt;BR /&gt;   Input price @ ;&lt;BR /&gt;   Pdate = dates(c) ;&lt;BR /&gt;   If price&amp;gt;0 then Output ;&lt;BR /&gt;End ;&lt;BR /&gt;Run ;&lt;BR /&gt;&lt;BR /&gt;That code assumes the dates conform to date. format like dd-mmm-yyyy or dd-mmm-yy &lt;BR /&gt;Or without those dashes.&lt;BR /&gt;If datesxare in some other date layout for which SAS has a suitable informat that should replace the informat date11.&lt;BR /&gt;If no suitable informat is available  conversion might still be possible. Other ways to define the price-date could be dealt with.&lt;BR /&gt;These alternatives need better definition of the input information structure .</description>
      <pubDate>Thu, 30 Mar 2017 22:12:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/345982#M262367</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-03-30T22:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/346020#M262368</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15174"&gt;@Peter_C&lt;/a&gt;&amp;nbsp;my data set looks like this one;&lt;/P&gt;
&lt;P&gt;data work.new;&lt;BR /&gt;infile datalines dsd truncover;&lt;BR /&gt;input Variable:$3. NAME:$15. _1_Oct_85:$7. _1_Nov_85:$7. _1_Dec_85:$7. _1_Jan_86:$7. _1_Feb_86:$7. _1_Mar_86:$7. _1_Apr_86:$7. _1_May_86:$7. _1_Jun_86:$7. _1_Jul_86:$7. _1_Aug_86:$7. _1_Sep_86:$7. _1_Oct_86:$7. _1_Nov_86:$7. _1_Dec_86:$7. _1_Jan_87:$7. _1_Feb_87:$7. _1_Mar_87:$7. _1_Apr_87:$7. _1_May_87:$7. _1_Jun_87:$7. _1_Jul_87:$7. _1_Aug_87:$7. _1_Sep_87:$7. _1_Oct_87:$7. _1_Nov_87:$7. _1_Dec_87:$7. _1_Jan_88:$7. _1_Feb_88:$7. _1_Mar_88:$7. _1_Apr_88:$7. _1_May_88:$7. _1_Jun_88:$7. _1_Jul_88:$7. _1_Aug_88:$7. _1_Sep_88:$7. _1_Oct_88:$7. _1_Nov_88:$7. _1_Dec_88:$7. _1_Jan_89:$7. _1_Feb_89:$7. _1_Mar_89:$7. _1_Apr_89:$7. _1_May_89:$7. _1_Jun_89:$7. _1_Jul_89:$7. _1_Aug_89:$7. _1_Sep_89:$7. _1_Oct_89:$7. _1_Nov_89:$7. _1_Dec_89:$7. _1_Jan_90:$7. _1_Feb_90:$7. _1_Mar_90:$7. _1_Apr_90:$7. _1_May_90:$7. _1_Jun_90:$7. _1_Jul_90:$7. _1_Aug_90:$7. _1_Sep_90:$7. _1_Oct_90:$7. _1_Nov_90:$7. _1_Dec_90:$7. _1_Jan_91:$7. _1_Feb_91:$7. _1_Mar_91:$7. _1_Apr_91:$7. _1_May_91:$7. _1_Jun_91:$7. _1_Jul_91:$7. _1_Aug_91:$7. _1_Sep_91:$7. _1_Oct_91:$7. _1_Nov_91:$7. _1_Dec_91:$7. _1_Jan_92:$7. _1_Feb_92:$7. _1_Mar_92:$7. _1_Apr_92:$7. _1_May_92:$7. _1_Jun_92:$7. _1_Jul_92:$7. _1_Aug_92:$7. _1_Sep_92:$7. _1_Oct_92:$7. _1_Nov_92:$7. _1_Dec_92:$7. _1_Jan_93:32. _1_Feb_93:32. _1_Mar_93:32. _1_Apr_93:32. _1_May_93:32. _1_Jun_93:32. _1_Jul_93:32. _1_Aug_93:32. _1_Sep_93:32. _1_Oct_93:32. _1_Nov_93:32. _1_Dec_93:32. _1_Jan_94:32. _1_Feb_94:32. _1_Mar_94:32. _1_Apr_94:32. _1_May_94:32. _1_Jun_94:32. _1_Jul_94:32. _1_Aug_94:32. _1_Sep_94:32. _1_Oct_94:32. _1_Nov_94:32. _1_Dec_94:32. _1_Jan_95:32. _1_Feb_95:32. _1_Mar_95:32. _1_Apr_95:32. _1_May_95:32. _1_Jun_95:32. _1_Jul_95:32. _1_Aug_95:32. _1_Sep_95:32. _1_Oct_95:32. _1_Nov_95:32. _1_Dec_95:32. _1_Jan_96:32. _1_Feb_96:32. _1_Mar_96:32. _1_Apr_96:32. _1_May_96:32. _1_Jun_96:32. _1_Jul_96:32. _1_Aug_96:32. _1_Sep_96:32. _1_Oct_96:32. _1_Nov_96:32. _1_Dec_96:32. _1_Jan_97:32. _1_Feb_97:32. _1_Mar_97:32. _1_Apr_97:32. _1_May_97:32. _1_Jun_97:32. _1_Jul_97:32. _1_Aug_97:32. _1_Sep_97:32. _1_Oct_97:32. _1_Nov_97:32. _1_Dec_97:32. _1_Jan_98:32. _1_Feb_98:32. _1_Mar_98:32. _1_Apr_98:32. _1_May_98:32. _1_Jun_98:32. _1_Jul_98:32. _1_Aug_98:32. _1_Sep_98:32. _1_Oct_98:32. _1_Nov_98:32. _1_Dec_98:32. _1_Jan_99:32. _1_Feb_99:32. _1_Mar_99:32. _1_Apr_99:32. _1_May_99:32. _1_Jun_99:32. _1_Jul_99:32. _1_Aug_99:32. _1_Sep_99:32. _1_Oct_99:32. _1_Nov_99:32. _1_Dec_99:32. _1_Jan_00:32. _1_Feb_00:32. _1_Mar_00:32. _1_Apr_00:32. _1_May_00:32. _1_Jun_00:32. _1_Jul_00:32. _1_Aug_00:32. _1_Sep_00:32. _1_Oct_00:32. _1_Nov_00:32. _1_Dec_00:32. _1_Jan_01:32. _1_Feb_01:32. _1_Mar_01:32. _1_Apr_01:32. _1_May_01:32. _1_Jun_01:32. _1_Jul_01:32. _1_Aug_01:32. _1_Sep_01:32. _1_Oct_01:32. _1_Nov_01:32. _1_Dec_01:32. _1_Jan_02:32. _1_Feb_02:32. _1_Mar_02:32. _1_Apr_02:32. _1_May_02:32. _1_Jun_02:32. _1_Jul_02:32. _1_Aug_02:32. _1_Sep_02:32. _1_Oct_02:32. _1_Nov_02:32. _1_Dec_02:32. _1_Jan_03:32. _1_Feb_03:32. _1_Mar_03:32. _1_Apr_03:32. _1_May_03:32. _1_Jun_03:32. _1_Jul_03:32. _1_Aug_03:32. _1_Sep_03:32. _1_Oct_03:32. _1_Nov_03:32. _1_Dec_03:32. _1_Jan_04:32. _1_Feb_04:32. _1_Mar_04:32. _1_Apr_04:32. _1_May_04:32. _1_Jun_04:32. _1_Jul_04:32. _1_Aug_04:32. _1_Sep_04:32. _1_Oct_04:32. _1_Nov_04:32. _1_Dec_04:32. _1_Jan_05:32. _1_Feb_05:32. _1_Mar_05:32. _1_Apr_05:32. _1_May_05:32. _1_Jun_05:32. _1_Jul_05:32. _1_Aug_05:32. _1_Sep_05:32. _1_Oct_05:32. _1_Nov_05:32. _1_Dec_05:32. _1_Jan_06:32. _1_Feb_06:32. _1_Mar_06:32. _1_Apr_06:32. _1_May_06:32. _1_Jun_06:32. _1_Jul_06:32. _1_Aug_06:32. _1_Sep_06:32. _1_Oct_06:32.;&lt;BR /&gt;datalines;&lt;BR /&gt;LTD,@LAUR(WC03251),NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,N&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;and i want it follwing format;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Date(Preferably in YYYYMM format) Variables (two variables in separate columns, LTD, BV)&lt;BR /&gt;Can you help with this thing.&amp;nbsp;&lt;BR /&gt;Good day&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 04:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/346020#M262368</guid>
      <dc:creator>raqthesolid</dc:creator>
      <dc:date>2017-03-31T04:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/352433#M262369</link>
      <description>&lt;P&gt;Hi &lt;IMG class="lia-user-rank-icon lia-user-rank-icon-left" src="https://communities.sas.com/html/rank_icons/contributor-rank.png" border="0" alt="Contributor" title="Contributor" /&gt; &lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/30126" target="_self"&gt;&lt;SPAN class=""&gt;raqthesolid&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;see the other message on this community&lt;/P&gt;
&lt;P&gt;I posted a single step solution at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/datastream-into-SAS/m-p/346407/highlight/true#M44666" target="_self"&gt;https://communities.sas.com/t5/General-SAS-Programming/datastream-into-SAS/m-p/346407/highlight/true#M44666&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;peterC&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 14:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/352433#M262369</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-04-22T14:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799283#M314281</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Noitsorted Name is not working. It is giving message of noitsorted variable not found&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 11:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799283#M314281</guid>
      <dc:creator>javidiqbal</dc:creator>
      <dc:date>2022-03-01T11:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799289#M314286</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am trying to make DataStream dataset consisting panels data of multiple banks into panel data where banks are stacked on each other. I used a command below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Proc transpose data = temp out = have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;By Noitsorted Name ; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;but the output comes with an error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Variable NOITSORTED not found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help resolve this issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&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>Tue, 01 Mar 2022 11:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799289#M314286</guid>
      <dc:creator>javidiqbal</dc:creator>
      <dc:date>2022-03-01T11:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799311#M314294</link>
      <description>the instruction NOTSORTED normally follows a variable name.&lt;BR /&gt;However, that just fixes the current error message. I won't promise the rest will do what you want.</description>
      <pubDate>Tue, 01 Mar 2022 13:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799311#M314294</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2022-03-01T13:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799313#M314296</link>
      <description>&lt;P&gt;Are you sure that is an EXCEL file.&lt;/P&gt;
&lt;P&gt;It looks more like a CSV file that has accidentally opened by EXCEL.&lt;BR /&gt;What was the original filename before you opened it with EXCEL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 13:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799313#M314296</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-01T13:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape Datastream data for SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799386#M314329</link>
      <description>Chloe posted her msg in 2017</description>
      <pubDate>Tue, 01 Mar 2022 16:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-Datastream-data-for-SAS/m-p/799386#M314329</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2022-03-01T16:57:20Z</dc:date>
    </item>
  </channel>
</rss>

