<?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: Matching Respondent ID with Respondent Age in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261216#M50782</link>
    <description>&lt;P&gt;HI! &amp;nbsp; Thanks but I don't get all the observations processed in the array you sent out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data two;&lt;BR /&gt;set one;&lt;BR /&gt;array a{5};&lt;BR /&gt;array v{5} _temporary_;&lt;BR /&gt;if ty = 1 then&lt;BR /&gt;do i = 1 to dim(a);&lt;BR /&gt;v{i} = a{i};&lt;BR /&gt;end;&lt;BR /&gt;i = input(scan(pid, -1, "A"), 2.);&lt;BR /&gt;if i &amp;gt; 0 and i &amp;lt;= dim(v) then do;&lt;BR /&gt;age = v{i};&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;keep id pid age;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=two; var id pid age; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the ouput I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS System 08:40 Monday, April 4, 2016 30&lt;/P&gt;&lt;P&gt;Obs id PID age&lt;/P&gt;&lt;P&gt;1 CT0121 CT0121A1 23&lt;BR /&gt;2 CT0121 CT0121A2 35&lt;BR /&gt;3 CT0121 CT0121A3 45&lt;BR /&gt;4 CT0121 CT0121A4 65&lt;BR /&gt;5 CT0200 CT0200A1 34&lt;BR /&gt;6 CT0200 CT0200A2 36&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I get the following from the log output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;383&lt;BR /&gt;384 data two;&lt;BR /&gt;385 set one;&lt;BR /&gt;386 array a{5};&lt;BR /&gt;387 array v{5} _temporary_;&lt;BR /&gt;388 if ty = 1 then&lt;BR /&gt;389 do i = 1 to dim(a);&lt;BR /&gt;390 v{i} = a{i};&lt;BR /&gt;391 end;&lt;BR /&gt;392 i = input(scan(pid, -1, "A"), 2.);&lt;BR /&gt;393 if i &amp;gt; 0 and i &amp;lt;= dim(v) then do;&lt;BR /&gt;394 age = v{i};&lt;BR /&gt;395 output;&lt;BR /&gt;396 end;&lt;BR /&gt;397 keep id pid age;&lt;BR /&gt;398 run;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=1 a1=21 a2=23 a3=24 a4=25 a5=90 i=. age=. _ERROR_=1 _N_=7&lt;BR /&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=2 a1=. a2=. a3=. a4=. a5=. i=. age=. _ERROR_=1 _N_=8&lt;BR /&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=2 a1=. a2=. a3=. a4=. a5=. i=. age=. _ERROR_=1 _N_=9&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the&lt;BR /&gt;operations have been set to missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;3 at 392:5&lt;BR /&gt;NOTE: There were 9 observations read from the data set WORK.ONE.&lt;BR /&gt;NOTE: The data set WORK.TWO has 6 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;399&lt;BR /&gt;400 proc print data=two; var id pid age; run;&lt;/P&gt;&lt;P&gt;NOTE: There were 6 observations read from the data set WORK.TWO.&lt;BR /&gt;NOTE: PROCEDURE PRINT 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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand the error message about the INPUT Statement. Any suggestions? For some reason the last observations with a "NS" prefix are not included due to the error in the PUT statment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2016 20:05:29 GMT</pubDate>
    <dc:creator>jlopez1</dc:creator>
    <dc:date>2016-04-04T20:05:29Z</dc:date>
    <item>
      <title>Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261139#M50755</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a situation in which I have a data set that contains respondent ID numbers in a single column and corresponding respondent ages in multiple columns. I need to match each individual respondent ID (PID) with its corresponding respondent age (a1-a5). A variable named TY is a binary variable that is coded as "1" or "2." TY as "1" is primary row that contains ages a1-a5. When "TY" is coded as "2" there are no row value for age. As you can see there are more ages than PIDs. I am working on a large dataset and seek a clean and quick method of matching each PID to each age. Any suggestions? Thanks. Here's how the data looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;input id$ PID$ TY a1 a2 a3 a4 a5;&lt;BR /&gt;cards;&lt;BR /&gt;CT0121 &amp;nbsp; CT0121A1 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;23 35 45 65 76&lt;BR /&gt;CT0121 &amp;nbsp; CT0121A2 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;CT0121 &amp;nbsp; CT0121A3 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;CT0121 &amp;nbsp; CT0121A4 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;CT0200 &amp;nbsp; CT0200A1 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;34 36 38 40 42&lt;BR /&gt;CT0200 &amp;nbsp; CT0200A2 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;NS10500 NS10500A1 &amp;nbsp; 1 &amp;nbsp;21 23 24 25 90&lt;BR /&gt;NS10500 NS10500A2 &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;NS10500 NS10500A3 &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;BR /&gt;;&lt;BR /&gt;run; quit;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 17:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261139#M50755</guid>
      <dc:creator>jlopez1</dc:creator>
      <dc:date>2016-04-04T17:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261147#M50760</link>
      <description>&lt;P&gt;And what would the data look like afterward?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 17:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261147#M50760</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-04-04T17:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261160#M50766</link>
      <description>&lt;P&gt;&lt;SPAN&gt;From this data structure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A1 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;23 35 45 65 76&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A2 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A3 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A4 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0200 &amp;nbsp; CT0200A1 &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;34 36 38 40 42&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0200 &amp;nbsp; CT0200A2 &amp;nbsp; &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A1 &amp;nbsp; 1 &amp;nbsp;21 23 24 25 90&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A2 &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A3 &amp;nbsp; 2 &amp;nbsp;. . . . .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To here's how it needs to look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Age&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A1 &amp;nbsp; &amp;nbsp; 23&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A2 &amp;nbsp; &amp;nbsp; 35&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A3 &amp;nbsp; &amp;nbsp; 45&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0121 &amp;nbsp; CT0121A4 &amp;nbsp; &amp;nbsp; 65&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0200 &amp;nbsp; CT0200A1 &amp;nbsp; &amp;nbsp; 34&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CT0200 &amp;nbsp; CT0200A2 &amp;nbsp; &amp;nbsp; 36&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A1 &amp;nbsp; 21&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A2 &amp;nbsp; 23&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NS10500 NS10500A3 &amp;nbsp; 24&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the reply!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261160#M50766</guid>
      <dc:creator>jlopez1</dc:creator>
      <dc:date>2016-04-04T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261163#M50768</link>
      <description>&lt;P&gt;A simple guess..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two;
