<?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: Proc transpose to convert user defined formatted table data to char format fails with huge data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559712#M156347</link>
    <description>&lt;P&gt;How about providing some very small example data, the "format tables" and the desired results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot see why any "join" is needed without a concrete example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example likely only needs two or three variables, the 'formats' in what ever form, 5 or 10 rows of data&amp;nbsp;and desired output for the given example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example&amp;nbsp;PDF &amp;nbsp;isn't very helpful without at least some sort of column header or row header to indicate what any of that stuff is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, MACRO variables without definitions obscure what you may actually be doing. I have seen some pretty strange things placed into single macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2019 16:47:23 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-17T16:47:23Z</dc:date>
    <item>
      <title>Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559456#M156213</link>
      <description>&lt;P&gt;I wanted to join user defined formats table having labels with the main table on the respective columns on which that format has been applied.&lt;/P&gt;&lt;P&gt;To do this I want data on this main table to be formatted as char/text for the purpose of join. I tried doing transpose but it failed with no memory error. Is there any other way to do this ? The table is huge and there are many columns on which user defined formats r applied.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 19:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559456#M156213</guid>
      <dc:creator>swwithsas</dc:creator>
      <dc:date>2019-05-16T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559458#M156214</link>
      <description>Can you provide a small example that illustrates your input data set and what you want as output and where you're having issues. This is totally doable, but data specific.</description>
      <pubDate>Thu, 16 May 2019 19:18:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559458#M156214</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-16T19:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559497#M156231</link>
      <description>I have tables for each user defined formats as:&lt;BR /&gt;1)say l1: format_name, start, label&lt;BR /&gt;X 0 =0&lt;BR /&gt;X 60 &amp;gt;60,&amp;lt;120&lt;BR /&gt;Similarly, l5,l47,l77....etc&lt;BR /&gt;&lt;BR /&gt;2) I have list of columns on which above formats are applied on main table:&lt;BR /&gt;c1 c5 c47 c77.... Etc&lt;BR /&gt;Ie, table column c1 has been applied with l1 format etc.&lt;BR /&gt;&lt;BR /&gt;Now I have main table produced after applying above formats as :&lt;BR /&gt;3) say tab: id, c1, c2, c3,...................., c100&lt;BR /&gt;1 &amp;gt;60,&amp;lt;120 abc ............&lt;BR /&gt;&lt;BR /&gt;4) I need to join table tab with all format tables to collect the counts of ids and sum of balances.&lt;BR /&gt;So I intend to join on label values.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 May 2019 21:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559497#M156231</guid>
      <dc:creator>swwithsas</dc:creator>
      <dc:date>2019-05-16T21:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559503#M156235</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/273507"&gt;@swwithsas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have tables for each user defined formats as:&lt;BR /&gt;1)say l1: format_name, start, label&lt;BR /&gt;X 0 =0&lt;BR /&gt;X 60 &amp;gt;60,&amp;lt;120&lt;BR /&gt;Similarly, l5,l47,l77....etc&lt;BR /&gt;&lt;BR /&gt;2) I have list of columns on which above formats are applied on main table:&lt;BR /&gt;c1 c5 c47 c77.... Etc&lt;BR /&gt;Ie, table column c1 has been applied with l1 format etc.&lt;BR /&gt;&lt;BR /&gt;Now I have main table produced after applying above formats as :&lt;BR /&gt;3) say tab: id, c1, c2, c3,...................., c100&lt;BR /&gt;1 &amp;gt;60,&amp;lt;120 abc ............&lt;BR /&gt;&lt;BR /&gt;4) I need to join table tab with all format tables to collect the counts of ids and sum of balances.&lt;BR /&gt;So I intend to join on label values.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not a very clear description.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;Or provide something like this:&lt;/P&gt;
&lt;PRE&gt;data table1;
   input format_name $ start $ label $ ;
datalines;
X  0  0
X  60 &amp;gt;60,&amp;lt;120
;&lt;/PRE&gt;
&lt;P&gt;That will replicate your data. The way you post this&lt;BR /&gt;X 60 &amp;gt;60,&amp;lt;120&lt;/P&gt;
&lt;P&gt;I can't quite tell if "&amp;gt;60" is a start or label or if ",&amp;lt;120" is part of the same start or label or a different on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have "user defined formats" have they been defined in this session?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your "tables for each user defined formats" are set up correctly, yours isn't as the variable name would be FMTNAME not format_name, you could use those sets as CNTLIN datasets on proc format to create the formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2) I have list of columns on which above formats are applied on main table:&lt;BR /&gt;c1 c5 c47 c77.... Etc&lt;BR /&gt;Ie, table column c1 has been applied with l1 format etc.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where in that "list" do you show anything that links "column" C1 with I1 format? What format is C5 or C47 supposed to have?&lt;/P&gt;
&lt;P&gt;Is C1 a variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 22:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559503#M156235</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-16T22:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559594#M156283</link>
      <description>&lt;P&gt;for anyone being SAS developer, I thought basic problem definition with little illustrations, should have been enough to understnad the problem at hand.&lt;/P&gt;&lt;P&gt;However, I will try to explain again:&lt;/P&gt;&lt;P&gt;Yes the user defined formats are defined in my session and a list of columns and their user defined formats is applied on the main table data with obvious statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;format &amp;amp;full_format_list;&lt;/P&gt;&lt;P&gt;---where, full_format_list is something like: (c1 X. c5 Y. c47 Z. ... etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output is our table that looks something like the one attached: (note: it is just the small snapshot of the table containing huge data and many comuns).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;format tables l1,l5,l47 etc have been created using :&lt;/P&gt;&lt;P&gt;proc format cntlout = &amp;amp;outvals&lt;/P&gt;&lt;P&gt;(keep = fmtname start label&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my problem is :&lt;/P&gt;&lt;P&gt;I need to join the main table with each of these format tables to gather the count and balance for each label value of the formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;select &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;var_cat"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; as Category length=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;50&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,t2.LABEL as Categories,count(t1.acc_id) as N,t2.POU_DT,sum(BALANCE_AMT) as Balance &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;from main_table t1&lt;/P&gt;&lt;P&gt;RIGHT OUTER JOIN&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;l&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t2 &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ON&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;strip(put(&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;t1.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;amp;&amp;amp;VARS&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;32.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;))=t2.LABEL and t1.POU_DT=t2.pou_dt &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;group by t2.pou_dt,t2.FMTNAME,&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;t2.LABEL order by t2.LABEL,t2.pou_dt asc;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the join fails as operands on either side of = are of different formats for obvious reasons.&lt;/P&gt;&lt;P&gt;So I need the entire main_table to be in character format.&lt;/P&gt;&lt;P&gt;If there is any way other than proc transpose applied twice, please let me know. Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 09:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559594#M156283</guid>
      <dc:creator>swwithsas</dc:creator>
      <dc:date>2019-05-17T09:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc transpose to convert user defined formatted table data to char format fails with huge data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559712#M156347</link>
      <description>&lt;P&gt;How about providing some very small example data, the "format tables" and the desired results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot see why any "join" is needed without a concrete example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example likely only needs two or three variables, the 'formats' in what ever form, 5 or 10 rows of data&amp;nbsp;and desired output for the given example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example&amp;nbsp;PDF &amp;nbsp;isn't very helpful without at least some sort of column header or row header to indicate what any of that stuff is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, MACRO variables without definitions obscure what you may actually be doing. I have seen some pretty strange things placed into single macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 16:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-transpose-to-convert-user-defined-formatted-table-data-to/m-p/559712#M156347</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-17T16:47:23Z</dc:date>
    </item>
  </channel>
</rss>

