What Files Can You Upload in the Aj Art Studio
After your datafiles have been uploaded to your SAS OnDemand for Academics business relationship, you can import the data into a SAS data step. The easiest way to do so is to utilise the Import Data chore:
-
Click Tasks and Utilities in the Navigation pane, and then click Import Data.
This will create a new tab in the piece of work area, titled Import Data 1.
-
Y'all can determine to elevate and driblet your files or select a file to import. In our case, the Excel file with the sample data is located in our Sample information folder. (Recollect: when using SAS OnDemand for Academics, your data must be uploaded into theServer Files and Folders tab. If you practice not run across any data files in this window, you most likely demand to upload them; see the previous section on uploading information to SAS ODA.)
-
Once you've chosen the Excel file with the data, click Open. SAS will populate the file data and generate code for importing.
-
To run the code, click the Run push (running homo icon) to execute the code.
-
Once you've executed the code, check the Log to see if any errors take occurred. If successful, the Log window should tell us how many observations and variables the new dataset contains.
Additionally, you tin can preview the dataset in the Output Data tab.
-
If you are satisfied with the outcome of the import process, y'all accept the pick to save the Import task by clicking the Save push button (floppy disk icon). This will create a *.ctl file in your SAS ODA account, which you tin employ to echo/re-create the import process in the futurity. We highly recommend doing this so you have a record of how you imported the data.
Understanding the Import Syntax
Let's take a closer look at the syntax that SAS generates when using the Import tool and understand what each line is doing:
The starting time four lines are comments -- they exercise not incorporate executable code, and exist only as notes for homo readers. The notes contain the proper noun and location of the imported file, and the date that the import lawmaking was generated.
The starting time executable line of code is
%web_drop_table(WORK.IMPORT);
This particular control "clears out" any data in the system saved under the Piece of work.IMPORT proper noun. You might notice that this control looks very different than the PROC IMPORT and PROC CONTENTS commands. Find the per centum symbol (%) at the outset of the line: this tells us that %web_drop_table
is a user-divers macro command. In this case, it's a function that SAS themselves defined to apace delete a item dataset. If you've imported another dataset into SAS using the Import task under the name Piece of work.IMPORT and desire to keep it, make sure you save information technology under a name other than Piece of work.IMPORT, or else yous will lose it!
The outset pertinent line starts with the FILENAME
statement, which specifies the path to the file containing the data to import. In particular, information technology assigns the nickname REFFILE to the full file path where our data is located. This means that we can simply blazon the nickname REFFILE in the PROC IMPORT
step instead of having to write out the full file path.
The next cake of code is the PROC IMPORT
statement, which triggers the data import activity. Annotation the first semicolon is non until the tertiary line. This is because the syntax includes quite a few options associated with the PROC IMPORT
statement:
- The
OUT
option tells SAS where to put the new SAS dataset it is creating – in this case we told information technology to put the new SAS dataset "import" in the Work library. - The
DATAFILE
option points to the file directory of the dataset you are importing. - The
DBMS
pick tells SAS what engine to use to read the data (in this case, the XLSX engine). This value will depend on what type of file you lot're importing. -
GETNAMES=Yep
instructs SAS to utilize the first row of the file as variable names.
The PROC IMPORT lawmaking in this step is very like to the PROC IMPORT code one would use for "desktop" SAS, and so for more information almost PROC IMPORT, see our Importing Excel Files into SAS tutorial.
Post-obit the PROC IMPORT
command, SAS generates lawmaking for PROC CONTENTS
, which displays information about the newly-imported dataset (WORK.IMPORT).
PROC CONTENTS is a standard SAS process; for more information about how to use and understand it, encounter the Summarizing Dataset Contents with PROC CONTENTS tutorial.
Source: https://libguides.library.kent.edu/SAS/OnDemandImportData
0 Response to "What Files Can You Upload in the Aj Art Studio"
Post a Comment