<?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: Offset Function SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390152#M277598</link>
    <description>&lt;P&gt;Thanks for your response RW9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the merging part but was more trying to find a way to calculate the offset part in SAS as it is dependent on the values in columns B, C, F and G.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2017 08:57:10 GMT</pubDate>
    <dc:creator>PetePatel</dc:creator>
    <dc:date>2017-08-23T08:57:10Z</dc:date>
    <item>
      <title>Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390145#M277596</link>
      <description>&lt;P&gt;Hello SAS Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Excel spreadsheet (extract attached) which needs to be transferred into SAS for automation purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lookup table in columns A, B and C and a dataset (columns E, F and G) and I have created an offset function in Excel to create column H (Result) which I am trying to replicate in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea on how this result can be achieved in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am more proficient in Excel than SAS so any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 08:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390145#M277596</guid>
      <dc:creator>PetePatel</dc:creator>
      <dc:date>2017-08-23T08:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390150#M277597</link>
      <description>&lt;P&gt;Forget Excel and Excel way of thinking. &amp;nbsp;What you have here is data merging or joining if you prefer. &amp;nbsp;You are taking a value from have1 and merging it to have 2 based on&amp;nbsp;id=a, so somthing like (and you need to get your data into SAS in a good format-Excel is a really poor data medium):&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT as 
  select  A.*,
             B.C as RESULT
  from    HAVE2 A
  left join HAVE1 B
  on       A.ID=B.A;
quit;&lt;/PRE&gt;
&lt;P&gt;You could also do the above in datastep merge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 08:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390150#M277597</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-23T08:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390152#M277598</link>
      <description>&lt;P&gt;Thanks for your response RW9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the merging part but was more trying to find a way to calculate the offset part in SAS as it is dependent on the values in columns B, C, F and G.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 08:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390152#M277598</guid>
      <dc:creator>PetePatel</dc:creator>
      <dc:date>2017-08-23T08:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390158#M277599</link>
      <description>&lt;P&gt;Sorry, I am not following at all then, there is no F and G in the given file? &amp;nbsp;Calrify the question, post the example data in the form of a datastep in the body of the post using the code window (its the {i} above the post area). &amp;nbsp;Then show what the output should be (avoiding Excel terms), and clarify the logic between the two, i.e. column named result should be the XYZ of column &amp;lt;&amp;gt; * column &amp;lt;&amp;gt; where column &amp;lt;&amp;gt; = coumn &amp;lt;&amp;gt;. &amp;nbsp;Terms like "offset" are Excel specific and have no meaning outside Excel. &amp;nbsp;I assume result is the product of some formula based on merging the two data?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 09:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390158#M277599</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-23T09:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390161#M277600</link>
      <description>&lt;P&gt;No problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Columns A-C are a lookup table (assume this would need to be imported into SAS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Columns E-G are in a SAS dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column H (Result) is what I am trying to create in SAS (You can see that it uses an offset function referencing columns F and G (named T and A) against the lookup table (Columns B and C).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So column H (Result) is what I need help to create...&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 09:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390161#M277600</guid>
      <dc:creator>PetePatel</dc:creator>
      <dc:date>2017-08-23T09:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Offset Function SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390187#M277601</link>
      <description>&lt;P&gt;Forget the Excel way of thinking. Think in datasets and variables, not in Excel spreadsheet terms. Present your SAS datasets as they are (use the macro provided in&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; to convert your datasets to data steps for easy posting here), and give an example of the expected resulting dataset (just like the output of a simple proc print is sufficient).&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 11:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Offset-Function-SAS/m-p/390187#M277601</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-23T11:55:25Z</dc:date>
    </item>
  </channel>
</rss>

