<?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: Replace specific missing variable with differences between multiple variable columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559607#M156292</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all : put your code in the "INSERT SAS CODE"&lt;/P&gt;&lt;P&gt;Don't put files on attachment, just say what you want preciselly&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2019 09:59:29 GMT</pubDate>
    <dc:creator>Onizuka</dc:creator>
    <dc:date>2019-05-17T09:59:29Z</dc:date>
    <item>
      <title>Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559602#M156288</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;would like to ask what code should I use in order to replace the specific missing&amp;nbsp;variables column (not all, as I have total 7 missing variable columns) with&lt;/P&gt;&lt;P&gt;differences between multiple variables columns. was struggling this for few hours and unable to get solutions even after I tried to google search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had attached&amp;nbsp;two screenshots with this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope to get some replies asap.Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;here's my code below&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;data P201812;&lt;BR /&gt;&amp;nbsp;%let _EFIERR_=0;&lt;BR /&gt;&amp;nbsp;infile '\\D:\POLA\201812.csv' dlm=',' MISSOVER DSD lrecl=32767 $3.;&lt;/P&gt;&lt;P&gt;firstobs=2;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;informat&amp;nbsp;dev10yr_fy 4.0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;format&amp;nbsp;dev10yr_fy 4.0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;INPUT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;dev10yr_fy;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;if _ERROR_ then call symputx('_EFIERR_',1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 07:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559602#M156288</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-22T07:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559607#M156292</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all : put your code in the "INSERT SAS CODE"&lt;/P&gt;&lt;P&gt;Don't put files on attachment, just say what you want preciselly&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 09:59:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559607#M156292</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-05-17T09:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559990#M156461</link>
      <description>Hmmm, sorry. I cannot understand what you meant. Can you provide a more detail explanation?&lt;BR /&gt;&lt;BR /&gt;Because i am A very beginner and almost dont know anything.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 May 2019 02:01:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559990#M156461</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-20T02:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559991#M156462</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, is it the below code is what you meant?&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for the&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;your_given_input&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;, what should i put actually? the data file?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data zclmosnet;&lt;/P&gt;&lt;P&gt;set &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;your_given_input&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;zclmosnet = zclmos - zosqs-zosvc-zosaf-zossp01;&lt;/P&gt;&lt;P&gt;keep zclmosnet&lt;SPAN&gt;&amp;nbsp;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 02:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559991#M156462</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-20T02:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559995#M156464</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274500"&gt;@Kayla_Tan222&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You write: "&lt;EM&gt;what code should I use in order to replace the specific missing&amp;nbsp;variables column&lt;/EM&gt;".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given your latest post I assume you've got a problem when doing calculations with variables where one of them is missing.&lt;/P&gt;
&lt;P&gt;You can use the SUM() function for such situations as this function treats missing values differently (excluding them from the calculation).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data zclmosnet;
  set your_given_input;
  zclmosnet = sum(zclmos,-zosqs,-zosvc,-zosaf,-zossp01);
  keep zclmosnet;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As for posting code: Use the running man icon as I've done above. This lets you post code that doesn't get messed up.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 02:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559995#M156464</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-05-20T02:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559996#M156465</link>
      <description>Hi, first of all, thanks for your reply!&lt;BR /&gt;&lt;BR /&gt;I have another problem is that what shoud i put after the ‘set’ function, the file location? Or the file name?</description>
      <pubDate>Mon, 20 May 2019 03:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559996#M156465</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-20T03:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559998#M156466</link>
      <description>&lt;P&gt;If you read data from an external file like in your original code sample then it's the&amp;nbsp;INPUT statement which maps your source data into SAS variables. So any operations you want to perform on SAS variables must come after the INPUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you read data from a source table via a SET statement then any operations you want to perform with the values coming from a source table must come after the SET statement.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 04:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/559998#M156466</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-05-20T04:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Replace specific missing variable with differences between multiple variable columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/560321#M156653</link>
      <description>&lt;P&gt;Thanks Patrick! You help me a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 00:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-specific-missing-variable-with-differences-between/m-p/560321#M156653</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-21T00:42:51Z</dc:date>
    </item>
  </channel>
</rss>

