<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: INDSNAME from Temporary to Permanent in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902115#M356475</link>
    <description>hello! Thanks for letting me know, I didnt know that! &lt;BR /&gt;&lt;BR /&gt;and the Source variable is working, its outputting the sources as i'd like to. Im just hoping to find a way for it to stay when I try to further query the table.</description>
    <pubDate>Wed, 08 Nov 2023 17:39:21 GMT</pubDate>
    <dc:creator>JibJam221</dc:creator>
    <dc:date>2023-11-08T17:39:21Z</dc:date>
    <item>
      <title>INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902100#M356469</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello all, im having issues with the INDSNAME column. It outputs as it should... however Im looking to make this column permanent so that I can rename the source names to more understandable terms. I tried using INDSNAME then using IF-THEN statements to rename the sources into a new column, however these sources get automatically removed once further querying the table..&amp;nbsp; is there any way for me to make INDSNAME a permanent column in the dataset?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data work.totaltable;
	set work.1222872-work.1222998 indsname=Dsnames;
	source=Dsnames;
	run;

data totaltable;
	set work.totaltable;
	if source='work.1222872' then SourceTransc='Transaction 2287';
......&lt;BR /&gt;run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Nov 2023 16:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902100#M356469</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T16:46:50Z</dc:date>
    </item>
    <item>
      <title>INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902090#M356481</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;im having issues with the INDSNAME column. It outputs as it should... however Im looking to make this column permanent so that I can rename the source names to more understandable terms. I tried using INDSNAME then using IF-THEN statements to rename the sources into a new column, however these sources get automatically removed once further querying the table..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any way for me to make INDSNAME a permanent column in the dataset?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 16:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902090#M356481</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T16:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902105#M356471</link>
      <description>&lt;PRE&gt;&lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;data totaltable;
	set work.totaltable;&lt;/STRONG&gt;&lt;/FONT&gt;
	if source='work.1222872' then SourceTransc='Transaction 2287';
......
run;&lt;/PRE&gt;
&lt;P&gt;This type of coding is known to cause issues so it's a good idea to use a unique data set name between each data step, then you can trace your code for bugs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you check the output of totaltable after the first step to ensure that the source variable is being created correctly and as expected? Usually character variables have a default length of 8 characters and your names are larger so it could be that. You need to add in a length statement for the source variable if that is the case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, it's usually returned as all uppercase I believe and you're using lower case data, SAS is case sensitive for character comparisons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/207689"&gt;@JibJam221&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;Hello all, im having issues with the INDSNAME column. It outputs as it should... however Im looking to make this column permanent so that I can rename the source names to more understandable terms. I tried using INDSNAME then using IF-THEN statements to rename the sources into a new column, however these sources get automatically removed once further querying the table..&amp;nbsp; is there any way for me to make INDSNAME a permanent column in the dataset?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data work.totaltable;
	set work.1222872-work.1222998 indsname=Dsnames;
	source=Dsnames;
	run;

data totaltable;
	set work.totaltable;
	if source='work.1222872' then SourceTransc='Transaction 2287';
......&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 17:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902105#M356471</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-08T17:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902115#M356475</link>
      <description>hello! Thanks for letting me know, I didnt know that! &lt;BR /&gt;&lt;BR /&gt;and the Source variable is working, its outputting the sources as i'd like to. Im just hoping to find a way for it to stay when I try to further query the table.</description>
      <pubDate>Wed, 08 Nov 2023 17:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902115#M356475</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T17:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902116#M356476</link>
      <description>It will stay unless you dropped it. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Trace your code to show where it's dropped. Look for Keep/Drop statements and verify that your SET/DATA references are correct.</description>
      <pubDate>Wed, 08 Nov 2023 17:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902116#M356476</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-08T17:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902117#M356477</link>
      <description>I dont necessarily drop it, however I do use the work.totaltable to create a more queried version called work.finaltable, and use this to only include the variable "SourceTransc" and not "source".. Could this be the cause?</description>
      <pubDate>Wed, 08 Nov 2023 17:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902117#M356477</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T17:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902118#M356478</link>
      <description>"use this to only include the variable "SourceTransc" and not "source""&lt;BR /&gt;&lt;BR /&gt;Sounds like you do drop it, but not including it in a KEEP statement maybe. Show the code for further assistance.</description>
      <pubDate>Wed, 08 Nov 2023 17:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902118#M356478</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-08T17:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902119#M356479</link>
      <description>&lt;PRE&gt;data work.totaltable;
	set work.1222872-work.1222998 indsname=Dsnames;
	source=Dsnames;
	run;

data work.totaltable2;
	set work.totaltable;
	if source='work.1222872' then SourceTransc='Transaction 2287';
......
run;

proc sql;
create table work.FinalTable AS
select 
SourceTransc,
	First_Name, 
	Last_Name,
....
from work.totaltable2;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Nov 2023 17:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902119#M356479</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T17:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902123#M356480</link>
      <description>If you don't explicitly keep it, (listing in SQL) then it's implicitly dropped. Add it to the SQL select statement if you want to keep it...</description>
      <pubDate>Wed, 08 Nov 2023 18:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902123#M356480</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-08T18:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902145#M356488</link>
      <description>I actually just tried to and it still isnt working. It shows the column names however the columns are empty</description>
      <pubDate>Wed, 08 Nov 2023 19:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902145#M356488</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T19:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902149#M356491</link>
      <description>&lt;P&gt;Your first step cannot work.&lt;/P&gt;
&lt;P&gt;This statement is not valid SAS syntax.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set work.1222872-work.1222998 indsname=Dsnames;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;1222872 and 1222998 are not valid member names for SAS datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have set the VALIDMEMNAME option to EXTEND then perhaps you could use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set work.'1222872'n-work.'1222998'n indsname=Dsnames;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Nov 2023 19:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902149#M356491</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-08T19:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902150#M356492</link>
      <description>hello, I do have the ValidMemName option listed at the top of the program. &lt;BR /&gt;Is there a way to make the INDSNAME a permanent column?</description>
      <pubDate>Wed, 08 Nov 2023 19:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902150#M356492</guid>
      <dc:creator>JibJam221</dc:creator>
      <dc:date>2023-11-08T19:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902161#M356497</link>
      <description>&lt;P&gt;Setting the VALIDMEMNAME option to EXTEND only means that SAS will ALLOW the use of the non-standard names.&lt;/P&gt;
&lt;P&gt;To actually reference the datasets that have such names you will still need to use a NAME LITERAL in your code instead of normal syntax.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;124  options validmemname=extend;
125  data work.123;
          --------
          22
          201
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, /, ;, _DATA_, _LAST_, _NULL_.

ERROR 201-322: The option is not recognized and will be ignored.

126   x=2;
127  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You probably should add LENGTH statement(s) to make sure that the two variables you are using are long enough.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validmemname=extend;
data work.'123'n '124'n;
 x=2;
run;

data want;
  length temporary permanent $70 ;
  set work.'123'n - work.'124'n indsname=temporary ;
  permanent=temporary;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the values are "disappearing" then add some diagnostic steps to see when they disappear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 19:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902161#M356497</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-08T19:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: INDSNAME from Temporary to Permanent</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902172#M356503</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/207689"&gt;@JibJam221&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;hello! Thanks for letting me know, I didnt know that! &lt;BR /&gt;&lt;BR /&gt;and the Source variable is working, its outputting the sources as i'd like to. Im just hoping to find a way for it to stay when I try to further query the table.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm confused. You said the source variable is working.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So is it working or not?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 20:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INDSNAME-from-Temporary-to-Permanent/m-p/902172#M356503</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-08T20:06:25Z</dc:date>
    </item>
  </channel>
</rss>

