For the latest version of JMP Help, visit JMP.com/help.

Scripting Guide > Extending JMP > Work with SAS > Create SAS DATA Step Code for Formula Columns
Publication date: 09/28/2021

Create SAS DATA Step Code for Formula Columns

Sending Get SAS Data Step for Formula Columns to a data table includes column formulas in the SAS data step code. Here is an example that outputs the formula for the Ratio column:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Ratio", Formula( :height / :weight ));
dt << Get SAS Data Step for Formula Columns;

This script output the following code to the log:

/*%PRODUCER: JMP - DataTable Formulas */

/*%TARGET: Ratio */

/*%INPUT: height */

/*%INPUT: weight */

/*%OUTPUT: Ratio */

/* Code to score Ratio */

Ratio =height/weight

drop ;

To get formulas for all columns, omit the column names as shown here:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Get SAS Data Step for Formula Columns;

You can also include column formulas in scoring code for SAS Model Manager. Send Get MM SAS Data Step for Formula Columns to the data table.

dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
dt << Get MM SAS Data Step for Formula Columns;

The results of this script are also shown in the log.

As with Get SAS Data Step for Formula Columns, specifying column names is optional.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).