· Aug 2, 2016

Use of $ZUTIL(49) is deprecated

Hi all,

I'm using $ZUTIL(49) to get information of the databases I want to add to a mirror. This information is passed to  ##class(SYS.Mirror).CatchupDB(plstPathDatabases)  in order to Catchup all databases addes to a Mirror.

I know that ZUTIL is deprecated and I'd like to know what function or functions I have to use in order to get all necessary information for CatchupDB.


Thanks a lot

Discussion (11)0
Log in or sign up to continue

Hi Dmitry,

Thanks for your response.

I see that page you tell me but the main problem is that I don't know what are the properties or methods of SYS.Database that I have to use because I don't know what are the fields ZU(49) is sending to me.

Can you help me on this? Where can I find the exact data ZU is returning?

Thanks in advance

That's what I'm trying yo do but I can't figure out all the properties I have to use.

$ZU49 is sending 24 values comma separated and after searching for documentation i can find 6 of them. But many others as Field 14 -> "System file number, regardless of whether the file is currently mounted or dismounted." don't know where to find it.

And also there are some others marked as values for iternal reference that I can't figure out what they are.

Thanks for your response.

Check where in ParseZU49Info it takes field 14 and what property does it fills with that information.  Check for more information.

#; Pieces of return value from $zu(49)
#define mountpiece 1
#define blksizpiece 2
#define uicpiece 3
#define filsizpiece 4
#define expandpiece 5
#define maxblkpiece 6
#define glodirpiece 7
#define gloptrpiece 8
#define rdirpiece 9
#define rgrpiece 10
#define glogrpiece 11
#define freezepiece 12
#define colpiece 13
#define sfnpiece 14
#define totvolpiece 15
#define formatpiece 16
#define attribpiece 17
#define statuspiece 18
#define exptimepiece 19
#define nojrnpiece 20
#define bigdbpiece 21
#define curblkspiece 22
#define blkspermappiece 23
#define curmapspiece 24
#define resourcepiece 25
#define enckeyidpiece 26

Sorry, I forgot that SYS.Database is deployed. You'll need to match $zu(49) to properties manually. But the macros usually have the same name. For example field 14 is sfnpiece macro ("piece" part of the name is irrelevant, so just sfn it is) and it corresponds to SFN property in SYS.Database.


To test, you can write the following method:

ClassMethod Test( Directory )

    Set db=##Class(SYS.Database).%OpenId(Directory)
    Write db.SFN = $p($zu(49),",",$$$sfnpiece) //14th piece
    // More checks