<?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>All SAS Data Management posts</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/bd-p/data_management</link>
    <description>All SAS Data Management posts</description>
    <pubDate>Tue, 11 Aug 2020 21:30:17 GMT</pubDate>
    <dc:creator>data_management</dc:creator>
    <dc:date>2020-08-11T21:30:17Z</dc:date>
    <item>
      <title>Re: Merging rows based on date and location</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675986#M19481</link>
      <description>That almost worked perfectly. Tripped up on the blank end dates. Figured out a work around though of setting the blank end dates as 01/01/2099 so it pulled as the max end date and then changed those dates back to blank for the final output. Thank you!</description>
      <pubDate>Tue, 11 Aug 2020 19:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675986#M19481</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2020-08-11T19:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rows based on date and location</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675974#M19480</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select fullname. min(start) as start format=date9.,max(end) as end format=date9.,
location
from your_table
group by location,fullname;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 18:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675974#M19480</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-08-11T18:38:05Z</dc:date>
    </item>
    <item>
      <title>Merging rows based on date and location</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675973#M19479</link>
      <description>&lt;P&gt;Trying to merge rows in which an individual was at the same location but has multiple date ranges resulting in multiple rows. Want to have one row per location with the first start date and last end date. Having a blank end date means they are still at that location and that would need to be kept.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't even know where to start with this merge. Open to DATA and PROC SQL steps. This data has approximately 500 rows currently for approximately 60 individuals. The reason the data populates like this is because there are separate bed assignments for each row, that level of data is not needed for this output, just location and the dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What my data currently looks like:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FULLNAME&lt;/TD&gt;&lt;TD&gt;START&lt;/TD&gt;&lt;TD&gt;END&lt;/TD&gt;&lt;TD&gt;LOCATION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SMITH, JOHN&lt;/TD&gt;&lt;TD&gt;14Sep2010&lt;/TD&gt;&lt;TD&gt;15Sep2010&lt;/TD&gt;&lt;TD&gt;CEDAR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SMITH, JOHN&lt;/TD&gt;&lt;TD&gt;15Sep2010&lt;/TD&gt;&lt;TD&gt;28Sep2010&lt;/TD&gt;&lt;TD&gt;CEDAR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SMITH, JOHN&lt;/TD&gt;&lt;TD&gt;28Sep2010&lt;/TD&gt;&lt;TD&gt;27Oct2010&lt;/TD&gt;&lt;TD&gt;CEDAR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SMITH, JOHN&lt;/TD&gt;&lt;TD&gt;28Oct2010&lt;/TD&gt;&lt;TD&gt;20Apr2011&lt;/TD&gt;&lt;TD&gt;OAK&lt;/TD&gt;&lt;/TR&gt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;/TD&gt;&lt;TD&gt;22May2017&lt;/TD&gt;&lt;TD&gt;MAPLE-B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JOHNSON, ROBERT&lt;/TD&gt;&lt;TD&gt;22May2017&lt;/TD&gt;&lt;TD&gt;02Aug2017&lt;/TD&gt;&lt;TD&gt;WILLOW&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JOHNSON, ROBERT&lt;/TD&gt;&lt;TD&gt;02Aug2017&lt;/TD&gt;&lt;TD&gt;07Aug2017&lt;/TD&gt;&lt;TD&gt;MAPLE-C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 11 Aug 2020 18:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Merging-rows-based-on-date-and-location/m-p/675973#M19479</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2020-08-11T18:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio Impact Analysis View in table format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675180#M19478</link>
      <description>Hi Allan,&lt;BR /&gt;Thanks a lot for your response. We do not have the Data Lineage exploration available to us. So that is why we are probably trying to get it done with code or some combination of Code plus VA exploration.</description>
      <pubDate>Fri, 07 Aug 2020 05:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675180#M19478</guid>
      <dc:creator>mohd-danshaik</dc:creator>
      <dc:date>2020-08-07T05:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio Impact Analysis View in table format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675179#M19477</link>
      <description>Hi Rama_V,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your inputs. This could be really helpful. I had thought of a similar way of extracting meta info and then representing them in SAS VA.&lt;BR /&gt;Will implement the same and keep you posted if it works</description>
      <pubDate>Fri, 07 Aug 2020 05:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675179#M19477</guid>
      <dc:creator>mohd-danshaik</dc:creator>
      <dc:date>2020-08-07T05:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio Impact Analysis View in table format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675174#M19476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have done something similar work in the past and presented the results on SAS VA. I have parts of solution you need stitch together to make it make work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Job List from Metadata.sas&lt;/STRONG&gt; - List all the jobs stored on SAS metadata created using DI Studio.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Job Source and Target Table.sas&lt;/STRONG&gt; - List the tables used as source and Target table. You need to send dynamically the job uri from job list and get the data for every job. Also need modification to add Source and Target URI. Refer Base SAS and Metadata browser to understand the structure.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Table column inforamation.sas -&amp;nbsp;&lt;/STRONG&gt;This will give column information for all the tables on Metadata, so you need to control using Table URI from above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Integrate all the data and present using any reporting tool. Can use exploration on VA to present impact analysis for lineage?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Rama&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 02:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/675174#M19476</guid>
      <dc:creator>Rama_V</dc:creator>
      <dc:date>2020-08-07T02:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675073#M19475</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;LI-USER uid="205036"&gt;&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;IF INDEX(UPCASE(var1), "OPANA" &amp;gt;0 or INDEX(UPCASE(var2), "OPANA")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var3), "OPANA")&amp;gt;0 or INDEX(UPCASE(var4), "OPANA")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var5), "OPANA")&amp;gt;0 or INDEX(UPCASE(var6), "OPANA")&amp;gt;0&lt;BR /&gt;THEN OPI_6=1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF INDEX(UPCASE(var1), "CODEINE" &amp;gt;0 or INDEX(UPCASE(var2), "CODEINE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var3), "CODEINE")&amp;gt;0 or INDEX(UPCASE(var4), "CODEINE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var5), "CODEINE")&amp;gt;0 or INDEX(UPCASE(var6), "CODEINE")&amp;gt;0&lt;BR /&gt;THEN OPI_16=1;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We also need to see the LOG, as I described above.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 17:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675073#M19475</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-06T17:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675072#M19474</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;

   array v Var1-var6;

*make this big enough to hold all values;
length str $500.;
str = upcase(catx('-', of v(*)));

   opi3 = index(str, 'METHADONE')&amp;gt;0;
   opi6 = index(str, 'OPANA')&amp;gt;0;
   opi16 = index(str, 'CODIENE')&amp;gt;0;


run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, if you have DINs there's drug listing DBs that you can use to link your drugs and they're categorized by categories, one of which is opioids. We're currently building out our PDMP so we're using the DB as it's constantly updated in our process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The approach above concatenates all the values into one string, separated by a hypen (-), and searches that string. Then you need a single line of code to search that new string and create your flags. You COULD design a loop that goes over your diagnosis to make this&amp;nbsp; more efficient if you have a ton of diagnosis.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 17:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675072#M19474</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-06T17:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675064#M19473</link>
      <description>&lt;P&gt;If you are going to do such code frequently I suggest that you go ahead and make the case standard, either all lower or all upper so you can eliminate multiple Upcase(SSSS) the make code more readable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And there are nicer ways to search for the same value among a bunch of variables:&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   array v Var1-var6;
   /* assumes all of the variables have been&lt;BR /&gt;      UPCASED prior&lt;BR /&gt;   */
   opi3 = ( whichc('METHADONE', of v(*))&amp;gt;0);
