cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm 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