<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JSL coding in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955429#M110077</link>
    <description>&lt;P&gt;Dear JMP community&lt;BR /&gt;I wrote a code the loop through all Site values (29 total) to extract&amp;nbsp; fail probability and part_actions (&lt;CODE class="language-jsl"&gt;Estimate Probability( 1 ), Estimate Quantile( 1 ))&lt;/CODE&gt; to one table. It is calculating fail probability and part_actions at 0.15 percent fail from a Weibull analysis.&amp;nbsp; Following is the code. It keeps failing. Could you help me debug?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Data Table( "WeiBull Random Sampling_062606backup2" );

siteSummary = dt &amp;lt;&amp;lt; Summary( Group( :Site ), N Rows( 1 ), Freq( "None" ) );
siteList = Column( siteSummary, 1 ) &amp;lt;&amp;lt; get values;
Close( siteSummary, NoSave );

obj = dt &amp;lt;&amp;lt; Life Distribution(
    Perspective( Compare Groups ),
    Y( :part_action ),
    Grouping( :R_ind ),
    Censor( :follow_censor ),
    Censor Code( 0 ),
    Label( :BOT ID ),
    Confidence Interval Method( Wald ),
    Interval Type( Pointwise ),
    Fit Distribution( "Weibull" ),
    Select Distribution( Distribution, Weibull ),
    Select Scale( Nonparametric ),
    Tabbed Report( 0 ),
    Show Quantile Functions( 1 ),
    Select Distribution( Quantile, Weibull ),
    Estimate Probability( 1 ),
    Estimate Probability( Compute( [150000] ) ),
    Estimate Quantile( 1 ),
    Estimate Quantile( Compute( [0.15] ) ),
    SendToEmbeddedScriptable(
        Dispatch( {"Individual Group", "Life Distribution R_ind=no"},
            {Y( :part_action ), Censor( :follow_censor ), Censor Code( 0 ),
            Label( :BOT ID ), &amp;lt;&amp;lt;Fit Weibull, Confidence Interval Method( Wald ),
            Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
        ),
        Dispatch( {"Individual Group", "Life Distribution R_ind=yes"},
            {Y( :part_action ), Censor( :follow_censor ), Censor Code( 0 ),
            Label( :BOT ID ), &amp;lt;&amp;lt;Fit Weibull, Confidence Interval Method( Wald ),
            Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
        )
    ),
    By( :Site ),
    SendToReport(
        Dispatch(
            {"Individual Group", "Life Distribution R_ind=no",
            "Compare Distributions"}, "Distribution Profiler", OutlineBox,
            {Set Summary Behavior( "Collapse" )}
        ),
        Dispatch(
            {"Individual Group", "Life Distribution R_ind=yes",
            "Compare Distributions"}, "Distribution Profiler", OutlineBox,
            {Set Summary Behavior( "Collapse" )}
        )
    )
);

Wait( 1 );

Show( "Sites: ", siteList );
Show( "N obj: ", N Items( obj ) );  // should equal N Items( siteList )

out = Empty();

For( i = 1, i &amp;lt;= N Items( obj ), i++,
    site = Char( siteList[i] );

    tmp = Report( obj[i] )["Compare Quantile", "Estimate Quantile - Weibull",
        Table Box( 2 )] &amp;lt;&amp;lt; Make Into Data Table( invisible );

    tmp &amp;lt;&amp;lt; New Column( "Site", Character, "Nominal" );
    For( r = 1, r &amp;lt;= N Row( tmp ), r++,
        Column( tmp, "Site" )[r] = site
    );

    If( Is Empty( out ),
        out = tmp;
    ,
        out &amp;lt;&amp;lt; Concatenate( tmp, Append to First Table );
        Close( tmp, NoSave );
    );

    Show( "OK: " || site );
);

For( i = 1, i &amp;lt;= N Items( obj ), i++,
    obj[i] &amp;lt;&amp;lt; Close Window;
);

Show( out );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Jun 2026 21:13:25 GMT</pubDate>
    <dc:creator>Caozheng0115</dc:creator>
    <dc:date>2026-06-24T21:13:25Z</dc:date>
    <item>
      <title>JSL coding</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955429#M110077</link>
      <description>&lt;P&gt;Dear JMP community&lt;BR /&gt;I wrote a code the loop through all Site values (29 total) to extract&amp;nbsp; fail probability and part_actions (&lt;CODE class="language-jsl"&gt;Estimate Probability( 1 ), Estimate Quantile( 1 ))&lt;/CODE&gt; to one table. It is calculating fail probability and part_actions at 0.15 percent fail from a Weibull analysis.&amp;nbsp; Following is the code. It keeps failing. Could you help me debug?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = Data Table( "WeiBull Random Sampling_062606backup2" );

siteSummary = dt &amp;lt;&amp;lt; Summary( Group( :Site ), N Rows( 1 ), Freq( "None" ) );
siteList = Column( siteSummary, 1 ) &amp;lt;&amp;lt; get values;
Close( siteSummary, NoSave );

obj = dt &amp;lt;&amp;lt; Life Distribution(
    Perspective( Compare Groups ),
    Y( :part_action ),
    Grouping( :R_ind ),
    Censor( :follow_censor ),
    Censor Code( 0 ),
    Label( :BOT ID ),
    Confidence Interval Method( Wald ),
    Interval Type( Pointwise ),
    Fit Distribution( "Weibull" ),
    Select Distribution( Distribution, Weibull ),
    Select Scale( Nonparametric ),
    Tabbed Report( 0 ),
    Show Quantile Functions( 1 ),
    Select Distribution( Quantile, Weibull ),
    Estimate Probability( 1 ),
    Estimate Probability( Compute( [150000] ) ),
    Estimate Quantile( 1 ),
    Estimate Quantile( Compute( [0.15] ) ),
    SendToEmbeddedScriptable(
        Dispatch( {"Individual Group", "Life Distribution R_ind=no"},
            {Y( :part_action ), Censor( :follow_censor ), Censor Code( 0 ),
            Label( :BOT ID ), &amp;lt;&amp;lt;Fit Weibull, Confidence Interval Method( Wald ),
            Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
        ),
        Dispatch( {"Individual Group", "Life Distribution R_ind=yes"},
            {Y( :part_action ), Censor( :follow_censor ), Censor Code( 0 ),
            Label( :BOT ID ), &amp;lt;&amp;lt;Fit Weibull, Confidence Interval Method( Wald ),
            Interval Type( Pointwise ), Show Event Plot Frequency Label( 0 )}
        )
    ),
    By( :Site ),
    SendToReport(
        Dispatch(
            {"Individual Group", "Life Distribution R_ind=no",
            "Compare Distributions"}, "Distribution Profiler", OutlineBox,
            {Set Summary Behavior( "Collapse" )}
        ),
        Dispatch(
            {"Individual Group", "Life Distribution R_ind=yes",
            "Compare Distributions"}, "Distribution Profiler", OutlineBox,
            {Set Summary Behavior( "Collapse" )}
        )
    )
);

Wait( 1 );

Show( "Sites: ", siteList );
Show( "N obj: ", N Items( obj ) );  // should equal N Items( siteList )

out = Empty();

For( i = 1, i &amp;lt;= N Items( obj ), i++,
    site = Char( siteList[i] );

    tmp = Report( obj[i] )["Compare Quantile", "Estimate Quantile - Weibull",
        Table Box( 2 )] &amp;lt;&amp;lt; Make Into Data Table( invisible );

    tmp &amp;lt;&amp;lt; New Column( "Site", Character, "Nominal" );
    For( r = 1, r &amp;lt;= N Row( tmp ), r++,
        Column( tmp, "Site" )[r] = site
    );

    If( Is Empty( out ),
        out = tmp;
    ,
        out &amp;lt;&amp;lt; Concatenate( tmp, Append to First Table );
        Close( tmp, NoSave );
    );

    Show( "OK: " || site );
);

For( i = 1, i &amp;lt;= N Items( obj ), i++,
    obj[i] &amp;lt;&amp;lt; Close Window;
);

Show( out );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jun 2026 21:13:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955429#M110077</guid>
      <dc:creator>Caozheng0115</dc:creator>
      <dc:date>2026-06-24T21:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: JSL coding</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955440#M110078</link>
      <description>&lt;P&gt;The error is as following&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Caozheng0115_0-1782335744232.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/107491i29464C4AF830DC98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Caozheng0115_0-1782335744232.png" alt="Caozheng0115_0-1782335744232.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 21:15:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955440#M110078</guid>
      <dc:creator>Caozheng0115</dc:creator>
      <dc:date>2026-06-24T21:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSL coding</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955445#M110079</link>
      <description>&lt;P&gt;You can keep the line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;obj[i] &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;from aborting the run by placing it in a Try() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;try(obj[i] &amp;lt;&amp;lt; Close Window);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2026 02:15:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955445#M110079</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2026-06-25T02:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: JSL coding</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955468#M110080</link>
      <description>&lt;P&gt;Have you tried using Make Combined Data table instead of Make into data table? You could combine it with&amp;nbsp;Group Options(Return Group(1)) within the platform launch to get a single object back instead of a list.&lt;/P&gt;
&lt;P&gt;Here is example using Bivariate and getting the results from table box under Fit Mean&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

obj = dt &amp;lt;&amp;lt; Bivariate(
	Y(:weight),
	X(:height),
	Fit Mean({Line Color({230, 159, 0})}),
	By(:age),
	SendToReport(Dispatch({}, "Fit Mean ", OutlineBox, {Close(0)})),
	Group Options(Return Group(1))
);

res = Report(obj)[OutlineBox("Fit Mean "), Table Box(1)] &amp;lt;&amp;lt; Make Combined Data Table;
obj &amp;lt;&amp;lt; Close Window;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 05:00:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-coding/m-p/955468#M110080</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-06-25T05:00:04Z</dc:date>
    </item>
  </channel>
</rss>

