Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 4. Calling SAS Procedures > 4.8 Handling Errors When Calling a Procedur...

4.8 Handling Errors When Calling a Procedure

If you write an IMLPlus program that calls a SAS procedure, you might need to know whether the procedure stopped with an error. For example, the data could be degenerate in some way such as having too many missing values or having collinear variables. Or you could incorrectly specify an option. You can use the OK= option in the SUBMIT statement to determine whether a procedure generated a SAS error and to handle the error if one occurs.

The next program is a variation of the example in the section "Passing Parameters to SAS Procedures" on page 93. In that program, an array of percentile values was passed into a SUBMIT block and substituted into a call to the UNIVARIATE procedure. Recall that a valid percentile (as specified in the PCTLPTS= option in the OUTPUT statement of the UNIVARIATE procedure) is a number in the range [0, 100]. If you specify a number outside that range in the PCTLPTS= option, the UNIVARIATE procedure generates an error.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial