Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level IV

How to save a datatable as a script (how to save a datatable as JSL) in JMP

How to save a datatable as a script.  It's easy but when I Google it the top results aren't the answer. So I'm going to answer my own question.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level IV

Re: How to save a datatable as a script (how to save a datatable as JSL) in JMP

This is also useful for learning JSL.  You can create and format columns, also formulas, and see the JSL for it.

1. Create datatable.

2. Red hot spot for scripts - > Copy Table Script

3. Red hot spot for scripts -> New Script

4. Give the script a title, paste the script, save.

``````New Table( "Slider Test",
Add Rows( 26 ),
Set Header Height( 47 ),
New Column( "SKU",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
)
),
New Column( "Sales",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
),
Set Display Width( 94 )
),
New Column( "ABC Class",
Character,
"Nominal",
Set Values(
{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
),
Set Display Width( 70 )
)
)``````
2 REPLIES 2
Highlighted
Level IV

Re: How to save a datatable as a script (how to save a datatable as JSL) in JMP

This is also useful for learning JSL.  You can create and format columns, also formulas, and see the JSL for it.

1. Create datatable.

2. Red hot spot for scripts - > Copy Table Script

3. Red hot spot for scripts -> New Script

4. Give the script a title, paste the script, save.

``````New Table( "Slider Test",
Add Rows( 26 ),
Set Header Height( 47 ),
New Column( "SKU",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
)
),
New Column( "Sales",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[98, 64, 120, 397, 93, 58, 196, 700, 674, 229, 607, 55, 590, 169, 1449,
1236, 143, 1714, 364, 404, 226, 1300, 1105, 144, 1391, 1893]
),
Set Display Width( 94 )
),
New Column( "ABC Class",
Character,
"Nominal",
Set Values(
{"C", "C", "B", "B", "C", "C", "B", "B", "B", "B", "B", "C", "B", "B",
"A", "A", "B", "A", "B", "B", "B", "A", "A", "B", "A", "A"}
),
Set Display Width( 70 )
)
)``````
Staff (Retired)