Statistical programming, matrix languages, and more

Do not exit IML when there are errors

Reply
Contributor
Posts: 20

Do not exit IML when there are errors

Is there a way to stop IML exit when it gets errors? That's because I have to re-run everything again in IML after it exits.

It is possible IML exits when it encounters a certain number of errors, so perhaps I can limit this number.

See the following log of my program:

90   create mydata from tt01[colname=namevar];

ERROR: Matrix tt01 has not been set to a value.

statement : CREATE at line 90 column 1

91   append from tt01;

ERROR: No data set is currently open for output.

statement : APPEND at line 91 column 1

92   close mydata;

NOTE: Cannot close WORK.MYDATA; it is not open.

93

94   create mydata from ta01[colname=namevar];

ERROR: Operand namevar does not have a value.

statement : CREATE at line 94 column 1

NOTE: Exiting IML.

NOTE: Storage library SASUSER.MYMODULES closed.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IML used (Total process time):

      real time           26:06.64

      cpu time            25.25 seconds

SAS Super FREQ
Posts: 3,222

Re: Do not exit IML when there are errors

Wow. I never knew SAS/IML did that.  How many errors are there? Is there a reason why you don't or can't fix the errors?

For unititialized variables, perhaps you could try something like:

   if ncol(tt01)=0 then stop;

Another option:

   if ncol(tt01)=0 then store _all_;  /* save matrices in case IML exits */

I don't know if any of these will work. I know that there are a lot of system options that SAS supports for handling errors. See if the options on this page are useful: SAS(R) 9.2 Language Reference: Concepts, Second Edition

Post a Question
Discussion Stats
  • 1 reply
  • 240 views
  • 0 likes
  • 2 in conversation