I am not sure whether you can do this in just JMP/JSL, but JMP makes it so convenient to run R code I wonder if it is worth reinventing the wheel here. You could let R do the analysis and then bring results back into JMP to use tabulate/graph builder.
I've not tested this, but after installing R your code would look something like this:
Names default to here(1);
//Open R
R Init();
//Open your data table here:
dt = Current data table();
//send data to R
R Send(dt);
//run your code
R Submit( "\[
# install package if needed, really only needs to happen once
if (!("survey" %in% installed.packages())) install.packages("survey")
#load package
library(survey)
#code from the website, you will want to verify column names here
NHANES_all <- svydesign(data=dt, id=~SDMVPSU, strata=~SDMVSTRA, weights=~WTMEC4YR, nest=TRUE)
NHANES <- subset(NHANES_all, inAnalysis==1)
m <- svymean(~Depression, NHANES)
]\" );
//return data from R
svymean = R Get( m )
//Close R
R Term();
More info on integrating R with JMP:
https://www.jmp.com/en_au/events/ondemand/mastering-jmp/jmp-and-r-integration.html
https://community.jmp.com/t5/JMPer-Cable/Getting-started-with-the-JMP-to-R-Interface/ba-p/43920
And here is some info on the R package they use:
https://cran.r-project.org/web/packages/survey/survey.pdf