<?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: WORK.G.DATA does not exist in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780076#M248517</link>
    <description>&lt;P&gt;Please show the code that is supposed to create the work dataset named G that your SQL code is trying to read from.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code you posted defines a &lt;STRONG&gt;libref&lt;/STRONG&gt; named G.&amp;nbsp; It then correctly uses it to reference a dataset in that library to create a dataset named WORK.C.&amp;nbsp; But there is not code show to create a dataset named G.&lt;/P&gt;</description>
    <pubDate>Sat, 13 Nov 2021 00:41:41 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-11-13T00:41:41Z</dc:date>
    <item>
      <title>WORK.G.DATA does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780072#M248513</link>
      <description>&lt;P&gt;Hello, I am unsure why the line: "order by t.month" is giving an error:&lt;/P&gt;&lt;P&gt;ERROR: File WORK.G.DATA does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me to understand why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;libname G "/server/File/location";
libname O "&amp;amp;myfiles_root/file/location"Access=readonly;

%let RunYear = 2021;
%let DateA = 202108_211011;
%let DateB = 2021_202110;

data C;
set G.expdtrs_&amp;amp;RunYear._r&amp;amp;DateA.;
run;

data A;
set OSC.tcoc_part_a_&amp;amp;DateB.;
run;

data B;
set OSC.tcoc_part_b_&amp;amp;DateB.;
run;

/* Compare numbers*/
proc sql;
    create table compare as
    select t.month
          ,t.apple
          ,t.banana
          ,a.orange
          ,b.cherry
          ,case
               when t.apple = a.orange
                   then 'YES'
               else 'NO'
           end as difference_a_o
          ,case
               when t.banana = b.cherry
                   then 'YES'
               else 'NO'
           end as difference_b_c
    from G t
    left join A a
        on t.month = a.month
    left join B b
        on t.month = b.month
    order by t.month
    ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Nov 2021 00:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780072#M248513</guid>
      <dc:creator>leeleelee</dc:creator>
      <dc:date>2021-11-13T00:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: WORK.G.DATA does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780075#M248516</link>
      <description>&lt;P&gt;Please show the full log.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 00:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780075#M248516</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-13T00:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: WORK.G.DATA does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780076#M248517</link>
      <description>&lt;P&gt;Please show the code that is supposed to create the work dataset named G that your SQL code is trying to read from.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code you posted defines a &lt;STRONG&gt;libref&lt;/STRONG&gt; named G.&amp;nbsp; It then correctly uses it to reference a dataset in that library to create a dataset named WORK.C.&amp;nbsp; But there is not code show to create a dataset named G.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2021 00:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780076#M248517</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-13T00:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: WORK.G.DATA does not exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780077#M248518</link>
      <description>&lt;P&gt;There does not appear to be any reason to create the datasets A, B, and C.&amp;nbsp; Just reference the real datasets directly with your SQL code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;...
   from G.expdtrs_&amp;amp;RunYear._r&amp;amp;DateA. t
    left join OSC.tcoc_part_a_&amp;amp;DateB. a
        on t.month = a.month
    left join OSC.tcoc_part_b_&amp;amp;DateB. b
        on t.month = b.month
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Nov 2021 00:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WORK-G-DATA-does-not-exist/m-p/780077#M248518</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-13T00:45:07Z</dc:date>
    </item>
  </channel>
</rss>

