This code is contained in the DataImportEngine.sas file located in your JMP installation directory.
The SAS code for the
Import Individual Text, CSV, or Excel Files process should appear as shown in the following sections. Instead of showing the
SAS code as one continuous entity, the code has been divided up into basic sections described in the
Getting Started chapter of this guide.
As in the Column Contents code example, the preamble section of the
Import Individual Text, CSV, or Excel Files code contains a simple history section for tracking changes. The concluding
Description: block describes a brief overview of the program. This same description is used at the beginning of the
XML file, which will be discussed later.
The SAS code for the preamble is shown below:
The Import Individual Text, CSV, or Excel Files process has a variety of global process
variables in the section of code that begins with
*ProcessVariables; including input file-associated parameters
InFiles,
VarNameList,
DataStartRow,
ScanRows and output data-associated parameters
OutData and
OutPath.
InFiles defines what files to import, and the remaining parameters enable modifications to the PROC IMPORT run.
OutData and
OutPath specify the name and path of the output SAS data set.
The SAS code outlining the process variable definitions is shown below:
Immediately after *ProcessBody; is a section similar to the initialization section from the
Column Contents example. The initialization section defines a few variables and also does the following:
The SAS code specifying initialization and argument checking is shown below:
This section of the code for the Import Individual Text, CSV, or Excel Files process carries out two functions:
The Import Individual Text, CSV, or Excel Files process does not generate any JMP analyses or graphics. Because of this, there is no code for generating a
JSL file. See
Creating a JSL File for Dynamic Graphics and Analyses for a detailed discussion of
JSL file generation.
This section is the same as the section in the Column Contents example, except that the
%PackageInsertDataset command is used to publish the output data set.
The SAS code for the package publication is shown below:
The final line of the code, %DataImport, which invokes the
macro that was just defined is shown below: