Question
Kevin McGinn · Sep 28

parsing FileCompact status OREF result

I am executing the command:

      set fileComp = ##Class(SYS.Database).FileCompact(obj.Directory, freeSpace, .actualFree)

      where obj.Directory contains the location of the current database

This executes correctly. However, the resultant OREF object does not contain any displayable properties but rather is of the value:

       "0 "_$lb($lb(380,,,,,,,,,$lb(,"%SYS",$lb("e^zFileCompact+38^SYS.Database.1^1","e^^^0"))))/* ERROR #380: Completed but skipped some blocks, details recorded in the console log. */

Which is what I expected. But I would like to extract the piece of the OREF object following the 'ERROR' keyword. But if I try to parse the information only the information prior to the /* .... */ piece of the OREF object is accessible.

Is there a class/method for accessing the error string from this OREF object?

Product version: Caché 2018.1
00
1 0 2 108
Log in or sign up to continue

The OREF you pasted in is a %Status object, so you can manipulate it with %SYSTEM.Status methods (see the documentation). To get the information between the /* ... */ you can use ##class(%SYSTEM.Status).GetErrorText(fileComp).

Thank-you for the quick response; I appreciate the help.