<?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: Impossible to load/create NHANES .dat dataset with SAS Studio in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761788#M241107</link>
    <description>&lt;P&gt;Ok thank you so much for the detailed explanations and the pictures, it helped a lot. I'd try to find the path and solve the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geoffrey&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 12:51:56 GMT</pubDate>
    <dc:creator>geogeo14000</dc:creator>
    <dc:date>2021-08-16T12:51:56Z</dc:date>
    <item>
      <title>Impossible to load/create NHANES .dat dataset with SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/760899#M240683</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a french machine learning student ans I would really like to use a NHANES dataset to perform linear regression with python, but as the data is made for SAS i want first to create the dataset thanks to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the free SAS Studio related to the SAS University Edition, I contacted NHANES to know the steps to follow in order to create the dataset. I did as it was indicated in their e-mails but I still have errors and as I'm totally new to SAS I can't figure out why I'm still struggling with creating the dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the link to the NHANES dataset, followed by the errors I got when I run the SAS code provided (after replacing filename with the location of the data downloaded and saved as .dat on my computer) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wwwn.cdc.gov/nchs/nhanes/nhanes3/datafiles.aspx#core" target="_blank" rel="noopener"&gt;https://wwwn.cdc.gov/nchs/nhanes/nhanes3/datafiles.aspx#core&lt;/A&gt;&amp;nbsp;the first Household Adult File in the core data section is the dataset I want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the errors and warings :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also have the following warnings :&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;WARNING: The data set WORK.WORK may be incomplete. When this step was stopped there were 0 observations and 1238 variables.&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;WARNING: Data set WORK.WORK was not replaced because this step was interrupted.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;(there was a part in french in the last warning that I translated to english myself)&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;Help would be much appreciated&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;Thanks a lot,&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;Best regards&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="yiv3768930880ydpd79f285csasWarning"&gt;Geoffrey Laforest&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 12:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/760899#M240683</guid>
      <dc:creator>geogeo14000</dc:creator>
      <dc:date>2021-08-11T12:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible to load/create NHANES .dat dataset with SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761203#M240820</link>
      <description>&lt;P&gt;The SAS code provided is incomplete and includes non-printable characters. To create this dataset:&lt;/P&gt;
&lt;P&gt;1. Right-click the link for the .DAT file and choose "Save link as" to save the &lt;STRONG&gt;adult.dat&lt;/STRONG&gt; file to your hard drive. I saved mine to the C:\temp directory:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASJedi_0-1628785992136.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62522iA8CD1B510898A10B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASJedi_0-1628785992136.png" alt="SASJedi_0-1628785992136.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Right-click the SAS Code link and save the &lt;STRONG&gt;adult.sas&lt;/STRONG&gt;&amp;nbsp;program file, too.&lt;/P&gt;
&lt;P&gt;3. Open the &lt;STRONG&gt;adult.sas&lt;/STRONG&gt; program file in SAS and make the following changes:&lt;/P&gt;
&lt;P&gt;The first part of the program looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME ADULT "D:\Questionnaire\DAT\ADULT.DAT" LRECL=3348;
*** LRECL includes 2 positions for CRLF, assuming use of PC SAS;

DATA WORK;
&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;In the first line, change the FILENAME statement to point to the actual location of the &lt;STRONG&gt;adult.dat&lt;/STRONG&gt; file. And wanted my dataset to be named &lt;STRONG&gt;adult&lt;/STRONG&gt; instead of &lt;STRONG&gt;work&lt;/STRONG&gt;, so I also changed the name of the output file in the DATA statement:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME ADULT "&lt;STRONG&gt;C:\temp&lt;/STRONG&gt;\ADULT.DAT" LRECL=3348;&lt;BR /&gt;*** LRECL includes 2 positions for CRLF, assuming use of PC SAS;

DATA WORK.&lt;STRONG&gt;ADULT&lt;/STRONG&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, use go to the very end of the program file and you'll see something like this:&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;        HAZNOK5R = "Number of BP's used for average K5";
&lt;STRONG&gt;
&amp;#26;
&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The little box you see is a non-printable character.&amp;nbsp; Delete it and replace it with a RUN; statement so it now looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;        HAZNOK5R = "Number of BP's used for average K5";
&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Save the modified SAS program, then run it. It should work fine now.&amp;nbsp;&amp;nbsp;&lt;/P&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>Thu, 12 Aug 2021 16:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761203#M240820</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2021-08-12T16:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible to load/create NHANES .dat dataset with SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761759#M241090</link>
      <description>&lt;P&gt;Thank you very much for your answer and sorry for mine being late.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well it's a bit strange. I replaced the strange character by run; If the path is the path to the SAS code file, there is no error but I have an empty array with around 1800 columns/variables and no row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I replace the path by the path to adult.dat that I saved as a link as you showed me, I have this error :&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasError"&gt;ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/D:\Divers\Dossiers et Thèmes\Maths&lt;/DIV&gt;&lt;DIV class="sasError"&gt;Informatique\Informatique\IA\IA_projet\MyOwnModels\LogisticRegression\adult.dat.&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="sasWarning"&gt;WARNING: The data set WORK.ADULT may be incomplete. When this step was stopped there were 0 observations and 1238 variables.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Data set WORK.ADULT was not replaced because cette étape a été interrompue.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;In the path, I tried both upper case ADULT.DAT and lowercase adult.dat (my file is saved in lower case) and none of these is working. I thought it might be the withespace in the file path causing the problem, but when I use it with the sas Code file name instead of adult.dat there is no such error so I'm really lost.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;I joined the printing of the physical location of my file and of the errors.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;Thanks again,&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;Geoffrey.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Aug 2021 09:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761759#M241090</guid>
      <dc:creator>geogeo14000</dc:creator>
      <dc:date>2021-08-16T09:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible to load/create NHANES .dat dataset with SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761774#M241100</link>
      <description>&lt;P&gt;When you SAS is running in the operating system installed on your PC, any file you can find via the Explorer in SAS Studio are also avialable to your SAS Compute Server (the SAS installed on your machine):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASJedi_0-1629114738635.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62622i3B282CCCD9B9488F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASJedi_0-1629114738635.png" alt="SASJedi_0-1629114738635.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With SAS University Edition(UE), your SAS is running in a Linux &lt;EM&gt;virtual machine&lt;/EM&gt;. This works just as if your Linux SAS Compute Server was installed on completely different hardware.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASJedi_1-1629115194102.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62623iFDAB2C526B86BABF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASJedi_1-1629115194102.png" alt="SASJedi_1-1629115194102.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Virtual machine has virtual disks, but you don't have write access to those. Your computer has a hard drive, but the SAS University Edition virtual machine knows nothing about that. When you set up SAS University Edition, you were given instructions on setting up a shared folder - a location where both the Virtual Machine and your Windows computer could read and write.&amp;nbsp;Because SAS University Edition is deprecated, I don't have access to it, so I can't give you the exact path, but you need to put the &lt;STRONG&gt;.dat&lt;/STRONG&gt; file in there and use the Linux path to point to the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761774#M241100</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2021-08-16T12:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible to load/create NHANES .dat dataset with SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761788#M241107</link>
      <description>&lt;P&gt;Ok thank you so much for the detailed explanations and the pictures, it helped a lot. I'd try to find the path and solve the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geoffrey&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 12:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Impossible-to-load-create-NHANES-dat-dataset-with-SAS-Studio/m-p/761788#M241107</guid>
      <dc:creator>geogeo14000</dc:creator>
      <dc:date>2021-08-16T12:51:56Z</dc:date>
    </item>
  </channel>
</rss>