run;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The WHICHC, and numeric WHICHN functions return the position number that the first parameter, in this case the word METHADONE appears in a list of variables, using an array for short hand instead of listing var1, var2, var3, var4,var5, var6. If a value match is found the function will return the position in that list, i.e. 3 would mean that VAR3 matched, or zero otherwise. The surrounding ( &amp;gt;0) means the variable is&amp;nbsp; assigned a comparison true/false result which is 1/0 numeric by default with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fewer parentheses, fewer quotes, fewer commas and fewer OR mean that you are much less likely to miss one of them.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 16:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675064#M19473</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-06T16:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675060#M19472</link>
      <description>&lt;P&gt;IF INDEX(UPCASE(var1), "OPANA" &amp;gt;0 or INDEX(UPCASE(var2), "OPANA")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var3), "OPANA")&amp;gt;0 or INDEX(UPCASE(var4), "OPANA")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var5), "OPANA")&amp;gt;0 or INDEX(UPCASE(var6), "OPANA")&amp;gt;0&lt;BR /&gt;THEN OPI_6=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF INDEX(UPCASE(var1), "CODEINE" &amp;gt;0 or INDEX(UPCASE(var2), "CODEINE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var3), "CODEINE")&amp;gt;0 or INDEX(UPCASE(var4), "CODEINE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var5), "CODEINE")&amp;gt;0 or INDEX(UPCASE(var6), "CODEINE")&amp;gt;0&lt;BR /&gt;THEN OPI_16=1;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 16:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675060#M19472</guid>
      <dc:creator>DanielQuay</dc:creator>
      <dc:date>2020-08-06T16:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675055#M19471</link>
      <description>&lt;P&gt;Show us the log for this DATA step. We need to see everything in the log, code, NOTEs, WARNINGs, and ERRORs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to preserve the formatting of the log by copying it as text and pasting it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. DO NOT SKIP THIS STEP!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 16:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675055#M19471</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-06T16:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675053#M19470</link>
      <description>Show the code that doesn't work. Showing working code doesn't help us isolate the issue, you likely forgot a quote, comma or bracket so pay attention to exactly where the error is indicated, SAS provides the line and column number for you to find it easily.</description>
      <pubDate>Thu, 06 Aug 2020 16:16:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675053#M19470</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-06T16:16:17Z</dc:date>
    </item>
    <item>
      <title>ERROR ##-###: The INDEX function call has too many arguments.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675045#M19469</link>
      <description>&lt;P&gt;I am working with data trying to identify opioid useage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;IF INDEX(UPCASE(var1), "METHADONE")&amp;gt;0 or INDEX(UPCASE(var2), "METHADONE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var3), "METHADONE")&amp;gt;0 or INDEX(UPCASE(var4), "METHADONE")&amp;gt;0 or&lt;BR /&gt;INDEX(UPCASE(var5&lt;SPAN style="font-family: inherit;"&gt;), "METHADONE")&amp;gt;0 or INDEX(UPCASE(var6), "METHADONE")&amp;gt;0&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;THEN OPI_3=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works for 14 of the 16 substances I am looking for.&lt;/P&gt;&lt;P&gt;But when I am looking for OPANA and CODIENE it is popping up with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR ##-###: The INDEX function call has too many arguments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this may be something about how the data is formatted but I haven't had to use INDEX before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 16:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-The-INDEX-function-call-has-too-many-arguments/m-p/675045#M19469</guid>
      <dc:creator>DanielQuay</dc:creator>
      <dc:date>2020-08-06T16:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio Impact Analysis View in table format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/674748#M19468</link>
      <description>&lt;P&gt;You can extract this information using a recursive call to the metadata to explore the tree.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have some documentation on it here:&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.datacontroller.io/dcu-lineage/" target="_blank" rel="noopener"&gt;https://docs.datacontroller.io/dcu-lineage/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Advanced Data Lineage exploration is available at both table and column level in the SAS 9 version of&amp;nbsp;&lt;A href="https://datacontroller.io" target="_self"&gt;Data Controller.&lt;/A&gt;&amp;nbsp; You can export in PNG, SVG and CSV (table) formats.&amp;nbsp; The tool is compatible from 9.3 onwards.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-VIDEO vid="https://vimeo.com/424504424" align="center" size="small" width="200" height="125" uploading="false" thumbnail="https://i.vimeocdn.com/video/901507863_960.jpg" external="url"&gt;&lt;/LI-VIDEO&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Column level version (interface is slightly different as the video is from an earlier version of the product).&amp;nbsp; The CSV export is not shown but it's the same as the table-level one above, with additional columns for the..&amp;nbsp; columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-VIDEO vid="https://vimeo.com/383391622" align="center" size="small" width="200" height="169" uploading="false" thumbnail="https://i.vimeocdn.com/video/844814957_640.jpg" external="url"&gt;&lt;/LI-VIDEO&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A free version is available and we'd be happy to discuss - the contact form is here:&amp;nbsp; &lt;A href="https://sasapps.io" target="_blank" rel="noopener"&gt;https://sasapps.io&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 15:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/674748#M19468</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2020-08-05T15:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio Impact Analysis View in table format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/674668#M19467</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am also currently working on a case study where in I need to extract the impact analysis details for any given table in SAS DI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is pretty similar to the original question in this post but I would only want to check the data lineage for any given source table using SAS code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using SAS 9.4&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 08:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-Impact-Analysis-View-in-table-format/m-p/674668#M19467</guid>
      <dc:creator>mohd-danshaik</dc:creator>
      <dc:date>2020-08-05T08:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673768#M19466</link>
      <description>&lt;P&gt;Thanks RogerHed. The AGE should be Type = Numeric, length = 8 and the BMT should be Type = Character, Length = 1 in both datasets.Unfortunately, as a novice I searched the internet to learn how to do that but I was unsuccessful in finding the proper way to include that logic.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 15:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673768#M19466</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-07-31T15:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673764#M19465</link>
      <description>&lt;P&gt;Thanks all for your responses. The imported source document (excel), had a space between the heading "Discharge Date", that's why I wanted to do the rename. Instead I used a "_" between the two words and commented out the rename step, and it worked perfectly.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 15:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673764#M19465</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-07-31T15:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673727#M19464</link>
      <description>&lt;P&gt;It looks to me like your first step (the PROC SQL) would work, except for one thing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a number of uses of "Discharge Date", with a space between the two words. If this was a proper SAS variable, I think the code would work fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You say this is inherited code. As it is, there is no way this code will work. It looks to me like something happened to change a correct variable, possible "DischargeDate" or "Discharge_Date", to "Discharge Date". Has anything like that happened, and have any other changes been made?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're probably best leaving the later steps until the earlier problems get solved. Problems tend to cascade.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 14:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673727#M19464</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-31T14:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673654#M19463</link>
      <description>&lt;P&gt;Do not type code and logs manually; just copy/paste the text&amp;nbsp;&lt;EM&gt;as is&lt;/EM&gt; into the appropriate codeboxes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What immediately catches my attention is the fact that there seem to be blanks in variable names. This is not correct syntax.&lt;/P&gt;
&lt;P&gt;If you actually have blanks in variable names, you need to use so-called "name literals":&lt;/P&gt;
&lt;PRE&gt;"Discharge Date"n&lt;/PRE&gt;
&lt;P&gt;The spelling must be correct with regards to upper/lowercase. It is STRONGLY recommended to avoid this, so rename those variables immediately to valid SAS names (use underlines in place of blanks).&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 10:17:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673654#M19463</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-31T10:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673645#M19462</link>
      <description>No sorry, the Rename is confusing "Discharge Date1= Discharge Date" &lt;BR /&gt;Column name must come in pairs like x=y z=q.&lt;BR /&gt;Do you want to rename Discharge to Date1?</description>
      <pubDate>Fri, 31 Jul 2020 09:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673645#M19462</guid>
      <dc:creator>RogerHed</dc:creator>
      <dc:date>2020-07-31T09:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673642#M19461</link>
      <description>&lt;P&gt;The Sql:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In the Rename there is a Date=, remove the "=".&lt;/LI&gt;
&lt;LI&gt;The Format "Date,5." I suppose is meant to be "date5.".&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The Data step:&lt;/P&gt;
&lt;P&gt;You have to decide if what type AGE and&amp;nbsp;BMT must be if the two datasets are to be appended. A couple of choices:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I they mean the same thing, change into numeric or character in both datasets before appending. You can use a SQL View to do that before the datastep on the input ataset you want to alter into the append Data step.&lt;/LI&gt;
&lt;LI&gt;If they mean different and are to be kept separate in the appended output, add a rename on one of the input datasets.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 31 Jul 2020 09:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673642#M19461</guid>
      <dc:creator>RogerHed</dc:creator>
      <dc:date>2020-07-31T09:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673628#M19460</link>
      <description>&lt;P&gt;My apologies, this did not present the way I typed it so I am going to attach the code and errors in a word document&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 06:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673628#M19460</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-07-31T06:51:05Z</dc:date>
    </item>
    <item>
      <title>How do I clear these errors?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673626#M19459</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Hello all&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I have inherited SAS code that has approx. 20 steps and the code had errors throughout. I have been successful in cleaning it up until the last two steps. This is the code for the first one&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
CREATE TABLE WORK.AllClaims1 (DROP= Discharge Date Rename= (Discharge Date1= Discharge Date)) AS 
SELECT *
 ,INPUT(Discharge Date,5.) - 21916 AS Discharge Date1 FORMAT= mmddyy10.
FROM WORK.AllClaims
;QUIT;&lt;BR /&gt;&lt;BR /&gt;This is the error message I get:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;22&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;76&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/FONT&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The is the code for the other step&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA AllClaims_Updated;
SET hphc_EOL_FY20 WORK.AllClaims;
RUN;&lt;BR /&gt;&lt;BR /&gt;This&amp;nbsp;the&amp;nbsp;error&amp;nbsp;message&amp;nbsp;that&amp;nbsp;I&amp;nbsp;get:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;ERROR: Variable Age has been defined as both character and numeric.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;ERROR: Variable BMT has been defined as both character and numeric.&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;These are the two columns that are effected and their types.&lt;BR /&gt;&lt;BR /&gt;work.EOL_COHORT Age = Type Numeric, Length 8&lt;BR /&gt;BHM = Type Character, Length Character 1&lt;BR /&gt;&lt;BR /&gt;AllCohorts1 Age = Type Character, Length Character 1&lt;BR /&gt;BHM = Type Numeric, Length 8&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Any assistance with these would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 06:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-clear-these-errors/m-p/673626#M19459</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-07-31T06:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: sum one column and group by two others</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/sum-one-column-and-group-by-two-others/m-p/673587#M19458</link>
      <description>&lt;P&gt;Look at the WEIGHT or FREQ statement within the PROC instead - and double check your numbers, especially if you have any missing values or non integers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;LI-USER uid="339812"&gt;&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a big dataset with 3 values that are of interest. &lt;STRONG&gt;ID&lt;/STRONG&gt;, &lt;STRONG&gt;Visite&lt;/STRONG&gt; and &lt;STRONG&gt;WSL_Flaechen&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;Visite ranges from 1 to 5 and WSL_Flaechen from 1 to 2.&lt;/P&gt;
&lt;P&gt;With the following code i managed to group by Visite and count the WSL_Flaechen for each ID.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asdf2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47814i4E3C9F427DC8C822/image-size/medium?v=1.0&amp;amp;px=400" title="asdf2.png" alt="asdf2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asdf.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47815i9E22990280244C25/image-size/medium?v=1.0&amp;amp;px=400" title="asdf.png" alt="asdf.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But instead i want count of WSL_Flaechen (blue arrow) to be multiplied with the value of WSL_Flaechen (red arrow) and display the sum of that for each ID.&lt;/P&gt;
&lt;P&gt;So ID 4001 has&lt;/P&gt;
&lt;P&gt;(1*8 + 2*12) = 32 on Visite 1 and&lt;/P&gt;
&lt;P&gt;2 + 20 = 22 on Visite 2&lt;/P&gt;
&lt;P&gt;and 26 on Visite 3&lt;/P&gt;
&lt;P&gt;and so on...&lt;/P&gt;
&lt;P&gt;The dataset only has 1s and 2s and the WSL_Flaechen field and i cant seem to just sum them up. I only display the count of 1s and 2s in seperate fields. How to i properly use the sum function here?&lt;/P&gt;
&lt;P&gt;When i try to get sum in there i get the "statistical variable other than N without analysis variable" error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Keets&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 22:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/sum-one-column-and-group-by-two-others/m-p/673587#M19458</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-30T22:56:22Z</dc:date>
    </item>
    <item>
      <title>sum one column and group by two others</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/sum-one-column-and-group-by-two-others/m-p/673584#M19457</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a big dataset with 3 values that are of interest. &lt;STRONG&gt;ID&lt;/STRONG&gt;, &lt;STRONG&gt;Visite&lt;/STRONG&gt; and &lt;STRONG&gt;WSL_Flaechen&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Visite ranges from 1 to 5 and WSL_Flaechen from 1 to 2.&lt;/P&gt;&lt;P&gt;With the following code i managed to group by Visite and count the WSL_Flaechen for each ID.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asdf2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47814i4E3C9F427DC8C822/image-size/medium?v=1.0&amp;amp;px=400" title="asdf2.png" alt="asdf2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asdf.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47815i9E22990280244C25/image-size/medium?v=1.0&amp;amp;px=400" title="asdf.png" alt="asdf.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But instead i want count of WSL_Flaechen (blue arrow) to be multiplied with the value of WSL_Flaechen (red arrow) and display the sum of that for each ID.&lt;/P&gt;&lt;P&gt;So ID 4001 has&lt;/P&gt;&lt;P&gt;(1*8 + 2*12) = 32 on Visite 1 and&lt;/P&gt;&lt;P&gt;2 + 20 = 22 on Visite 2&lt;/P&gt;&lt;P&gt;and 26 on Visite 3&lt;/P&gt;&lt;P&gt;and so on...&lt;/P&gt;&lt;P&gt;The dataset only has 1s and 2s and the WSL_Flaechen field and i cant seem to just sum them up. I only display the count of 1s and 2s in seperate fields. How to i properly use the sum function here?&lt;/P&gt;&lt;P&gt;When i try to get sum in there i get the "statistical variable other than N without analysis variable" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Keets&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 22:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/sum-one-column-and-group-by-two-others/m-p/673584#M19457</guid>
      <dc:creator>Keets</dc:creator>
      <dc:date>2020-07-30T22:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673304#M19456</link>
      <description>Hello Ballard, I have updated my example code as per your instructions.</description>
      <pubDate>Wed, 29 Jul 2020 20:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673304#M19456</guid>
      <dc:creator>r4321</dc:creator>
      <dc:date>2020-07-29T20:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673170#M19455</link>
      <description>&lt;P&gt;SAS DI is meant to be a managed environment for running production jobs. If you're having storage issues, you should discuss it with your SAS administrators to ensure changes are made to the environment to prevent these problems from happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673170#M19455</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-29T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673152#M19454</link>
      <description>&lt;P&gt;You need to set UTILLOC in the sasv9_usermods.cfg file of the server context that DI uses (e.g. in the SASApp directory, not in SASApp/WorkspaceServer).&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 14:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673152#M19454</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-29T14:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673085#M19453</link>
      <description>&lt;P&gt;The default setting for the WORK library on Linux is /tmp. You can double check that setting by running the following statement in Code Editor from within SAS Data Integration Studio. Tools --&amp;gt; Code Editor&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(pathname(work));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result will be placed in the log tab.&lt;/P&gt;
&lt;P&gt;To get around this issue, there are few options&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Ask your SAS Administrator to redirect/change the -WORK setting to point to a different more sizable directory/file-system, by modifying the &amp;lt;SASHome&amp;gt;/SASFoundation/9.4/sasv9_local.cfg file&lt;/LI&gt;
&lt;LI&gt;Create your own custom sasv9.cfg file and save it in your own $HOME directory on the Linux Compute Server(s)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Ahmed&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 11:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673085#M19453</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2020-07-29T11:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673067#M19452</link>
      <description>&lt;P&gt;Other approach would be to change the&amp;nbsp;UTILLOC= System Option, see:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lesysoptsref&amp;amp;docsetTarget=p1texr4rxo0ipyn1ovajj11raccx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=lesysoptsref&amp;amp;docsetTarget=p1texr4rxo0ipyn1ovajj11raccx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it is&amp;nbsp;Configuration file/SAS invocation option so&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-you will need admin help if you work with EG or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-if you could work with command line interface you could do it yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673067#M19452</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-07-29T09:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673066#M19451</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we perform this in SAS DI. By default Sort and join operation area is /tmp, and I want it to change to any other directory location.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673066#M19451</guid>
      <dc:creator>shrikantpwc</dc:creator>
      <dc:date>2020-07-29T09:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: /tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673065#M19450</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you could use the USER library idea:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname USER ("%sysfunc(pathname(work))" "/temp/");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It allow you to write codes like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data OUTPUT;
  set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and the OUTPUT dataset will be stored in the USER library, so you don't have to change your code to much if you' were using "single name dataset"(i.e. without work. before dataset name)&amp;nbsp; to store data in WORK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you have to remember that &lt;STRONG&gt;you have to clean USER up yourself&lt;/STRONG&gt; after SAS session ends.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673065#M19450</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-07-29T09:20:18Z</dc:date>
    </item>
    <item>
      <title>/tmp Storage used for joining and sorting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673064#M19449</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Few of my jobs are getting failed due to insufficient storage, my work file location having sufficient space. /tmp/ getting utilised by job for sorting and joining.&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question is can we change the location of this sorting and joining location permentalty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;-shrikant Suvarnkar&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/tmp-Storage-used-for-joining-and-sorting/m-p/673064#M19449</guid>
      <dc:creator>shrikantpwc</dc:creator>
      <dc:date>2020-07-29T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673061#M19448</link>
      <description>&lt;P&gt;First, neither of those data step will run as posted. Datalines ONLY has the values. If you copy either of those to your editor and run the code you should get some errors. Pleases fix them. Datalines blocks end with a ;&lt;/P&gt;
&lt;P&gt;And you should not have blank rows inside a datalines block either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And did you understand at all what I said about grouping order? I can't follow your logic with the out of state order results of your example.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673061#M19448</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-29T09:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673045#M19447</link>
      <description>Anyone have some suggestions? Thanks!</description>
      <pubDate>Wed, 29 Jul 2020 06:18:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/673045#M19447</guid>
      <dc:creator>r4321</dc:creator>
      <dc:date>2020-07-29T06:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio adds support for a Git plug-in</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-adds-support-for-a-Git-plug-in/m-p/672962#M19446</link>
      <description>&lt;P&gt;Hi Anna and Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to configure the Git Plug-in to do not commit on branch master automatically but to redirect to a specific branch ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an additional doc&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 20:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-adds-support-for-a-Git-plug-in/m-p/672962#M19446</guid>
      <dc:creator>BilaTheLegend</dc:creator>
      <dc:date>2020-07-28T20:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672605#M19445</link>
      <description>&lt;PRE&gt;data have;
input time Bucketcode State $ Count;
datalines; 
101 222 OH 3
102 222 OH 4
103 222 OH 4
103 333 OH 1
104 333 OH 1
101 111 TX 2
102 111 TX 1
103 111 TX 1
104 111 TX 2
101 222 VA 1
102 222 VA 2
103 222 VA 2
104 222 VA 4
104 444 VA 2
;

data want;
input Time Bucketcode State $ Countdiff;
datalines;
102 222 OH 1
103 222 OH 0
103 333 OH 1
104 222 OH -4
104 333 OH 0
102 111 TX -1
103 111 TX 0
104 111 TX 1
102 222 VA 1
103 222 VA 0
104 222 VA 2
104 444 VA 2
;&lt;/PRE&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;Hello Ballard, yes, it is fine that the first state bucketcode is dropped as long as it&amp;nbsp; appears in that first time period (i.e., 101). Appearances/disappearances of bucketcodes&amp;nbsp;in subsequent time periods should be treated differently. If a new bucketcode appears in&amp;nbsp;a time period (eg., 102) (that isn't the first) then that should be reflected in the&amp;nbsp;changescore differential for that bucketcode/state/timeperiod triplet with whatever&amp;nbsp;the addition in count was, eg., 1. If a bucket that was there in a time period disappears in a subsequent period (was there in 102, but not in a state-time-bucketcode triplet in&amp;nbsp;the next period, eg., 103) then the state-time-bucketcode triplet should reflect whatever&amp;nbsp;the drop in value is/was for that subsequent period. For example, VA-104-333 has a count of&amp;nbsp;2, but VA-105-333 is not there then VA-105-333 would be -2. Thank you again for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 04:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672605#M19445</guid>
      <dc:creator>r4321</dc:creator>
      <dc:date>2020-07-30T04:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672476#M19444</link>
      <description>&lt;P&gt;So do you want the first state buckcode dropped or not I followed your original example which did so because that appeared to be the requirement. But if that is not a requirement and likely shouldn't then say so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please in some detail describe exactly what you wantto have happen with a bucketcode that disappears per "Conversely, a bucketcode that was there in OH during time period 103 might exit that state and not be there in time period 104. In both cases, the appearance / disappearances need to be marked in the change variable (e.g., +1, -4, etc.; see example)."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I am not going to spend a lot time trying to make that verbiage match your data because the order you are displaying things gives me a headache. If you want to have things by "groups", then display them by groups. Then we don't have to try to hop around a bad order to tell when something may need to be inserted that wasn't there previously (which may be what I think you are requesting).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And Please provide the data in the form of a data step. I have shown you how to do that. And post the code in a code box opened with the&amp;nbsp; &amp;lt;/&amp;gt; icon.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 09:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672476#M19444</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-29T09:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672465#M19443</link>
      <description>Ballard, thank you for your quick reply. Your comment and code brought some things to my attention that I hadn't considered. I updated the notes to reflect these realizations.&lt;BR /&gt;&lt;BR /&gt;Essentially, I do need the code to accomodate:&lt;BR /&gt;&lt;BR /&gt;(1) I need it to accommodate multiple bucketcodes per state per time period.&lt;BR /&gt;&lt;BR /&gt;(2) I need to account for the appearance / disappearance of bucketcodes within a state. For example, a new bucketcode might enter OH at time period 103 that wasnt previously there in the prior time period (102). Conversely, a bucketcode that was there in OH during time period 103 might exit that state and not be there in time period 104. In both cases, the appearance / disappearances need to be marked in the change variable (e.g., +1, -4, etc.; see example).&lt;BR /&gt;&lt;BR /&gt;(3) Dropping the first time period is fine, but after that if a bucketcode enters a state and time period, that wasn't previously there, it should be treated as entering the dataset.&lt;BR /&gt;&lt;BR /&gt;Thank you again</description>
      <pubDate>Mon, 27 Jul 2020 07:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672465#M19443</guid>
      <dc:creator>r4321</dc:creator>
      <dc:date>2020-07-27T07:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672376#M19442</link>
      <description>&lt;P&gt;This appears to do what is requested except for output order.&lt;/P&gt;
&lt;PRE&gt;data have;
input Time Bucketcode State $ Count;
datalines;
101  111  TX   2
101  222  VA   1
101  222  OH  3
102  111  TX   1
102  222  VA   2
102  222  OH  4
103  111  TX   1
103  222  VA   2
103  222  OH  4
104  111  TX   2
104  222  VA   4
104  222  OH  1
;

proc sort data=have;
   by state bucketcode time;
run;

data want;
   set have;
   by state bucketcode ;
   Countdif =dif(count);
   if not first.bucketcode;
run;

proc sort data=want;
   by time bucketcode state;
run;
&lt;/PRE&gt;
&lt;P&gt;I have used a different variable to hold the count difference for demonstration.&lt;/P&gt;
&lt;P&gt;However, since you don't show any example data where a state has multiple bucketcodes no promises about more complex data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The DIF function used is the difference between the current row's value of a variable and the previous row's value. Normally I would set the value for the first record of a group such as state&lt;/P&gt;
&lt;P&gt;to missing but since you apparently are dropping the first record that isn't needed here.&lt;/P&gt;
&lt;P&gt;If the final order is important you need to describe that as a requirement.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2020 06:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672376#M19442</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-26T06:43:04Z</dc:date>
    </item>
    <item>
      <title>Computing the change in values across time and state</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672375#M19441</link>
      <description>&lt;P&gt;Updated (7-27-20)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could use your help figuring out some code. I have different 'buckets' that take on different values depending on the time, bucketcode, and state, and I am trying to compute the change in values (count) across time and state. Please see an illustration of my data below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A couple new notes:&lt;/P&gt;&lt;P&gt;(1) I need it to accommodate multiple bucketcodes per state per time period.&lt;/P&gt;&lt;P&gt;(2)&amp;nbsp;I need to account for the appearance / disappearance of bucketcodes within a state. For example, a new bucketcode might enter OH at time period 103 that wasnt previously there in the prior time period (102). &lt;SPAN&gt;If a new bucketcode appears in&amp;nbsp;a time period (eg., 102) (that isn't the first) then that should be reflected in the&amp;nbsp;changescore differential for that bucketcode/state/timeperiod triplet with whatever&amp;nbsp;the addition in count was, eg., 1. If a bucket that was there in a time period disappears in a subsequent period (was there in 102, but not in a state-time-bucketcode triplet in&amp;nbsp;the next period, eg., 103) then the state-time-bucketcode triplet should reflect whatever&amp;nbsp;the drop in value is/was for that subsequent period. For example, VA-104-333 has a count of&amp;nbsp;2, but if VA-105-333 is not there then VA-105-333 would be -2.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(3) Dropping the first time period is fine, but after that if a bucketcode enters a state and time period, that wasn't previously there, it should be treated as entering the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
input time Bucketcode State $ Count;
datalines; 
101 222 OH 3
102 222 OH 4
103 222 OH 4
103 333 OH 1
104 333 OH 1
101 111 TX 2
102 111 TX 1
103 111 TX 1
104 111 TX 2
101 222 VA 1
102 222 VA 2
103 222 VA 2
104 222 VA 4
104 444 VA 2
;

data want;
input Time Bucketcode State $ Countdiff;
datalines;
102 222 OH 1
103 222 OH 0
103 333 OH 1
104 222 OH -4
104 333 OH 0
102 111 TX -1
103 111 TX 0
104 111 TX 1
102 222 VA 1
103 222 VA 0
104 222 VA 2
104 444 VA 2
;


&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 04:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Computing-the-change-in-values-across-time-and-state/m-p/672375#M19441</guid>
      <dc:creator>r4321</dc:creator>
      <dc:date>2020-07-30T04:45:52Z</dc:date>
    </item>
    <item>
      <title>Selects which branch to use - SAS DATA INTEGRATION</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Selects-which-branch-to-use-SAS-DATA-INTEGRATION/m-p/671396#M19440</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have branch structures at GIT.&lt;/P&gt;&lt;P&gt;Is there a way to control how SAS DI selects which branch to use? At the moment, all checkins end at our main branch (branch master), instead of the individual resource branch the developer is working on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Kassia&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 14:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Selects-which-branch-to-use-SAS-DATA-INTEGRATION/m-p/671396#M19440</guid>
      <dc:creator>kassialua1</dc:creator>
      <dc:date>2020-07-22T14:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then use it for data manipulation?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670824#M19439</link>
      <description>&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge myfiles.dataset1 myfiles.dataset2 myfiles.dataset3 myfiles.dataset4;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by somevariablename; /* Optional */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 21:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670824#M19439</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-20T21:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then use it for data manipulation?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670821#M19438</link>
      <description>please bear with me, have less exposure to sas programming</description>
      <pubDate>Mon, 20 Jul 2020 21:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670821#M19438</guid>
      <dc:creator>jjoy4891</dc:creator>
      <dc:date>2020-07-20T21:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then use it for data manipulation?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670819#M19437</link>
      <description>thank you,&lt;BR /&gt;i did the above step, however, i can't merge these 4 datasets &amp;gt;</description>
      <pubDate>Mon, 20 Jul 2020 21:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670819#M19437</guid>
      <dc:creator>jjoy4891</dc:creator>
      <dc:date>2020-07-20T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import a sas7bdat file to SAS studio and then use it for data manipulation?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670815#M19436</link>
      <description>&lt;P&gt;You don't import the .sas7bdat files. Instead, you point SAS to the folder they are stored in by using a LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myfiles "/folders/myshortcuts/temp/temp";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jul 2020 20:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670815#M19436</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-20T20:56:47Z</dc:date>
    </item>
    <item>
      <title>How do I import a sas7bdat file to SAS studio and then use it for data manipulation?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670810#M19435</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 4 sas7bdat files , wanted to concatenate them for data manipulation . How can i import the same to sas university edition and perform concatenation ?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 20:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-do-I-import-a-sas7bdat-file-to-SAS-studio-and-then-use-it/m-p/670810#M19435</guid>
      <dc:creator>jjoy4891</dc:creator>
      <dc:date>2020-07-20T20:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669874#M19434</link>
      <description>&lt;P&gt;Merge Skill:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data WORK.CLASS(label='Habitat Data');
infile datalines;
input Origin:8. Destination:8. Distance:8. Len:8. Vol:8.;
datalines;
1001 999 11891 26.44 193.00
1005 1016 2422 7.03 8.42
1005 944 19437 16.84 74.17
1010 1012 42986 22.10 262.95
1010 988 48093 9.10 26.36
1012 1010 42986 10.66 472.81
1012 988 44204 9.10 26.36
1012 999 47478 26.44 193.00
1016 1005 2422 30.73 62.22
;;;;

data temp;
 set class;
 by origin;
 if first.origin then n=0;
 n+1;
run;
proc sql noprint nowarn;
select distinct catt('temp(where=(n=',n,') rename=(
Destination=Destination',n,' Distance=Distance',n,' Len=Len',n,' Vol=Vol',n,'))') 
into : merge separated by ' '
from temp;
quit;
data want;
 merge &amp;amp;merge;
 by Origin;
 drop n;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669874#M19434</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-07-16T13:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669632#M19433</link>
      <description>Thank you Art! I appreciate your time!</description>
      <pubDate>Wed, 15 Jul 2020 17:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669632#M19433</guid>
      <dc:creator>camper</dc:creator>
      <dc:date>2020-07-15T17:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669628#M19432</link>
      <description>Thank you for taking the time to send your ideas! I don't know how he's going to use this crazy table, and I agree, it is very awkward!</description>
      <pubDate>Wed, 15 Jul 2020 17:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669628#M19432</guid>
      <dc:creator>camper</dc:creator>
      <dc:date>2020-07-15T17:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669625#M19431</link>
      <description>WOW. This is AMAZING! I am so grateful. You make it look so easy - and I could never have figured this out. Thank you so very much!!</description>
      <pubDate>Wed, 15 Jul 2020 17:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669625#M19431</guid>
      <dc:creator>camper</dc:creator>
      <dc:date>2020-07-15T17:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669621#M19430</link>
      <description>This worked great - Thank you! Thanks for the amazingly FAST reply! and thank you for including the link to the paper.</description>
      <pubDate>Wed, 15 Jul 2020 17:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669621#M19430</guid>
      <dc:creator>camper</dc:creator>
      <dc:date>2020-07-15T17:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669588#M19429</link>
      <description>&lt;P&gt;I'd recommend the %transpose macro to get what you want. e.g.:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=class (rename=(Destination=Dest
                              Distance=Dist))
          out=need;
  by Origin Dist;
