<?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 Easy one..Skip Logic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128322#M260384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I am analyzing survey data which has skip logic. I want to create special missing values for those variables which should have no response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Essentially I can do this now with If statements but I will have around 1000 statements in total and I do not see this as efficient.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; question1=2&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;question2=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;._&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; question1=2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;question3=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;._&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: black; font-size: 10pt;"&gt;I am looking for a way to use one statement in which I can list all variables which will be assigned the 'value' of ._. Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: black; font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2012 12:19:03 GMT</pubDate>
    <dc:creator>Theriault_SAS</dc:creator>
    <dc:date>2012-05-29T12:19:03Z</dc:date>
    <item>
      <title>Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128322#M260384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I am analyzing survey data which has skip logic. I want to create special missing values for those variables which should have no response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Essentially I can do this now with If statements but I will have around 1000 statements in total and I do not see this as efficient.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; question1=2&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;question2=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;._&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; question1=2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;question3=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;._&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: black; font-size: 10pt;"&gt;I am looking for a way to use one statement in which I can list all variables which will be assigned the 'value' of ._. Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: black; font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 12:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128322#M260384</guid>
      <dc:creator>Theriault_SAS</dc:creator>
      <dc:date>2012-05-29T12:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128323#M260385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If those 'if.. then...'s follow certain rules, then array could be a possible approach. Otherwise, if they are all random assignments, then you are out of luck. So what are the rules here? from your given examples, it is hard for me to fathom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 12:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128323#M260385</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-05-29T12:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128324#M260386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Haikuo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variables which I want to assign ._ all have random names if that's what you're asking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I predefine an array then set the array to ._? How would I define the array?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 12:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128324#M260386</guid>
      <dc:creator>Theriault_SAS</dc:creator>
      <dc:date>2012-05-29T12:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128325#M260387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it sounds like you have a list of those variables, but in what form? if they are already in the form of dataset or macro variable, then you don't have to type them one by one. Give me an example so I can start it for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 13:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128325#M260387</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-05-29T13:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128326#M260388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While some folk have said that do over is deprecated, I have always found it quite useful for such tasks.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input a b c d;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 1 2&lt;/P&gt;&lt;P&gt;2 3 4 2&lt;/P&gt;&lt;P&gt;1 1 2 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array recode a--d;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over recode;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if recode eq 2 then call missing(recode);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 13:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128326#M260388</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-05-29T13:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128327#M260389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could I go one step further and ask how to force each of my variables to be numeric or text for the sake of the array?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 13:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128327#M260389</guid>
      <dc:creator>Theriault_SAS</dc:creator>
      <dc:date>2012-05-29T13:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128328#M260390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I understand what you are asking.&amp;nbsp; An array can only hold character or numeric variables, not both.&amp;nbsp; Are you looking for something like:?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input a b $ c d $ e f $ g h $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 2 1 2 1 2 1 2&lt;/P&gt;&lt;P&gt;2 3 4 2 2 3 4 2&lt;/P&gt;&lt;P&gt;1 1 2 1 1 1 2 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array recodec $ _character_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array recoden&amp;nbsp; _numeric_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over recodec;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if recodec eq '2' then call missing(recodec);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over recoden;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if recoden eq 2 then call missing(recoden);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 13:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128328#M260390</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-05-29T13:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128329#M260391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you can't change a variable that has already been defined.&amp;nbsp; But you can change the array definitions.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array recode a-numeric-d;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This array now contains the numeric variables only, beginning with A and ending with D.&amp;nbsp; Similarly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array recode2 a-character-d;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This array contains all the character variables only, in that same range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get warning messages if you define an array with 0 elements, and you would have to investigate whether or not those warnings make a difference to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 14:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128329#M260391</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-05-29T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Easy one..Skip Logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128330#M260392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the informative replies! Very helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 13:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Easy-one-Skip-Logic/m-p/128330#M260392</guid>
      <dc:creator>Theriault_SAS</dc:creator>
      <dc:date>2012-05-30T13:20:46Z</dc:date>
    </item>
  </channel>
</rss>

