<?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: Issue in update statement in data step in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512907#M6576</link>
    <description>&lt;P&gt;Please avoid shouting uppercase code at us.&amp;nbsp; The first thing that jumps out at me is that you are filtering the master dataset (with a where clause), but this is not how update works.&amp;nbsp; If you are trying to add a new record, then set the small dataset to the big one.&amp;nbsp; If you updating where the id exists, then the by line will do that.&amp;nbsp; Also, as you have not provided any test data - in the form of a datastep, nor even provided what the macro job_key_skey is, we have nothing to work with to diagnose any further.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2018 11:33:28 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-14T11:33:28Z</dc:date>
    <item>
      <title>Issue in update statement in data step</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512904#M6575</link>
      <description>&lt;P&gt;Update statement in data step is not executing through SAS DI but same is executing through EG. PFB the code we are trying to execute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA TRANSACTION;&lt;BR /&gt;FORMAT JOB_RUN_SKEY 20. JOB_END_TIME DATETIME20.;&lt;BR /&gt;JOB_STATUS_CDE = -1;&lt;BR /&gt;JOB_RUN_SKEY =&amp;amp;JOB_RUN_SKEY.;&lt;BR /&gt;JOB_END_TIME=DATETIME();&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;data ODSDMSAS.DSI_PROD_CTRL_TBL;&lt;BR /&gt;modify ODSDMSAS.DSI_PROD_CTRL_TBL (WHERE=(JOB_RUN_SKEY =&amp;amp;JOB_RUN_SKEY.))&lt;BR /&gt;transaction&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;by JOB_RUN_SKEY;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="_ad_q1"&gt;NOTE: The data set ODSDMSAS.DSI_PROD_CTRL_TBL has been updated.  There were 0 observations rewritten, 0 observations added and 0 observations deleted.
NOTE: There were 0 observations read from the data set WORK.TRANSACTION.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 11:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512904#M6575</guid>
      <dc:creator>ALOKVB86</dc:creator>
      <dc:date>2018-11-14T11:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in update statement in data step</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512907#M6576</link>
      <description>&lt;P&gt;Please avoid shouting uppercase code at us.&amp;nbsp; The first thing that jumps out at me is that you are filtering the master dataset (with a where clause), but this is not how update works.&amp;nbsp; If you are trying to add a new record, then set the small dataset to the big one.&amp;nbsp; If you updating where the id exists, then the by line will do that.&amp;nbsp; Also, as you have not provided any test data - in the form of a datastep, nor even provided what the macro job_key_skey is, we have nothing to work with to diagnose any further.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 11:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512907#M6576</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-14T11:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in update statement in data step</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512973#M6577</link>
      <description>&lt;P&gt;This statement&lt;/P&gt;
&lt;PRE&gt;NOTE: There were 0 observations read from the data set WORK.TRANSACTION.&lt;/PRE&gt;
&lt;P&gt;says there were no records in the data set you named transaction. So with nothing read from that set nothing was available to update or modify the data. So you need to examine the log for where your transaction set is made. Since we have nothing for your macro variable &amp;amp;Job_run_skey we cannot tell whether that might be an issue or not. If the macro variable was undefined then the data step would have and error and an empty data set created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify is no the same as Update though.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 15:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/512973#M6577</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-14T15:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in update statement in data step</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/513845#M6600</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am intending to update status table once DI job gets completed. Once job executes successfully status_code updates properly to 1 but once encountered an error it's not updating at all. We tried proc sql but it was not working so tried data step to update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MPRINT(JOB_IS_ERRR_EXIST): DATA TRANSACTION;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): FORMAT JOB_RUN_SKEY 20. JOB_END_TIME DATETIME20.;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): JOB_STATUS_CDE = -1;&lt;BR /&gt;SYMBOLGEN: Macro variable JOB_RUN_SKEY resolves to 1857990024574&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): JOB_RUN_SKEY =1857990024574;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): JOB_END_TIME=DATETIME();&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): RUN;&lt;/P&gt;&lt;P&gt;NOTE: Compression was disabled for data set WORK.TRANSACTION because compression overhead would increase the size of the data set.&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;NOTE: The data set WORK.TRANSACTION has 1 observations and 3 variables.&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;PROCEDURE| _DISARM| STOP| _DISARM| 2018-11-16T12:21:14,175+05:1800| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | _DISARM| 25952256| _DISARM| 17993728| _DISARM| 14| _DISARM| 15| _DISARM| 136| _DISARM| 21478| _DISARM| 0.000000| _DISARM|&lt;BR /&gt;0.002801| _DISARM| 1857970274.173060| _DISARM| 1857970274.175861| _DISARM| 0.000000| _DISARM| | _ENDDISARM&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;MPRINT(JOB_IS_ERRR_EXIST): data ODSDMSAS.DSI_PROD_CTRL_TBL;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): modify ODSDMSAS.DSI_PROD_CTRL_TBL TRANSACTION ;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): by JOB_RUN_SKEY;&lt;BR /&gt;MPRINT(JOB_IS_ERRR_EXIST): RUN;&lt;BR /&gt;&amp;#12;36 The SAS System 12:20 Friday, November 16, 2018&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: The data set ODSDMSAS.DSI_PROD_CTRL_TBL has been updated. There were 0 observations rewritten, 0 observations added and 0 observations deleted.&lt;BR /&gt;NOTE: There were 0 observations read from the data set WORK.TRANSACTION.&lt;BR /&gt;PROCEDURE| _DISARM| STOP| _DISARM| 2018-11-16T12:21:14,510+05:1800| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| | _DISARM| 25952256| _DISARM| 17993728| _DISARM| 14| _DISARM| 15| _DISARM| 0| _DISARM| 21478| _DISARM| 0.020000| _DISARM|&lt;BR /&gt;0.333983| _DISARM| 1857970274.176700| _DISARM| 1857970274.510683| _DISARM| 0.010000| _DISARM| | _ENDDISARM&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.33 seconds&lt;BR /&gt;cpu time 0.02 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;JOB_RUN_SKEY&lt;/TD&gt;&lt;TD&gt;JOB_ID&lt;/TD&gt;&lt;TD&gt;JOB_NAME&lt;/TD&gt;&lt;TD&gt;JOB_SAS_CDE&lt;/TD&gt;&lt;TD&gt;TGT_TBL_NME&lt;/TD&gt;&lt;TD&gt;TGT_TBL_DESC&lt;/TD&gt;&lt;TD&gt;JOB_ETL_NME&lt;/TD&gt;&lt;TD&gt;JOB_START_TIME&lt;/TD&gt;&lt;TD&gt;JOB_END_TIME&lt;/TD&gt;&lt;TD&gt;JOB_STATUS_CDE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1857990024574&lt;/TD&gt;&lt;TD&gt;574&lt;/TD&gt;&lt;TD&gt;ABR_PREPAID_CARDS_JOB&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;ABR_PREPAID_CARDS_JOB&lt;/TD&gt;&lt;TD&gt;16Nov2018 12:20:24&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Status Code 0 meaning job has been executed. Once job got an error status code didn't change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 11:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-in-update-statement-in-data-step/m-p/513845#M6600</guid>
      <dc:creator>ALOKVB86</dc:creator>
      <dc:date>2018-11-16T11:23:11Z</dc:date>
    </item>
  </channel>
</rss>

