<?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: how to create dataset with the data provided. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378555#M91001</link>
    <description>Thanks Bipasha, I know we can do it by importing it through excel but I was being asked to do this with infile cards only.</description>
    <pubDate>Sun, 23 Jul 2017 19:33:00 GMT</pubDate>
    <dc:creator>ab12nov</dc:creator>
    <dc:date>2017-07-23T19:33:00Z</dc:date>
    <item>
      <title>how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378542#M90990</link>
      <description>&lt;P&gt;Data Employee;&lt;BR /&gt;Input empno ename$ job$ Mgr hiredate sal comm deptno;&lt;BR /&gt;cards;&lt;/P&gt;&lt;PRE class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR"&gt;EMPNO  ENAME   JOB       MGR   HIREDATE   SAL   COMM  DEPTNO 
7369   SMITH   CLERK     7902  17-Dec-80  800          20 
7499   ALLEN   SALESMAN  7698  20-Feb-81  1600   300   30 
7521   WARD    SALESMAN  7698  22-Feb-81  1250   500   30 
7566  JONES    MANAGER   7839  02-Apr-81  2975         20 
7654  MARTIN   SALESMAN  7698  28-Sep-81  1250  1400   30 
7698  BLAKE    MANAGER   7839  01-May-81  2850         30
7782  CLARK    MANAGER   7839  09-Jun-81  2450         10 
7788  SCOTT    ANALYST   7566  19-Apr-87  3000         20 
7839  KING     PRESIDENT null  17-Nov-81  5000         10 
7844  TURNER   SALESMAN  7698  08-Sep-81  1500  0      30
7876  ADAMS    CLERK     7788  23-May-87  1100         20 
7900  JAMES    CLERK     7698  03-Dec-81  950          30 
7902  FORD     ANALYST   7566  03-Dec-81  3000         20 
7934  MILLER   CLERK     7782  23-Jan-82  1300         10 &lt;/PRE&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Tried everything but unable to create proper dataset having blank spaces in "&lt;SPAN&gt;comm" variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me with the SAS program&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ayushmaan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 17:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378542#M90990</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-23T17:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378543#M90991</link>
      <description>You can create a excel file with the given data and then import the excel in sas using proc import or ui tools if available.</description>
      <pubDate>Sun, 23 Jul 2017 17:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378543#M90991</guid>
      <dc:creator>Bipasha</dc:creator>
      <dc:date>2017-07-23T17:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378545#M90993</link>
      <description>&lt;P&gt;You need to use column input&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148066.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000148066.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 17:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378545#M90993</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-07-23T17:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378548#M90994</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/155414"&gt;@ab12nov&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tried everything but unable to create proper dataset having blank spaces in "&lt;SPAN&gt;comm" variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please help me with the SAS program&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you show what you've tried we can help point out what you need to change instead of doing your assignment.&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>Sun, 23 Jul 2017 18:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378548#M90994</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-23T18:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378552#M90998</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry if it looked as if I'm giving you an assignment or so... please find the below code and output dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Employee;&lt;BR /&gt;infile cards missover;&lt;BR /&gt;retain empno ename job Mgr hiredate sal comm deptno;&lt;BR /&gt;Input empno ename$ job$ Mgr hiredate sal comm deptno;&lt;BR /&gt;hiredate = compress(hiredate,'-');&lt;BR /&gt;informat hiredate DATE9.;&lt;BR /&gt;cards;&lt;/P&gt;&lt;PRE class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR"&gt;7369   SMITH   CLERK     7902  17-Dec-80  800          20 
