<?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: Comment after PROC in a clean way? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607354#M176532</link>
    <description>&lt;P&gt;When I copy/paste the Listing(!) output from EG, I get this:&lt;/P&gt;
&lt;PRE&gt;                        Die Prozedur FREQ

                                           Kumuliert     Kumuliert
Make             Häufigkeit    Prozent     Häufigkeit      Prozent
------------------------------------------------------------------
Acura                    7       1.64             7         1.64  
Audi                    19       4.44            26         6.07  
BMW                     20       4.67            46        10.75  
Buick                    9       2.10            55        12.85  
Cadillac                 8       1.87            63        14.72  
Chevrolet               27       6.31            90        21.03  
Chrysler                15       3.50           105        24.53  
Dodge                   13       3.04           118        27.57  
Ford                    23       5.37           141        32.94  
GMC                      8       1.87           149        34.81  
Honda                   17       3.97           166        38.79  
Hummer                   1       0.23           167        39.02  
Hyundai                 12       2.80           179        41.82  
Infiniti                 8       1.87           187        43.69  
Isuzu                    2       0.47           189        44.16  
Jaguar                  12       2.80           201        46.96  
Jeep                     3       0.70           204        47.66  
Kia                     11       2.57           215        50.23  
Land Rover               3       0.70           218        50.93  
Lexus                   11       2.57           229        53.50  
Lincoln                  9       2.10           238        55.61  
MINI                     2       0.47           240        56.07  
Mazda                   11       2.57           251        58.64  
Mercedes-Benz           26       6.07           277        64.72  
Mercury                  9       2.10           286        66.82  
Mitsubishi              13       3.04           299        69.86  
Nissan                  17       3.97           316        73.83  
Oldsmobile               3       0.70           319        74.53  
Pontiac                 11       2.57           330        77.10  
Porsche                  7       1.64           337        78.74  
Saab                     7       1.64           344        80.37  
Saturn                   8       1.87           352        82.24  
Scion                    2       0.47           354        82.71  
Subaru                  11       2.57           365        85.28  
Suzuki                   8       1.87           373        87.15  
Toyota                  28       6.54           401        93.69  
Volkswagen              15       3.50           416        97.20  
Volvo                   12       2.80           428       100.00  
&lt;/PRE&gt;
&lt;P&gt;and it looks the same when I paste it into the code as comment.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Nov 2019 14:44:38 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-11-26T14:44:38Z</dc:date>
    <item>
      <title>Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607351#M176529</link>
      <description>&lt;P&gt;I'm wondering if there is a way to comment the results of PROC FREQ (or any other PROCs) in a beautiful way. The comment section in the below code is a simple copy&amp;amp;paste from PROC FREQ. Quite often, I make such a comment, so I can keep track of my data and results. Unfortunately, the comment section is messed mostly because of heterogenous indentations. Does anybody have a good suggestion?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc freq data= sashelp.cars;	table make; run;
*
Make Frequency Percent Cumulative
Frequency Cumulative
Percent 
Acura 7 1.64 7 1.64 
Audi 19 4.44 26 6.07 
BMW 20 4.67 46 10.75 
Buick 9 2.10 55 12.85 
Cadillac 8 1.87 63 14.72 
Chevrolet 27 6.31 90 21.03 
Chrysler 15 3.50 105 24.53 
Dodge 13 3.04 118 27.57 
Ford 23 5.37 141 32.94 
GMC 8 1.87 149 34.81 
Honda 17 3.97 166 38.79 
Hummer 1 0.23 167 39.02 
Hyundai 12 2.80 179 41.82 
Infiniti 8 1.87 187 43.69 
Isuzu 2 0.47 189 44.16 
Jaguar 12 2.80 201 46.96 
Jeep 3 0.70 204 47.66 
Kia 11 2.57 215 50.23 
Land Rover 3 0.70 218 50.93 
Lexus 11 2.57 229 53.50 
Lincoln 9 2.10 238 55.61 
MINI 2 0.47 240 56.07 
Mazda 11 2.57 251 58.64 
Mercedes-Benz 26 6.07 277 64.72 
Mercury 9 2.10 286 66.82 
Mitsubishi 13 3.04 299 69.86 
Nissan 17 3.97 316 73.83 
Oldsmobile 3 0.70 319 74.53 
Pontiac 11 2.57 330 77.10 
Porsche 7 1.64 337 78.74 
Saab 7 1.64 344 80.37 
Saturn 8 1.87 352 82.24 
Scion 2 0.47 354 82.71 
Subaru 11 2.57 365 85.28 
Suzuki 8 1.87 373 87.15 
Toyota 28 6.54 401 93.69 
Volkswagen 15 3.50 416 97.20 
Volvo 12 2.80 428 100.00 
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 14:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607351#M176529</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-11-26T14:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607354#M176532</link>
      <description>&lt;P&gt;When I copy/paste the Listing(!) output from EG, I get this:&lt;/P&gt;