run;

filename tr url 'https://raw.githubusercontent.com/art297/transpose/master/transpose.sas';
%include tr ;

%transpose(data=need, out=want, by=Origin, Guessingrows=1000,
  var=Dest Dist Len Vol)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 17:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669588#M19429</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2020-07-15T17:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669586#M19428</link>
      <description>&lt;P&gt;A data step solution while possible involves some more work. The first thing is to find out the maximum number of records with the same Origin. Then use that value to create the array dimension that are needed.&lt;/P&gt;
&lt;P&gt;Then retain all of those.&lt;/P&gt;
&lt;P&gt;Then using by processing you can reset the retained values when the first origin is encountered and then write output only on the last origin for each.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: How is this data set to be used? The desired output is a moderately awkward structure to do many things with.&lt;/P&gt;
&lt;P&gt;If the sole purpose is to read things by a person it may be that a report would be better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider:&lt;/P&gt;
&lt;PRE&gt;proc report data=work.class;
   columns origin destination,(distance len vol);
   define origin /group;
   define destination/group across;
   define distance/ sum;
   define len/ sum;
   define vol/ sum;
run;
&lt;/PRE&gt;
&lt;P&gt;Which makes "columns" across but aligns the destinations so you can compare with different origins more easily. By have the values of distance, len and vol grouped under the destination it is much easier to see which destination is involved or to find the values involving any specific destination instead of the "scattered" inside the columns of the data set that might be created.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 19:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669586#M19428</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-15T19:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669585#M19427</link>
      <description>&lt;P&gt;Alternatively you may try the arrays as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.CLASS(label='Habitat Data');
