SAS Institute. The Power to Know

SAS/ACCESS(R) 9.2 Interface to PC Files: Reference

Previous Page | Next Page

File Format-Specific Reference for the IMPORT and EXPORT Procedures

JMP Files


JMP Files Essentials

A JMP file is a file format that the JMP software program creates. JMP is an interactive statistics package that is available for Microsoft Windows and Macintosh. For more information about a JMP concept or term, see the JMP documentation that is packaged with your system.

A JMP file contains data that is organized in a tabular format of fields and records. Each field can contain one type of data, and each record can hold one data value for each field.

Variable names can be up to 31 characters in length. When you are reading a JMP file, any embedded blank or special character in a variable name is replaced with an underscore (_). This is noted in the log.

See Example 1: EXPORT a SAS Data Set to a JMP File .


JMP Missing Values

JMP supports a single missing value in all variable types other than character. When you are reading a JMP file, JMP missing value maps to SAS missing value. When you are writing a JMP file, all SAS missing values maps to the single JMP missing value.


JMP Data Types

Every field in a JMP file has a name and a data type. The data type indicates how much physical storage to set aside for the field and the format in which the data is stored. This list describes each data type.

CHARACTER

specifies a field for character string data. The maximum length is 255 characters. Characters can be letters, digits, spaces, or special characters.

META

specifies how metadata contained in the specified data set is handled.

meta=libref.member

When you add this statement to the EXPORT procedure, the metadata contained in the specified data set is added to the built JMP file. When you add this statement to the IMPORT procedure, the extra data set that contains the metadata is created when reading the JMP file.

These record types are processed for the metadata.

Table properties:

code="text, subcode="prop", variable="", label=property_text

Variable notes:

code="note", subcode="", variable=varname, label=note_text
You can create any number of properties or notes.

Variable labels are automatically written as SAS labels when the SAS data set is built. SAS variable labels are read when the JMP table is built.

When you use this statement with the IMPORT procedure, value labels from the JMP file can be read and added to the format library.

When you use this statement with the EXPORT procedure, value lists are read from the format libraries when the JMP table is being built.

The metadata data set contains these fields: index, number, variable, code, subcode, name, and label. Those names must match when the SAS metadata data set is being read. To do this easily, write the metadata from an existing JMP file to a SAS data set, view the variable information, and record the contents of the file.

NUMERIC

specifies an 8-byte floating point number. This is also called a double precision number. When you are reading data, this maps directly to the SAS double precision number. When you are writing data, all SAS numeric variables (regardless of length) become JMP numeric variables.

ROWSTATE

specifies an integer variable that takes on the value of 1 or missing. When you are reading data, this maps to a SAS double precision number.

DATE

specifies the date format. When you are reading data, the date values are mapped to a SAS number and scaled to the base date. The JMP date display format maps to the appropriate SAS date display format. When you are writing data, the SAS output format for the numeric variable is checked to determine whether it is a date format. If so, the SAS numeric value is scaled to a JMP date value with the appropriate date display format.

DATETIME

specifies the datetime format. When you are reading data, the datetime values are mapped to a SAS number and scaled to the base datetime. The JMP datetime display format maps to the appropriate SAS datetime display format. When you are writing data, the SAS output format for the numeric variable is checked to determine whether it is a datetime format. If so, the SAS numeric value is scaled to a JMP datetime value with the appropriate datetime display format.

TIME

specifies the time format. When you are reading data, the time values are mapped to a SAS number and scaled to the base time. The JMP time display format maps to the appropriate SAS time display format. When you are writing data, the SAS output format for the numeric variable is checked to determine whether it is a time format. If so, the SAS numeric value is scaled to a JMP time value with the appropriate time display format.


Importing and Exporting Data in JMP Files

SAS IMPORT|EXPORT utilities provide two components for accessing JMP files.

JMP File Formats (DBMS=JMP)

This IMPORT| EXPORT component uses JMP file formats to access data in JMP files on Linux, UNIX, and Microsoft Windows operating platforms. It imports data from JMP files saved with any version of JMP formats. It exports data to JMP files with V5 formats. This component does not provide any additional statements; use the the IMPORT procedure and the EXPORT procedure syntax to access your JMP data.

PC Files Server (DBMS=PCFS)

This IMPORT|EXPORT component uses the client server model to access data in JMP files on Microsoft Windows from Linux, UNIX, or Microsoft Windows 64-bit operating environments. This component requires running the PC Files Server on Microsoft Windows.


Supported Syntax by the IMPORT Procedure and the EXPORT Procedure

FMTLIB=libref.format-catalog

When importing a JMP file, this saves value labels to the specified SAS format catalog. When importing a SAS data set to a JMP file, this writes the specified SAS format catalog to the JMP file. User-defined formats.

META=libref.member-data-set;

When importing a JMP file, this saves JMP metadata information to the specified SAS metadata set. When exporting a SAS data set to a JMP file, this writes the specified SAS metadata information to the JMP file.

Alias: metadata

Example 1: EXPORT a SAS Data Set to a JMP File

This example exports a SAS data set named SDF.CUSTOMER to a JMP file named customer.jmp on a local system.

LIBNAME SDF V9 "&sasdir";
PROC EXPORT DATA=SDF.CUSTOMER
            FILE="&tmpdir.customer.jmp"
            DBMS=JMP REPLACE;
RUN;


Example 2: IMPORT a SAS Data Set from a JMP File

This example imports a SAS data set named CUSTOMER from a JMP file named customer.jmp on a local system.

PROC IMPORT OUT=WORK.CUSTOMER
            FILE="&jmpdir.customer.jmp"
            DBMS=JMP REPLACE;
RUN;


Example 3: EXPORT a SAS Data Set on UNIX to a JMP File on Microsoft Windows

This example exports a SAS data set named SDF.CUSTOMER to a JMP file named customer.jmp. Note that SAS is running on the UNIX operating platform and the JMP file is loaded on Microsoft Windows where a PC Files Server is running.

LIBNAME SDF V9 "&sasdir";
PROC EXPORT DATA=SDF.CUSTOMER
            FILE="&cstmpdir.customer.jmp"
            DBMS=PCFS REPLACE;
   SERVER=&server;
   PORT=8621;
RUN;


Example 4: IMPORT Data from a JMP File on Microsoft Windows to a SAS Data Set on UNIX

This example imports data from a JMP file named customer.jmp to a SAS data set named CUSTOMER. Note that SAS is running on a UNIX platform and the JMP file is located on Microsoft Windows where a PC Files Server is running.

PROC IMPORT OUT= WORK.CUSTOMER
            FILE="&csjmpdir.customer.jmp"
            DBMS=PCFS REPLACE;
  SERVER=&server;
  PORT=8621;
RUN;

Previous Page | Next Page | Top of Page