<?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: Create dataset from dataset that doesn't have conventional names (&amp;quot;-&amp;quot; hyphen symbol in in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845966#M334440</link>
    <description>&lt;P&gt;Copy to work library then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options msglevel=i;

filename src 'c:\document\ny\ny_2022-dec_accounts.sas7bdat' recfm=n;
filename dest "%sysfunc(pathname(work))/ny_dec2022_accounts.sas7bdat" recfm=n;

data _null_;
   length msg $ 384;
   rc=fcopy('src', 'dest');
   if rc=0 then
      put 'Copied SRC to DEST.';
   else do;
      msg=sysmsg();
      put rc= msg=;
   end;
run;

data expenses;
   set ny_dec2022_accounts;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Nov 2022 16:07:22 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-11-23T16:07:22Z</dc:date>
    <item>
      <title>Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in Name)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845799#M334375</link>
      <description>&lt;P&gt;I thought we cannot use the "-"( hyphen) in&amp;nbsp; the dataset name. We got this kind of name for a dataset from a vendor.&amp;nbsp; I try to do some analysis to using the set statement. But I am not sure&amp;nbsp; how to do it, my SET statements not working because of the symbol, is there a way I can create&amp;nbsp; copy of this data into sas session to work on it. I am not really sure How they able to create the SAS dataset.( is there a way?). The following how the name looks like. Thank you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname account 'c:\temp\act';
data expenses;
   set account. ny_2022-dec_accounts;*dataset name in library "-" after the 2022;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 00:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845799#M334375</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T00:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845801#M334377</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname account 'c:\temp\act';
data expenses;
   set account.'ny_2022-dec_accounts'n;*dataset name in library "-" after the 2022;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The dataset may have been created the same way I've suggested reading it.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 00:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845801#M334377</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-23T00:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845819#M334384</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp; Thank you. Unfortunately no luck I am getting '&lt;FONT color="#FF0000"&gt;Invalid data set name error&lt;/FONT&gt;'&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 02:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845819#M334384</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T02:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845822#M334385</link>
      <description>&lt;P&gt;OK, try this then - it should allow the hyphen.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options VALIDMEMNAME = EXTEND;
libname account 'c:\temp\act';
data expenses;
   set account.'ny_2022-dec_accounts'n;*dataset name in library "-" after the 2022;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 02:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845822#M334385</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-23T02:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845839#M334387</link>
      <description>&lt;P&gt;&amp;nbsp;Didn't worked . Still same issue 'Invalid data set name'. And I got the following note but it did not allowing me. I am using SAS 9.4 windows .&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1669176586493.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77588iD4553D99CE800763/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1669176586493.png" alt="SASuserlot_0-1669176586493.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_1-1669176611680.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77589iCC61441B6BBF16E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_1-1669176611680.png" alt="SASuserlot_1-1669176611680.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 04:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845839#M334387</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T04:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845843#M334391</link>
      <description>&lt;P&gt;Rename the .sas7bdat file on the OS level.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 05:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845843#M334391</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-23T05:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845851#M334397</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&amp;nbsp; can you please provide me with an example? ( I don't want to change the original file name). By any chance your referring 'RENAME'&amp;nbsp; like this?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1669183862496.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77590iE9EC4E9EE0355C73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1669183862496.png" alt="SASuserlot_0-1669183862496.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/sclref/9.4/p0mgkyalwbgx2cn18e8z05b90s5v.htm#n1gufiu0rf7qv2n1v058z7weu0sq" target="_blank"&gt;https://documentation.sas.com/doc/en/sclref/9.4/p0mgkyalwbgx2cn18e8z05b90s5v.htm#n1gufiu0rf7qv2n1v058z7weu0sq&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 06:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845851#M334397</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T06:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845857#M334400</link>
      <description>&lt;P&gt;No. OS means Operating System.&lt;/P&gt;
&lt;P&gt;Since you work on Windows, you would either use the Windows Explorer or the ren command in a cmd window.&lt;/P&gt;
&lt;P&gt;Or, if the XCMD system option is enabled in SAS, you could use the ren command in an X statement or an INFILE PIPE.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile pipe "ren c:\temp\act\ny_2022-dec_accounts.sas7bdat c:\temp\act\ny_2022_dec_accounts.sas7bdat 2&amp;gt;&amp;amp;1";
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 06:49:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845857#M334400</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-23T06:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845860#M334402</link>
      <description>&lt;P&gt;Can you please post your complete SAS log including your code and any notes and errors. Please do it as a copy and paste NOT a screenshot.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 07:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845860#M334402</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-23T07:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845957#M334436</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
