<?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: Transposing Data in DM Studio or Proc Import in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/308270#M8806</link>
    <description>&lt;P&gt;Ok, the code is below. If I could output all the sheets into one dataset and capture that semester/year data from one cell to populate into a new column....that would be a big help. I'm currently outputting each sheet as it's own dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname cbsch 'S:\path\;

%macro pim(sheet);

proc import out=sch

    datafile = 'S:\path\file.xlsx'
	 out = cbsch.CB_SCH_&amp;amp;sheet 
    dbms = Excel replace;
    sheet = "&amp;amp;sheet";
    mixed = yes;
    getnames = yes;

run;


%mend pim;

%pim(sffall2013);
%pim(sfspring2014);
%pim(sfsummer2014);
%pim(sfFY14);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2016 13:42:02 GMT</pubDate>
    <dc:creator>jwhite</dc:creator>
    <dc:date>2016-10-31T13:42:02Z</dc:date>
    <item>
      <title>Transposing Data in DM Studio or Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/307996#M8804</link>
      <description>&lt;P&gt;We're trying to incoroprate Data Management Studio into our process by cleaning up data before doing our transformations and such in DI Studio.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source data comes from Excel, and we use a user written code node in DI Studio to write a proc import statement to turn the excel spreadsheets into sas datasets. The output datasets look like attached image, but we want them to look as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; John&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fall 2013&lt;/P&gt;
&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Juan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fall 2013&lt;/P&gt;
&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Kara&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fall 2013&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my questions are...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Is there a way to do this in the proc import statement? Create a new column and provide the value for it?&lt;/P&gt;
&lt;P&gt;2) If not, can this be done in Dataflux - Data Management Studio?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The idea is that we convert the spreadsheets into sas datasets, Dataflux cleans the data, then DI Studio continues processing the clean datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can do the above in DI Studio (and probably the data standardization with lookup tables), but again we want to do cleaning and standardizing in Dataflux if possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are we going about this the wrong way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&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;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13087i87B3F7D1FD0D920B/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="sourcetb.PNG" title="sourcetb.PNG" /&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/307996#M8804</guid>
      <dc:creator>jwhite</dc:creator>
      <dc:date>2016-10-28T19:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Transposing Data in DM Studio or Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/308115#M8805</link>
      <description>&lt;P&gt;Please post your PROC IMPORT code. You should be able to get the desired output by using either the RANGE, STARTCOL, or STARTROW statements in your PROC IMPORT code. Check the following link to confirm what options are available for your type of Excel workbook:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acpcref/67382/HTML/default/viewer.htm#n0msy4hy1so0ren1acm90iijxn8j.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acpcref/67382/HTML/default/viewer.htm#n0msy4hy1so0ren1acm90iijxn8j.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2016 03:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/308115#M8805</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-10-30T03:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transposing Data in DM Studio or Proc Import</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/308270#M8806</link>
      <description>&lt;P&gt;Ok, the code is below. If I could output all the sheets into one dataset and capture that semester/year data from one cell to populate into a new column....that would be a big help. I'm currently outputting each sheet as it's own dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname cbsch 'S:\path\;

%macro pim(sheet);

proc import out=sch

    datafile = 'S:\path\file.xlsx'
	 out = cbsch.CB_SCH_&amp;amp;sheet 
    dbms = Excel replace;
    sheet = "&amp;amp;sheet";
    mixed = yes;
    getnames = yes;

run;


%mend pim;

%pim(sffall2013);
%pim(sfspring2014);
%pim(sfsummer2014);
%pim(sfFY14);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 13:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transposing-Data-in-DM-Studio-or-Proc-Import/m-p/308270#M8806</guid>
      <dc:creator>jwhite</dc:creator>
      <dc:date>2016-10-31T13:42:02Z</dc:date>
    </item>
  </channel>
</rss>

