cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Festrus
Level I

Problem calling a script with Include()

Hi All,

 

I have 3 scripts that run different SQL queries to extract data. Another script uses Include() to run each one of those scripts and then makes some modifications to the three tables and joins them.

In two of those scripts, when I run the individual script, or the call using Include(), I got the same table. However, for the last script, if I run it I get like 8000 rows, but running it through the include() command, I get less than 4000 rows. Besides this, some columns are also missing.

I have removed everything else and now I only have a jsl script with one line like the one below:

 

Include( "...\Test.jsl");

 

and it still gives me a different table as when I run Test.jsl directly

 

I have never seen this behaviour before and the fact that I get the same tables no matter how I run the two previous script, tells me some functionality of include() is not working with my data.  

 

Have you ever encountered this before? Just in case, I use JMP 17.0.0

 

Thank you,

3 REPLIES 3
jthi
Super User

Re: Problem calling a script with Include()

There could be some variable collisions. Do your scripts have similarly named variables? Do your scripts start with Names Default To Here(1)? Or do you use <<New Context or <<Names Default to Here with your Include? https://www.jmp.com/support/help/en/17.2/#page/jmp/programming-functions.shtml?os=win&source=applica... and https://www.jmp.com/support/help/en/17.2/#page/jmp/include-a-script.shtml#ww306193

-Jarmo
Festrus
Level I

Re: Problem calling a script with Include()

Hi Jarmo,

 

Thank you for your answer. Yes, I tried New Context also.

I believe the problem might be in the SQL code. It was written to download a specific value but I modified it to download some extra parameters and it maybe confusing everything. I need to have another look at the SQL script. As this might not be a JMP issue, please feel free to delete this post.

Thanks again.

Re: Problem calling a script with Include()

One other thing to check: queries can have different timing behavior when running in the background or in the foreground. Sometimes explicitly using Run Foreground can be helpful.

Jed_Campbell_0-1711118502768.png