<?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: minor usage issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703376#M215498</link>
    <description>&lt;P&gt;yeah, i tried it with and without the double dots and neither worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 14:22:05 GMT</pubDate>
    <dc:creator>me55</dc:creator>
    <dc:date>2020-12-03T14:22:05Z</dc:date>
    <item>
      <title>minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703173#M215425</link>
      <description>&lt;P&gt;i am trying to build a process that uses last months file to create this months file.&amp;nbsp; for some reason my variable in proc copy is not working.&amp;nbsp; the error i get is...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;560 proc copy in=LIB03 out=WORK;&lt;BR /&gt;561 select FILE_&amp;amp;l2numshortdate.dbf;&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;WARNING: Apparent symbolic reference L2NUMSHORTDATE not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, -, /, :.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;562 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i cannot figure it out.&amp;nbsp; i am certain i have used very similar code before but it is not working here...code below...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null1_;&lt;BR /&gt;td00=today();&lt;BR /&gt;td01=intnx('month',today(),-5);&lt;BR /&gt;td02=intnx('month',today(),-6);&lt;BR /&gt;td03=intnx('month',today(),-7);&lt;BR /&gt;ytrd00=put(td00,YYMMN.);&lt;BR /&gt;ytrd01=put(td01,YYMMN.);&lt;BR /&gt;ytrd02=put(td02,YYMMN.);&lt;BR /&gt;ytrd03=put(td03,YYMMN.);&lt;BR /&gt;ytrd04=put(td04,YYMMN.);&lt;BR /&gt;call symput('l0numshortdate',ytrd00);&lt;BR /&gt;call symput('l1numshortdate',ytrd01);&lt;BR /&gt;call symput('l2numshortdate',ytrd02);&lt;BR /&gt;call symput('l3numshortdate',ytrd03);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME LIB01 '/sas/loc_01/files/';&lt;BR /&gt;LIBNAME LIB02 '/sas/loc_02/files/';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc copy in=LIB01 out=WORK;&lt;BR /&gt;select ARCHIVE;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc copy in=LIB02 out=WORK;&lt;BR /&gt;select FILE_&amp;amp;l2numshortdate.dbf;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first proc copy is running but&amp;nbsp; the second fails at the &amp;amp;...&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 18:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703173#M215425</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-02T18:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703177#M215427</link>
      <description>&lt;P&gt;Please do not show us portions of the log separated from the code. Please do show us the ENTIRE log for this sequence of code, with nothing chopped out, 100% of it, the CODE as it appears in the log, the NOTEs, the ERRORs, the WARNINGs, &lt;STRONG&gt;all&lt;/STRONG&gt; of the log for this sequence of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. DO NOT SKIP THIS STEP. This preserves the formatting and makes the log more readable and more usable.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 18:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703177#M215427</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-02T18:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703183#M215431</link>
      <description>&lt;P&gt;Add the following at the top of the code, re-run, check the log and post the log to this thread&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint symbolgen mlogic;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Dec 2020 19:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703183#M215431</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-12-02T19:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703186#M215433</link>
      <description>&lt;P&gt;Looks like you are missing a '.' to separator.&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;proc copy in=LIB03 out=WORK;
    select FILE_&amp;amp;l2numshortdate&lt;FONT size="5" color="#993300"&gt;..&lt;/FONT&gt;dbf;
 run;&lt;/CODE&gt;&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;</description>
      <pubDate>Wed, 02 Dec 2020 19:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703186#M215433</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-12-02T19:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703188#M215434</link>
      <description>&lt;PRE&gt;561 select FILE_&amp;amp;l2numshortdate.dbf;
_
22
200
WARNING: Apparent symbolic reference L2NUMSHORTDATE not resolved.&lt;/PRE&gt;
&lt;P&gt;So, where do you define a macro variable named "l2numshortdate"? That error means that you have not created the macro variable, or attempted to and failed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the . is used as an end of macro variable marker. If the file that you expect to use needs a period after a macro variable you need to double them up. Please run the following code and read the log.&lt;/P&gt;
&lt;PRE&gt;%let macrovar = Sometext;

%put Without two dots: &amp;amp;macrovar.dbf;
%put With two dots: &amp;amp;macrovar..dbf;&lt;/PRE&gt;
&lt;P&gt;Please when posting copied text from the log paste it into a code box opened using the &amp;lt;/&amp;gt; icon on the forum. That will preserve the formatting of the text making it easier to read and keep the locations of any diagnostic characters provided by SAS in the correct place relative to the code.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 19:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703188#M215434</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-02T19:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703273#M215475</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223452"&gt;@r_behata&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Looks like you are missing a '.' to separator.&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;proc copy in=LIB03 out=WORK;
    select FILE_&amp;amp;l2numshortdate&lt;FONT size="5" color="#993300"&gt;..&lt;/FONT&gt;dbf;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="4"&gt;No, not in this case. With the extra dot an illegal dataset-name would be the result.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 06:21:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703273#M215475</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-12-03T06:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703375#M215497</link>
      <description>&lt;P&gt;yeah, what they said below...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703375#M215497</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T14:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703376#M215498</link>
      <description>&lt;P&gt;yeah, i tried it with and without the double dots and neither worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703376#M215498</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T14:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703379#M215500</link>
      <description>yeah, that changed nothing...</description>
      <pubDate>Thu, 03 Dec 2020 14:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703379#M215500</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T14:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703384#M215503</link>
      <description>&lt;P&gt;Combine your code that sets the macro variable with the PROC COPY code, and use the option&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint mlogic symbolgen;

%let .....

proc copy .....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then post the complete log from that into a window opened with the &amp;lt;/&amp;gt; button.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 14:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703384#M215503</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-03T14:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703395#M215508</link>
      <description>&lt;P&gt;this is multiple issues...the first was, i had to change the program location of the variables.&amp;nbsp; when i added the variables to the process flow in the correct spot in the project tree window, that did not change the order when they are run so when i added the new program, it added to the end of the process flow and so that is why it was not resolving.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, i corrected that and now i am getting a new issue which i dont really understand.&amp;nbsp; so...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variable definition...&lt;/P&gt;&lt;PRE&gt;data _null1_;
	options mprint symbolgen mlogic;
	td00=today();
  	td01=intnx('month',today(),-5);
  	td02=intnx('month',today(),-6);
	td03=intnx('month',today(),-7);
	ytrd00=put(td00,YYMMN.);
	ytrd01=put(td01,YYMMN.);
	ytrd02=put(td02,YYMMN.);
	ytrd03=put(td03,YYMMN.);
	ytrd04=put(td04,YYMMN.);
	call symput('l0numshortdate',ytrd00);
	call symput('l1numshortdate',ytrd01);
	call symput('l2numshortdate',ytrd02);
	call symput('l3numshortdate',ytrd03);
run;&lt;/PRE&gt;&lt;P&gt;code to run it...&lt;/P&gt;&lt;PRE&gt;LIBNAME LIB01 '/loc_01/';
LIBNAME LIB02 '/loc_02/';

proc copy in=LIB01 out=WORK;
	select FILE_ARCHIVE;
run;

%let FILEA_file=FILEA_&amp;amp;l2numshortdate..dbf;

proc copy in=LIB02 out=WORK;
	select &amp;amp;FILEA_file;
run;&lt;/PRE&gt;&lt;P&gt;resulting error...&lt;/P&gt;&lt;PRE&gt;25         GOPTIONS ACCESSIBLE;
SYMBOLGEN:  Macro variable L2NUMSHORTDATE resolves to 202006
26         
27         %let FILEA_file=FILEA_&amp;amp;l2numshortdate..dbf;
28         
29        


30         proc copy in=LIB02 out=WORK;
31         	
SYMBOLGEN:  Macro variable FILEA_FILE resolves to FILEA_202006.dbf
31       !  select &amp;amp;FILEA_file;
NOTE: Line generated by the macro variable "FILEA_FILE".
31          FILEA_202006.dbf
            _______________
            22
            201
ERROR 22-322: Expecting a name.  
ERROR 201-322: The option is not recognized and will be ignored.
32         run;&lt;/PRE&gt;&lt;P&gt;what am i missing here?&amp;nbsp; i tried putting the variable inside the proc copy and as a macro and i keep getting the same error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703395#M215508</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T15:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703407#M215514</link>
      <description>&lt;P&gt;You are using PROC COPY.&amp;nbsp; So the names you want to list in the SELECT statement are the names of MEMBERS of the LIBREF listed in the IN= option.&amp;nbsp; Member names do NOT contain special characters like periods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to do?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are you sticking DBF extension onto the member name here?&lt;/P&gt;
&lt;P&gt;What members exist in LIB02?&lt;/P&gt;
&lt;P&gt;Run PROC CONTENTS to see what is there.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=lib02._all_; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703407#M215514</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-12-03T15:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703415#M215519</link>
      <description>i am trying to copy a file that ends with a date. so it is FILE_YYYYMM from its home which is LIB02 to my work directory. i will not hard code the date and since this same format has worked in many other instances, i figured it would work here. the file is a dbf, that is why i am putting the dbf extension on there.</description>
      <pubDate>Thu, 03 Dec 2020 15:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703415#M215519</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T15:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703420#M215522</link>
      <description>&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1qedclb9msdcen14bnjawk8xp0w.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC COPY&lt;/A&gt; is for SAS files (datasets, views, catalogs); A .dbf (dBase) is NOT a SAS file, it is an external file.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 15:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703420#M215522</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-03T15:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703432#M215530</link>
      <description>well, i solved my own problem. i had to wo that issue...&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2020 16:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703432#M215530</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T16:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703433#M215531</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/113010"&gt;@me55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please tell us what the solution was.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 16:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703433#M215531</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-03T16:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: minor usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703489#M215556</link>
      <description>i realized that copying the table would be the same essentially as importing the table so if copy couldnt handle it, import proabably would...so, i imported the table from another directory into the work directory.</description>
      <pubDate>Thu, 03 Dec 2020 19:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/minor-usage-issue/m-p/703489#M215556</guid>
      <dc:creator>me55</dc:creator>
      <dc:date>2020-12-03T19:40:13Z</dc:date>
    </item>
  </channel>
</rss>