infile datalines;
input Origin:8. Destination:8. Distance:8. Len:8. Vol:8.;
datalines;
1001 999 11891 26.44 193.00
1005 1016 2422 7.03 8.42
1005 944 19437 16.84 74.17
1010 1012 42986 22.10 262.95
1010 988 48093 9.10 26.36
1012 1010 42986 10.66 472.81
1012 988 44204 9.10 26.36
1012 999 47478 26.44 193.00
1016 1005 2422 30.73 62.22
;;;;

data want;
set class;
by origin;
retain count dest1 dest2 dest3 Dist1 Dist2 Dist3 Len1 Len2 Len3 vol1 vol2 vol3;
array dest(3) dest1 dest2 dest3;
array Dist(3) Dist1 Dist2 Dist3 ;
array Lens(3) Len1 Len2 Len3;
array Vols(3) vol1 vol2 vol3;
if first.origin then count=1;
else count+1;
do i = 1 to 3;
if first.origin then do;
dest(i)=.;
Dist(i)=.;
Lens(i)=.;
Vols(i)=.;
end;
end;
dest(count)=Destination;
Dist(count)=Distance;
Lens(count)=len;
Vols(count)=vol;
if last.origin;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jul 2020 16:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669585#M19427</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-07-15T16:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669573#M19426</link>
      <description>&lt;P&gt;Your problem is the second example here exactly, expand it to 4 variables though.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Long to Wide:&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=class out=wide1;
