<?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: Transpose with sort sequence in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/726444#M225718</link>
    <description>&lt;P&gt;Is this a bug?&lt;/P&gt;&lt;P&gt;Because proc transpose with notsorted in by clause is not working as expected when data is sorted with linguistic option and containing both character and numeric variables&amp;nbsp; in by clause of proc sort&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 16:15:25 GMT</pubDate>
    <dc:creator>rkdownload</dc:creator>
    <dc:date>2021-03-15T16:15:25Z</dc:date>
    <item>
      <title>Transpose with sort sequence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725330#M225275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below mentioned code works as expect when we remove following line of code from proc sort&lt;/P&gt;&lt;P&gt;sortseq = linguistic(strength=primary numeric_collation=on) but not with it&lt;/P&gt;&lt;P&gt;Any help in regard would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=======================================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Test;&lt;BR /&gt;infile datalines delimiter='09'x;&lt;BR /&gt;informat ID 8. USUBJID $50. VISITNUM VSTPTNUM PULSE TEMP SYS DIA 8.;&lt;BR /&gt;input ID USUBJID VISITNUM VSTPTNUM PULSE TEMP SYS DIA;&lt;BR /&gt;datalines;&lt;BR /&gt;1 009/01-001-S1 1 1 93 98.5 116 78&lt;BR /&gt;2 009/01-001-S1 2 2 97 98.4 164 100&lt;BR /&gt;3 009/01-001-S1 2 3 103 . 128 106&lt;BR /&gt;4 009/01-001-S1 2 4 107 . 150 84&lt;BR /&gt;5 009/01-001-S1 2 5 112 97.1 100 78&lt;BR /&gt;6 009/01-001-S1 3 2 91 98.1 134 98&lt;BR /&gt;7 009/01-001-S1 3 3 90 . 116 46&lt;BR /&gt;8 009/01-001-S1 3 4 113 . 138 90&lt;BR /&gt;9 009/01-001-S1 3 5 57 96.3 106 72&lt;BR /&gt;10 009/01-001-S2 1 1 86 97.3 130 90&lt;BR /&gt;11 009/01-001-S2 2 2 58 96.5 104 46&lt;BR /&gt;12 009/01-001-S2 2 3 82 . 112 70&lt;BR /&gt;13 009/01-001-S2 2 4 95 . 162 82&lt;BR /&gt;14 009/01-001-S2 2 5 76 95.6 124 102&lt;BR /&gt;15 009/01-001-S3 1 1 73 96.6 132 84&lt;BR /&gt;16 009/01-001-S3 2 2 75 96.9 100 76&lt;BR /&gt;17 009/01-001-S3 2 3 79 . 154 110&lt;BR /&gt;18 009/01-001-S3 2 4 78 . 164 94&lt;BR /&gt;19 009/01-001-S3 2 5 107 97.0 102 58&lt;BR /&gt;20 009/01-001-S3 3 2 76 98.1 78 80&lt;BR /&gt;21 009/01-001-S3 3 3 78 . 156 80&lt;BR /&gt;22 009/01-001-S3 3 4 85 . 134 94&lt;BR /&gt;23 009/01-001-S3 3 5 110 96.8 136 90&lt;BR /&gt;24 009/01-001-S4 1 1 78 95.9 136 82&lt;BR /&gt;25 009/01-001-S4 2 2 84 97.6 92 68&lt;BR /&gt;26 009/01-001-S4 2 3 63 . 84 66&lt;BR /&gt;27 009/01-001-S4 2 4 78 . 166 82&lt;BR /&gt;28 009/01-001-S4 2 5 95 95.4 100 70&lt;BR /&gt;29 009/01-001-S4 3 2 72 95.9 88 48&lt;BR /&gt;30 009/01-001-S4 3 3 55 . 104 74&lt;BR /&gt;31 009/01-001-S4 3 4 105 . 110 48&lt;BR /&gt;32 009/01-001-S4 3 5 119 95.8 136 100&lt;BR /&gt;33 009/01-001-S5 1 1 68 97.3 108 66&lt;BR /&gt;34 009/01-001-S5 2 2 50 96.7 158 120&lt;BR /&gt;35 009/01-001-S5 2 3 115 . 126 110&lt;BR /&gt;36 009/01-001-S5 2 4 56 . 122 114&lt;BR /&gt;37 009/01-001-S5 2 5 49 96.3 132 86&lt;BR /&gt;38 009/01-001-S5 3 2 59 97.4 138 98&lt;BR /&gt;39 009/01-001-S5 3 3 70 . 156 96&lt;BR /&gt;40 009/01-001-S5 3 4 99 . 128 98&lt;BR /&gt;41 009/01-001-S5 3 5 81 96.3 150 114&lt;BR /&gt;42 009/01-001-S6 1 1 63 97.7 116 78&lt;BR /&gt;43 009/01-001-S6 2 2 105 95.6 80 64&lt;BR /&gt;44 009/01-001-S6 2 3 98 . 138 92&lt;BR /&gt;45 009/01-001-S6 2 4 93 . 88 66&lt;BR /&gt;46 009/01-001-S6 2 5 97 97.3 122 102&lt;BR /&gt;47 009/01-001-S6 3 2 105 97.0 116 46&lt;BR /&gt;48 009/01-001-S6 3 3 57 . 154 80&lt;BR /&gt;49 009/01-001-S6 3 4 116 . 100 76&lt;BR /&gt;50 009/01-001-S6 3 5 62 95.3 154 100&lt;BR /&gt;51 009/01-001-S7 1 1 86 95.3 104 74&lt;BR /&gt;52 009/01-001-S7 2 2 48 98.1 138 96&lt;BR /&gt;53 009/01-001-S7 2 3 64 . 108 54&lt;BR /&gt;54 009/01-001-S7 2 4 54 . 94 80&lt;BR /&gt;55 009/01-001-S7 2 5 67 97.5 156 112&lt;BR /&gt;56 009/01-001-S7 3 2 61 98.0 78 70&lt;BR /&gt;57 009/01-001-S7 3 3 72 . 154 98&lt;BR /&gt;58 009/01-001-S7 3 4 107 . 128 112&lt;BR /&gt;59 009/01-001-S7 3 5 54 95.8 112 58&lt;BR /&gt;60 009/01-001-S8 1 1 67 96.8 134 86&lt;BR /&gt;61 009/01-001-S8 2 2 58 98.3 92 54&lt;BR /&gt;62 009/01-001-S8 2 3 72 . 118 58&lt;BR /&gt;63 009/01-001-S8 2 4 68 . 124 106&lt;BR /&gt;64 009/01-001-S8 2 5 61 96.6 100 76&lt;BR /&gt;65 009/01-001-S8 3 2 114 96.7 146 110&lt;BR /&gt;66 009/01-001-S8 3 3 94 . 120 62&lt;BR /&gt;67 009/01-001-S8 3 4 117 . 84 52&lt;BR /&gt;68 009/01-001-S8 3 5 85 97.0 148 106&lt;BR /&gt;69 009/01-001-S9 1 1 86 97.4 130 82&lt;BR /&gt;70 009/01-001-S9 2 2 50 95.4 110 68&lt;BR /&gt;71 009/01-001-S9 2 3 74 . 146 116&lt;BR /&gt;72 009/01-001-S9 2 4 93 . 150 102&lt;BR /&gt;73 009/01-001-S9 2 5 110 95.8 74 62&lt;BR /&gt;74 009/01-001-S9 3 2 86 97.5 114 56&lt;BR /&gt;75 009/01-001-S9 3 3 99 . 104 78&lt;BR /&gt;76 009/01-001-S9 3 4 61 . 154 84&lt;BR /&gt;77 009/01-001-S9 3 5 69 97.2 108 74&lt;BR /&gt;78 009/01-001-S10 1 1 64 96.2 98 70&lt;BR /&gt;79 009/01-001-S10 2 2 73 95.5 102 66&lt;BR /&gt;80 009/01-001-S10 2 3 69 . 164 114&lt;BR /&gt;81 009/01-001-S10 2 4 50 . 122 84&lt;BR /&gt;82 009/01-001-S10 2 5 97 96.6 138 98&lt;BR /&gt;83 009/01-001-S10 3 2 83 98.0 88 46&lt;BR /&gt;84 009/01-001-S10 3 3 100 . 122 96&lt;BR /&gt;85 009/01-001-S10 3 4 80 . 158 116&lt;BR /&gt;86 009/01-001-S10 3 5 103 97.5 112 44&lt;BR /&gt;87 009/01-001-S11 1 1 86 97.1 136 80&lt;BR /&gt;88 009/01-001-S11 2 2 97 97.3 120 60&lt;BR /&gt;89 009/01-001-S11 2 3 86 . 130 82&lt;BR /&gt;90 009/01-001-S11 2 4 102 . 100 64&lt;BR /&gt;91 009/01-001-S11 2 5 50 98.0 102 52&lt;BR /&gt;92 009/01-001-S11 3 2 55 96.6 144 84&lt;BR /&gt;93 009/01-001-S11 3 3 60 . 158 110&lt;BR /&gt;94 009/01-001-S11 3 4 118 . 102 66&lt;BR /&gt;95 009/01-001-S11 3 5 73 96.9 150 116&lt;BR /&gt;96 009/01-001-S12 1 1 62 95.6 114 60&lt;BR /&gt;97 009/01-001-S12 2 2 55 96.4 94 46&lt;BR /&gt;98 009/01-001-S12 2 3 85 . 166 84&lt;BR /&gt;99 009/01-001-S12 2 4 77 . 168 116&lt;BR /&gt;100 009/01-001-S12 2 5 77 98.0 162 112&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=Test sortseq = linguistic(strength=primary numeric_collation=on);&lt;BR /&gt;by USUBJID VISITNUM VSTPTNUM;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=Test out=Result;&lt;BR /&gt;by USUBJID VISITNUM VSTPTNUM;&lt;BR /&gt;var PULSE TEMP SYS DIA;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 02:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725330#M225275</guid>
      <dc:creator>rkdownload</dc:creator>
      <dc:date>2021-03-11T02:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose with sort sequence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725341#M225282</link>
      <description>&lt;P&gt;The BY statement in other procedures are not aware of the SORTseq options. If you need to use By some processes, like Transpose, you should add a variable that behaves as needed prior to the transpose. Or possibly use the BY NOTSORTED option in Proc Transpose the values get treated as groups regardless of BY behavior.&lt;/P&gt;
&lt;PRE&gt;proc transpose data=Test out=Result;
   by notsorted USUBJID VISITNUM VSTPTNUM;
   var PULSE TEMP SYS DIA;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are going to use TABS to delimit data you really need to paste the code into a text box as the message windows reformat white space characters. As shown your data step does not run because of the way the forum changes things.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 04:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725341#M225282</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-11T04:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose with sort sequence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725697#M225463</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Ballardw,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;That didn't work as expected. Please also find attached the corresponding sas code file for your reference .&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 02:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/725697#M225463</guid>
      <dc:creator>rkdownload</dc:creator>
      <dc:date>2021-03-12T02:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose with sort sequence</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/726444#M225718</link>
      <description>&lt;P&gt;Is this a bug?&lt;/P&gt;&lt;P&gt;Because proc transpose with notsorted in by clause is not working as expected when data is sorted with linguistic option and containing both character and numeric variables&amp;nbsp; in by clause of proc sort&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-with-sort-sequence/m-p/726444#M225718</guid>
      <dc:creator>rkdownload</dc:creator>
      <dc:date>2021-03-15T16:15:25Z</dc:date>
    </item>
  </channel>
</rss>

