<?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: Need help with Transpose - in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70909#M20439</link>
    <description>Curious if you attempted using PROC TRANSPOSE, after reading the DOC, and considering the examples that are available at the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt; either using the SEARCH facility at the site or with an Internet search?&lt;BR /&gt;
&lt;BR /&gt;
Also, you show 1 row for 20100120, then multiple rows for another date-related variable -- yet you attempt to describe the desired result which doesn't necessarily jive with the "input source".&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google search, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
proc transpose how to site:sas.com</description>
    <pubDate>Wed, 24 Mar 2010 20:40:02 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-03-24T20:40:02Z</dc:date>
    <item>
      <title>Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70908#M20438</link>
      <description>Hi support,&lt;BR /&gt;
&lt;BR /&gt;
   Would you please let me know how to do this in PROC step in TRANSPOSE ?&lt;BR /&gt;
&lt;BR /&gt;
For example my data is like this :&lt;BR /&gt;
&lt;BR /&gt;
20100120;var1;var2;ID;dob;relat&lt;BR /&gt;
20100118;var1;var2;ID;dob;relat&lt;BR /&gt;
20100218;var1;var2;ID;dob;relat&lt;BR /&gt;
20100218;var1;var2;ID;dob;relat&lt;BR /&gt;
&lt;BR /&gt;
Where var1 and var2 will be like question and answer. &lt;BR /&gt;
&lt;BR /&gt;
And I want to write the record as :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
20100120;ID;dob;relat;var1;var2;var1a;var2b;var2a;var2b;var3a;var3b;&lt;BR /&gt;
&lt;BR /&gt;
assuming var1,var2, var3 are not similar. I am trying to output using PROC TRANSPOSE and for somereason I am getting error message saying - ID value occurs twice. &lt;BR /&gt;
&lt;BR /&gt;
Do I need to sort data and delete duplicate by merge variable ? I just used PROC SORT and didn't used nodupkey word. Please let me know.&lt;BR /&gt;
&lt;BR /&gt;
thanks,&lt;BR /&gt;
sasbase9&lt;BR /&gt;
latha</description>
      <pubDate>Wed, 24 Mar 2010 20:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70908#M20438</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-24T20:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70909#M20439</link>
      <description>Curious if you attempted using PROC TRANSPOSE, after reading the DOC, and considering the examples that are available at the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt; either using the SEARCH facility at the site or with an Internet search?&lt;BR /&gt;
&lt;BR /&gt;
Also, you show 1 row for 20100120, then multiple rows for another date-related variable -- yet you attempt to describe the desired result which doesn't necessarily jive with the "input source".&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google search, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
proc transpose how to site:sas.com</description>
      <pubDate>Wed, 24 Mar 2010 20:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70909#M20439</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-24T20:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70910#M20440</link>
      <description>Yes, That's correct. I have data for HRA and we get data by Completion date and by each of the question code followed by an answer in one record. I wanted to combine all of the unique questions related to that person into one record for all possible questions and I am not sure if PROC TRANSPOSE will do that. &lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Wed, 24 Mar 2010 20:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70910#M20440</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-24T20:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70911#M20441</link>
      <description>Sure it can - you may need/want to summarize or GROUP your data first, before invoking TRANSPOSE.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 24 Mar 2010 21:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70911#M20441</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-24T21:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70912#M20442</link>
      <description>Any example code that can site with this scenario?  I never worked on PROC TRANSPOSE or grouping data like this before.&lt;BR /&gt;
&lt;BR /&gt;
thanks for help,&lt;BR /&gt;
sasbase9</description>
      <pubDate>Wed, 24 Mar 2010 22:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70912#M20442</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-24T22:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70913#M20443</link>
      <description>As suggested, the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website and its SEARCH facility can reveal much information for PROC TRANSPOSE - both SAS-hosted documentation and also supplemental conference/technical papers on the topic.&lt;BR /&gt;
&lt;BR /&gt;
Also, the forum archives will provide useful reference information as well, when searched.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.

Message was edited by: sbb</description>
      <pubDate>Wed, 24 Mar 2010 23:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70913#M20443</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-24T23:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70914#M20444</link>
      <description>Agreed with Scott: try the various possibilities offered by the procedure, and if you end up being stumped after trying your best, come back with some code.</description>
      <pubDate>Thu, 25 Mar 2010 02:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70914#M20444</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-03-25T02:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70915#M20445</link>
      <description>hi Chris,&lt;BR /&gt;
&lt;BR /&gt;
I tried to output using PROC TRANSPOSE and for some reason my answers for question codes are not coming out.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code I used -&lt;BR /&gt;
&lt;BR /&gt;
proc transpose data=bcmaraw_out out=hra_rollup  /*prefix= Q  let */  ;&lt;BR /&gt;
    by mrgvar QUSTNCD_SHRT   ;&lt;BR /&gt;
    id QUSTNCD_SHRT;&lt;BR /&gt;
    var HA_QUESTION_TEXT;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
- where mergvar is combination of memberID + MemDOB + RELAT + HRA DATE OF COMP .&lt;BR /&gt;
&lt;BR /&gt;
All of my  "QUSTNCD_SHRT" came out as variables in output, but corresponding answer is not outputted under question. "HA_QUESTION_TEXT" is the variable coming on data as an answer to the question.&lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Thu, 25 Mar 2010 09:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70915#M20445</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-25T09:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Transpose -</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70916#M20446</link>
      <description>Strongly suggest that you start with some instream DATALINES, or consider SASHELP.CLASS, so you can get familiar with the PROC TRANSPOSE processing.&lt;BR /&gt;
&lt;BR /&gt;
I very much expect that you can emulate your output rqmts to-start with using SASHELP.CLASS, get the processing well-defined, then move forward (slowly) with introducing your specific data.&lt;BR /&gt;
&lt;BR /&gt;
You need to learn the procedure/process first, then adapt the process(ing) to your specific input data conditions and output data requirements -- one step at a time.&lt;BR /&gt;
&lt;BR /&gt;
And, remember, you know your data - we don't - so to reveal SAS code in your post/reply for which we have no clue how you mangled the input side is less-than-useful if you actually expect to get assistance from other subscribers (without making it a guessing contest).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 25 Mar 2010 13:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-Transpose/m-p/70916#M20446</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-25T13:02:18Z</dc:date>
    </item>
  </channel>
</rss>