by Origin;
var Destination;
run;

proc transpose data=class out=wide2;
by origin;
var distance;
run;

proc transpose data=class out=wide3;
by origin;
var length;
run;

proc transpose data=class out=wide4;
by origin;
var volume;
run;

data want;
merge wide1 wide2 wide3 wide4;
by Origin;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Then once you have it in this format you can worry about re-ordering variables and then sorting as needed.&lt;/P&gt;
&lt;P&gt;Does this get you closer?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 16:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669573#M19426</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-15T16:28:46Z</dc:date>
    </item>
    <item>
      <title>Transpose long to wide with Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669568#M19425</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; I've spent a couple of days researching forums and reading papers and I'm stumped.&amp;nbsp; I don't know how to use arrays, macros, or do loops - and i think that's what's needed for this task.&amp;nbsp; This is more complicated than I can do.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; This is fish habitat data.&amp;nbsp; The ORIGIN is the stream where the fish lives and the DESTINATION is another suitable stream. DISTANCE is the stream length between them, and the LEN and VOL are additional attributes.&amp;nbsp; The data must be sorted by ORIGIN, DISTANCE because I want the transformed columns to be in the order of the closest destination habitats.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; My dataset as &amp;gt;6000 obs, and some ORIGINs have 25 DESTINATIONS, so there will be about 100 columns in the resulting table.&amp;nbsp; It's what the boss wants - and I'm bummed that I can't figure it out myself.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Here's the data:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;data WORK.CLASS(label='Habitat Data');&lt;BR /&gt;infile datalines;&lt;BR /&gt;input Origin:8. Destination:8. Distance:8. Len:8. Vol:8.;&lt;BR /&gt;datalines;&lt;BR /&gt;1001 999 11891 26.44 193.00&lt;BR /&gt;1005 1016 2422 7.03 8.42&lt;BR /&gt;1005 944 19437 16.84 74.17&lt;BR /&gt;1010 1012 42986 22.10 262.95&lt;BR /&gt;1010 988 48093 9.10 26.36&lt;BR /&gt;1012 1010 42986 10.66 472.81&lt;BR /&gt;1012 988 44204 9.10 26.36&lt;BR /&gt;1012 999 47478 26.44 193.00&lt;BR /&gt;1016 1005 2422 30.73 62.22&lt;BR /&gt;;;;;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Here's the result I want:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;As I move the data into the columns, I have abbreviated their variable names.&amp;nbsp; I highlighted the DISTANCEs so you can see how they dictate the ordering of the columns.&lt;/FONT&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Origin&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dest1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dist1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Len1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Vol1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dest2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dist2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Len2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Vol2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dest3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Dist3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Len3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Vol3&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1001&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;999&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;11891&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;26.44&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;193.00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1005&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1016&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;2422&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;7.03&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;8.42&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;944&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;19437&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;16.84&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;74.17&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1010&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1012&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;42986&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;22.10&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;262.95&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;988&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;48093&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;9.10&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;26.36&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1012&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1010&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;42986&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;10.66&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;472.81&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;988&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;44204&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;9.10&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;26.36&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;999&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;47478&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;26.44&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;193.00&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1016&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1005&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;2422&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;30.73&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;62.22&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&amp;nbsp; This has been fun, but a dead end.&amp;nbsp; Hope someone out there has fun with it!&amp;nbsp; I'm using SAS 9.4.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 16:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transpose-long-to-wide-with-Do-Loop/m-p/669568#M19425</guid>
      <dc:creator>camper</dc:creator>
      <dc:date>2020-07-15T16:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668570#M19424</link>
      <description>&lt;P&gt;Good morning Kurt,&lt;/P&gt;