7499   ALLEN   SALESMAN  7698  20-Feb-81  1600   300   30 
7521   WARD    SALESMAN  7698  22-Feb-81  1250   500   30 
7566  JONES    MANAGER   7839  02-Apr-81  2975         20 
7654  MARTIN   SALESMAN  7698  28-Sep-81  1250  1400   30 
7698  BLAKE    MANAGER   7839  01-May-81  2850         30
7782  CLARK    MANAGER   7839  09-Jun-81  2450         10 
7788  SCOTT    ANALYST   7566  19-Apr-87  3000         20 
7839  KING     PRESIDENT null  17-Nov-81  5000         10 
7844  TURNER   SALESMAN  7698  08-Sep-81  1500  0      30
7876  ADAMS    CLERK     7788  23-May-87  1100         20 
7900  JAMES    CLERK     7698  03-Dec-81  950          30 
7902  FORD     ANALYST   7566  03-Dec-81  3000         20 
7934  MILLER   CLERK     7782  23-Jan-82  1300         10 &lt;/PRE&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OUTPUT is in the attachment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14130i8B5840A297E5B203/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="output.jpg" title="output.jpg" /&gt;</description>
      <pubDate>Sun, 23 Jul 2017 19:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378552#M90998</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-23T19:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378553#M90999</link>
      <description>even if I use column input method. the data is not in a proper indexes as in.&lt;BR /&gt;&lt;BR /&gt;please check line 3rd and 4th for column empno ename$, their indexes are different.</description>
      <pubDate>Sun, 23 Jul 2017 19:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378553#M90999</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-23T19:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378555#M91001</link>
      <description>Thanks Bipasha, I know we can do it by importing it through excel but I was being asked to do this with infile cards only.</description>
      <pubDate>Sun, 23 Jul 2017 19:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378555#M91001</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-23T19:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378556#M91002</link>
      <description>&lt;P&gt;I think this gives you what you need&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data Employee;
infile cards missover;
Input empno 1-4 ename $ 7-12 job $ 16-24 Mgr 26-29 chardate $ 32-40 sal 43-46 comm 49- 52 deptno 56-57;
format hiredate date9.;
hiredate = input(compress(chardate,'-'),date7.);
cards;
7369   SMITH   CLERK     7902  17-Dec-80  800          20 
7499   ALLEN   SALESMAN  7698  20-Feb-81  1600   300   30 
7521   WARD    SALESMAN  7698  22-Feb-81  1250   500   30 
7566  JONES    MANAGER   7839  02-Apr-81  2975         20 
7654  MARTIN   SALESMAN  7698  28-Sep-81  1250  1400   30 
7698  BLAKE    MANAGER   7839  01-May-81  2850         30
7782  CLARK    MANAGER   7839  09-Jun-81  2450         10 
7788  SCOTT    ANALYST   7566  19-Apr-87  3000         20 
7839  KING     PRESIDENT null  17-Nov-81  5000         10 
7844  TURNER   SALESMAN  7698  08-Sep-81  1500  0      30
7876  ADAMS    CLERK     7788  23-May-87  1100         20 
7900  JAMES    CLERK     7698  03-Dec-81  950          30 
7902  FORD     ANALYST   7566  03-Dec-81  3000         20 
7934  MILLER   CLERK     7782  23-Jan-82  1300         10 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jul 2017 21:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378556#M91002</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-07-23T21:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378557#M91003</link>
      <description>&lt;P&gt;On your input statement define the starting column of the comm field&amp;nbsp; like @49 comm 5.&amp;nbsp; .&lt;/P&gt;
&lt;P&gt;Thats because it does not have a '.'&amp;nbsp; to show the data is missing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Im not sure exactly what position comm starts in.&lt;/P&gt;
&lt;P&gt;also use the options Missing='&amp;nbsp; ';&amp;nbsp; you might have to define deptno also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 21:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378557#M91003</guid>
      <dc:creator>Jim_G</dc:creator>
      <dc:date>2017-07-23T21:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to create dataset with the data provided.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378562#M91008</link>
      <description>thanks a lot budd....!! really helped..</description>
      <pubDate>Sun, 23 Jul 2017 21:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-dataset-with-the-data-provided/m-p/378562#M91008</guid>
      <dc:creator>ab12nov</dc:creator>
      <dc:date>2017-07-23T21:51:06Z</dc:date>
    </item>
  </channel>
</rss>

