<?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: Programming 2 EPG294 data file in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593446#M8080</link>
    <description>&lt;P&gt;University Edition using VirtualBox.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2019 16:00:15 GMT</pubDate>
    <dc:creator>ConnerM</dc:creator>
    <dc:date>2019-10-02T16:00:15Z</dc:date>
    <item>
      <title>Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593218#M8077</link>
      <description>&lt;P&gt;I am currently taking the "Programming 2: Data Manipulation Techniques" course and trying to upload the _2createdata_pg2.sas file into my data folder onto SAS Studio 3.8. I am using SAS Studio 3.8 on a local server with a MAC. When I try to upload that file into my data folder I get an alert telling me I cannot upload files larger than 10 MB.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 22:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593218#M8077</guid>
      <dc:creator>ConnerM</dc:creator>
      <dc:date>2019-10-01T22:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593222#M8078</link>
      <description>&lt;P&gt;Are you trying to use SAS Academics on Demand or University Edition?&lt;/P&gt;
&lt;P&gt;If SAS UE - then drop it in your myfolders, do not use the UPLOAD feature, that's designed for Server systems.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290898"&gt;@ConnerM&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am currently taking the "Programming 2: Data Manipulation Techniques" course and trying to upload the _2createdata_pg2.sas file into my data folder onto SAS Studio 3.8. I am using SAS Studio 3.8 on a local server with a MAC. When I try to upload that file into my data folder I get an alert telling me I cannot upload files larger than 10 MB.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 22:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593222#M8078</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-01T22:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593446#M8080</link>
      <description>&lt;P&gt;University Edition using VirtualBox.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 16:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593446#M8080</guid>
      <dc:creator>ConnerM</dc:creator>
      <dc:date>2019-10-02T16:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593469#M8081</link>
      <description>Then place the files in myfolders or any other shared folders you set up in VirtualBox. It will work as expected in there.</description>
      <pubDate>Wed, 02 Oct 2019 16:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593469#M8081</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-02T16:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593517#M8084</link>
      <description>&lt;P&gt;I am not sure how to place files in virtual box?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 19:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593517#M8084</guid>
      <dc:creator>ConnerM</dc:creator>
      <dc:date>2019-10-02T19:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593533#M8085</link>
      <description>When you installed SAS UE you created a folder called myfolders. Go put the files in that folder and SAS can access them there. &lt;BR /&gt;&lt;BR /&gt;If you're not sure where that folder is, check Virtual Box and the Shared Folders setting to see what is currently set up.</description>
      <pubDate>Wed, 02 Oct 2019 20:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593533#M8085</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-02T20:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593571#M8086</link>
      <description>&lt;P&gt;Got it. &amp;nbsp;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 23:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/593571#M8086</guid>
      <dc:creator>ConnerM</dc:creator>
      <dc:date>2019-10-02T23:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/610215#M8465</link>
      <description>&lt;P&gt;Hi, where did you find the SAS programming 2 datafiles. Please share the link.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2019 18:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/610215#M8465</guid>
      <dc:creator>harshbelani</dc:creator>
      <dc:date>2019-12-07T18:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Programming 2 EPG294 data file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/615604#M8611</link>
      <description>&lt;P&gt;Run this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let course=epg294;
%let path=%qsysfunc(translate(%superq(path),/,\));
%let original_path=%superq(path);

/*options nomprint nosymbolgen nonotes nosource dlcreatedir;*/
options mprint symbolgen notes source;

%macro unpack(unzip /* Full path pointing to where to create the EPG294 data */
             ,zipfilename /* ZIP File name (used to download with PROC HTTP) */
             ,coursecode /* Represents the top level folder of the ZIP file; can be used for conditional logic */);

