<?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: LIBREF NOT ASSIGNED in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735415#M28670</link>
    <description>&lt;P&gt;The description of the actions taken is still a little confusing. It sounds like you copied a bunch of XPT files into a folder and you want to convert those XPT files into datasets in the same folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A SAS libref will point to a directory when using normal (BASE) engine.&amp;nbsp; But when using the XPORT engine it needs to point to file.&amp;nbsp; Each XPT file could contain multiple datasets, but I suspect that NHANES is just publishing one member per file.&amp;nbsp; So the code I posted before should work.&amp;nbsp; You just need to repeat it for every file you want to convert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Point a libref to the place where you want to write the SAS datasets.&lt;/P&gt;
&lt;P&gt;Then for each XPT file point a libref at the file using the XPORT engine and run PROC COPY to copy all of the members from the XPT file into the target libref.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the list of filenames in a dataset you can use it to generate the code. Otherwise just copy and paste the code and change the filename used each time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NHANES published many dataset for each WAVE.&amp;nbsp; The base name for a dataset stays the same and the suffix changes for each wave.&amp;nbsp; So this link,&amp;nbsp;&lt;A href="https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/DEMO_J.XPT" target="_blank"&gt;https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/DEMO_J.XPT&lt;/A&gt;, is to the demographics data for the 2017-2018 wave and this link,&lt;A href="https://wwwn.cdc.gov/Nchs/Nhanes/2015-2016/DEMO_I.XPT" target="_blank"&gt;https://wwwn.cdc.gov/Nchs/Nhanes/2015-2016/DEMO_I.XPT&lt;/A&gt;&amp;nbsp;, is for the same data for the previous 2015-2016 wave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So to copy from those two files into dataset in the NHANES libref you would use code like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname NHANES  '/home/u47547945/NHANES';

libname DEMO_I '/home/u47547945/NHANES/DEMO_I.XPT';
proc copy inlib=demo_i out=nhanes; run;

libname DEMO_J '/home/u47547945/NHANES/DEMO_J.XPT';
proc copy inlib=demo_j out=nhanes; run;

...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it is probably simpler to just reuse the name libref to point the transport file so there is less to modify as you replicate the code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname FROM '/home/u47547945/NHANES/DEMO_I.XPT';
proc copy inlib=from out=nhanes; run;