&lt;P&gt;Thank you for your time.&amp;nbsp; Your program does what I was expecting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the program below (sent by other member of the community) corrects my own mistakes. This is: for the same individual/date (last two observations for individual b) we should have the same values for&amp;nbsp; time and sum.&lt;/P&gt;
&lt;P&gt;Thank you again,&lt;/P&gt;
&lt;P&gt;Have a good weekend&lt;/P&gt;
&lt;P&gt;Tomas&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;data k;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;input X $ d y ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;informat d mmddyy8. ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;cards ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;a 01/01/96 5.1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;a 10/27/96 2.3&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;a 12/16/96 8.1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;a 01/05/97 9.6&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;a 01/11/97 1.6&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 02/03/97 6.2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 03/25/97 5.8&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 11/15/98 2.6&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 01/14/99 4.9&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 01/29/99 3.7&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 03/10/99 4.6&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;b 03/10/99 2.3&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;c 03/16/99 9.6&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;proc sql;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;create table want as&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;select *,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;(select count(*) from k where x=a.x and d between a.d-100 and a.d) as times,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;(select sum(y) from k where x=a.x and d between a.d-100 and a.d) as sum&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt; from k as a;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE&gt;quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 15:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668570#M19424</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-11T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668529#M19423</link>
      <description>&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input X $ d :mmddyy10. y;
format d yymmddd10.;
cards;
a     01/01/96    5.1
a     10/27/96    2.3
a     12/16/96    8.1
a     01/05/97    9.6
a     01/11/97    1.6
b     02/03/97    6.2
b     03/25/97    5.8
b     11/15/98    2.6
b     01/14/99    4.9
b     01/29/99    3.7
b     03/10/99    4.6
b     03/10/99    2.3
c     03/16/99    9.6
;

proc sql;
/* first, consolidate per day */
create table times as
  select
    x,
    d,
    count(d) as times,
    sum(y) as y
  from have
  group by x, d
;
/* now, calculate the rolling window */
create table want as
  select
    a.x,
    a.d,
    sum(b.times) as times,
    sum(b.y) as sum
  from times a
  left join times b
  on a.x = b.x and a.d - 100 le b.d le a.d
  group by a.x, a.d
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;b has a slightly different result, because I show each date only once.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 09:41:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668529#M19423</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-11T09:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668483#M19422</link>
      <description>&lt;P&gt;I hope you don't really want -999 in values in a SAS data set. If that "value" is supposed to indicate missing value then SAS has a perfectly good missing value (actually better, you can use . , .A through .Z and ._ to indicate different reasons why the value might be missing).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unlike -999 the missing values would not be accidentally used in computations.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 21:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668483#M19422</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-10T21:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668482#M19421</link>
      <description>&lt;P&gt;Are you using SAS DI studio or one of the tools listed below?&lt;/P&gt;
&lt;P&gt;Otherwise, this does belong in general programming forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Forum description for SAS Data Management:&lt;/P&gt;
&lt;P&gt;SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop, SAS Data Preparation and others&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;LI-USER uid="47293"&gt;&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Reeza,&lt;BR /&gt;it is the same question but with a few more explanations .. and perhaps it does not belong to the procedures, and fits better in data management part of SAS?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 21:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668482#M19421</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-10T21:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668481#M19420</link>
      <description>Hi Reeza,&lt;BR /&gt;it is the same question but with a few more explanations .. and perhaps it does not belong to the procedures, and fits better in data management part of SAS?&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jul 2020 20:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668481#M19420</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-10T20:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668475#M19419</link>
      <description>Is this different than your question here: &lt;A href="https://communities.sas.com/t5/SAS-Procedures/Find-out-the-how-much-a-person-spent-in-the-last-100-days/m-p/668458" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Find-out-the-how-much-a-person-spent-in-the-last-100-days/m-p/668458&lt;/A&gt;?</description>
      <pubDate>Fri, 10 Jul 2020 20:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668475#M19419</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-10T20:32:59Z</dc:date>
    </item>
    <item>
      <title>Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668472#M19418</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I have observations of thousands of individuals (variable X&amp;nbsp; for individuals&amp;nbsp; a, b, c, d.. ) overtime (d) and the money each individual spent on that date (Y). The data are sorted by X and d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; k;&lt;/P&gt;&lt;P&gt;input X $ d y&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;informat d mmddyy8.&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;cards ;&lt;/P&gt;&lt;P&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/01/96&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.1&lt;/P&gt;&lt;P&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/27/96&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.3&lt;/P&gt;&lt;P&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/16/96&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.1&lt;/P&gt;&lt;P&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/05/97&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.6&lt;/P&gt;&lt;P&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/11/97&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.6&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/03/97&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.2&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/25/97&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.8&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/15/98&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.6&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/14/99&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.9&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/29/99&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.7&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/10/99&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.6&lt;/P&gt;&lt;P&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/10/99&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.3&lt;/P&gt;&lt;P&gt;c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/16/99&amp;nbsp;&amp;nbsp;&amp;nbsp; 9.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;; &lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;I am trying to resolve two questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How many times one individual spent money in a period of 100 days?&amp;nbsp; (this is the variable “times” in the solution below)&lt;/LI&gt;&lt;LI&gt;How much money has she/he spent in a the last 100 days? (this is “sum” in the solutions below.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So the question is to find out “times” and “sum”: the times an individual appears in the data base in the last 100 days, and the money spent in the last by this individual in the last 100 days.&lt;/P&gt;&lt;P&gt;For instance, for individual b:&lt;/P&gt;&lt;P&gt;She appears on 2/3/1997 for the first time, so times&amp;nbsp; =&amp;nbsp; 1; sum = 6.2&lt;/P&gt;&lt;P&gt;She appears again on 3/25/1997 , or 50 days later, so times = 2 (2/3/1997 and 3/25/1997) and sum is = 12 (5.8+6.2).&lt;/P&gt;&lt;P&gt;She appears again on 11/15/1998, or 300 days later, so times = 1 (because 300 &amp;gt; 100)) and sum is = 2.6.&lt;/P&gt;&lt;P&gt;She appears again on 1/14/1999, or 60 days later, so times = 2 &amp;nbsp;and sum is = 2.6 + 4.9 = 7.5.&lt;/P&gt;&lt;P&gt;She appears again on 1/29/1999, or 15 days later, so times = 3 (3 times in 100 days, on 11/15/1998, on &amp;nbsp;1/14/1999 and on 1/29/1999.&amp;nbsp; Sum is the value of Y on these 3 dates (3.7+4.9+2.6)&lt;/P&gt;&lt;P&gt;She appears again on 3/10/1999, or 40 days later, so times = 3 (3 times in 100 days, on 1/14/1999 on 1/29/1999 and on 3/10/1999.&amp;nbsp; Sum is the value of Y on these 3 dates (3.7+4.9+2.3)&lt;/P&gt;&lt;P&gt;I did the complete solution in excel, below (and in the attached file).&amp;nbsp; Diff is the number of days between two dates (I did this to get to the solution in excel; it may not be necessary).&amp;nbsp; This difference is -999 when we change to a different individual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case the solution is:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;x&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;d&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;y&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;diff&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;times&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;sum&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1/1/1996&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5.1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-999&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5.1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10/27/1996&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2.3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&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;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;9.6&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 20:20:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668472#M19418</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-10T20:20:51Z</dc:date>
    </item>
    <item>
      <title>Compute the number of observations and sum in a moving window</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668471#M19417</link>
      <description />
      <pubDate>Fri, 10 Jul 2020 20:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Compute-the-number-of-observations-and-sum-in-a-moving-window/m-p/668471#M19417</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-10T20:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: about table name longer than 32 character and data types in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668216#M19416</link>
      <description>&lt;P&gt;&lt;LI-USER uid="83316"&gt;&lt;/LI-USER&gt;&amp;nbsp;- I can understand your disappointment. One of the reasons for extending the SAS 9.4 life cycle was to deal with the Adobe Flash Player end-of-life problem. A lot of effort had to be put into removal of Flash Player dependencies in 9.4 so customers could upgrade before the end of 2020. Once that is behind us, perhaps we will see some progress on other fronts.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 23:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668216#M19416</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-07-09T23:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: about table name longer than 32 character and data types in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668207#M19415</link>
      <description>&lt;P&gt;Very disapointing that years later despite promises and a eta of probably by the end of 2018 there won't be a fix. Thanks for taking the time to reply anyway.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A viya trial is no good to me as we're not going to switch a national infrastructure with a few hundred users and I'm not the person who would make that decision, even more so when we are currently migrating to 9.4 on AWS instead of our own hosting. It looks like we're stuck with this issue, unfortunately I'll have to investigate other products that can support basic features like tables on databases which is a shame as I like SAS, but missing basic functionality is increasingly becoming an issue (such as xml processing much slower than ssis).&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 22:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668207#M19415</guid>
      <dc:creator>MRDM</dc:creator>
      <dc:date>2020-07-09T22:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: about table name longer than 32 character and data types in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668189#M19414</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="83316"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I concur with&amp;nbsp;&lt;LI-USER uid="13976"&gt;&lt;/LI-USER&gt;&amp;nbsp;that there's a very good chance that correcting this is likely to happen first in Viya. I've been trying the Viya trial, and I'm finding it appears to be quite suitable for production work. I suggest you investigate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 20:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668189#M19414</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-09T20:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: about table name longer than 32 character and data types in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668178#M19413</link>
      <description>&lt;P&gt;&lt;LI-USER uid="83316"&gt;&lt;/LI-USER&gt;&amp;nbsp; - As far as I'm aware the 9.4 life cycle was extended, currently still 9.4M6 but with 9.4M7 due out later in 2020. I haven't heard anything further regarding 9.5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMO most development effort now seems to be concentrated on the SAS Viya platform with a significant push to encourage SAS9 users to gradually migrate to the new cloud-ready technology. I wouldn't surprise me if the 32 character limit issue was fixed in Viya rather than SAS9.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 20:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/668178#M19413</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-07-09T20:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: about table name longer than 32 character and data types in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/667986#M19412</link>
      <description>&lt;P&gt;Any update on this, it is now causing us major issues and the fix has been coming for years.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 08:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/about-table-name-longer-than-32-character-and-data-types-in-SAS/m-p/667986#M19412</guid>
      <dc:creator>MRDM</dc:creator>
      <dc:date>2020-07-09T08:40:22Z</dc:date>
    </item>
    <item>
      <title>Export/Print bar graph along with table in HTML format using SAS Data integration</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Export-Print-bar-graph-along-with-table-in-HTML-format-using-SAS/m-p/667655#M19411</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to print both table and bar graph in HTML but able to only get table in output using SAS DI.&lt;/P&gt;&lt;P&gt;Kindly assist me what modification is needed in my below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;BR /&gt;ods html path='/ACTDATA/fireuw/' (url=none)&lt;BR /&gt;body='sgplot.html';&lt;BR /&gt;goptions reset=all;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;create table CARS1 as&lt;BR /&gt;SELECT make, model, type, invoice, horsepower, length, weight&lt;BR /&gt;FROM&lt;BR /&gt;SASHELP.CARS&lt;BR /&gt;WHERE make in ('Audi','BMW')&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;proc print;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc SGPLOT data = cars1;&lt;BR /&gt;vbar length /group = type GROUPDISPLAY = CLUSTER;&lt;BR /&gt;title 'Cluster of Cars by Types';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods html close;&lt;BR /&gt;ods listing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Akshay&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 09:00:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Export-Print-bar-graph-along-with-table-in-HTML-format-using-SAS/m-p/667655#M19411</guid>
      <dc:creator>AkshayS</dc:creator>
      <dc:date>2020-07-08T09:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Column Header Validation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667568#M19410</link>
      <description>&lt;P&gt;Unfortunately, I don't have access to DI studio, so I'm not sure how these could be implemented.&lt;/P&gt;
