<?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: Data labeling in SAS, any array??? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156188#M298931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conversely, if you showed NULL merely to represent missing values, then you might be able to use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA HAVE ;&lt;/P&gt;&lt;P&gt;input ID Q01-Q04;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 . . . .&lt;/P&gt;&lt;P&gt;1 . 7 . .&lt;/P&gt;&lt;P&gt;1 . 8 9 6&lt;/P&gt;&lt;P&gt;1 3 4 5 6&lt;/P&gt;&lt;P&gt;2 . . . .&lt;/P&gt;&lt;P&gt;2 3 8 9 2&lt;/P&gt;&lt;P&gt;2 6 7 8 0&lt;/P&gt;&lt;P&gt;2 4 5 0 2&lt;/P&gt;&lt;P&gt;3 . . . .&lt;/P&gt;&lt;P&gt;3 4 5 2 .&lt;/P&gt;&lt;P&gt;3 2 3 8 9&lt;/P&gt;&lt;P&gt;3 2 3 8 2&lt;/P&gt;&lt;P&gt;4 3 8 9 2&lt;/P&gt;&lt;P&gt;4 6 5 4 5&lt;/P&gt;&lt;P&gt;4 6 3 8 9&lt;/P&gt;&lt;P&gt;4 . . . .&lt;/P&gt;&lt;P&gt;4 3 8 9 7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=flag_set);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain flag_set;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.id then flag_set=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; first_answered=not flag_set and sum(of q01-q04) gt 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first_answered then flag_set=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Nov 2013 02:20:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2013-11-26T02:20:46Z</dc:date>
    <item>
      <title>Data labeling in SAS, any array???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156186#M298929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA HAVE :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 457px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="64"&gt;ID &lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Q01&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Q02&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Q03 &lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Q04&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="137"&gt;&lt;SPAN style="color: #ff0000;"&gt;FIRST_ANSWERED&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;NULL&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WANT TO ADD COLUMN&amp;nbsp; "FIRST_ANSWERED", this column is labeling the first row by ID that Q1- Q4 are not all "NULL" as 1, otherwise as 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 01:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156186#M298929</guid>
      <dc:creator>peppapig</dc:creator>
      <dc:date>2013-11-26T01:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data labeling in SAS, any array???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156187#M298930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993; font-size: 10pt;"&gt;&lt;STRONG&gt;Here's one solution, I'm sure there are others...I use a flag to keep track of when the first answered is set and reset at the first of every ID. &lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/SPAN&gt; HAVE ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;input&lt;/SPAN&gt; ID Q01 $ Q02 $ Q03 $ Q04 $ FIRST_ANSWERED;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;cards&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;1 NULL NULL NULL NULL 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;1 NULL 7 NULL NULL 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;1 NULL 8 9 6 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;1 3 4 5 6 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;2 NULL NULL NULL NULL 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;2 3 8 9 2 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;2 6 7 8 0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;2 4 5 0 2 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;3 NULL NULL NULL NULL 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;3 4 5 2 NULL 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;3 2 3 8 9 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;3 2 3 8 2 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;4 3 8 9 2 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;4 6 5 4 5 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;4 6 3 8 9 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;4 NULL NULL NULL NULL 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;4 3 8 9 7 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;set&lt;/SPAN&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;retain&lt;/SPAN&gt; flag_set;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;by&lt;/SPAN&gt; id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;if&lt;/SPAN&gt; first.id &lt;SPAN style="color: #0433ff;"&gt;then&lt;/SPAN&gt; flag_set=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;first_answered2=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0433ff;"&gt;if&lt;/SPAN&gt; compress(tranwrd(catt(of Q01-Q04), &lt;SPAN style="color: #942193;"&gt;"NULL"&lt;/SPAN&gt;, &lt;SPAN style="color: #942193;"&gt;""&lt;/SPAN&gt;)) ne &lt;SPAN style="color: #942193;"&gt;""&lt;/SPAN&gt; and flag_set=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0433ff;"&gt;do&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; first_answered2=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; flag_set=&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;end&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 01:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156187#M298930</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-11-26T01:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Data labeling in SAS, any array???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156188#M298931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conversely, if you showed NULL merely to represent missing values, then you might be able to use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA HAVE ;&lt;/P&gt;&lt;P&gt;input ID Q01-Q04;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 . . . .&lt;/P&gt;&lt;P&gt;1 . 7 . .&lt;/P&gt;&lt;P&gt;1 . 8 9 6&lt;/P&gt;&lt;P&gt;1 3 4 5 6&lt;/P&gt;&lt;P&gt;2 . . . .&lt;/P&gt;&lt;P&gt;2 3 8 9 2&lt;/P&gt;&lt;P&gt;2 6 7 8 0&lt;/P&gt;&lt;P&gt;2 4 5 0 2&lt;/P&gt;&lt;P&gt;3 . . . .&lt;/P&gt;&lt;P&gt;3 4 5 2 .&lt;/P&gt;&lt;P&gt;3 2 3 8 9&lt;/P&gt;&lt;P&gt;3 2 3 8 2&lt;/P&gt;&lt;P&gt;4 3 8 9 2&lt;/P&gt;&lt;P&gt;4 6 5 4 5&lt;/P&gt;&lt;P&gt;4 6 3 8 9&lt;/P&gt;&lt;P&gt;4 . . . .&lt;/P&gt;&lt;P&gt;4 3 8 9 7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=flag_set);&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain flag_set;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by id;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.id then flag_set=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; first_answered=not flag_set and sum(of q01-q04) gt 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first_answered then flag_set=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 02:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156188#M298931</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-11-26T02:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data labeling in SAS, any array???</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156189#M298932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much. This is great!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 14:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-labeling-in-SAS-any-array/m-p/156189#M298932</guid>
      <dc:creator>peppapig</dc:creator>
      <dc:date>2013-11-26T14:45:13Z</dc:date>
    </item>
  </channel>
</rss>