%local rc fid fileref fnum memname big_zip big_zip_found data_zip data_zip_found url;
%global cre8data_success path;
%let cre8data_success=0;
%let url=%str(http://dl.liveweb.sas.com/eldata/pg294_oda.zip);


/* Is the path specified valid? */
%let fileref=unzip;  
%let rc=%sysfunc(filename(fileref,%superq(unzip)));
%let path_found=%sysfunc(fileref(unzip));
%if &amp;amp;path_found ne 0 %then %do;
   %put %sysfunc(sysmsg());
   %put ERROR: ************************************************************;
   %put ERROR- Path specified for data files (%superq(unzip)) is not valid.;
   %put ERROR- Remember: PATH values in UNIX and LINUX are case sensitive. ;
   %put ERROR- ************************************************************;
   %let rc=%sysfunc(filename(fileref));
   %return;
%end;

/* Get just the filename of the zipfile, not the .ZIP extension */
%if %qscan(%qupcase(%superq(zipfilename)),2,.) = %str(ZIP) %then %do;
   %let zipfilename = %qscan(%superq(zipfilename),1,.) ;
%end;

/* Test for the presence of the main ZIP file in the path */
%let fileref=bigzip;
%let rc=%sysfunc(filename(fileref,%superq(unzip)/%superq(zipfilename).zip,zip));
%let big_zip_found=%sysfunc(fileref(bigzip));
%if &amp;amp;big_zip_found ne 0 %then %do;
   %put NOTE: %superq(zipfilename).zip not found in %superq(unzip).;
   %put NOTE- Attempting to download the ZIP file from the internet.;
   filename BigZip "%superq(unzip)/%superq(zipfilename).zip";
   proc http 
      url="%superq(url)"
      out=BigZip method="get";
;

run;

   %let big_zip_found=%sysfunc(fileref(bigzip));
   %if &amp;amp;big_zip_found ne 0 %then %do;
      %put ERROR: *************************************************************;
      %put ERROR-   Attempt to download %superq(zipfilename).zip unsuccessful.;
      %put ERROR- *************************************************************;
      filename BigZip;
      %return;
   %end;
%end;

options dlcreatedir;
libname xx "%superq(path)";
libname xx clear;

/* Read the "members" (files) from the ZIP file */
/* Create the data folder structure and get a list of files in macro variables */
filename BigZip zip "%superq(unzip)/%superq(zipfilename).zip";
data _null_;
   length memname pathname $500;
   fid=dopen("bigzip");
   if fid=0 then stop;
   memcount=dnum(fid);
   do i=1 to memcount;
      memname=dread(fid,i);
      /* Create and empty folder for each folder in the ZIP file */
      /* check for trailing / in folder name */
      isFolder = (first(reverse(trim(memname)))='/');
/*         if isfolder then put memname= isfolder=;*/
      if isfolder then do;
         pathname=cats("&amp;amp;path/",substr(memname,1,length(memname)-1));
         put "NOTE: Creating path " pathname;
         rc1=libname('xx',pathname);
         rc2=libname('xx');
      end;
      else do;
         filecount+1;
         call symputx(cats('out',filecount),memname,'L');
      end;
   end;
   rc=dclose(fid);
   call symputx('filecount',filecount,'L');
run;

%do i=1 %to &amp;amp;filecount;
   filename out "%superq(unzip)/%superq(out&amp;amp;i)";
    data _null_;
      infile bigzip(%superq(out&amp;amp;i))
      lrecl=256 recfm=F length=length eof=eof unbuf;
      file out  lrecl=256 recfm=N;
      input;
      put _infile_ $varying256. length;
      return;
    eof:
      stop;
   run;
%end;

filename bigzip;
filename out;
filename unzip;

%let setup=%superq(unzip)/setup.sas;
%let cre8data_ready=%sysfunc(fileexist(%superq(setup)));

%if not &amp;amp;cre8data_ready %then %do;
      %put;
      %put ERROR: ********************************************************************;
      %put ERROR- After unzipping %superq(zipfilename).zip, setup.sas program not found ;
      %put ERROR- in folder %superq(unzip).;
      %put ERROR- Download and unzip %superq(zipfilename)_data.zip manually, then;
      %put ERROR- run cre8data.sas again.;
      %put ERROR- ********************************************************************;
      %put;
%end;

%let path=%superq(unzip)/data;

%include "%superq(setup)";

%mend unpack;

%unpack(%superq(path),epg294.zip,epg294)

/* added to set &amp;amp;path for elearning */
%let path=/home/&amp;amp;sysuserid/EPG294/data;

options mprint notes source;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 09:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Programming-2-EPG294-data-file/m-p/615604#M8611</guid>
      <dc:creator>kleelasiva9</dc:creator>
      <dc:date>2020-01-07T09:22:15Z</dc:date>
    </item>
  </channel>
</rss>

