11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ZUTIL(131)DO $ZUTIL(130,2,0,1)SET y = $ZUTIL(130,2,0)WRITE !,"domain index is ",y$ZUTIL(131)Sets or returns system identifiers.$ZUTIL(131,flag,alias)$ZU(131,flag,alias)ParametersflagaliasA numeric code that specifies which value to get or set: 0 = system name oralias. 1 = system name and <strong>Caché</strong> instance name.Optional — The system name alias to set, specified as a quoted string.Description$ZUTIL(131,0) returns the system name, or the system name alias established with$ZUTIL(131,0,"name"). You can establish this alias system-wide for the current instanceof <strong>Caché</strong>. Stopping and restarting <strong>Caché</strong> causes the system name value to revert to the systemdefault.$ZUTIL(131,1) returns the system name, followed by the name of the current instance of<strong>Caché</strong>. These two names are separated by a colon (:). $ZUTIL(131,1) always returns theactual system name; it does not return the system name alias established by$ZUTIL(131,0,"name").The string returned by $ZUTIL(131,1) can also be returned by writing the contents of the$SYSTEM variable.Prior to <strong>Caché</strong> 5.1, $ZUTIL(131,1) returned the IP address and other system information.You can get the IP address and other information using methods of the SYS.Process class,as shown in the following example:ZNSPACE "%SYS"WRITE ##CLASS(SYS.Process).%OpenId($JOB).ClientIPAddressGet()An IP address consists of four numbers separated by periods. Each of these numbers can befrom 0 to 255, inclusive. Refer to the <strong>Caché</strong> Class <strong>Reference</strong> for further details.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 705

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!