1    options VALIDMEMNAME=EXTEND ;
&lt;FONT color="#0000FF"&gt;NOTE: Windowing environment support for VALIDMEMNAME=EXTEND is limited to Editor, Log, and Output windows.&lt;/FONT&gt;
2    *create library;
3
4    libname account 'c:\document\ny';
&lt;FONT color="#0000FF"&gt;NOTE: Libref ACCOUNT was successfully assigned as follows:&lt;/FONT&gt;
      Engine:        V9
  &lt;FONT color="#0000FF"&gt;    Physical Name: c:\document\ny&lt;/FONT&gt;
5
6    * data set creation;
7
8    data expenses;
9       set account.'ny_2022-dec_accounts'n;*dataset name in library "-" after the 2022;
           &lt;FONT color="#800000"&gt;-------------------------------&lt;/FONT&gt;
            211
&lt;FONT color="#800000"&gt;ERROR 211-185: Invalid data set name.&lt;/FONT&gt;

10   run;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.EXPENSES may be incomplete.  When this step was stopped there were 0 observations
         and 0 variables.&lt;/FONT&gt;
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Here is my log. sorry for the inconvenience. I tried with out using " 'n " and single quotations too. but no luck. Thank you for your time.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845957#M334436</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T14:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845959#M334437</link>
      <description>&lt;P&gt;I tried using your code. Unfortunately it didn't work&amp;nbsp; . Can you please correct me, if I am doing anything wrong ( Note: I didn't want to change the original file name, I just want to read into SAS so that I can do analysis). Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
1
2    options noxwait ;
3    data _null_;
4    infile pipe "ren
4  ! c:\document\ny\ny_2022-dec_accounts.sas7bdat
4  ! c:\document\ny\ny_2022_dec_accounts.sas7bdat 2&amp;gt;&amp;amp;1";
      --------------------------------------------------&lt;FONT color="#993300"&gt;
      23

ERROR 23-2: Invalid option name "ren
             c:\document\ny\ny_2022-dec_accounts.sas7bdat
             c:\document\ny\ny_2022_dec_accounts.sas7bdat
             2&amp;gt;&amp;amp;1".
&lt;/FONT&gt;
5    input;
6    put _infile_;
7    run;

&lt;FONT color="#0000FF"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;
&lt;FONT color="#339966"&gt;WARNING: The data set WORK.XX may be incomplete.  When this step was stopped there were 0 observations and 0
         variables.&lt;/FONT&gt;
&lt;FONT color="#0000FF"&gt;NOTE: DATA statement used (Total process time):
      real time           0.06 seconds&lt;/FONT&gt;
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 15:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845959#M334437</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T15:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845962#M334438</link>
      <description>&lt;P&gt;Does the name have a space at the front?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rules for EXTEND Are&lt;/P&gt;
&lt;UL class="xisDoc-listUnordered"&gt;
&lt;LI class="xisDoc-item"&gt;can be up to 32 bytes in length.&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;&lt;STRONG&gt;can contain special characters except for / \ * ? " &amp;lt; &amp;gt; | : &lt;FONT size="4" color="#FF0000"&gt;-&lt;/FONT&gt;&lt;/STRONG&gt;. A name that contains special characters must be specified as a name literal.&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;&lt;STRONG&gt;cannot begin with a blank or a period.&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;ignores leading and trailing blanks.&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;can contain mixed-case letters. SAS internally converts the member name to uppercase. Therefore, you cannot use the same member name with a different combination of uppercase and lowercase letters to represent different variables. For example, cat, Cat, and CAT all represent the same member name.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-footnoteAnchor"&gt;(&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lepg/n1ov28a8jt7jx9n1op0ti5y0wj1d.htm#n1rt3zvp2qrswun1d29s2x7ffeeo-note1" target="_blank" rel="noopener"&gt;footnote 1&lt;/A&gt;)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="xisDoc-footnoteAnchor"&gt;That being said, I get an error every time I try to create a data set with that name so it's invalid. You will have to rename it, I suggest copying it first and then renaming it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 69         libname account '/home/fkhurshed/Demo1/';
 NOTE: Libref ACCOUNT was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /home/fkhurshed/Demo1
 70         
 71         data account.'ny_2022-dec_accounts'n;
 72         set sashelp.class;
 73         run;
 
 ERROR: The value 'NY_2022-DEC_ACCOUNTS'n is not a valid SAS member name.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              474.09k
       OS Memory           24224.00k
       Timestamp           11/23/2022 03:52:19 PM
       Step Count                        48  Switch Count  0
       Page Faults                       0
       Page Reclaims                     70
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;If you're concerned about traceability in the code, you can use FCOPY to copy/rename the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options msglevel=i;

