<?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: p106a02.sas export unsuccessful in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987459#M43831</link>
    <description>&lt;PRE&gt; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         libname pg1 "S:/workshop/EPG1V2/data/storm_final.sas7bdat";
 ERROR: Library PG1 is not in a valid format for access method RANDOM.
 ERROR: Error in the LIBNAME statement.
 74         
 75         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

libname pg1 "S:/workshop/EPG1V2/data/storm_final.sas7bdat";&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 May 2026 10:28:16 GMT</pubDate>
    <dc:creator>ivarenho</dc:creator>
    <dc:date>2026-05-07T10:28:16Z</dc:date>
    <item>
      <title>p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987418#M43825</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ivarenho_0-1778081098011.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/114791i398C768EC419EFB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ivarenho_0-1778081098011.png" alt="ivarenho_0-1778081098011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried using the macro and not using the macro and I'm at a loss.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-05-06 112707.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/114792iC874CBC57EA05C3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-05-06 112707.png" alt="Screenshot 2026-05-06 112707.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 15:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987418#M43825</guid>
      <dc:creator>ivarenho</dc:creator>
      <dc:date>2026-05-06T15:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987420#M43826</link>
      <description>&lt;P&gt;The first ERROR message (the one in BLACK instead of RED) in your first picture is the one you need to fix.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-05-06 at 11.43.15 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/114793iBF12A7C34DAFADC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-05-06 at 11.43.15 AM.png" alt="Screenshot 2026-05-06 at 11.43.15 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That error means that the dataset you are trying to export does not exist.&amp;nbsp; SAS could not find a dataset named STORM_FINAL in the libref named PG1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure you have defined the PG1 libref.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure that the directory ("folder") that it points to contains a file named storm_final.sas7bdat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 15:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987420#M43826</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-05-06T15:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987427#M43827</link>
      <description>In the autoexec. sas file i have libname pg1 "S/workshop/EPG1V2/"; but when I tried to change it to storm_final.sas7bdat I got an error I believe.</description>
      <pubDate>Wed, 06 May 2026 16:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987427#M43827</guid>
      <dc:creator>ivarenho</dc:creator>
      <dc:date>2026-05-06T16:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987428#M43828</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/480946"&gt;@ivarenho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;In the autoexec. sas file i have libname pg1 "S/workshop/EPG1V2/"; but when I tried to change it to storm_final.sas7bdat I got an error I believe.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So that is not a valid path.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your SAS session is running on a Windows machine then you need a colon after the S drive letter.&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier" color="#FF0000"&gt;S:/workshop/EPG1V2/&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your SAS session is running on a Unix machine then you need a fully qualified path. So the path needs to start with the root node.&amp;nbsp; &amp;nbsp;&lt;FONT face="courier new,courier" color="#FF0000"&gt;/S/workshop/EPG1V2/&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The path used in the LIBNAME statement needs to point to a directory ("folder") and not to a file, so storm_final.sas7bdat should not appear in the LIBNAME statement that defines the PG1 libref.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the photograph you posted you can see in the SAS/Studio Files and Folders tab that there is no sas7bdat files in that EPG1V2 folder.&amp;nbsp; Perhaps you should be using the data subfolder?&amp;nbsp;&lt;FONT face="courier new,courier" color="#FF0000"&gt;S:/workshop/EPG1V2/data/&lt;/FONT&gt; Reread the instructions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS/Studio expand the data folder and check if the storm_final.sas7bdat file is there.&amp;nbsp; If you can find the file then right click on the folder that contains it and ask for Properties.&amp;nbsp; That should show you the exact string you need to use in the LIBNAME statement to point to that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you cannot find the file then go back to the earlier steps that setup the files and make sure they worked.&amp;nbsp; Perhaps when you ran those steps you also had the wrong path in the LIBNAME statement and so the dataset was never created.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 16:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987428#M43828</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-05-06T16:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987429#M43829</link>
      <description>Yes when i did try to run that in the past i got and still get two errors the first is library pg is not in valid format for access method random and error in lib name statement, so i would assume i need to go back and reformat the data?</description>
      <pubDate>Wed, 06 May 2026 16:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987429#M43829</guid>
      <dc:creator>ivarenho</dc:creator>
      <dc:date>2026-05-06T16:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987441#M43830</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/480946"&gt;@ivarenho&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes when i did try to run that in the past i got and still get two errors the first is library pg is not in valid format for access method random and error in lib name statement, so i would assume i need to go back and reformat the data?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will need to show the log for the actual code you ran.&amp;nbsp; Instead of taking pictures of the text just copy the text from the LOG and paste it into the pop-up window you get when you click on the Insert Code icon (looks like &amp;lt;/&amp;gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most likely a message like that would be generated if you tried to point a libref at a FILE instead of a DIRECTORY.&amp;nbsp; Here is an example using a dataset I have in my home directory on the SAS server.&lt;/P&gt;
