Can JMP do macros similar to SAS?

Currently where I work we have SAS 9.2 Foundation with QC package, and we have 4 templates, or macro programs, that will run with each of our products. Which we have 40+ products. The problem is, we are the only branch in the company using SAS for our reports and it has been desired for use to do them in JMP. A typical SAS marco for what we currently have is

%macro Import(Filepath=) the excel file(s), usually two worksheets from one workbook. One for the data and one for specification limits

%macro Outputfilemacro(filepath=) inside of this macro is summarized by a general order of (ODS graphics on, ods rtf startpage, call the test macros such as %BothSLtest(test='pH'), ods graphics off, rtf close)

I call anywhere from 8-20 different test macros inside of the outputfilemacro, each displaying 2-4 charts per test depending on which test macro is used.

Test is the variable name from my data set that is being tested and charted against specification limits. I have control charts with Capability estimates tested against the spec limits.

The charts display spec limits specific to each test, current and prior time phases depending on the dates I select, and capability indexes in the top left corner of the charts. Each time I run this for a different product, all I do is change the filepath name, copy and paste which test macros I want to run, and set the test= value in each of the SLChart macros that I desire to have. I can output all the charts I need about about 5-10 minutes for each product and product strength that I have. This particular program for a strength of a product will produce 26 or so charts with data printout specific to the test following the chart.

Question is, can I do something similar as this in JMP 10? If so, how do macros work in JMP?

I have a slight understanding of JMP JSL, but am brand new to it. Just trying to figure out how to make things as automated in JMP as they are in our SAS macros.

I'm not exactly sure what your output might look like, but the JSL to open a file and then make some control charts is fairly simple. Use JMP to open your excel file, and the JMP table will have a "source" script in the table box that you can use to open the table again. Then use JMP to make the control charts, format them to match your criteria, then save the script to the data table.

Then to automate opening a table and running your control charts, just combine the Open statement from the Source script, and the Control Chart script in a new script window (separate the two instructions with a semi colon). There you have it, a automated report, with virtually no coding on your part.

One thing other responders didn't cover, and maybe you know this, is that JMP's equivalent of a "macro" is a JSL Function. A SAS Macro is a piece of SAS code that is encapsulated and can have parameters passed to it. JSL Functions can encapsulate JMP scripts and allow parameters to be passed in. So if your goal is to encapsulate some JMP functionality and have it be callable, possibly with parameters, consider JSL Functions.

I think the JSL equivalent of SAS macros would be JSL expressions. I say this because a SAS macro doesn't really pass arguments as much as it creates a text program where values have been substituted into the text for the macro variables. This is very similar to using Substitute() or Substitute Into() functions in JSL for expressions.

You can read here to get started with expressions and expression handling functions in JSL: Lists and Expressions.

That being said, JSL functions will also probably work in most of the same type situations that SAS macros do.