set one;
array a{5};
do i = 1 to dim(a);
    if not missing(a{i}) then do;
        age = a{i};
        output;
        end;
    end;
keep id pid age;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261163#M50768</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-04T18:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261168#M50770</link>
      <description>&lt;P&gt;Still not resolved. PIDs are changed to single value when I began with individual values. Please refer to last post of what data should look like. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obs &amp;nbsp; id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;age&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0121 CT0121A1 &amp;nbsp; 23&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0121 CT0121A1 &amp;nbsp; 35&lt;BR /&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0121 CT0121A1 &amp;nbsp; 45&lt;BR /&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0121 CT0121A1 &amp;nbsp; 65&lt;BR /&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0121 CT0121A1 &amp;nbsp; 76&lt;BR /&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0200 CT0200A1 &amp;nbsp; 34&lt;BR /&gt;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0200 CT0200A1 &amp;nbsp; 36&lt;BR /&gt;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0200 CT0200A1 &amp;nbsp; 38&lt;BR /&gt;9 &amp;nbsp; &amp;nbsp; &amp;nbsp; CT0200 CT0200A1 &amp;nbsp; 40&lt;BR /&gt;10 &amp;nbsp; &amp;nbsp; CT0200 CT0200A1 &amp;nbsp; 42&lt;BR /&gt;11 &amp;nbsp; &amp;nbsp; NS10500 NS10500A 21&lt;BR /&gt;12 &amp;nbsp; &amp;nbsp; NS10500 NS10500A 23&lt;BR /&gt;13 &amp;nbsp; &amp;nbsp; NS10500 NS10500A 24&lt;BR /&gt;14 &amp;nbsp; &amp;nbsp; NS10500 NS10500A 25&lt;BR /&gt;15 &amp;nbsp; &amp;nbsp; NS10500 NS10500A 90&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 18:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261168#M50770</guid>
      <dc:creator>jlopez1</dc:creator>
      <dc:date>2016-04-04T18:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261214#M50781</link>
      <description>&lt;P&gt;Less of a guess this time:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id :$10. PID :$12. TY a1 a2 a3 a4 a5;
cards;
CT0121   CT0121A1     1  23 35 45 65 76
CT0121   CT0121A2     2  . . . . .
CT0121   CT0121A3     2  . . . . .
CT0121   CT0121A4     2  . . . . .
CT0200   CT0200A1     1  34 36 38 40 42
CT0200   CT0200A2     2  . . . . .
NS10500 NS10500A1   1  21 23 24 25 90
NS10500 NS10500A2   2  . . . . .
NS10500 NS10500A3   2  . . . . .
;

data two;
set one;
array a{5};
array v{5} _temporary_;
if ty = 1 then
    do i = 1 to dim(a);
        v{i} = a{i};
        end;
i = input(scan(pid, -1, "A"), 2.);
if i &amp;gt; 0 and i &amp;lt;= dim(v) then do;
    age = v{i};
    output;
    end;