&lt;PRE&gt;                        Die Prozedur FREQ

                                           Kumuliert     Kumuliert
Make             Häufigkeit    Prozent     Häufigkeit      Prozent
------------------------------------------------------------------
Acura                    7       1.64             7         1.64  
Audi                    19       4.44            26         6.07  
BMW                     20       4.67            46        10.75  
Buick                    9       2.10            55        12.85  
Cadillac                 8       1.87            63        14.72  
Chevrolet               27       6.31            90        21.03  
Chrysler                15       3.50           105        24.53  
Dodge                   13       3.04           118        27.57  
Ford                    23       5.37           141        32.94  
GMC                      8       1.87           149        34.81  
Honda                   17       3.97           166        38.79  
Hummer                   1       0.23           167        39.02  
Hyundai                 12       2.80           179        41.82  
Infiniti                 8       1.87           187        43.69  
Isuzu                    2       0.47           189        44.16  
Jaguar                  12       2.80           201        46.96  
Jeep                     3       0.70           204        47.66  
Kia                     11       2.57           215        50.23  
Land Rover               3       0.70           218        50.93  
Lexus                   11       2.57           229        53.50  
Lincoln                  9       2.10           238        55.61  
MINI                     2       0.47           240        56.07  
Mazda                   11       2.57           251        58.64  
Mercedes-Benz           26       6.07           277        64.72  
Mercury                  9       2.10           286        66.82  
Mitsubishi              13       3.04           299        69.86  
Nissan                  17       3.97           316        73.83  
Oldsmobile               3       0.70           319        74.53  
Pontiac                 11       2.57           330        77.10  
Porsche                  7       1.64           337        78.74  
Saab                     7       1.64           344        80.37  
Saturn                   8       1.87           352        82.24  
Scion                    2       0.47           354        82.71  
Subaru                  11       2.57           365        85.28  
Suzuki                   8       1.87           373        87.15  
Toyota                  28       6.54           401        93.69  
Volkswagen              15       3.50           416        97.20  
Volvo                   12       2.80           428       100.00  
&lt;/PRE&gt;
&lt;P&gt;and it looks the same when I paste it into the code as comment.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 14:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607354#M176532</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-26T14:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607358#M176535</link>
      <description>Ah, didn't know that. But I use SAS windows for my job. Just wondering if it's possible here.... not in EG...</description>
      <pubDate>Tue, 26 Nov 2019 14:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607358#M176535</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-11-26T14:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607364#M176541</link>
      <description>&lt;P&gt;Note that the listing output destination has not gone away in SAS, even when you are using Enterprise Guide or SAS/Studio as your programming interface.&amp;nbsp; It just might take more effort to generate and retrieve the results.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename results temp;
ods listing file=results  ;
options ls=80 ps=200;
proc freq data= sashelp.cars;	table make ; run;
ods listing close;

data _null_;
  infile results;
  input;
  put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;SAS 9.4 on WINDOWS                           08:48 Friday, November 22, 2019  75

The FREQ Procedure

                                          Cumulative    Cumulative
