%Status or %Library.Status provides a number of useful capabilities.

Following is documentation from the %Library.Status Class.

The %Status data type class is used to represent an error status code.

Many of the methods provided by the Caché Class Library return error status information using the %Status data type. The include file, %occStatus.INC, contains several macro definitions that are useful in testing the value of an error code in %Status format.

These macros include:

  • $$$ISOK(status:%Status) returns true (1) if the status code status does not represent an error condition.
  • $$$ISERR(status:%Status) returns true (1) if the status code status represents an error condition.

You can get a more detailed description of an error by using the system-provided DecomposeStatus^%apiOBJ(status:%Status,&err,flag) routine.

This routine takes a status code and returns an array of error strings.

For example: 

Set status=obj.%Save() If $$$ISERR(status) Do DecomposeStatus^%apiOBJ(status,.err,"-d") For i=1:1:err Write err(i),! 

A method returning a %Status code representing an error will throw an exception in a client Visual Basic (ActiveX) or Java application.

I wish to thank Eduard and Daniel for your comments on this post. Although I almost regret asking my question. It will take me awhile to understand everything that was said.

And that brings me to another point, why does asking a simple question, like getting all the Manys' in a relationship have to be so complicated?

Ok, how about  a simpler question, why isn't ExtentFunc documented in the InterSystems Documentation?

The people who create the documentation, listen up!! Or maybe not, your documentation is too complicated and cumbersome as it is.

Eduard,

Thank you for your answer, it was just what I was looking for.

But, what is ExtentFunc?

I did a search in the I/S Documentation and found no results.

I looked in %Library.Persistent but did not find it there.

I searched the Developer Community and got 1 hit, this post.

I even tried to Google it.

I did find the class %sqlcq.SAMPLES.cls9 from doing a ZW on the rs variable, but could not find the class.

So my friend, where did you get the method ExtentFunc from? 

Peter, please clarify your comments:

>>>>That for any reasonable sized database (ie less than <~10,000,000) rows on a modern server with adequate memory - it >>>>don't much matter!!! Cache will do the biz.

What do you mean Cache will do the biz?

 

>>>>>But give it a go
>>>>>As I said it don't much matter unless you are in serious terabyte country

Give it a go? Give what a go?

And what is serious terabyte country?

 

I am sorry, but I am just not following what you are saying.