&lt;PRE&gt; 73         libname x "~/class.sas7bdat";
 ERROR: Library X is not in a valid format for access method RANDOM.
 ERROR: Error in the LIBNAME statement.
 74         libname x "~";
 NOTE: Libref X was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /home/tom.abernathy
 75         data _null_;
 76           set x.class;
 77           put (_all_) (=);
 78         run;
 
 Student Name=Alfred Sex=M Age=14 Height=69 Weight=112.5
 Student Name=Alice Sex=F Age=13 Height=56.5 Weight=84
 Student Name=Barbara Sex=F Age=13 Height=65.3 Weight=98
 Student Name=Carol Sex=F Age=14 Height=62.8 Weight=102.5
 Student Name=Henry Sex=M Age=14 Height=63.5 Weight=102.5
 Student Name=James Sex=M Age=12 Height=57.3 Weight=83
 Student Name=Jane Sex=F Age=12 Height=59.8 Weight=84.5
 Student Name=Janet Sex=F Age=15 Height=62.5 Weight=112.5
 Student Name=Jeffrey Sex=M Age=13 Height=62.5 Weight=84
 Student Name=John Sex=M Age=12 Height=59 Weight=99.5
 Student Name=Joyce Sex=F Age=11 Height=51.3 Weight=50.5
 Student Name=Judy Sex=F Age=14 Height=64.3 Weight=90
 Student Name=Louise Sex=F Age=12 Height=56.3 Weight=77
 Student Name=Mary Sex=F Age=15 Height=66.5 Weight=112
 Student Name=Philip Sex=M Age=16 Height=72 Weight=150
 Student Name=Robert Sex=M Age=12 Height=64.8 Weight=128
 Student Name=Ronald Sex=M Age=15 Height=67 Weight=133
 Student Name=Thomas Sex=M Age=11 Height=57.5 Weight=85
 Student Name=William Sex=M Age=15 Height=66.5 Weight=112
 NOTE: There were 19 observations read from the data set X.CLASS.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2026 18:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987441#M43830</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-05-06T18:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987459#M43831</link>
      <description>&lt;PRE&gt; OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         libname pg1 "S:/workshop/EPG1V2/data/storm_final.sas7bdat";
 ERROR: Library PG1 is not in a valid format for access method RANDOM.
 ERROR: Error in the LIBNAME statement.
 74         
 75         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

libname pg1 "S:/workshop/EPG1V2/data/storm_final.sas7bdat";&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 May 2026 10:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987459#M43831</guid>
      <dc:creator>ivarenho</dc:creator>
      <dc:date>2026-05-07T10:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987469#M43841</link>
      <description>&lt;P&gt;Point the libref at the DIRECTORY that contains the FILE that is the SAS dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname pg1 "S:/workshop/EPG1V2/data/";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 May 2026 12:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987469#M43841</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-05-07T12:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: p106a02.sas export unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987472#M43842</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/480946"&gt;@ivarenho&lt;/a&gt;&amp;nbsp;, I think the reason that the file did not export successfully was: the &lt;EM&gt;&lt;STRONG&gt;pg1&lt;/STRONG&gt;&lt;/EM&gt; library did not create properly, and so that SAS could not locate the dataset &lt;STRONG&gt;&lt;EM&gt;storm_final&lt;/EM&gt;&lt;/STRONG&gt;. To solve the problem, you need to assign the &lt;STRONG&gt;&lt;EM&gt;pg1&lt;/EM&gt;&lt;/STRONG&gt; library first, and so that SAS knows where, or in which folder, to get this dataset. The code for creating &lt;STRONG&gt;&lt;EM&gt;pg1&lt;/EM&gt;&lt;/STRONG&gt; library is as follows, according to your screen capture. Write this line of code and run it before you write the code for exporting data. After you run this line of code, the log message should show that the library &lt;STRONG&gt;&lt;EM&gt;pg1&lt;/EM&gt;&lt;/STRONG&gt; is created successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname pg1 "S:/workshop/EPG1V2/data";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the error message you got, the log tells you that your &lt;STRONG&gt;&lt;EM&gt;libname&lt;/EM&gt;&lt;/STRONG&gt; statement did not wrote correctly (i.e., the syntax was not correct), the reason was you mistakenly included the file name (&lt;STRONG&gt;&lt;EM&gt;storm_final.sas7bdat&lt;/EM&gt;&lt;/STRONG&gt;) in the &lt;STRONG&gt;&lt;EM&gt;libname&lt;/EM&gt;&lt;/STRONG&gt; statement, and you need to delete it from your code. The &lt;STRONG&gt;&lt;EM&gt;pg1&lt;/EM&gt;&lt;/STRONG&gt; library is to be assigned to a folder, not a datafile. You cannot assign a &lt;STRONG&gt;&lt;EM&gt;libname&lt;/EM&gt;&lt;/STRONG&gt; to a dataset, you can only assign a &lt;STRONG&gt;&lt;EM&gt;libname&lt;/EM&gt;&lt;/STRONG&gt; to a folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2026 13:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/p106a02-sas-export-unsuccessful/m-p/987472#M43842</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2026-05-07T13:14:33Z</dc:date>
    </item>
  </channel>
</rss>

