Is that a production instance?

Is that 8bit or Unicode instance?

What I/O tables NLS routine shows? (Note that modifying locales/defaults can be potentially application-breaking change so do it only if you know what you're doing)

zn "%SYS"

do ^NLS
 
 
1) Display current locale
2) Select defaults
3) Change locale
4) Display loaded settings
5) Advanced
 
NLS option? 2
 
1) Internal tables
2) I/O tables
3) CSP files
4) Date, time and number formats
 
Category of defaults? 2
 
Items marked with (*) represent the locale's original default
 
I/O table              Current default
---------------------  --------------------
 
1) Process             RAW (*)
2) Cache Terminal      UTF8 (*)
3) Other terminal      UTF8 (*)
4) File                UTF8 (*)
5) Magtape             UTF8 (*)
6) TCP/IP              RAW (*)
7) System call         RAW (*)
8) Printer             CP1251 (*)

Some general advice:

  1. Root directory should be a configurable setting,
    • Before changing config, call NormalizeDirectory method of %File class
    • Check that directory exists and you can write to it
    • If it's Ensemble check that Ensemble can write to that directory too
  2. Try to minimize the number of root directories, if you have to have several. It's preferable to use subdirectories.
  3. Calculate all subdirectories via calls to SubDirectoryName method from %File class
  4. You should not have slash symbols for directories/files purposes in your code base.

This seems to work for me:

set x = "%sqlcq.something.value.foo"

write x?1"%sqlcq".E

That said, I assume you're iterating over some list of classes. If so, it may be better to add this or equivalent condition to the builder of the class list. If you do it via SQL and %Dictionary package, then excluding System classes, or generated classes or even classes that %STARTSWITH '%sqlcq' may be a better solution.

You can easily develop your own custom function. Here's an example of a custom function which checks that the number is valid.

/// Functions to use in rule definitions.
Class Custom.Functions Extends Ens.Rule.FunctionSet
{

/// Returns 1 if a string is a number, 0 otherwise
ClassMethod IsValidNumber(string As %String) As %Boolean [ CodeMode = expression, Final ]
{
$ISVALIDNUM(string)
}

}