BookmarkSubscribeRSS Feed
cib
Calcite | Level 5 cib
Calcite | Level 5
I am wondering if there is a variable that I can check at the bottom of my stored process code to verify if the stored process completed successfully.

(Just as background information: There is currently a bug in the portal that, if you run a stored process that errors out, the portal does not return the error log but gives a bizarre error 'Wraps an exception thrown while using the hints provided to bind to the Result Package.' because there is no output data for the results package to bind to. The Stored Process group in Tech support is aware of the issue and there is currently no fix available.) In my case, the error is generated when the user inputs parameter values that cause the code to be invalid.

That being said, I want to check the error status of the STP at the end of the code so that, if there is an error, I can generate output - a meaningful message that tells the user that the values they entered are invalid.

I have tried syserr and _error_ but these are only valid for a given step not the entire STP, which would mean I'd have to add a check after every data/proc step in every STP, which is not a practical option.

Thanks.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
The Stored Process folks in Tech Support are the best folks to answer this question. Unless there's something buried in the Administration guide on this, I only know of ways to check steps.
cynthia
deleted_user
Not applicable
In your position I would step back to the parameters and examine these.

Is there some way you can test each parameter is "in scope" and terminate the stored process in a more controlled manner?

"Causes the code to be invalid" suggests you might have character values where numeric are needed, or vice versa, or incorrectly quoted lists, values outside allowable ranges etc. Each of these can be checked and flags set if they fail validation.

IMHO, it is poor design to create a processing object that may be sent invalid data by users, and not perform some degree of validation or constraint. As it stands, even when the bug is fixed, you will still have a process failure and a report that is not very helpful to diagnose the cause.

Kind regards

David

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1291 views
  • 0 likes
  • 3 in conversation