&lt;P&gt;If I were to try this in SAS code, I'd do one of the following:&lt;/P&gt;
&lt;P&gt;1. Read in the file, but write the first line as a text string (if _n_ = 1) to one SAS dataset, and process the rest of the lines normally. In another step, do all of the checking needed on the header line, and then use macro processing to do the correct thing with the data.&lt;/P&gt;
&lt;P&gt;2. Have a very basic data step, that splits the incoming dataset into two files, one with just the first line, and the other with all of the other lines. Then have a checking process to read in and check the one-line file, and set whatever macro variables are needed. Then process the other file, and based on the macro variables do something.&lt;/P&gt;
&lt;P&gt;I hope maybe this gives you some thoughts for things that can be done in DI.&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667568#M19410</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-07T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Column Header Validation</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667440#M19409</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some help on creating some form of custom transformation to check the column headers a .csv file has when it get read into DI Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a list of headers which should be in the table and when the file gets read in if it doesn't contain the correct headers, i want it will get moved to a check file so that the job doesn't fail. Any suggestions on the best way to set this up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 13:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Column-Header-Validation/m-p/667440#M19409</guid>
      <dc:creator>Flappyduck</dc:creator>
      <dc:date>2020-07-07T13:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: first observation is variable name</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/first-observation-is-variable-name/m-p/667228#M19408</link>
      <description>&lt;P&gt;&lt;LI-USER uid="322220"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The double proc transpose is nice in that it has a simple structure, and it uses a pre-packaged sas routine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it may not scale well.&amp;nbsp; Transposing 1,000,000 observations will create a dataset with 1,000,000 variables in the intermediate data set TEST1.&amp;nbsp; The entire dataset would have to be processed two times, which can begin to use significant resources.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 16:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/first-observation-is-variable-name/m-p/667228#M19408</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-07-06T16:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rearranging data in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667208#M19407</link>
      <description>&lt;P&gt;Thank you Diamond,&lt;/P&gt;&lt;P&gt;The Proc transpose works in this case.&lt;/P&gt;&lt;P&gt;One obstacle to implement your code is that I have 5000 variables Va, Vb,.... (etc),&lt;/P&gt;&lt;P&gt;But I appreciate you have taken time to help me,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 15:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667208#M19407</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-06T15:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rearranging data in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667205#M19406</link>
      <description>&lt;P&gt;Thank you Tom,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 15:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667205#M19406</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-06T15:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rearranging data in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667156#M19405</link>
      <description>&lt;PRE&gt;proc sql;
create table want as
select 'va' as label length=32,date,va as value from k
union all
select 'vb' as label length=32,date,vb as value from k
union all
.....................
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jul 2020 12:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667156#M19405</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-07-06T12:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rearranging data in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667061#M19404</link>
      <description>&lt;P&gt;Thanks for posting the data step to make it easy!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=k out=ktrans;
	var va--vd;
	by date;
run;

proc sort;
	by _name_ date;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Jul 2020 21:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667061#M19404</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-07-05T21:24:07Z</dc:date>
    </item>
    <item>
      <title>Rearranging data in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667035#M19403</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I need some help rearranging data in a very large data set using SAS 9.4.&lt;/P&gt;&lt;P&gt;I have the data as follows (please see also attached Excel file) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; k;&lt;/P&gt;&lt;P&gt;input&amp;nbsp; date&amp;nbsp; va&amp;nbsp; vb&amp;nbsp; vc&amp;nbsp; vd&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;cards&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;20000630&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.1207&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.7044&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.3283&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.846&lt;/P&gt;&lt;P&gt;20000929&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.1158&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.6934&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.3253&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.8423&lt;/P&gt;&lt;P&gt;20001229&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.7898&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.9828&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.1254&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.5832&lt;/P&gt;&lt;P&gt;20010330&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.9815&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7.5266&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.4934&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.5082&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have the data&amp;nbsp; as:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;va&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20000630&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;6.1207&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;va&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20000929&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;6.1158&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;va&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20001229&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;5.7898&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;va&lt;/P&g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</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Rearranging-data-in-SAS-9-4/m-p/667035#M19403</guid>
      <dc:creator>Thomas_mp</dc:creator>
      <dc:date>2020-07-05T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: first observation is variable name</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/first-observation-is-variable-name/m-p/666964#M19401</link>
      <description>&lt;P&gt;Outdated reply but may help someone in future&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*----------------------------------------*/&lt;BR /&gt;data test;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input A : $10. B : $3. C &amp;amp; $20. D : $20.;&lt;BR /&gt;datalines;&lt;BR /&gt;Name Sex Address Phone&lt;BR /&gt;Rachel F 789 Mid County 111-111-1111&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=test out=testt;&lt;BR /&gt;var A B C D;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc transpose data=testt out=testtt(drop=_:);&lt;BR /&gt;var col2;&lt;BR /&gt;id col1;&lt;BR /&gt;run;&lt;BR /&gt;/*----------------------------------------*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 20:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/first-observation-is-variable-name/m-p/666964#M19401</guid>
      <dc:creator>tocilj</dc:creator>
      <dc:date>2020-07-04T20:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666843#M19400</link>
      <description>&lt;P&gt;Thanks, I got it working with the below, I had to change it to go Numeric to Chararter as Numeric to Numeric didn't work as on MONTHDAY it was still dropping leading zeroes (not an issue with YEARMONTH).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CASE WHEN DOB ^= . 
THEN cats(put(year(datepart(DOB)),z4.),put(month(datepart(DOB)),z2.))
ELSE "" END&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put(datepart(dob),yymmn6.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It got upset I think because it was going datetime to a straight numeric.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 15:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666843#M19400</guid>
      <dc:creator>MRDM</dc:creator>
      <dc:date>2020-07-03T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666836#M19399</link>
      <description>&lt;P&gt;PS the PUT statement (used when writing to a text file) will honor the assigned format.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666836#M19399</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-03T14:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666834#M19398</link>
      <description>&lt;P&gt;If you need the string, use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put(datepart(dob),yymmn6.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the Julian date (day in a year), use the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=leforinforref&amp;amp;docsetTarget=p0f7u4z8iuaoygn183i6q1yc49xb.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;JULIAN&lt;/A&gt;&amp;nbsp;format&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666834#M19398</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-03T14:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666828#M19397</link>
      <description>&lt;P&gt;It's been exported to a delimited file so won't hold the formats anyway, if it was staying in a SAS/SQL table I agree, all I need is a string with the leading zero, I have 20055 already, I just need it to be 200505. I'm not sure that code will drop into the express on an extract and would need to be user written code instead? I've not really got time to start making changes to the layout of the job and more transformations, I was hoping to just edit my current expression slightly. Missing dates are already ignored as I exclude null dates in the first part. &lt;BR /&gt;&lt;BR /&gt;Also if you think that's useless, they also want YEARDAY e.g. 200525&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CASE WHEN DOB  ^= .
THEN input(cats(year(datepart(DOB)),intnx('month',datepart(DOB),0,'b')),6.)
ELSE . END&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;20-10-1983 became 198386?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:15:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666828#M19397</guid>
      <dc:creator>MRDM</dc:creator>
      <dc:date>2020-07-03T14:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666826#M19396</link>
      <description>&lt;P&gt;Why do you want a mostly unusable number, instead of a date with a proper format?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;intnx('month',datepart(dob),0,'b') as newvar format=yymmn6.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All raw date values will be aligned to the first of the month, and missing values will automatically result in missing values.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666826#M19396</guid>
      <dc:creator>KurtBremser</dc:creator>
      <dc:date>2020-07-03T14:07:59Z</dc:date>
    </item>
    <item>
      <title>Quick datepart/date format query.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666823#M19395</link>
      <description>&lt;P&gt;Hi, This might be fairly obvious but formats have always been my downfall and I'm up against the clock or I'd try experiment. I'm doing this in an expression on an Extract Transformation in DI Studio.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CASE WHEN DOB  ^= .
THEN input(cats(year(datepart(DOB)),month(datepart(DOB))),6.)
ELSE . END&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Gives me 20055, I'd like 200505 (dates like 200512 are already fine). The output is a straight numeric rather than a date so I didn't think it would be an issue, from a quick google I found using z as the format so tried z6. but that didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Quick-datepart-date-format-query/m-p/666823#M19395</guid>
      <dc:creator>MRDM</dc:creator>
      <dc:date>2020-07-03T14:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert an excel data table into SAS format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Convert-an-excel-data-table-into-SAS-format/m-p/666496#M19394</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;LI-USER uid="11562"&gt;&lt;/LI-USER&gt;&amp;nbsp;for your help. I am now able to run the program.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose
  data=mydata.return
  out=mydata.long (
  drop=_name_
  rename=(col1=y)
   where=(y ne .)
  )
 ;
by id;
var _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Regards, Sara&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 21:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Convert-an-excel-data-table-into-SAS-format/m-p/666496#M19394</guid>
      <dc:creator>saraphdnz</dc:creator>
      <dc:date>2020-07-01T21:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Share and Power BI</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666220#M19393</link>
      <description>Thanks &lt;LI-USER uid="13976" login="SASKiwi"&gt;&lt;/LI-USER&gt;, we are not yet using SAS Viya, but that is still being planned/talked about.</description>
      <pubDate>Tue, 30 Jun 2020 21:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666220#M19393</guid>
      <dc:creator>akhozan</dc:creator>
      <dc:date>2020-06-30T21:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Share and Power BI</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666215#M19392</link>
      <description>&lt;P&gt;&lt;LI-USER uid="24313"&gt;&lt;/LI-USER&gt;&amp;nbsp; - FYI, I believe there will be other ways SAS and Power BI can work together when SAS Viya 4.0 is released later this year. There are some details of this in the SAS Global Forum 2020 presentations regarding the strategic partnership between SAS and Microsoft, which you can link to from the SAS Community.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 21:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666215#M19392</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-06-30T21:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Share and Power BI</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666183#M19391</link>
      <description>Thanks &lt;LI-USER uid="4" login="ChrisHemedinger"&gt;&lt;/LI-USER&gt;. I will work with my SAS Admin to get an ODBC port enabled for SAS/Share.</description>
      <pubDate>Tue, 30 Jun 2020 18:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666183#M19391</guid>
      <dc:creator>akhozan</dc:creator>
      <dc:date>2020-06-30T18:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Share and Power BI</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666180#M19390</link>
      <description>&lt;P&gt;&lt;LI-USER uid="24313"&gt;&lt;/LI-USER&gt;&amp;nbsp;According &lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-connect-using-generic-interfaces" target="_self"&gt;to the Power BI doc, you can use the generic interfaces&lt;/A&gt; (ODBC or OLE DB) to connect to a variety of providers.&amp;nbsp; SAS Workspace supports connections via OLE DB.&amp;nbsp; SAS/SHARE has an ODBC connection method.&amp;nbsp; Some of this might require configuration in your Power BI desktop environment.&amp;nbsp; I don't know how/if these methods work in the cloud.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 18:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666180#M19390</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-06-30T18:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Share and Power BI</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666173#M19389</link>
      <description>Can you connect directly from Power BI to SAS using SAS/share via JDBC? We currently use this method with Spotfire, but Power BI will be the preferred visualization tool in the future once more of our data moves to the cloud.</description>
      <pubDate>Tue, 30 Jun 2020 18:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-Share-and-Power-BI/m-p/666173#M19389</guid>
      <dc:creator>akhozan</dc:creator>
      <dc:date>2020-06-30T18:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665999#M19388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;LI-USER uid="292396"&gt;&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;In DIS, how to assign the table metadata to the new library?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The new library must also be defined in SAS Metadata. Then open the the table metadata properties where you can change the assigned library. And once done also move the table metadata object to the appropriate metadata folder.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 06:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665999#M19388</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-30T06:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665977#M19387</link>
      <description>In DIS, how to assign the table metadata to the new library?&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Jun 2020 02:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665977#M19387</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2020-06-30T02:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665959#M19386</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;LI-USER uid="292396"&gt;&lt;/LI-USER&gt;&amp;nbsp;wrote:&lt;BR /&gt;Is there a way that we can move the dataset from one library to other library? &lt;BR /&gt;In one of my DI job, I want to change the library of the source dataset. Any help? &lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In DIS assign the table metadata to the new library.&lt;/P&gt;
&lt;P&gt;Redeploy all impacted jobs (impact/reverse impact analysis on the table will give you the list of jobs).&lt;/P&gt;
&lt;P&gt;With EG use Proc Copy or Proc Datasets/Copy to also move the physical data. Consider using the MOVE option in the Proc if you don't want to just replicate (copy) the data but also remove it from the source.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 00:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665959#M19386</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-30T00:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665901#M19385</link>
      <description>&lt;P&gt;Correct. A PROC COPY by itself will not change library metadata. If you want the copied dataset registered in metadata in the library it was copied to then you have to do that separately.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 19:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665901#M19385</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-06-29T19:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665900#M19384</link>
      <description>Yes.&lt;BR /&gt;&lt;BR /&gt;I would like to know if I do proc copy from SAS EG, it will change the&lt;BR /&gt;library of the respective dataset which was being used in DI studio job&lt;BR /&gt;without updating metadata?&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2020 19:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665900#M19384</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2020-06-29T19:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665898#M19383</link>
      <description>&lt;P&gt;I don't understand the question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC COPY takes a dataset(s) in one library and makes a copy in the other library. Is that what you want?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 19:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665898#M19383</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-29T19:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665895#M19382</link>
      <description>If I do PROC COPY via SAS EG, it will update the library in the respective&lt;BR /&gt;dataset which was being used in the job?&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2020 19:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665895#M19382</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2020-06-29T19:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move dataset from one library to other</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665893#M19381</link>
      <description>&lt;P&gt;PROC COPY&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 18:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Move-dataset-from-one-library-to-other/m-p/665893#M19381</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-29T18:59:17Z</dc:date>
    </item>
  </channel>
</rss>

