Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
The All New JSL Cookbook II - Soliciting Input

We are in the process of revamping the JSL Cookbook to give it broader appeal, make it better organized, and easier to use. The focus will be on short projects (recipes) to help you improve your JSL. The recipes will include step-by-step instructions, completed code and a demonstration video. The first recipes will focus will be on less than obvious aspects of common tasks. Later we will develop recipes dealing with more challenging JSL tasks like expression handling and pattern matching.


We’d like your input - what recipes would you like to see?

  • What things are or were challenging for you?
  • How would you like to see the Cookbook organized?


We’re looking forward to hearing from you.


My understanding is more to have sample code that could become part of my new application, rather than a kind of learning place. Its a pretty high request to produce a video and a step by step description. Perhaps we need an experimental kitchen where useful code can go in and mature before it gets into the cook book.


Just another idea: JMP has the REST interface. I guess that many scripters have REST codes. If it accesses public sources we could collect all kind of interfaces for public use.




Based on some recent questions in the discussion forum I think the following very basic topics would be useful:


1. Table manipulation

      a. Assign a variable to a table (i.e. dt)

      b. Determine the number of rows in the table

      c. How to reference particular table cells


2. For loops

3. If statement


@Bernd2Heinen, the idea is to do both, provide code with reusable portions and a vehicle for learning JSL. There will be at least one recipe dealing with REST/API


@pmroz Item 1, absolutely. Anything particular about branching and looping you'd like to see?


Branching and looping: nothing fancy, just the basics.  Beginners seem to struggle with what we consider simple tasks. 

Several examples of IF-THEN and IF-THEN-ELSE with explanations.

With FOR loops I'd also include WHILE loops.

I'll second the request for REST examples for public sources that @Bernd2Heinen made. This would be very helpful! @DonMcCormack: Glad to see this will captured.

Some ideas for recipes:

  • Getting unique values
  • Manipulating/getting data from Report layer
    • XPath, method Jordan Hiller has show, subscripting...
  • Manipulating graph builder's element parts
    • For example changing summary statistic from mean to median
  • Seeing what you can do to JMPs objects (object << Show Properties(), Show Properties(object), scripting index...)
  • Into vs Non-into functions (Substitute, Substitute Into, Short List, Short List Into...)
  • Different ways of getting references / accessing objects
    • Column(), AsColum()
    • Datatable()
    • Window()
  • Managing namespaces
  • Replacing values in multiple columns
  • Re-ordering lists / associative arrays values using Ranking
  • Running JMP Platforms with prefilled values
  • Using Char To Blob() to bypass creation of temporary files
  • KDTable() and VPTree()
  • Debugging your scripts
    • Using JMP's sample data / creation of data tables with random data
    • Using different log print options
    • Capture Log
    • Getting script execution time (and JMP memory usage)
    • Watch()
    • Debugger

For organization of the cookbook I think most important thing would be visibility and that it will be offered with google searches (search engine optimization) and that it will also be offered in JMP Community searches in addition to normal community posts.


Also if you will be writing functions maybe making them into JSL-Cookbook addin with Custom Functions would be a nice idea. It would allow us to access them directly from JMP and Scripting Index.

Thank you @Judah. I was definitely planning a REST example or two. @jthi great list. I'll need a few recipes to cover the material.


If possible, create an easy accessable output format such as a PDF File, which can be used as a textbook.


It would be extremely helpful to have a built in function to convert between time zones using the always updating time zone database (more info:  Each time zone should use the TZ database name (, as is used in other programming languages (e.g.: Python).


For a very humorous description of the time zone issue, watch this video:  It is 10 minutes long, but well worth the time (pardon the pun).

Thanks for the ideas @Marco_ & @Judah. Below are the recipes I've built so far. Still waiting for for some administrative details to be completed before the pages go live. Looking forward to adding more based all your suggestions.


  • The Script Window - Basics
  • Using the Script Window, Next Steps
  • Join 2 Tables and Create a Subset
  • Run a Platform without Knowing the Number or Names of Columns
  • Using a Dialog Box to Create a Tailored Report
  • Modify a Report Based on Analysis Results
  • Build a Tailored Report using Messages
  • Concatenate CSV Files Selected by User
  • Accessing Data using a REST-API
JSL Cookbook

If you’re looking for a code snippet or design pattern that performs a common task for your JSL project, the JSL Cookbook is for you.

This knowledge base contains building blocks of JSL code that you can use to reduce the amount of coding you have to do yourself.

It's also a great place to learn from the experts how to use JSL in new ways, with best practices.