× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx wrote:
quick and dirty:
...
dErrorDS ds Qualified d BytesProvided 10i 0 Inz(%Size(ErrorDS)) ...
/free chkusraut( authind : 'USERID ' ...
: ErrorDS); *inlr=*On; return;

Tommy, for quick and dirty, I think you should initialize the BytesProvided subfield to zero.

By coding a non-zero value for that subfield, you force yourself into checking the error code parameter and somehow indicating that there was an error. By coding zero, your program crashes nicely if you get the parameters wrong, and as a bonus, the error message is still in the joblog.

Me, I think that it's best even for Slow-and-Clean? to always initialize BytesProvided to zero, and only set to a non-zero value right before calling an API. Then, after the API call, set it back to zero. That way, the default behaviour for API calls is to crash if an error occurs; the programmer has to add explicit code to get the API to swallow the error and report it in the errorcode parameter, maximizing the possibility that the programmer will also add the code to check the errorcode parameter.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.