Make             Frequency     Percent     Frequency      Percent
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Acura                   7        1.64             7         1.64
Audi                   19        4.44            26         6.07
BMW                    20        4.67            46        10.75
Buick                   9        2.10            55        12.85
Cadillac                8        1.87            63        14.72
Chevrolet              27        6.31            90        21.03
Chrysler               15        3.50           105        24.53
Dodge                  13        3.04           118        27.57
Ford                   23        5.37           141        32.94
GMC                     8        1.87           149        34.81
Honda                  17        3.97           166        38.79
Hummer                  1        0.23           167        39.02
Hyundai                12        2.80           179        41.82
Infiniti                8        1.87           187        43.69
Isuzu                   2        0.47           189        44.16
Jaguar                 12        2.80           201        46.96
Jeep                    3        0.70           204        47.66
Kia                    11        2.57           215        50.23
Land Rover              3        0.70           218        50.93
Lexus                  11        2.57           229        53.50
Lincoln                 9        2.10           238        55.61
MINI                    2        0.47           240        56.07
Mazda                  11        2.57           251        58.64
Mercedes-Benz          26        6.07           277        64.72
Mercury                 9        2.10           286        66.82
Mitsubishi             13        3.04           299        69.86
Nissan                 17        3.97           316        73.83
Oldsmobile              3        0.70           319        74.53
Pontiac                11        2.57           330        77.10
Porsche                 7        1.64           337        78.74
Saab                    7        1.64           344        80.37
Saturn                  8        1.87           352        82.24
Scion                   2        0.47           354        82.71
Subaru                 11        2.57           365        85.28
Suzuki                  8        1.87           373        87.15
Toyota                 28        6.54           401        93.69
Volkswagen             15        3.50           416        97.20
Volvo                  12        2.80           428       100.00
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you just want data then dumping to the log is the easiest way to do go.&amp;nbsp; The display might not look exactly the same but is that really the point?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data= sashelp.cars;	table make /out=counts; run;

data _null_;
  set counts;
  put @1 make @20  count @30 percent;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Acura              7         1.6355140187
Audi               19        4.4392523364
BMW                20        4.6728971963
Buick              9         2.1028037383
Cadillac           8         1.8691588785
Chevrolet          27        6.308411215
Chrysler           15        3.5046728972
Dodge              13        3.0373831776
Ford               23        5.3738317757
GMC                8         1.8691588785
Honda              17        3.9719626168
Hummer             1         0.2336448598
Hyundai            12        2.8037383178
Infiniti           8         1.8691588785
Isuzu              2         0.4672897196
Jaguar             12        2.8037383178
Jeep               3         0.7009345794
Kia                11        2.5700934579
Land Rover         3         0.7009345794
Lexus              11        2.5700934579
Lincoln            9         2.1028037383
MINI               2         0.4672897196
Mazda              11        2.5700934579
Mercedes-Benz      26        6.0747663551
Mercury            9         2.1028037383
Mitsubishi         13        3.0373831776
Nissan             17        3.9719626168
Oldsmobile         3         0.7009345794
Pontiac            11        2.5700934579
Porsche            7         1.6355140187
Saab               7         1.6355140187
Saturn             8         1.8691588785
Scion              2         0.4672897196
Subaru             11        2.5700934579
Suzuki             8         1.8691588785
Toyota             28        6.5420560748
Volkswagen         15        3.5046728972
Volvo              12        2.8037383178
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607364#M176541</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-26T15:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607381#M176554</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your help. Both look good for me.&lt;BR /&gt;My point was: I run many PROCs (FREQ, MEANS, REPORT....) and I want to keep them in my comment section, as a part of SAS code file.&lt;BR /&gt;&lt;BR /&gt;This way I can better understand my code and set next time when I open my code without running my code again. This is actually the function I really like from Jupyter Notebook. So I wanted to mimic this in SAS!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607381#M176554</guid>
      <dc:creator>braam</dc:creator>
      <dc:date>2019-11-26T15:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Comment after PROC in a clean way?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607446#M176605</link>
      <description>Use a Jupyter Notebook with SAS then....</description>
      <pubDate>Tue, 26 Nov 2019 17:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comment-after-PROC-in-a-clean-way/m-p/607446#M176605</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-26T17:47:45Z</dc:date>
    </item>
  </channel>
</rss>

