<?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: how to select column based on day(row is fixed)? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54221#M15024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It works!&lt;/P&gt;&lt;P&gt;The whole table is for February, its one of the sheets of a workbook. The records 1, 2, 3 are different types of data which i receive on that particular day. So, I just modified your code to take the date as input &amp;amp; code is taking care of everything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2012 16:45:33 GMT</pubDate>
    <dc:creator>Sudtej</dc:creator>
    <dc:date>2012-02-15T16:45:33Z</dc:date>
    <item>
      <title>how to select column based on day(row is fixed)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54218#M15021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name&amp;nbsp; F1 F2 F3 F4 F5 F6 .. . .. &lt;BR /&gt;1Cycle&amp;nbsp; 34 35 23 23 12 89&lt;BR /&gt;2Cycle 78 90 78 57 45 67&lt;BR /&gt;3Cycle 67 87 45 43 89 64&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;10cycle 56 45 79 90 45 78 &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am having a data set like above which has a whole month data(here I have just spcified 7 columns)&lt;BR /&gt;I want to retrive 3rd row data which is fixed and column will be chnaging on the day basis and after retriving the value, assign the value into &lt;BR /&gt;a macro variable.&lt;BR /&gt;for ex&amp;nbsp; on 4th feb it should select (row 3 and F4 column)=value should give 43&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on the 24th feb (row 3 and F24 column)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if i am not enough clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Sudtej&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 11:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54218#M15021</guid>
      <dc:creator>Sudtej</dc:creator>
      <dc:date>2012-02-15T11:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to select column based on day(row is fixed)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54219#M15022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this is what you want. Following code will put the value of the third row, column(days) you choose into macro variable 'want'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Name $&amp;nbsp; F1 F2 F3 F4 F5 F6 ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1Cycle&amp;nbsp; 34 35 23 23 12 89&lt;/P&gt;&lt;P&gt;2Cycle 78 90 78 57 45 67&lt;/P&gt;&lt;P&gt;3Cycle 67 87 45 43 89 64&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test (d=);&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;n=3;&lt;/P&gt;&lt;P&gt;set have point=n;&lt;/P&gt;&lt;P&gt;call symput ('want',f&amp;amp;d);&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put &amp;amp;want;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%test (d=6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more general purpose, the code can also be slightly tweaked like the following, so you can also choose the row of your will.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test (r= ,c=);&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;n=&amp;amp;r;&lt;/P&gt;&lt;P&gt;set have point=n;&lt;/P&gt;&lt;P&gt;call symput ('want',f&amp;amp;c);&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put &amp;amp;want;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%test (r=2, c=3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 12:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54219#M15022</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-02-15T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to select column based on day(row is fixed)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54220#M15023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is the code supposed to know that February is represented on the 3rd record?&amp;nbsp; What do records one and two represent?&amp;nbsp; Do you just want to indicate the date upfront and have the code take care of everything else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 13:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54220#M15023</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-15T13:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to select column based on day(row is fixed)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54221#M15024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It works!&lt;/P&gt;&lt;P&gt;The whole table is for February, its one of the sheets of a workbook. The records 1, 2, 3 are different types of data which i receive on that particular day. So, I just modified your code to take the date as input &amp;amp; code is taking care of everything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 16:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-select-column-based-on-day-row-is-fixed/m-p/54221#M15024</guid>
      <dc:creator>Sudtej</dc:creator>
      <dc:date>2012-02-15T16:45:33Z</dc:date>
    </item>
  </channel>
</rss>