keep id pid age;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261214#M50781</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-04T19:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261216#M50782</link>
      <description>&lt;P&gt;HI! &amp;nbsp; Thanks but I don't get all the observations processed in the array you sent out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data two;&lt;BR /&gt;set one;&lt;BR /&gt;array a{5};&lt;BR /&gt;array v{5} _temporary_;&lt;BR /&gt;if ty = 1 then&lt;BR /&gt;do i = 1 to dim(a);&lt;BR /&gt;v{i} = a{i};&lt;BR /&gt;end;&lt;BR /&gt;i = input(scan(pid, -1, "A"), 2.);&lt;BR /&gt;if i &amp;gt; 0 and i &amp;lt;= dim(v) then do;&lt;BR /&gt;age = v{i};&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;keep id pid age;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=two; var id pid age; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the ouput I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS System 08:40 Monday, April 4, 2016 30&lt;/P&gt;&lt;P&gt;Obs id PID age&lt;/P&gt;&lt;P&gt;1 CT0121 CT0121A1 23&lt;BR /&gt;2 CT0121 CT0121A2 35&lt;BR /&gt;3 CT0121 CT0121A3 45&lt;BR /&gt;4 CT0121 CT0121A4 65&lt;BR /&gt;5 CT0200 CT0200A1 34&lt;BR /&gt;6 CT0200 CT0200A2 36&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I get the following from the log output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;383&lt;BR /&gt;384 data two;&lt;BR /&gt;385 set one;&lt;BR /&gt;386 array a{5};&lt;BR /&gt;387 array v{5} _temporary_;&lt;BR /&gt;388 if ty = 1 then&lt;BR /&gt;389 do i = 1 to dim(a);&lt;BR /&gt;390 v{i} = a{i};&lt;BR /&gt;391 end;&lt;BR /&gt;392 i = input(scan(pid, -1, "A"), 2.);&lt;BR /&gt;393 if i &amp;gt; 0 and i &amp;lt;= dim(v) then do;&lt;BR /&gt;394 age = v{i};&lt;BR /&gt;395 output;&lt;BR /&gt;396 end;&lt;BR /&gt;397 keep id pid age;&lt;BR /&gt;398 run;&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=1 a1=21 a2=23 a3=24 a4=25 a5=90 i=. age=. _ERROR_=1 _N_=7&lt;BR /&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=2 a1=. a2=. a3=. a4=. a5=. i=. age=. _ERROR_=1 _N_=8&lt;BR /&gt;NOTE: Invalid argument to function INPUT at line 392 column 5.&lt;BR /&gt;id=NS10500 PID=NS10500A TY=2 a1=. a2=. a3=. a4=. a5=. i=. age=. _ERROR_=1 _N_=9&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the&lt;BR /&gt;operations have been set to missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;3 at 392:5&lt;BR /&gt;NOTE: There were 9 observations read from the data set WORK.ONE.&lt;BR /&gt;NOTE: The data set WORK.TWO has 6 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;399&lt;BR /&gt;400 proc print data=two; var id pid age; run;&lt;/P&gt;&lt;P&gt;NOTE: There were 6 observations read from the data set WORK.TWO.&lt;BR /&gt;NOTE: PROCEDURE PRINT 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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand the error message about the INPUT Statement. Any suggestions? For some reason the last observations with a "NS" prefix are not included due to the error in the PUT statment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 20:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261216#M50782</guid>
      <dc:creator>jlopez1</dc:creator>
      <dc:date>2016-04-04T20:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261247#M50795</link>
      <description>&lt;P&gt;The problem is with the way you read the data in. Variables id and pid are too short to contain the longer codes. My program uses the last part if the pid code (after the "A") to decide which array element to output. When that part of the pid code is missing, an error occurs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure you read the data in properly, as I did in the example (&amp;nbsp;input id &lt;FONT color="#800000"&gt;&lt;STRONG&gt;:$10.&lt;/STRONG&gt;&lt;/FONT&gt; PID &lt;FONT color="#800000"&gt;&lt;STRONG&gt;:$12.&lt;/STRONG&gt;&lt;/FONT&gt; ), and the rest of the program will work.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 22:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261247#M50795</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-04T22:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Matching Respondent ID with Respondent Age</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261257#M50798</link>
      <description>&lt;P&gt;Awesome! Will do!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 01:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Matching-Respondent-ID-with-Respondent-Age/m-p/261257#M50798</guid>
      <dc:creator>jlopez1</dc:creator>
      <dc:date>2016-04-05T01:24:44Z</dc:date>
    </item>
  </channel>
</rss>

