<?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: Passing Parameters to JSL script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5542#M5541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jane,&amp;nbsp;&amp;nbsp; thank you very much ---- I will give it a try....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Aug 2012 21:39:52 GMT</pubDate>
    <dc:creator>twaintwist</dc:creator>
    <dc:date>2012-08-31T21:39:52Z</dc:date>
    <item>
      <title>Passing Parameters to JSL script</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5540#M5539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script that generates graphs over a particular date duration (e.g. last 30 days) -----&amp;nbsp;&amp;nbsp;&amp;nbsp; the requirement is to generate multiple graphs over several more date durations (e.g. last 100 days, 365 days, etc.) ---- and these date durations will likely change over time....&amp;nbsp;&amp;nbsp;&amp;nbsp; So is there a way to pass a 'duration' parameter to the script? ----&amp;nbsp; or should I set a text file containing the duration value and read from it in the JSL script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 18:36:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5540#M5539</guid>
      <dc:creator>twaintwist</dc:creator>
      <dc:date>2012-08-31T18:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameters to JSL script</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5541#M5540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you invoking the jsl script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I do if I need to execute a jsl script from a bat or such and pass the jsl a parameter....&lt;/P&gt;&lt;OL&gt;&lt;LI&gt; I write my jsl code as a Function with arguments&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;and save it to it's own file - and it never changes.&lt;/LI&gt;&lt;LI&gt;I have the bat file create a temporary jsl file that just&amp;nbsp; includes the file from #1 and then has one line that is the call to the function but with the argument on it.&lt;/LI&gt;&lt;LI&gt; Then I have the bat file start jmp with the file from #2&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From dos prompt .....&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd /c start jmp "C:\my_constructed.jsl"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;where....&lt;/P&gt;&lt;P&gt;my_constructed.jsl&amp;nbsp; contains&amp;nbsp; (and keep in mind this is the tmp file that gets generated then run)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; \\!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; include ("C:\the_jsl_code_guts.jsl");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = my_real_code(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;then....&lt;/P&gt;&lt;P&gt;C:\the_jsl_code_guts.jsl....&amp;nbsp;&amp;nbsp; contains....&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; my_real_code = Function(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // function arg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {duration_function_argument}, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // local vars&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {}, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // your code that really does stuff.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 19:52:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5541#M5540</guid>
      <dc:creator>janeg</dc:creator>
      <dc:date>2012-08-31T19:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameters to JSL script</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5542#M5541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jane,&amp;nbsp;&amp;nbsp; thank you very much ---- I will give it a try....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 21:39:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5542#M5541</guid>
      <dc:creator>twaintwist</dc:creator>
      <dc:date>2012-08-31T21:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Parameters to JSL script</title>
      <link>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5543#M5542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like Jane's idea and it works great&amp;nbsp; --- so I simply concatenate two files...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a text file with a line of JSL script that includes setting the parameter you want to pass in the Batch file (in DOS....&amp;nbsp; Echo Parameter1=30;&amp;gt;Parameter1.txt&lt;/P&gt;&lt;P&gt;2. Concatenate using the Copy command to create a temp.jsl script ---&amp;nbsp; Copy /y /b Parameter1.txt+DataScript.jsl temp.jsl &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; --- so the first line of the temp file contains the 'Parameter1=30; ' jsl command AND all the other jsl scripting that uses the parameter....&lt;/P&gt;&lt;P&gt;3. Now that the temp.jsl has the full Datascript and the one line parameter setting we can run the jump script.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DOS Batch script.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Echo Parameter1=30;&amp;gt;Parameter1.txt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Copy /y /b Parameter1.txt+DataScript.jsl temp.jsl&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;JMP temp.jsl&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2012 00:45:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Passing-Parameters-to-JSL-script/m-p/5543#M5542</guid>
      <dc:creator>twaintwist</dc:creator>
      <dc:date>2012-09-04T00:45:46Z</dc:date>
    </item>
  </channel>
</rss>