libname FROM '/home/u47547945/NHANES/DEMO_J.XPT';
proc copy inlib=from out=nhanes; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 04:16:59 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-04-20T04:16:59Z</dc:date>
    <item>
      <title>LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734873#M28641</link>
      <description>&lt;P&gt;I keep having an issue to run my program. There is an error stating that my libref is not assigned. is it because of the format of the data downloaded from NHANES (sas viewer; xpt)? see below. thanks for any guidance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME NHANES "C:\NHANES\DATA\BMX_H.XPT"&lt;/P&gt;&lt;P&gt;libname BMX_H xport "C:\NHANES\DATA\BMX_H.XPT";&lt;BR /&gt;libname BMX_G xport "C:\NHANES\DATA\BMX_G.XPT";&lt;BR /&gt;libname DEMO_H xport "C:\NHANES\DATA\DEMO_H.XPT";&lt;BR /&gt;libname DEMO_G xport "C:\NHANES\DATA\DEMO_G.XPT";&lt;BR /&gt;proc copy in=BMX_H out=NHANES;&lt;BR /&gt;run;&lt;BR /&gt;proc copy in=BMX_G out=NHANES;&lt;BR /&gt;run;&lt;BR /&gt;proc copy in=DEMO_H out=NHANES;&lt;BR /&gt;run;&lt;BR /&gt;proc copy in=DEMO_G out=NHANES;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=DEMO_G;&lt;BR /&gt;BY SEQN;&lt;BR /&gt;PROC SORT DATA=DEMO_H;&lt;BR /&gt;BY SEQN;&lt;BR /&gt;PROC SORT DATA=BMX_G;&lt;BR /&gt;BY BMXBMI;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="dijitBorderContainer dijitContainer row-fluid dijitLayoutContainer"&gt;&lt;DIV class="dijitContentPane dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane dijitAlignCenter dijitContentPaneSingleChild"&gt;&lt;DIV class="dijitBorderContainer dijitContainer row-fluid dijitLayoutContainer"&gt;&lt;DIV class="dijitContentPane dijitAlignCenter dijitContentPaneSingleChild dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane"&gt;&lt;DIV class="tabs dijitBorderContainer dijitContainer sasStudioTabsParentContainer dijitLayoutContainer dojoDndSource dojoDndTarget dojoDndContainerOver"&gt;&lt;DIV class="dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled sasStudioTabsTabContainer sasStudioTabsTabContainerVertical sasStudioTabsTop dijitBorderContainer-child dijitBorderContainer-dijitTabContainerTop dijitBorderContainerPane dijitAlignCenter"&gt;&lt;DIV class="dijitTabPaneWrapper dijitTabContainerTop-container dijitAlignCenter"&gt;&lt;DIV class="dijitTabContainerTopChildWrapper dijitVisible"&gt;&lt;DIV class="dijitBorderContainer dijitContainer sasStudioTabsTabContainerChild dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitBorderContainer dijitLayoutContainer"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dijitBorderContainer-child dijitBorderContainer-dijitBorderContainer dijitBorderContainerPane dijitAlignCenter dijitLayoutContainer dojoDndSource dojoDndTarget dojoDndContainerOver"&gt;&lt;DIV class="dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled sasSuiteTabs dijitAlignCenter dijitBorderContainer-child dijitBorderContainer-dijitTabContainerTop dijitBorderContainerPane"&gt;&lt;DIV class="dijitTabPaneWrapper dijitTabContainerTop-container dijitAlignCenter"&gt;&lt;DIV class="dijitTabContainerTopChildWrapper dijitVisible"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitBorderContainer dijitLayoutContainer"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dijitBorderContainer-child dijitBorderContainer-dijitBorderContainer dijitBorderContainerPane dijitAlignCenter dijitLayoutContainer"&gt;&lt;DIV class="dijitContentPane dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane dijitAlignCenter"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 LIBNAME NHANES "C:\NHANES\DATA"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 libname BMX_H xport "C:\NHANES\DATA\BMX_H.XPT";&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref NHANES is not assigned.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error in the LIBNAME statement.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-7: Invalid option name LIBNAME.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 libname BMX_G xport "C:\NHANES\DATA\BMX_G.XPT";&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Libref BMX_G was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Engine: XPORT&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Physical Name: /pbr/biconfig/940/Lev1/SASApp/C:\NHANES\DATA\BMX_G.XPT&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 libname DEMO_H xport "C:\NHANES\DATA\DEMO_H.XPT";&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Libref DEMO_H was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Engine: XPORT&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Physical Name: /pbr/biconfig/940/Lev1/SASApp/C:\NHANES\DATA\DEMO_H.XPT&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 libname DEMO_G xport "C:\NHANES\DATA\DEMO_G.XPT";&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Libref DEMO_G was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Engine: XPORT&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Physical Name: /pbr/biconfig/940/Lev1/SASApp/C:\NHANES\DATA\DEMO_G.XPT&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 proc copy in=BMX_H out=NHANES;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref NHANES is not assigned.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 467.03k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 31144.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 04/17/2021 01:04:56 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 594 Switch Count 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 57&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 8&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80 proc copy in=BMX_G out=NHANES;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref NHANES is not assigned.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 579.15k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 31144.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 04/17/2021 01:04:56 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 595 Switch Count 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 48&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 8&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;82 proc copy in=DEMO_H out=NHANES;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;83 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref NHANES is not assigned.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 579.15k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 31144.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 04/17/2021 01:04:56 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 596 Switch Count 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 49&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 8&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84 proc copy in=DEMO_G out=NHANES;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;85 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Libref NHANES is not assigned.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 579.15k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 31144.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 04/17/2021 01:04:56 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 597 Switch Count 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 48&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 8&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;86&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;87 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;99&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="dijitContentPane statusBar dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane dijitAlignBottom"&gt;&lt;DIV class="statusBarMessage"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 13:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734873#M28641</guid>
      <dc:creator>PFM151632</dc:creator>
      <dc:date>2021-04-17T13:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734874#M28642</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME NHANES "C:\NHANES\DATA"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This won't work. There has to be a semi-colon on the end of the LIBNAME statement for this to work.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 13:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734874#M28642</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-04-17T13:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734888#M28644</link>
      <description>&lt;P&gt;The libnames that worked show you more about what is wrong than the ones that failed.&lt;/P&gt;
&lt;PRE&gt;75 libname BMX_G xport "C:\NHANES\DATA\BMX_G.XPT";
NOTE: Libref BMX_G was successfully assigned as follows:
Engine: XPORT
Physical Name: /pbr/biconfig/940/Lev1/SASApp/C:\NHANES\DATA\BMX_G.XPT&lt;/PRE&gt;
&lt;P&gt;Your SAS session is running on UNIX so it cannot use Windows style directory names.&amp;nbsp; Most likely SAS is actually running on a different machine than where you have that C: drive mounted.&lt;/P&gt;
&lt;P&gt;Place the data on a directory that exists on the Unix machine where SAS is running and use the right path that points to that folder in your SAS code.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 18:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/734888#M28644</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-17T18:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735377#M28667</link>
      <description>&lt;P&gt;Thank you, I finally succeeded to create my library NHANES.&lt;/P&gt;&lt;P&gt;Now I would like to xport my different files (e.g. ALQ_01 ALQ_02 etc...) to NHANES library and then proc copy but I do not succeed to create the subfolders in NHANES library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PFM151632_0-1618870078655.png" style="width: 959px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58338iE841D005B8F421E4/image-dimensions/959x446?v=v2" width="959" height="446" role="button" title="PFM151632_0-1618870078655.png" alt="PFM151632_0-1618870078655.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then when I initiate the proc copy I have an error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 libname ALQ_G '/home/u47547945/NHANES';&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Libref ALQ_G refers to the same physical library as NHANES.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Libref ALQ_G was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Engine: V9&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Physical Name: /home/u47547945/NHANES&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 run;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 proc copy in=ALQ_G out= NHANES/ALQ_G; run;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;_&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;200&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, ACCEL, ALTER, CLONE, CONSTRAINT, DATECOPY, ENCRYPTKEY, FORCE, IN,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;INDD, INDEX, INLIB, MEMTYPE, MOVE, MT, MTYPE, NOACCEL, NOCLONE, OUT, OUTDD, OUTLIB, OVERRIDE, PROTECT, PW.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Statements not processed because of errors noted above.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 523.15k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 30120.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 04/19/2021 10:09:22 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 200 Switch Count 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 56&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 8&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;89&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Is there any guidance document that I could use for step by step approach ?&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Apr 2021 22:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735377#M28667</guid>
      <dc:creator>PFM151632</dc:creator>
      <dc:date>2021-04-19T22:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735380#M28668</link>
      <description>&lt;P&gt;Libraries don't have subfolders.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to do?&lt;/P&gt;
&lt;P&gt;Are you trying to copy from a series of transport files into a single directory with all of the individual SAS datsets in it?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname NHANES 'some path';
libname ALQ_G xport 'some filename';
proc copy inlib=alq_g out=nhanes; run;

libname ALQ_F xport 'some filename';
proc copy inlib=alq_f out=nhanes; run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Apr 2021 22:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735380#M28668</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-19T22:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735389#M28669</link>
      <description>&lt;P&gt;I am trying to&amp;nbsp;&lt;STRONG&gt;Convert .XPT to SAS Datasets &lt;/STRONG&gt;after having uploaded my datasets in my folders and copy them in the library. I have created a folder NHANES in library but the datasets in xpt format that I tried to copy in this NHANES library are copied in the library as individual xpt files.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 00:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735389#M28669</guid>
      <dc:creator>PFM151632</dc:creator>
      <dc:date>2021-04-20T00:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735415#M28670</link>
      <description>&lt;P&gt;The description of the actions taken is still a little confusing. It sounds like you copied a bunch of XPT files into a folder and you want to convert those XPT files into datasets in the same folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A SAS libref will point to a directory when using normal (BASE) engine.&amp;nbsp; But when using the XPORT engine it needs to point to file.&amp;nbsp; Each XPT file could contain multiple datasets, but I suspect that NHANES is just publishing one member per file.&amp;nbsp; So the code I posted before should work.&amp;nbsp; You just need to repeat it for every file you want to convert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Point a libref to the place where you want to write the SAS datasets.&lt;/P&gt;
&lt;P&gt;Then for each XPT file point a libref at the file using the XPORT engine and run PROC COPY to copy all of the members from the XPT file into the target libref.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the list of filenames in a dataset you can use it to generate the code. Otherwise just copy and paste the code and change the filename used each time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NHANES published many dataset for each WAVE.&amp;nbsp; The base name for a dataset stays the same and the suffix changes for each wave.&amp;nbsp; So this link,&amp;nbsp;&lt;A href="https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/DEMO_J.XPT" target="_blank"&gt;https://wwwn.cdc.gov/Nchs/Nhanes/2017-2018/DEMO_J.XPT&lt;/A&gt;, is to the demographics data for the 2017-2018 wave and this link,&lt;A href="https://wwwn.cdc.gov/Nchs/Nhanes/2015-2016/DEMO_I.XPT" target="_blank"&gt;https://wwwn.cdc.gov/Nchs/Nhanes/2015-2016/DEMO_I.XPT&lt;/A&gt;&amp;nbsp;, is for the same data for the previous 2015-2016 wave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So to copy from those two files into dataset in the NHANES libref you would use code like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname NHANES  '/home/u47547945/NHANES';

libname DEMO_I '/home/u47547945/NHANES/DEMO_I.XPT';
proc copy inlib=demo_i out=nhanes; run;

libname DEMO_J '/home/u47547945/NHANES/DEMO_J.XPT';
proc copy inlib=demo_j out=nhanes; run;

...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it is probably simpler to just reuse the name libref to point the transport file so there is less to modify as you replicate the code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname FROM '/home/u47547945/NHANES/DEMO_I.XPT';
proc copy inlib=from out=nhanes; run;

libname FROM '/home/u47547945/NHANES/DEMO_J.XPT';
proc copy inlib=from out=nhanes; run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 04:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/735415#M28670</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-20T04:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/736530#M28735</link>
      <description>I found the solution. resolved</description>
      <pubDate>Fri, 23 Apr 2021 00:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/736530#M28735</guid>
      <dc:creator>PFM151632</dc:creator>
      <dc:date>2021-04-23T00:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: LIBREF NOT ASSIGNED</title>
      <link>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/736531#M28736</link>
      <description>&lt;P&gt;Thank you ! it worked.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 00:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/LIBREF-NOT-ASSIGNED/m-p/736531#M28736</guid>
      <dc:creator>PFM151632</dc:creator>
      <dc:date>2021-04-23T00:43:07Z</dc:date>
    </item>
  </channel>
</rss>