filename src '/home/fkhurshed/Demo1/ny_2022-dec_accounts.sas7bdat' recfm=n;
filename dest '/home/fkhurshed/Demo1/ny_dec2022_accounts.sas7bdat' recfm=n;

data _null_;
   length msg $ 384;
   rc=fcopy('src', 'dest');
   if rc=0 then
      put 'Copied SRC to DEST.';
   else do;
      msg=sysmsg();
      put rc= msg=;
   end;
run;

data expenses;
   set account.ny_dec2022_accounts;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 16:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845962#M334438</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-11-23T16:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845964#M334439</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;. I don't have any blank spaces in the name.&amp;nbsp; If I don't have any option, your solution is the option and inform my upper level. Since they don't&amp;nbsp; give me the access to copy/ rename or do any thing&amp;nbsp; in the folder access.&amp;nbsp; I thought we can not use any fancy character in name. At least&amp;nbsp; from this post I learned about EXTEND option.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 16:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845964#M334439</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-23T16:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845966#M334440</link>
      <description>&lt;P&gt;Copy to work library then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options msglevel=i;

filename src 'c:\document\ny\ny_2022-dec_accounts.sas7bdat' recfm=n;
filename dest "%sysfunc(pathname(work))/ny_dec2022_accounts.sas7bdat" recfm=n;

data _null_;
   length msg $ 384;
   rc=fcopy('src', 'dest');
   if rc=0 then
      put 'Copied SRC to DEST.';
   else do;
      msg=sysmsg();
      put rc= msg=;
   end;
run;

data expenses;
   set ny_dec2022_accounts;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 16:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845966#M334440</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-11-23T16:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845980#M334443</link>
      <description>&lt;P&gt;You cannot use hyphen in a dataset name.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;456  options validmemname=extend;
NOTE: Windowing environment support for VALIDMEMNAME=EXTEND is limited to Editor, Log, and Output windows.
457  data "test-name"n ;
458    x=1;
459  run;

ERROR: The value TEST-NAME is not a valid SAS member name.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;Reprimand the fool that created the file.&lt;/P&gt;
&lt;P&gt;Rename or copy the file to one with a valid name and then SAS will be able to use it.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 16:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845980#M334443</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-23T16:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845996#M334445</link>
      <description>&lt;P&gt;Change the order of the INFILE statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "ren c:\temp\act\ny_2022-dec_accounts.sas7bdat c:\temp\act\ny_2022_dec_accounts.sas7bdat 2&amp;gt;&amp;amp;1" pipe;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 18:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/845996#M334445</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-23T18:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/846000#M334448</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;- I should have read the documentation for &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n10nwm6blrcrtmn0zdcwyxlwxfjh.htm" target="_blank" rel="noopener"&gt;EXTEND&lt;/A&gt; a bit closer - see below.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350312"&gt;@SASuserlot&lt;/a&gt;&amp;nbsp; - I believe your offending dataset is on your local PC drive. If so just go into Windows Explorer, make a copy of the dataset file, then rename it and remove the hyphen. I can only assume the producer of the file has renamed it manually like this as you can't create a dataset containing a hyphen in the name in SAS itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;EXTEND&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies that a SAS data set name, a SAS data view name, or an item store name must follow these rules:&lt;/P&gt;
&lt;UL class="xisDoc-listUnordered"&gt;
&lt;LI class="xisDoc-item"&gt;Names can include national characters.&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;&lt;STRONG&gt;The name can include special characters, except for the / \ * ? " &amp;lt; &amp;gt; |: -. characters&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Nov 2022 19:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/846000#M334448</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-11-23T19:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset from dataset that doesn't have conventional names ("-" hyphen symbol in</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/846193#M334540</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;. It worked and served my purpose now.&amp;nbsp; &amp;nbsp;I informed the upper level about this issue&amp;nbsp; since its from a vendor.&amp;nbsp; From this post I came to learn extend ( new option) and how to deal with these kind of Issues. Thanks to you all. special mentions to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp; for you time on this issue&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 17:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-from-dataset-that-doesn-t-have-conventional-names/m-p/846193#M334540</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-11-24T17:04:17Z</dc:date>
    </item>
  </channel>
</rss>

