<?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 Re: How to use JSL to write a script in the specified JMP file and save it in the JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427718#M67718</link>
    <description>&lt;P&gt;Here is one way to handle this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
Eval(
	Parse(
		"dt&amp;lt;&amp;lt;new script(\!"test\!",d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table );"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Oct 2021 14:22:49 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-10-18T14:22:49Z</dc:date>
    <item>
      <title>How to use JSL to write a script in the specified JMP file and save it in the JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427682#M67716</link>
      <description>&lt;P&gt;Such as:Abrasion.jmp&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;dt = Open( "$SAMPLE_DATA/Abrasion.jmp" );
dt &amp;lt;&amp;lt; Select Where( Shift == "A" );
d3 = dt &amp;lt;&amp;lt; Subset( Output Table( "ts" ), Selected Rows( 1 ), selected columns( 0 ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;JSL extracts A subset of file&amp;nbsp;"Abrasion.jmp" and creates A script in this subset file that writes the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table );&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-10-18_213322.png" style="width: 727px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36787i6100A7700435A3B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-10-18_213322.png" alt="2021-10-18_213322.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:02:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427682#M67716</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2023-06-09T18:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to write a script in the specified JMP file and save it in the JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427718#M67718</link>
      <description>&lt;P&gt;Here is one way to handle this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
Eval(
	Parse(
		"dt&amp;lt;&amp;lt;new script(\!"test\!",d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table );"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 14:22:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427718#M67718</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-18T14:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to write a script in the specified JMP file and save it in the JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427756#M67719</link>
      <description>Thank Jim!</description>
      <pubDate>Mon, 18 Oct 2021 14:30:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/427756#M67719</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2021-10-18T14:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to write a script in the specified JMP file and save it in the JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/428089#M67742</link>
      <description>&lt;P&gt;This JSL can write a script with the specified content to a newly generated JMP file.&lt;BR /&gt;But here the original JSL seems to have stopped automatically without executing the following code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;dt = Open( "$SAMPLE_DATA/Abrasion.jmp" );
dt &amp;lt;&amp;lt; Select Where( Shift == "A" );
d3 = dt &amp;lt;&amp;lt; Subset( Output Table( "ts" ), Selected Rows( 1 ), selected columns( 0 ) );
Eval(
	Parse(
		"d3&amp;lt;&amp;lt;new script(\!"test\!",d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table );"
	)
);
d3&amp;lt;&amp;lt;setName("new");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-10-19_115657.png" style="width: 728px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36819i6DA05F4288ED2DE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-10-19_115657.png" alt="2021-10-19_115657.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 04:05:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/428089#M67742</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2021-10-19T04:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL to write a script in the specified JMP file and save it in the JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/428090#M67743</link>
      <description>&lt;P&gt;The log indicates that you have a missing ")"&lt;/P&gt;
&lt;PRE&gt;Unexpected end of input. Perhaps there is a missing "," or ")".
Trying to parse arguments of function "new script".
Line 2 Column 59: ...nding ), replace table );►...&lt;/PRE&gt;
&lt;P&gt;You have dropped the training ")" for the New Script statement.&lt;/P&gt;
&lt;P&gt;Your code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	Parse(
		"d3&amp;lt;&amp;lt;new script(\!"test\!",d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table );"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Correct code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	Parse(
		"d3&amp;lt;&amp;lt;new script(\!"test\!",d3 = Current Data Table();
d3 &amp;lt;&amp;lt; Sort( By( 6 ), Order( Descending ), replace table ));"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Oct 2021 04:15:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-to-write-a-script-in-the-specified-JMP-file-and/m-p/428090#M67743</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-19T04:15:35Z</dc:date>
    </item>
  </channel>
</rss>

