<?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: advance Sas programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539241#M148547</link>
    <description>The code i wrote is this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proc sql,&lt;BR /&gt;Create table want1 as select b.&amp;amp;colnm.,b.&amp;amp;lkp1.b.&amp;amp;lkp2.,'Accept' as flag_&amp;amp;seq_no from dbn.&amp;amp;tblnm. b Inner join wrk.tbl2 a&lt;BR /&gt;On b.&amp;amp;colnm.=a.&amp;amp;lkp1.&lt;BR /&gt;&lt;BR /&gt;---result from these dataset means the records are updated&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proc sql,&lt;BR /&gt;Create table want2 as select b.&amp;amp;colnm.,b.&amp;amp;lkp1.b.&amp;amp;lkp2.,'Reject' as flag_&amp;amp;seq_no from dbn.&amp;amp;tblnm. b Inner join wrk.tbl2 a&lt;BR /&gt;On b.&amp;amp;colnm.=a.&amp;amp;lkp2.&lt;BR /&gt;&lt;BR /&gt;----------result from these dataset means the records are not yet updated&lt;BR /&gt;&lt;BR /&gt;And again I have 3rd table which i will call as final table where I have created flags 1 to flag 20 wherein if&lt;BR /&gt;Want1 is 0 then flag_&amp;amp;seqno is updated with 'accept' and if want2 have 0 records my flag_&amp;amp;seqno is updated to 'Reject'..so basically i am checking conditions from 2 table and updating the third one&lt;BR /&gt;Flag_&amp;amp;seqno is the macro variable created for table name.&lt;BR /&gt;&lt;BR /&gt;I hope i am able to explain it not..&lt;BR /&gt;PS_cant post the screenshot of sample data due to security constraints</description>
    <pubDate>Thu, 28 Feb 2019 09:21:46 GMT</pubDate>
    <dc:creator>nid197</dc:creator>
    <dc:date>2019-02-28T09:21:46Z</dc:date>
    <item>
      <title>advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539101#M148472</link>
      <description>Hi,&lt;BR /&gt;Please helo me to solve this&lt;BR /&gt;&lt;BR /&gt;I have table1 where i have created multiole flag columns which are empty.&lt;BR /&gt;I have another table2 which will check for the matching of account no and will output the rows which are not matching(matching rows it will remove).&lt;BR /&gt;So based on output from table 1 i have to update flag columns in table1.&lt;BR /&gt;I need the output table as-&lt;BR /&gt;&lt;BR /&gt;Accno flag1 flag2 flag3 flag4 flag5.......flag20&lt;BR /&gt;245789 y n n y y ........ n&lt;BR /&gt;678955 n y y y n ......... y&lt;BR /&gt;654285 n y y n y .........n&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here account no is the total list of account no and flag1 to flag20 are the tables i am checking where i will find that account no..so basically i will update y-yes and n-no if there.&lt;BR /&gt;&lt;BR /&gt;Please help&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 27 Feb 2019 19:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539101#M148472</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-02-27T19:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539102#M148473</link>
      <description>&lt;P&gt;Can you provide some example data of table1?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 19:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539102#M148473</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-27T19:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539105#M148474</link>
      <description>No i cant do that..there are some security constraints.but there are some some more variables as new acc no, old acc no,acc no,flag1...flag20&lt;BR /&gt;So basically we are checking if old acc no and new acc no are same if not is it updated..based on few more variables.&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 27 Feb 2019 19:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539105#M148474</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-02-27T19:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539126#M148484</link>
      <description>Make fake data, please. It needs to reflect your data structure and complexity but does not need to be your actual data.</description>
      <pubDate>Wed, 27 Feb 2019 20:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539126#M148484</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-27T20:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539135#M148488</link>
      <description>Well,It looks bit this way&lt;BR /&gt;&lt;BR /&gt;Table1:&lt;BR /&gt;&lt;BR /&gt;Custn acc_no oldtr_acc_no newtr_acc_no flag1-14&lt;BR /&gt;112 56786 ab54318tvc bs26514ihs&lt;BR /&gt;612 95305 id54318tvc bs97424ird&lt;BR /&gt;169 85319 pl75290hds bs6514ihs&lt;BR /&gt;932 84326 kd64290ygd bs25325pld&lt;BR /&gt;172 75032 la62975jfc bs87424itd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Table2&lt;BR /&gt;&lt;BR /&gt;acc_no oldtr_acc_no newtr_acc_no&lt;BR /&gt;56786 ab54318tvc bs26514ihs&lt;BR /&gt;95305 tg76428fds bs97424ird&lt;BR /&gt;85319 pl75290hds bs6514ihs&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I want to update table1 flag column based on the output of table2 such as if table2 has 0 rows then all the acc no are updated because table 2 only has the acc no which are not yet updated.so based on table2 data i want to mark the acc no in table1 flag as updated else not updated</description>
      <pubDate>Wed, 27 Feb 2019 20:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539135#M148488</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-02-27T20:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539211#M148527</link>
      <description>&lt;P&gt;And now...paste in a self-contained SAS datastep using datalines for your data, so we don't have to do the work that you should provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paste examples of your source datasets (traditionally called "have", or in your case "have1", "have2") and your target dataset (traditionally called "want").&amp;nbsp; Although we should be able to figure source(s) and target(s) from the context, so the above dataset names, while helpful, are optional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please also paste your code inside a SAS block - click the "running man" icon in the editor to do so.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 04:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539211#M148527</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-02-28T04:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539212#M148528</link>
      <description>&lt;P&gt;This looks like a work of a database trigger.&lt;/P&gt;&lt;P&gt;1. So what do you do when a particular record is removed from table 2?&lt;/P&gt;&lt;P&gt;2. You still have not mentioned about the conditions for flag variables, are all 14 variables dependent on one record in table 2?&lt;/P&gt;&lt;P&gt;Please post data with data lines, so that we don't have to construct the data.&lt;/P&gt;&lt;P&gt;And show us with example how the output should look like for your input.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 04:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539212#M148528</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2019-02-28T04:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: advance Sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539241#M148547</link>
      <description>The code i wrote is this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proc sql,&lt;BR /&gt;Create table want1 as select b.&amp;amp;colnm.,b.&amp;amp;lkp1.b.&amp;amp;lkp2.,'Accept' as flag_&amp;amp;seq_no from dbn.&amp;amp;tblnm. b Inner join wrk.tbl2 a&lt;BR /&gt;On b.&amp;amp;colnm.=a.&amp;amp;lkp1.&lt;BR /&gt;&lt;BR /&gt;---result from these dataset means the records are updated&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proc sql,&lt;BR /&gt;Create table want2 as select b.&amp;amp;colnm.,b.&amp;amp;lkp1.b.&amp;amp;lkp2.,'Reject' as flag_&amp;amp;seq_no from dbn.&amp;amp;tblnm. b Inner join wrk.tbl2 a&lt;BR /&gt;On b.&amp;amp;colnm.=a.&amp;amp;lkp2.&lt;BR /&gt;&lt;BR /&gt;----------result from these dataset means the records are not yet updated&lt;BR /&gt;&lt;BR /&gt;And again I have 3rd table which i will call as final table where I have created flags 1 to flag 20 wherein if&lt;BR /&gt;Want1 is 0 then flag_&amp;amp;seqno is updated with 'accept' and if want2 have 0 records my flag_&amp;amp;seqno is updated to 'Reject'..so basically i am checking conditions from 2 table and updating the third one&lt;BR /&gt;Flag_&amp;amp;seqno is the macro variable created for table name.&lt;BR /&gt;&lt;BR /&gt;I hope i am able to explain it not..&lt;BR /&gt;PS_cant post the screenshot of sample data due to security constraints</description>
      <pubDate>Thu, 28 Feb 2019 09:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/advance-Sas-programming/m-p/539241#M148547</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-02-28T09:21:46Z</dc:date>
    </item>
  </channel>
</rss>

