cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
bbenny7
Level III

Nested Try statement

I am trying to run a script similar to the following:

 

Try(

       dt1 = Open(path1);

       Try(

               dt2 = Open(path2);

               dt2 << Concatenate(dt1, "Append to first table");

               ,

              dt2 = dt1 << Subset(All rows);

             );

       dt2 << Save(path2);

       ,

       print("No dt1 found!");

);

 

But, when it fails to open dt2, instead of executing the subset statement, it executes the print statement.

The question is if it possible to run nested try statements.

1 ACCEPTED SOLUTION

Accepted Solutions
bbenny7
Level III

Re: Nested Try statement

I have found an error in catch expression of the second try statement, that is why it was executing the print statement.

After correction, the script works as intended.

View solution in original post

1 REPLY 1
bbenny7
Level III

Re: Nested Try statement

I have found an error in catch expression of the second try statement, that is why it was executing the print statement.

After correction, the script works as intended.

Recommended Articles