cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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