Using JMP > Import Your Data > Java Runtime Environment (JRE) Requirements > Using SAS Extended Attributes to Import Metadata
Publication date: 08/13/2020

Using SAS Extended Attributes to Import Metadata

SAS extended attributes are metadata that you define in SAS code to import information such as table scripts, labels, length, and type. You associate the extended attributes with a data set or variable and define them in name-value pairs, such as _JMP_TABLESCRIPTNAME_2="OnOpen". See the SAS documentation on extended attributes at https://sas.com.

On export from JMP to SAS, items such as column properties and table scripts are preserved automatically. You map SAS extended attributes to JMP attributes only when importing SAS code into JMP.

Here is an example of defining extended attributes in SAS code. The attributes define a table script name and the table script itself.

/* specify two table scripts. */
%LET _DS_ATTRIBUTES=_JMP_TABLESCRIPTCOUNT=2
/* define the table script names */
_JMP_TABLESCRIPTNAME_1="Favorite Movie By State"
_JMP_TABLESCRIPTNAME_2="OnOpen"
_JMP_TABLESCRIPTVALUE_2="CurrentDataTable() << RunScript(""Favorite Movie By State"");"
/* define the OnOpen table script */
_JMP_TABLESCRIPTVALUE_1=
/* a portion of the OnOpen table script */
"
	Current Data Table();
	New Column(""max_name"",
		Character,
		Width(128)
	);

The following example shows how to combine PROC DATASETS with extended attributes:

%LET _DS_ATTRIBUTES = attr-name=attr-value...attr-name=attr-value;
%LET _VAR_ATTRIBUTES= var-name (attr-name=attr-value...)...var-name (attr-name=attr-value...);
 
PROC DATASETS NOLIST LIB=WORK;
  MODIFY AttributeReferenceTable;
  XATTR OPTIONS MAXCHUNK=100;
  XATTR SET DS &_DS_ATTRIBUTES;
  XATTR SET VAR &_VAR_ATTRIBUTES;
RUN;
QUIT;

See Conventions for Mapping JMP Attributes to SAS Extended Attributes for more information about SAS extended attributes and their corresponding JMP attributes.

Two SAS Integration preferences determine whether extended attributes are imported or exported. Select On export, store table and column properties in extended attributes to export extended attributes. Select On import, apply table and column properties from extended attributes. The options are deselected by default.

To see an example of exporting extended attributes, run the following script:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sd = dt << Make SAS Data Step Window( SaveJMPMetadata( 1 ) );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).
.