<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Madanswer Technologies Interview Questions Data|Agile|DevOPs|Python - Recent questions and answers in Software Defined Networking</title>
<link>https://madanswer.com/qa/software-defined-networking</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Two ways to reverse order of data</title>
<link>https://madanswer.com/89025/two-ways-to-reverse-order-of-data?show=89026#a89026</link>
<description>&lt;p&gt;Reverse order of data&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89025/two-ways-to-reverse-order-of-data?show=89026#a89026</guid>
<pubDate>Mon, 26 Aug 2024 15:35:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to combine tables vertically with PROC SQL</title>
<link>https://madanswer.com/89023/how-to-combine-tables-vertically-with-proc-sql?show=89024#a89024</link>
<description>&lt;p&gt;PROC SQL : Combine tables vertically&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89023/how-to-combine-tables-vertically-with-proc-sql?show=89024#a89024</guid>
<pubDate>Mon, 26 Aug 2024 15:34:48 +0000</pubDate>
</item>
<item>
<title>Answered: Use of Multiple SET Statments</title>
<link>https://madanswer.com/89021/use-of-multiple-set-statments?show=89022#a89022</link>
<description>&lt;p&gt;SAS : Use of Multiple SET Statements&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89021/use-of-multiple-set-statments?show=89022#a89022</guid>
<pubDate>Mon, 26 Aug 2024 15:34:30 +0000</pubDate>
</item>
<item>
<title>Answered: What is the use of &#039;BY statement&#039; in Data Step Merge?</title>
<link>https://madanswer.com/89019/what-is-the-use-of-by-statement-in-data-step-merge?show=89020#a89020</link>
<description>Without &amp;#039;BY&amp;#039; statement, Data Step Merge performs merging without matching. In other words, the records are combined based on their relative position in the data set. The second data set gets placed to the &amp;quot;right&amp;quot; of the first data set (no matching based on the unique identifier - if data is not sorted based on unique identifier, wrong records can be merged).&lt;br /&gt;
&lt;br /&gt;
When you use &amp;#039;BY&amp;#039; statement, it matches observations according to the values of the BY variables that you specify.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89019/what-is-the-use-of-by-statement-in-data-step-merge?show=89020#a89020</guid>
<pubDate>Mon, 26 Aug 2024 15:34:12 +0000</pubDate>
</item>
<item>
<title>Answered: How Data Step Merge and PROC SQL handle many-to-many relationship?</title>
<link>https://madanswer.com/89017/how-data-step-merge-and-proc-sql-handle-many-to-many-relationship?show=89018#a89018</link>
<description>&lt;p&gt;Data Step MERGE does not create a cartesian product incase of a many-to-many relationship. Whereas, Proc SQL produces a cartesian product.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SAS : Many-to-Many Merge&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89017/how-data-step-merge-and-proc-sql-handle-many-to-many-relationship?show=89018#a89018</guid>
<pubDate>Mon, 26 Aug 2024 15:33:53 +0000</pubDate>
</item>
<item>
<title>Answered: How to save log in an external file</title>
<link>https://madanswer.com/89015/how-to-save-log-in-an-external-file?show=89016#a89016</link>
<description>&lt;p&gt;Use PROC PRINTTO&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;proc printto log=&quot;C:\Users\Deepanshu\Downloads\LOG2.txt&quot; new;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89015/how-to-save-log-in-an-external-file?show=89016#a89016</guid>
<pubDate>Mon, 26 Aug 2024 15:33:32 +0000</pubDate>
</item>
<item>
<title>Answered: How to debug SAS Macros</title>
<link>https://madanswer.com/89013/how-to-debug-sas-macros?show=89014#a89014</link>
<description>There are some system options that can be used to debug SAS Macros: MPRINT, MLOGIC, SYMBOLGEN.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89013/how-to-debug-sas-macros?show=89014#a89014</guid>
<pubDate>Mon, 26 Aug 2024 15:33:08 +0000</pubDate>
</item>
<item>
<title>Answered: Difference between %EVAL and %SYSEVALF</title>
<link>https://madanswer.com/89011/difference-between-%25eval-and-%25sysevalf?show=89012#a89012</link>
<description>&lt;p&gt;%EVAL cannot perform arithmetic calculations with operands that have the floating point values. It is when the %SYSEVALF function comes into picture.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%let last=%eval (4.5+3.2);&lt;/p&gt;&lt;p&gt;%let last2=%sysevalf(4.5+3.2);&lt;/p&gt;&lt;p&gt;%put &amp;amp;last2;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89011/difference-between-%25eval-and-%25sysevalf?show=89012#a89012</guid>
<pubDate>Mon, 26 Aug 2024 15:32:47 +0000</pubDate>
</item>
<item>
<title>Answered: How to merge two data sets using PROC SQL?</title>
<link>https://madanswer.com/89009/how-to-merge-two-data-sets-using-proc-sql?show=89010#a89010</link>
<description>&lt;p&gt;PROC SQL Merging&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89009/how-to-merge-two-data-sets-using-proc-sql?show=89010#a89010</guid>
<pubDate>Mon, 26 Aug 2024 15:32:28 +0000</pubDate>
</item>
<item>
<title>Answered: How to count unique values by a grouping variable?</title>
<link>https://madanswer.com/89007/how-to-count-unique-values-by-a-grouping-variable?show=89008#a89008</link>
<description>&lt;p&gt;You can use PROC SQL with COUNT(DISTINCT variable_name) to determine the number of unique values for a column.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89007/how-to-count-unique-values-by-a-grouping-variable?show=89008#a89008</guid>
<pubDate>Mon, 26 Aug 2024 15:32:09 +0000</pubDate>
</item>
<item>
<title>Answered: How to remove duplicates using PROC SQL?</title>
<link>https://madanswer.com/89005/how-to-remove-duplicates-using-proc-sql?show=89006#a89006</link>
<description>&lt;p&gt;Proc SQL noprint;&lt;/p&gt;&lt;p&gt;Create Table mergedtbl as&lt;/p&gt;&lt;p&gt;Select distinct * from readin ;&lt;/p&gt;&lt;p&gt;Quit;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89005/how-to-remove-duplicates-using-proc-sql?show=89006#a89006</guid>
<pubDate>Mon, 26 Aug 2024 15:31:52 +0000</pubDate>
</item>
<item>
<title>Answered: How to use IF THEN ELSE in PROC SQL?</title>
<link>https://madanswer.com/89003/how-to-use-if-then-else-in-proc-sql?show=89004#a89004</link>
<description>&lt;p&gt;PROC SQL;&lt;/p&gt;&lt;p&gt;SELECT WEIGHT,&lt;/p&gt;&lt;p&gt;CASE&lt;/p&gt;&lt;p&gt;WHEN WEIGHT BETWEEN 0 AND 50 THEN ’LOW’&lt;/p&gt;&lt;p&gt;WHEN WEIGHT BETWEEN 51 AND 70 THEN ’MEDIUM’&lt;/p&gt;&lt;p&gt;WHEN WEIGHT BETWEEN 71 AND 100 THEN ’HIGH’&lt;/p&gt;&lt;p&gt;ELSE ’VERY HIGH’&lt;/p&gt;&lt;p&gt;END AS NEWWEIGHT FROM HEALTH;&lt;/p&gt;&lt;p&gt;QUIT;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89003/how-to-use-if-then-else-in-proc-sql?show=89004#a89004</guid>
<pubDate>Mon, 26 Aug 2024 15:31:31 +0000</pubDate>
</item>
<item>
<title>Answered: When grouping is in effect, can the WHERE clause be used in PROC SQL to subset data?</title>
<link>https://madanswer.com/89001/when-grouping-is-in-effect-can-the-where-clause-be-used-in-proc-sql-to-subset-data?show=89002#a89002</link>
<description>&lt;p&gt;No. In order to subset data when grouping is in effect, the HAVING clause must be used. The variable specified in having clause must contain summary statistics.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC SQL Made Easy&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/89001/when-grouping-is-in-effect-can-the-where-clause-be-used-in-proc-sql-to-subset-data?show=89002#a89002</guid>
<pubDate>Mon, 26 Aug 2024 15:31:08 +0000</pubDate>
</item>
<item>
<title>Answered: For what purpose would you use the RETAIN statement?</title>
<link>https://madanswer.com/88999/for-what-purpose-would-you-use-the-retain-statement?show=89000#a89000</link>
<description>&lt;p&gt;A RETAIN statement tells SAS not to set variables to missing when going from the current iteration of the DATA step to the next. Instead, SAS retains the values.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88999/for-what-purpose-would-you-use-the-retain-statement?show=89000#a89000</guid>
<pubDate>Mon, 26 Aug 2024 15:30:48 +0000</pubDate>
</item>
<item>
<title>Answered: The following data step executes:</title>
<link>https://madanswer.com/88997/the-following-data-step-executes?show=88998#a88998</link>
<description>&lt;p&gt;* DONALD DUCK [(Leading blanks are displayed using an asterisk *]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88997/the-following-data-step-executes?show=88998#a88998</guid>
<pubDate>Mon, 26 Aug 2024 15:30:24 +0000</pubDate>
</item>
<item>
<title>Answered: Difference between SCAN and SUBSTR?</title>
<link>https://madanswer.com/88995/difference-between-scan-and-substr?show=88996#a88996</link>
<description>&lt;p&gt;SCAN extracts words within a value that is marked by delimiters. SUBSTR extracts a portion of the value by stating the specific location. It is best used when we know the exact position of the sub string to extract from a character value.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88995/difference-between-scan-and-substr?show=88996#a88996</guid>
<pubDate>Mon, 26 Aug 2024 15:29:57 +0000</pubDate>
</item>
<item>
<title>Answered: How to count the number of intervals between two given SAS dates?</title>
<link>https://madanswer.com/88955/how-to-count-the-number-of-intervals-between-two-given-sas-dates?show=88956#a88956</link>
<description>INTCK(interval,start-of-period,end-of-period) is an interval function that counts the number of intervals between two give SAS dates, Time and/or datetime.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88955/how-to-count-the-number-of-intervals-between-two-given-sas-dates?show=88956#a88956</guid>
<pubDate>Thu, 22 Aug 2024 14:43:04 +0000</pubDate>
</item>
<item>
<title>Answered: Which date function advances a date, time or datetime value by a given interval?</title>
<link>https://madanswer.com/88953/which-date-function-advances-a-date-time-or-datetime-value-by-a-given-interval?show=88954#a88954</link>
<description>&lt;p&gt;The INTNX Function advances a date, time, or datetime value by a given interval, and returns a date, time, or datetime value. Example : INTNX(interval,start-from,number-of-increments,alignment).&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88953/which-date-function-advances-a-date-time-or-datetime-value-by-a-given-interval?show=88954#a88954</guid>
<pubDate>Thu, 22 Aug 2024 14:42:40 +0000</pubDate>
</item>
<item>
<title>Answered: What are SYMGET and SYMPUT?</title>
<link>https://madanswer.com/88951/what-are-symget-and-symput?show=88952#a88952</link>
<description>&lt;p&gt;SYMPUT puts the value from a dataset into a macro variable where as SYMGET gets the value from the macro variable to the dataset.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88951/what-are-symget-and-symput?show=88952#a88952</guid>
<pubDate>Thu, 22 Aug 2024 14:42:18 +0000</pubDate>
</item>
<item>
<title>Answered: Use of CALL SYMPUT</title>
<link>https://madanswer.com/88949/use-of-call-symput?show=88950#a88950</link>
<description>&lt;p&gt;CALL SYMPUT puts the value from a dataset into a macro variable.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;proc means data=test;&lt;/p&gt;&lt;p&gt;var x;&lt;/p&gt;&lt;p&gt;output out=testmean mean=xbar;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;data _null_;&lt;/p&gt;&lt;p&gt;set testmean;&lt;/p&gt;&lt;p&gt;call symput(&quot;xbarmac&quot;,xbar);&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%put mean of x is &amp;amp;xbarmac;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88949/use-of-call-symput?show=88950#a88950</guid>
<pubDate>Thu, 22 Aug 2024 14:41:58 +0000</pubDate>
</item>
<item>
<title>Answered: Describe the ways in which you can create macro variables</title>
<link>https://madanswer.com/88947/describe-the-ways-in-which-you-can-create-macro-variables?show=88948#a88948</link>
<description>&lt;p&gt;There are 5 ways to create macro variables:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;%Let&lt;/p&gt;&lt;p&gt;Iterative %DO statement&lt;/p&gt;&lt;p&gt;Call Symput&lt;/p&gt;&lt;p&gt;Proc SQl into clause&lt;/p&gt;&lt;p&gt;Macro Parameters.&lt;/p&gt;&lt;p&gt;Detailed Tutorial : SAS Macros Made Easy&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88947/describe-the-ways-in-which-you-can-create-macro-variables?show=88948#a88948</guid>
<pubDate>Thu, 22 Aug 2024 14:41:39 +0000</pubDate>
</item>
<item>
<title>Answered: How to count missing values for all variables?</title>
<link>https://madanswer.com/88945/how-to-count-missing-values-for-all-variables?show=88946#a88946</link>
<description>&lt;p&gt;proc format;&lt;/p&gt;&lt;p&gt;value $missfmt &#039; &#039;=&#039;Missing&#039; other=&#039;Not Missing&#039;;&lt;/p&gt;&lt;p&gt;value missfmt .=&#039;Missing&#039; other=&#039;Not Missing&#039;;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;proc freq data=one;&amp;nbsp;&lt;/p&gt;&lt;p&gt;format _CHAR_ $missfmt.;&lt;/p&gt;&lt;p&gt;tables _CHAR_ / missing missprint nocum nopercent;&lt;/p&gt;&lt;p&gt;format _NUMERIC_ missfmt.;&lt;/p&gt;&lt;p&gt;tables _NUMERIC_ / missing missprint nocum nopercent;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88945/how-to-count-missing-values-for-all-variables?show=88946#a88946</guid>
<pubDate>Thu, 22 Aug 2024 14:41:17 +0000</pubDate>
</item>
<item>
<title>Answered: How to count missing values for numeric variables?</title>
<link>https://madanswer.com/88943/how-to-count-missing-values-for-numeric-variables?show=88944#a88944</link>
<description>&lt;p&gt;Use PROC MEANS with NMISS option.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Types of Missing Values in SAS&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88943/how-to-count-missing-values-for-numeric-variables?show=88944#a88944</guid>
<pubDate>Thu, 22 Aug 2024 14:40:54 +0000</pubDate>
</item>
<item>
<title>Answered: How to generate detailed summary statistics?</title>
<link>https://madanswer.com/88941/how-to-generate-detailed-summary-statistics?show=88942#a88942</link>
<description>&lt;p&gt;Use PROC UNIVARIATE code.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC UNIVARIATE DATA=READIN;&lt;/p&gt;&lt;p&gt;&amp;nbsp;CLASS Age;&lt;/p&gt;&lt;p&gt;&amp;nbsp;VAR Q1;&lt;/p&gt;&lt;p&gt;RUN;&lt;/p&gt;&lt;p&gt;Note : Q1 is a numeric variable and Age a grouping variable.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88941/how-to-generate-detailed-summary-statistics?show=88942#a88942</guid>
<pubDate>Thu, 22 Aug 2024 14:40:35 +0000</pubDate>
</item>
<item>
<title>Answered: How to generate cross tabulation?</title>
<link>https://madanswer.com/88939/how-to-generate-cross-tabulation?show=88940#a88940</link>
<description>&lt;p&gt;Use PROC FREQ code.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC FREQ DATA=auto;&lt;/p&gt;&lt;p&gt;&amp;nbsp;TABLES A*B ;&lt;/p&gt;&lt;p&gt;RUN;&lt;/p&gt;&lt;p&gt;SAS will produce table of A by B.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88939/how-to-generate-cross-tabulation?show=88940#a88940</guid>
<pubDate>Thu, 22 Aug 2024 14:40:15 +0000</pubDate>
</item>
<item>
<title>Answered: How to calculate mean for a variable by group?</title>
<link>https://madanswer.com/88937/how-to-calculate-mean-for-a-variable-by-group?show=88938#a88938</link>
<description>&lt;p&gt;Suppose Q1 is a numeric variable and Age a grouping variable. You wish to compute mean for Q1 by Age.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC MEANS DATA=READIN;&lt;/p&gt;&lt;p&gt;VAR Q1;&lt;/p&gt;&lt;p&gt;CLASS AGE;&lt;/p&gt;&lt;p&gt;RUN;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88937/how-to-calculate-mean-for-a-variable-by-group?show=88938#a88938</guid>
<pubDate>Thu, 22 Aug 2024 14:39:52 +0000</pubDate>
</item>
<item>
<title>Answered: How to use arrays to recode all the numeric variables?</title>
<link>https://madanswer.com/88935/how-to-use-arrays-to-recode-all-the-numeric-variables?show=88936#a88936</link>
<description>&lt;p&gt;Use _numeric_ and dim functions in array.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;set outdata;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;array Q(*) _numeric_;&lt;/p&gt;&lt;p&gt;do i=1 to dim(Q);&lt;/p&gt;&lt;p&gt;if Q(i)=6 then Q(i)=.;&lt;/p&gt;&lt;p&gt;end;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;Note : DIM returns a total count of the number of elements in array dimension Q.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88935/how-to-use-arrays-to-recode-all-the-numeric-variables?show=88936#a88936</guid>
<pubDate>Thu, 22 Aug 2024 14:39:32 +0000</pubDate>
</item>
<item>
<title>Answered: How to use arrays to recode set of variables?</title>
<link>https://madanswer.com/88933/how-to-use-arrays-to-recode-set-of-variables?show=88934#a88934</link>
<description>&lt;p&gt;Recode the set of questions: Q1,Q2,Q3...Q20 in the same way: if the variable has a value of 6 recode it to SAS missing.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;set outdata;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;array Q(20) Q1-Q20;&lt;/p&gt;&lt;p&gt;do i=1 to 20;&lt;/p&gt;&lt;p&gt;if Q(i)=6 then Q(i)=.;&lt;/p&gt;&lt;p&gt;end;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88933/how-to-use-arrays-to-recode-set-of-variables?show=88934#a88934</guid>
<pubDate>Thu, 22 Aug 2024 14:39:11 +0000</pubDate>
</item>
<item>
<title>Answered: How to label values and use it in PROC FREQ?</title>
<link>https://madanswer.com/88931/how-to-label-values-and-use-it-in-proc-freq?show=88932#a88932</link>
<description>Use PROC FORMAT to set up a format.&lt;br /&gt;
&lt;br /&gt;
proc format;&lt;br /&gt;
&lt;br /&gt;
value score 0 - 100=‘100-‘&lt;br /&gt;
&lt;br /&gt;
101 - 200=‘101+’&lt;br /&gt;
&lt;br /&gt;
other=‘others’&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
proc freq data=readin;&lt;br /&gt;
&lt;br /&gt;
tables outdata;&lt;br /&gt;
&lt;br /&gt;
format outdatascore. ;&lt;br /&gt;
&lt;br /&gt;
run;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88931/how-to-label-values-and-use-it-in-proc-freq?show=88932#a88932</guid>
<pubDate>Thu, 22 Aug 2024 02:28:18 +0000</pubDate>
</item>
<item>
<title>Answered: How do I create a data set with observations=100, mean 0 and standard deviation 1?</title>
<link>https://madanswer.com/88929/how-do-i-create-a-data-set-with-observations-100-mean-0-and-standard-deviation-1?show=88930#a88930</link>
<description>data readin;&lt;br /&gt;
&lt;br /&gt;
do i=1 to 100;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp=0 + rannor(1) * 1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;output;&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
run;&lt;br /&gt;
&lt;br /&gt;
proc means data=readin mean stddev;&lt;br /&gt;
&lt;br /&gt;
var temp;&lt;br /&gt;
&lt;br /&gt;
run;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88929/how-do-i-create-a-data-set-with-observations-100-mean-0-and-standard-deviation-1?show=88930#a88930</guid>
<pubDate>Thu, 22 Aug 2024 02:27:54 +0000</pubDate>
</item>
<item>
<title>Answered: How to do Matched Merge and output consisting of observations from only file1?</title>
<link>https://madanswer.com/88927/how-to-do-matched-merge-and-output-consisting-of-observations-from-only-file1?show=88928#a88928</link>
<description>&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;merge file1(in=infile1)file2(in=infile2);&lt;/p&gt;&lt;p&gt;by id;&lt;/p&gt;&lt;p&gt;if infile1;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88927/how-to-do-matched-merge-and-output-consisting-of-observations-from-only-file1?show=88928#a88928</guid>
<pubDate>Thu, 22 Aug 2024 02:27:31 +0000</pubDate>
</item>
<item>
<title>Answered: How to do Matched Merge and output consisting of observations in file1 but not in file2, or in file2 but not in file1?</title>
<link>https://madanswer.com/88925/how-matched-merge-and-output-consisting-observations-file1-but-not-file2-file2-file1?show=88926#a88926</link>
<description>&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;merge file1(in=infile1)file2(in=infile2);&lt;/p&gt;&lt;p&gt;by id;&lt;/p&gt;&lt;p&gt;if infile1 ne infile2;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;SAS Merge&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88925/how-matched-merge-and-output-consisting-observations-file1-but-not-file2-file2-file1?show=88926#a88926</guid>
<pubDate>Thu, 22 Aug 2024 02:27:07 +0000</pubDate>
</item>
<item>
<title>Answered: How to do Matched Merge and output only consisting of observations from both files?</title>
<link>https://madanswer.com/88923/how-to-do-matched-merge-and-output-only-consisting-of-observations-from-both-files?show=88924#a88924</link>
<description>&lt;p&gt;Use IN=variable in MERGE statements. It is used for matched merge to track and select which observations in the data set from the merge statement will go to a new data set.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;merge file1(in=infile1) file2(in=infile2);&lt;/p&gt;&lt;p&gt;by id;&lt;/p&gt;&lt;p&gt;if infile1=infile2;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88923/how-to-do-matched-merge-and-output-only-consisting-of-observations-from-both-files?show=88924#a88924</guid>
<pubDate>Thu, 22 Aug 2024 02:26:47 +0000</pubDate>
</item>
<item>
<title>Answered: Difference between SET and MERGE?</title>
<link>https://madanswer.com/88921/difference-between-set-and-merge?show=88922#a88922</link>
<description>&lt;p&gt;SET concatenates the data sets where as MERGE matches the observations of the data sets.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SET&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SAS SET STATEMENT&lt;/p&gt;&lt;p&gt;MERGE&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Join Horizontally&lt;/p&gt;&lt;p&gt;Detailed Explanation : Data Step Merging&lt;/p&gt;&lt;p&gt;Detailed Explanation : Combine Data Sets&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88921/difference-between-set-and-merge?show=88922#a88922</guid>
<pubDate>Thu, 22 Aug 2024 02:26:23 +0000</pubDate>
</item>
<item>
<title>Answered: Difference between CEIL and FLOOR functions?</title>
<link>https://madanswer.com/88919/difference-between-ceil-and-floor-functions?show=88920#a88920</link>
<description>The ceil function returns the smallest integer greater than/equal to the argument whereas the floor returns the greatest integer less than/equal to the argument.&lt;br /&gt;
&lt;br /&gt;
For example : ceil(4.4) returns 5 whereas floor(4.4) returns 4.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88919/difference-between-ceil-and-floor-functions?show=88920#a88920</guid>
<pubDate>Thu, 22 Aug 2024 02:25:58 +0000</pubDate>
</item>
<item>
<title>Answered: How SUBSTR function works?</title>
<link>https://madanswer.com/88917/how-substr-function-works?show=88918#a88918</link>
<description>&lt;p&gt;The SUBSTR function is used to extract substring from a character variable.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The SUBSTR function has three arguments:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SUBSTR ( character variable, starting point to begin reading the variable, number of characters to read from the starting point)&lt;/p&gt;&lt;p&gt;There are two basic applications of the SUBSTR function:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;RIGHT SIDE APPLICATION&lt;/p&gt;&lt;p&gt;data _null_;&lt;/p&gt;&lt;p&gt;phone=&#039;(312) 555-1212&#039;;&lt;/p&gt;&lt;p&gt;area_cd=substr(phone, 2, 3);&lt;/p&gt;&lt;p&gt;put area_cd=;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;Result : In the log window, it writes area_cd=312 .&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;LEFT SIDE APPLICATION&lt;/p&gt;&lt;p&gt;It is used to change just a few characters of a variable.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;data _null_ ;&lt;/p&gt;&lt;p&gt;phone=&#039;(312) 555-1212&#039; ;&lt;/p&gt;&lt;p&gt;substr(phone, 2, 3)=&#039;773&#039; ;&lt;/p&gt;&lt;p&gt;put phone=;&lt;/p&gt;&lt;p&gt;run ;&lt;/p&gt;&lt;p&gt;Result : The variable PHONE has been changed from(312) 555-1212 to (773) 555-1212.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88917/how-substr-function-works?show=88918#a88918</guid>
<pubDate>Thu, 22 Aug 2024 02:25:31 +0000</pubDate>
</item>
<item>
<title>Answered: Can PROC MEANS analyze ONLY the character variables?</title>
<link>https://madanswer.com/88915/can-proc-means-analyze-only-the-character-variables?show=88916#a88916</link>
<description>No, Proc Means requires at least one numeric variable.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88915/can-proc-means-analyze-only-the-character-variables?show=88916#a88916</guid>
<pubDate>Thu, 22 Aug 2024 02:25:10 +0000</pubDate>
</item>
<item>
<title>Answered: What&#039;s the difference between VAR A1 - A3 and VAR A1 -- A3?</title>
<link>https://madanswer.com/88902/whats-the-difference-between-var-a1-a3-and-var-a1-a3?show=88903#a88903</link>
<description>&lt;p&gt;Single Dash : It is used to specify consecutively numbered variables. A1-A3 implies A1, A2 and A3.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Double Dash : It is used to specify variables based on the order of the variables as they appear in the file,regardless of the name of the variable. A1--A3 implies all the variables from A1 to A3 in the order they appear in the data set.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Example : The order of variables in a data set : ID Name A1 A2 C1 A3&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So using A1-A3 would return A1 A2 A3. A1--A3 would return A1 A2 C1 A3.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88902/whats-the-difference-between-var-a1-a3-and-var-a1-a3?show=88903#a88903</guid>
<pubDate>Tue, 20 Aug 2024 15:22:08 +0000</pubDate>
</item>
<item>
<title>Answered: How to convert a character variable to a numeric variable?</title>
<link>https://madanswer.com/88900/how-to-convert-a-character-variable-to-a-numeric-variable?show=88901#a88901</link>
<description>You must create a differently-named variable using theINPUTfunction.&lt;br /&gt;
&lt;br /&gt;
The example below shows the use of the INPUT function.&lt;br /&gt;
&lt;br /&gt;
numvar=input(charvar,4.0);</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88900/how-to-convert-a-character-variable-to-a-numeric-variable?show=88901#a88901</guid>
<pubDate>Tue, 20 Aug 2024 15:21:39 +0000</pubDate>
</item>
<item>
<title>Answered: How to convert a numeric variable to a character variable?</title>
<link>https://madanswer.com/88898/how-to-convert-a-numeric-variable-to-a-character-variable?show=88899#a88899</link>
<description>&lt;p&gt;You must create a differently-named variable using the PUT function.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The example below shows the use of the PUT function.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;charvar=put(numvar, 7.) ;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88898/how-to-convert-a-numeric-variable-to-a-character-variable?show=88899#a88899</guid>
<pubDate>Tue, 20 Aug 2024 15:21:20 +0000</pubDate>
</item>
<item>
<title>Answered: Under what circumstances would you code a SELECT construct instead of IF statements?</title>
<link>https://madanswer.com/88896/under-what-circumstances-would-you-code-select-construct-instead-of-if-statements?show=88897#a88897</link>
<description>&lt;p&gt;When you have a long series of mutually exclusive conditions and the comparison is numeric, using a SELECT group is slightly more efficient than using IF-THEN or IF-THEN-ELSE statements because CPU time is reduced.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The syntax for SELECT WHEN is as follows :&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SELECT (condition);&lt;/p&gt;&lt;p&gt;WHEN (1) x=x;&lt;/p&gt;&lt;p&gt;WHEN (2) x=x*2;&lt;/p&gt;&lt;p&gt;OTHERWISE x=x-1;&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;Example :&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SELECT (str);&lt;/p&gt;&lt;p&gt;WHEN (&#039;Sun&#039;) wage=wage*1.5;&lt;/p&gt;&lt;p&gt;WHEN (&#039;Sat&#039;) wage=wage*1.3;&lt;/p&gt;&lt;p&gt;OTHERWISE DO;&lt;/p&gt;&lt;p&gt;wage=wage+1;&lt;/p&gt;&lt;p&gt;bonus=0;&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88896/under-what-circumstances-would-you-code-select-construct-instead-of-if-statements?show=88897#a88897</guid>
<pubDate>Tue, 20 Aug 2024 15:20:59 +0000</pubDate>
</item>
<item>
<title>Answered: How to sort in descending order?</title>
<link>https://madanswer.com/88894/how-to-sort-in-descending-order?show=88895#a88895</link>
<description>&lt;p&gt;Use DESCENDING keyword in PROC SORT code. The example below shows the use of the descending keyword.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC SORT DATA=auto;&lt;/p&gt;&lt;p&gt;&amp;nbsp;BY DESCENDING engine ;&lt;/p&gt;&lt;p&gt;RUN ;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88894/how-to-sort-in-descending-order?show=88895#a88895</guid>
<pubDate>Tue, 20 Aug 2024 15:20:37 +0000</pubDate>
</item>
<item>
<title>Answered: What are _numeric_ and _character_ and what do they do?</title>
<link>https://madanswer.com/88892/what-are-_numeric_-and-_character_-and-what-do-they-do?show=88893#a88893</link>
<description>&lt;p&gt;1. _NUMERIC_ specifies all numeric variables that are already defined in the current DATA step.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2. _CHARACTER_ specifies all character variables that are currently defined in the current DATA step.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;3. _ALL_ specifies all variables that are currently defined in the current DATA step.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Example : To include all the numeric variables in PROC MEANS.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;proc means;&lt;/p&gt;&lt;p&gt;var _numeric_;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88892/what-are-_numeric_-and-_character_-and-what-do-they-do?show=88893#a88893</guid>
<pubDate>Tue, 20 Aug 2024 15:20:10 +0000</pubDate>
</item>
<item>
<title>Answered: Difference between NODUP and NODUPKEY Options?</title>
<link>https://madanswer.com/88890/difference-between-nodup-and-nodupkey-options?show=88891#a88891</link>
<description>The NODUPKEY option removes duplicate observations where value of a variable listed in BY statement is repeated while NODUP option removes duplicate observations where values in all the variables are repeated (identical observations).</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88890/difference-between-nodup-and-nodupkey-options?show=88891#a88891</guid>
<pubDate>Tue, 20 Aug 2024 15:19:46 +0000</pubDate>
</item>
<item>
<title>Answered: How to identify and remove unique and duplicate values?</title>
<link>https://madanswer.com/88888/how-to-identify-and-remove-unique-and-duplicate-values?show=88889#a88889</link>
<description>&lt;p&gt;1. Use PROC SORT with NODUPKEY and NODUP Options.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2. Use First. and Last. Variables - Detailed Explanation&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The detailed explanation is shown below :&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SAMPLE DATA SET&lt;/p&gt;&lt;p&gt;ID&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Name&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Score&lt;/p&gt;&lt;p&gt;1&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;David&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;45&lt;/p&gt;&lt;p&gt;1&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;David&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;74&lt;/p&gt;&lt;p&gt;2&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Sam&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;45&lt;/p&gt;&lt;p&gt;2&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Ram&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;54&lt;/p&gt;&lt;p&gt;3&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Bane&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;87&lt;/p&gt;&lt;p&gt;3&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Mary&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;92&lt;/p&gt;&lt;p&gt;3&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Bane&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;87&lt;/p&gt;&lt;p&gt;4&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Dane&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;23&lt;/p&gt;&lt;p&gt;5&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Jenny&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;87&lt;/p&gt;&lt;p&gt;5&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Ken&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;87&lt;/p&gt;&lt;p&gt;6&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Simran&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;63&lt;/p&gt;&lt;p&gt;8&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;Priya&lt;span style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;72&lt;/p&gt;&lt;p&gt;Create this data set in SAS&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;data readin;&lt;/p&gt;&lt;p&gt;input ID Name $ Score;&lt;/p&gt;&lt;p&gt;cards;&lt;/p&gt;&lt;p&gt;1 David 45&lt;/p&gt;&lt;p&gt;1 David 74&lt;/p&gt;&lt;p&gt;2 Sam 45&lt;/p&gt;&lt;p&gt;2 Ram 54&lt;/p&gt;&lt;p&gt;3 Bane 87&lt;/p&gt;&lt;p&gt;3 Mary 92&lt;/p&gt;&lt;p&gt;3 Bane 87&lt;/p&gt;&lt;p&gt;4 Dane 23&lt;/p&gt;&lt;p&gt;5 Jenny 87&lt;/p&gt;&lt;p&gt;5 Ken 87&lt;/p&gt;&lt;p&gt;6 Simran 63&lt;/p&gt;&lt;p&gt;8 Priya 72;&lt;/p&gt;&lt;p&gt;run;&lt;/p&gt;&lt;p&gt;There are several ways to identify and remove unique and duplicate values:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC SORT&lt;/p&gt;&lt;p&gt;In PROC SORT, there are two options by which we can remove duplicates.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;1. NODUPKEY Option 2. NODUP Option&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The NODUPKEY option removes duplicate observations where value of a variable listed in BY statement is repeated while NODUP option removes duplicate observations where values in all the variables are repeated (identical observations).&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PROC SORT DATA=readin NODUPKEY;&lt;/p&gt;&lt;p&gt;BY ID;&lt;/p&gt;&lt;p&gt;RUN;&lt;/p&gt;&lt;p&gt;PROC SORT DATA=readin NODUP;&lt;/p&gt;&lt;p&gt;BY ID;&lt;/p&gt;&lt;p&gt;RUN;&lt;/p&gt;&lt;p&gt;The output is shown below :&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SAS : NODUPKEY vs NODUP&lt;/p&gt;&lt;p&gt;SAS : NODUPKEY vs NODUP&lt;/p&gt;&lt;p&gt;The NODUPKEY has deleted 5 observations with duplicate values whereas NODUP has not deleted any observations.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88888/how-to-identify-and-remove-unique-and-duplicate-values?show=88889#a88889</guid>
<pubDate>Tue, 20 Aug 2024 15:19:18 +0000</pubDate>
</item>
<item>
<title>Answered: What is the difference between &#039;+&#039; operator and SUM function?</title>
<link>https://madanswer.com/88886/what-is-the-difference-between-operator-and-sum-function?show=88887#a88887</link>
<description>SUM function returns the sum of non-missing arguments whereas “+” operator returns a missing value if any of the arguments are missing.&lt;br /&gt;
&lt;br /&gt;
Suppose we have a data set containing three variables - X, Y and Z. They all have missing values. We wish to compute sum of all the variables.&lt;br /&gt;
&lt;br /&gt;
data mydata2;&lt;br /&gt;
&lt;br /&gt;
set mydata;&lt;br /&gt;
&lt;br /&gt;
a=sum(x,y,z);&lt;br /&gt;
&lt;br /&gt;
p=x+y+z;&lt;br /&gt;
&lt;br /&gt;
run;&lt;br /&gt;
&lt;br /&gt;
The output is shown in the image below :&lt;br /&gt;
&lt;br /&gt;
SUM Function vs PLUS Operator&lt;br /&gt;
&lt;br /&gt;
SAS : SUM Function vs Plus Operator&lt;br /&gt;
&lt;br /&gt;
In the output, value of p is missing for 4th, 5th and 6th observations.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88886/what-is-the-difference-between-operator-and-sum-function?show=88887#a88887</guid>
<pubDate>Tue, 20 Aug 2024 15:18:50 +0000</pubDate>
</item>
<item>
<title>Answered: What is DATA _NULL_?</title>
<link>https://madanswer.com/88884/what-is-data-_null_?show=88885#a88885</link>
<description>&lt;p&gt;The DATA _NULL_ is mainly used to create macro variables. It can also be used to write output without creating a dataset.The idea of &quot;null&quot; here is that we have a data step that actually doesn&#039;t create a data set.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88884/what-is-data-_null_?show=88885#a88885</guid>
<pubDate>Tue, 20 Aug 2024 15:18:30 +0000</pubDate>
</item>
<item>
<title>Answered: How PDV is created?</title>
<link>https://madanswer.com/88882/how-pdv-is-created?show=88883#a88883</link>
<description>&lt;p&gt;SAS creates a dataset one observation at a time.Input buffer is created at the time of compilation, for holding a record from external file.PDV is created followed by the creation of input buffer.SAS builds dataset in the PDV area of memory.&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88882/how-pdv-is-created?show=88883#a88883</guid>
<pubDate>Tue, 20 Aug 2024 15:18:13 +0000</pubDate>
</item>
<item>
<title>Answered: What is Program Data Vector (PDV)?</title>
<link>https://madanswer.com/88880/what-is-program-data-vector-pdv?show=88881#a88881</link>
<description>PDV is a logical area in the memory.</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88880/what-is-program-data-vector-pdv?show=88881#a88881</guid>
<pubDate>Tue, 20 Aug 2024 15:17:52 +0000</pubDate>
</item>
<item>
<title>Answered: Differences between WHERE and IF statement?</title>
<link>https://madanswer.com/88878/differences-between-where-and-if-statement?show=88879#a88879</link>
<description>&lt;p&gt;For detailed explanation, see this tutorial -SAS : Where Vs IF&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;WHERE statement can be used in procedures to subset data while IF statement cannot be used in procedures.&lt;/p&gt;&lt;p&gt;WHERE can be used as a data set option while IF cannot be used as a data set option.&lt;/p&gt;&lt;p&gt;WHERE statement is more efficient than IF statement. It tells SAS not to read all observations from the data set&lt;/p&gt;&lt;p&gt;WHERE statement can be used to search for all similar character values that sound alike while IF statement cannot be used.&lt;/p&gt;&lt;p&gt;WHERE statement can not be used when reading data using INPUT statement whereas IF statement can be used.&lt;/p&gt;&lt;p&gt;Multiple IF statements can be used to execute multiple conditional statements&lt;/p&gt;&lt;p&gt;When it is required to use newly created variables, useIF statement as it doesn&#039;t require variables to exist in the READIN data set&lt;/p&gt;&lt;div&gt;&lt;/div&gt;</description>
<category>Software Defined Networking</category>
<guid isPermaLink="true">https://madanswer.com/88878/differences-between-where-and-if-statement?show=88879#a88879</guid>
<pubDate>Mon, 19 Aug 2024 22:13:30 +0000</pubDate>
</item>
</channel>
</rss>