<?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: Displaying data by column, not row in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116349#M32100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking for something like the following?&lt;/P&gt;&lt;P&gt;What's your output destination?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA NULL;&lt;/P&gt;&lt;P&gt;FILE 'z:\DROPBOX\TEMP.TXT';&lt;/P&gt;&lt;P&gt;SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;PUT "Name: " NAME;&lt;/P&gt;&lt;P&gt;PUT "AGE: " AGE;&lt;/P&gt;&lt;P&gt;PUT "WEIGHT: " WEIGHT;&lt;/P&gt;&lt;P&gt;RUN; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Nov 2012 05:24:16 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2012-11-03T05:24:16Z</dc:date>
    <item>
      <title>Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116338#M32089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'd like to create a table like the following where the variable names/labels are in the first column and associated values are in the second column but I am having a hard time finding coding for this online or in the SAS guides. Any suggestions would be appeciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="301"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="118"&gt;Name&lt;/TD&gt;&lt;TD class="xl63" width="183"&gt;Indiviual A's Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;St Address&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's St Address&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;City&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's City&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;State&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's State&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Zip Code&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's Zip Code&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Phone Number&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's Phone Number&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Email&lt;/TD&gt;&lt;TD class="xl63"&gt;Indiviual A's Email&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 19:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116338#M32089</guid>
      <dc:creator>cs</dc:creator>
      <dc:date>2012-11-02T19:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116339#M32090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you open a SAS dataset by double clicking on it in the SAS explorer window that will bring up the table using the viewtable program.&amp;nbsp; Once it is open, if you click on view (from the menu bar) you can switch the view from table view to form view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That may be what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 19:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116339#M32090</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-02T19:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116340#M32091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that's helpful but I need it as output to include in a report. I tried looking at options in proc print but didn't see anything that would display the data like the table above.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 20:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116340#M32091</guid>
      <dc:creator>cs</dc:creator>
      <dc:date>2012-11-02T20:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116341#M32092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about Proc transpose..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input name $ add $&amp;nbsp; city $&amp;nbsp; country $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;shiva ramnagar delhi india&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=want;&lt;/P&gt;&lt;P&gt;VAR name add city country;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 20:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116341#M32092</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-11-02T20:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116342#M32093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one possibility:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select catx(" ","variable='",name,"';value=",name,";output;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :vars separated by " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname="SASHELP" and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memname="CLASS"&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (keep=variable value);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length variable $32;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length value $32;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.class;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;vars.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=want;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 21:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116342#M32093</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-02T21:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116343#M32094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is that data example in a SAS data set? If so, please run proc contents on the data set and show the results.&lt;/P&gt;&lt;P&gt;If it is not in a SAS data set then the question is how to read the file and that can depend on a whole lot of factors such as file type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 22:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116343#M32094</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-11-02T22:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116344#M32095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thought in case the other suggestions don't meet your needs.&amp;nbsp; Take a look at:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002153702.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002153702.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't even aware of it before you asked your question, but found it via a Google search.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 22:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116344#M32095</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-02T22:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116345#M32096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc fsbrowse data=SASHELP.CLASS label printall ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2012 23:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116345#M32096</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-11-02T23:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116346#M32097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There used to be a PROC LABEL (or maybe it was PROC LABELS) intended for printing adhesive labels but also suitable for a task like this. I can't find it now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 01:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116346#M32097</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2012-11-03T01:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116347#M32098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="274354" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: I 'm not aware of such a proc and can't find anything on it.&amp;nbsp; Did you possibly mean proc forms?&lt;/P&gt;&lt;P&gt;see, e.g.: &lt;A href="http://support.sas.com/kb/25/335.html"&gt;http://support.sas.com/kb/25/335.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 02:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116347#M32098</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-03T02:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116348#M32099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Art, I was remembering PROC FORMS. It will probably only work with LISTING, though. As I remember, you used it to do mailing labels and mounted the forms onto the printer. I think you could tell it how many pages of XXX's to print so the operators could align the label sheets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, my! What a blast from the past! Computer rooms, operators, line printers &amp;amp; pinfeed forms!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 04:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116348#M32099</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-11-03T04:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116349#M32100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you looking for something like the following?&lt;/P&gt;&lt;P&gt;What's your output destination?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA NULL;&lt;/P&gt;&lt;P&gt;FILE 'z:\DROPBOX\TEMP.TXT';&lt;/P&gt;&lt;P&gt;SET SASHELP.CLASS;&lt;/P&gt;&lt;P&gt;PUT "Name: " NAME;&lt;/P&gt;&lt;P&gt;PUT "AGE: " AGE;&lt;/P&gt;&lt;P&gt;PUT "WEIGHT: " WEIGHT;&lt;/P&gt;&lt;P&gt;RUN; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 05:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116349#M32100</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-11-03T05:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116350#M32101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more possibility to add to the list .. one which I'm surprised that &lt;A __default_attr="63295" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; didn't suggest: proc report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following paper gives step-by-step examples for using both proc forms and proc report:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/149-31.pdf" title="http://www2.sas.com/proceedings/sugi31/149-31.pdf"&gt;http://www2.sas.com/proceedings/sugi31/149-31.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 16:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116350#M32101</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-03T16:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116351#M32102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Art:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I was just so caught up in nostalgia for the old days of pinfeed label forms, I did neglect to mention PROC REPORT. But actually, if the need is NOT for Avery labels, but just for listing the variables in one or two columns -- since PROC REPORT needs a DATA step to manipulate the data, I'd probably just use FILE PRINT ODS within the DATA step program. Not sure whether I'd make a table template or not. But probably not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Before I went down any of those roads -- PROC FORMS or DATA _NULL_ or PROC REPORT, I would be tempted to make a form in Word with merge fields defined, then I would make a simple CSV file with SAS and do the merge of the CSV file with the Word doc from within Word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Of course, I'm still blissing out over PROC FORMS memories. That is a good paper, thanks for providing the link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 18:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116351#M32102</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-11-03T18:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116352#M32103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cynthia: Enjoy the memories.&amp;nbsp; I'll try to bring up some new(old) ones next week so that the nostalgic period can continue.&amp;nbsp; Hmmm .. proc explode, proc spell, proc hier&lt;SPAN style="color: #000000; font-size: 14px; font-family: 'Comic Sans MS', arial, helvetica, sans-serif;"&gt;, proc gwhiz, proc nickname,&lt;/SPAN&gt; proc extract, proc kba and proc fscalc might be good candidates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2012 19:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116352#M32103</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-03T19:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying data by column, not row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116353#M32104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for everyone's help. I was able to get the data into my report using proc transpose and proc print. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Nov 2012 18:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Displaying-data-by-column-not-row/m-p/116353#M32104</guid>
      <dc:creator>cs</dc:creator>
      <dc:date>2012-11-04T18:04:18Z</dc:date>
    </item>
  </channel>
</rss>

