<?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: Generate mock table in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/925506#M364212</link>
    <description>&lt;P&gt;Excellent!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 06:50:46 GMT</pubDate>
    <dc:creator>DrAbhijeetSafai</dc:creator>
    <dc:date>2024-04-24T06:50:46Z</dc:date>
    <item>
      <title>Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766528#M242935</link>
      <description>&lt;P&gt;Hi everyone, I just want to ask&amp;nbsp;how to generate mock table in SAS.&lt;/P&gt;&lt;P&gt;I just found this topic&amp;nbsp;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Mock-shell-table-in-SAS/m-p/371788" target="_blank"&gt;Solved: Mock shell table in SAS - SAS Support Communities&lt;/A&gt;&amp;nbsp;but the paper mentioned in there is about implying mock table&amp;nbsp;when the shells have already been designed manually (in RTF file)&lt;/P&gt;&lt;P&gt;So my question is that: how can I&amp;nbsp;generate a mock table&amp;nbsp; in SAS in the first place ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 09:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766528#M242935</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-08T09:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766532#M242938</link>
      <description>&lt;P&gt;Use a data step with a DATALINES block:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input string :$10. number date :yymmdd10.;
format date yymmdd10.;
datalines;
AAAAAAAAAA 12345 2021-08-31
BBBBBBBBB 567 2021-09-03
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I included the most common data types.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 09:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766532#M242938</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-09-08T09:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766551#M242945</link>
      <description>&lt;P&gt;You can mock a table using SAS code with DATALINES (also known as CARDS), or - if you'd like the ability to put your mocked table inside a macro - you can use INSERTS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whichever method you prefer, you can also generate the mocked data directly from an existing table.&amp;nbsp; The following macros may help:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://core.sasjs.io/mp__ds2inserts_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__ds2inserts_8sas.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://core.sasjs.io/mp__ds2cards_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__ds2cards_8sas.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://core.sasjs.io/mp__lib2cards_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__lib2cards_8sas.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://core.sasjs.io/mp__lib2inserts_8sas.html" target="_blank" rel="noopener"&gt;https://core.sasjs.io/mp__lib2inserts_8sas.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you are generating mocks as part of a test suite, you might also be interested in &lt;A href="https://cli.sasjs.io/test/" target="_self"&gt;sasjs test&lt;/A&gt; - a commandline approach for testing Jobs, Services and Macros in both SAS 9 and Viya.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 11:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766551#M242945</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-09-08T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766562#M242951</link>
      <description>&lt;P&gt;"Table" has multiple meanings.&amp;nbsp; Do you mean develop a mock table as as in mock SAS dataset?&amp;nbsp; Or do you mean mock table as in a "table shell" that would go into the outline for a report (word doc or whatever)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My thought for a report table shell would be to start by simulating a SAS dataset (either with CARDS to create data, or random number generators), and then running the usual reporting PROCS to generate the shell tables using ODS.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 12:44:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766562#M242951</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-09-08T12:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766578#M242958</link>
      <description>&lt;P&gt;I just want to create something like this.&lt;/P&gt;&lt;P&gt;Instead of real data, I want to just display xx.xx (for example) for demographic table, AE table, lab shift table,...&lt;/P&gt;&lt;P&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="James_Yu_0-1631109526951.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63384iC1DB19DBCA6D88B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="James_Yu_0-1631109526951.png" alt="James_Yu_0-1631109526951.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 14:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766578#M242958</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-08T14:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766588#M242963</link>
      <description>&lt;P&gt;I would suggest simulating some data, then using your normal code to produce the table from the simulated data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that is done, I would try using formats that will format all values a "X" or "X.X%" or similar.&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>Wed, 08 Sep 2021 14:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766588#M242963</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-09-08T14:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766597#M242969</link>
      <description>Do you have any idea of code to do that ?&lt;BR /&gt;I can use Proc report to output dataset in the form of my report but the data cells are already in character format like 20 (15.5%) for example.&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Sep 2021 14:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766597#M242969</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-09-08T14:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766601#M242972</link>
      <description>&lt;P&gt;If you already have a&amp;nbsp; PROC REPORT step which can make the table from a simulated data (or even real data), you can use PROC format to create a format which displays all the values as "XX", and then use that format in your PROC REPORT to mask the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format ;
  value X other='XX' ;
  value $X other='XXX' ;
run ;
proc report data=sashelp.class ;
  format _numeric_ x. _character_ $x.;
run ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Sep 2021 14:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766601#M242972</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-09-08T14:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766603#M242974</link>
      <description>&lt;P&gt;What do you consider a TABLE?&lt;/P&gt;
&lt;P&gt;From the body of you message you mean a table (or figure) included in your analysis report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If instead you meant a DATASET (what a lot of SQL terminology call a TABLE) then you are talking about something different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general for a mock report table structure you probably need a combination of datasets.&amp;nbsp; One might be a mock set of sample data.&amp;nbsp; And another might be a mock set of metadata to describe how the printed table should look.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might even want to have a step that generates the sample data based on the metadata.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your metadata might include titles, footnotes, number of treatment groups and other parameters that will impact how the tables will look.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 15:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/766603#M242974</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-08T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generate mock table in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/925506#M364212</link>
      <description>&lt;P&gt;Excellent!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 06:50:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generate-mock-table-in-SAS/m-p/925506#M364212</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-04-24T06:50:46Z</dc:date>
    </item>
  </channel>
</rss>

