Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

^%ZOSF(): Operating System-dependent Logic Global

Reference Type: Supported, Category: Operating System Interface, ICR#:

Description

The ^%ZOSF global holds operating system-dependent logic so that application programs can be written independently of any specific operating system.

Most of the nodes contain logic that must be executed to return a value, for example:

    X ^%ZOSF("SS")

Those prefaced with one asterisk in the table below, however, are reference values. For example, to WRITE the operating system, use:

    W ^%ZOSF("OS")

The nodes prefaced with two asterisks in the table below should be used with the DO command, as in the following:

    >D @^%ZOSF("ERRTN")

Format

  ^%ZOSF()

Table Key:

* indicates those nodes that hold reference values.

** indicates those nodes that are invoked with a DO statement (D).

Node Description

ACTJ

Return in Y the number of active jobs on the system.

AVJ

Return in Y the number of jobs that can be started. The number of available jobs is the maximum number less the number of active jobs.

BRK

Allow the user to break the running of a routine.

DEL

Delete the routine named in X from the UCI.

EOFF

Turn off echo to the $I device.

EON

Turn on echo to the $I device.

EOT

Returns Y = 1 if Magtape end-of-tape mark is detected.

**ERRTN

This node is set to the name of the routine that should be used to record errors. For most systems this is the KERNEL error recording routine (%ZTER):

  >D @^%ZOSF("ERRTN")

To initially set the trap:

  >S X=^%ZOSF("ERRTN"),@^%ZOSF("TRAP")

ETRP

Obsolete.

GD

Display the global directory.

GSEL

Returns the user's selection of globals as follows:

  ^UTILITY($J,"global name")

NOTE: This is only supported for Caché at this time.

JOBPARAM

When passed the job in X, returns the UCI for that job in Y. It is used to determine whether the job is valid on the system.

LABOFF

Turn off echo to the IO device.

LOAD

Load routine X into @(DIF_"XCNP,0)".

LPC

Returns in Y the longitudinal parity check of the string in X.

MAGTAPE

Sets the %MT local variable to hold magtape functions. Issue the backspace command as follows:

  >W @%MT("BS")

The full list of functions are:

  • BS—Back Space

  • FS—Forward Space

  • WTM-WRITE Tape Mark

  • WB-WRITE Block

  • REW-Rewind

  • RB-READ Block

  • REL-READ Label

  • WHL-WRITE HDR Label

  • WEL-WRITE EOF Label

MAXSIZ

For M/SQL-VAX only. Sets the partition size to X.

*MGR

Holds the name of the MGR account (UCI, Volume Set).

MTBOT

Returns Y = 1 if the magtape is at BOT.

MTERR

Returns Y = 1 if a magtape error is detected.

MTONLINE

Returns Y = 1 if the magtape is online.

MTWPROT

Returns Y = 1 if the magtape is WRITE Protected.

NBRK

Do not allow the user to break a routine.

NO-PASSALL

Sets device $I to interpret tabs, carriage returns, line feeds, or control characters (normal text mode).

NO-TYPE-AHEAD

Turn off the TYPE-AHEAD for the device $I.

*OS

In the first ^ piece, holds the type of MUMPS (e.g., Caché, VAX DSM, GT.M).

PASSALL

Sets device $I to pass all codes, allow tabs, carriage returns, and other control characters to be passed (binary transfer).

PRIINQ

Returns Y with the current priority of the job.

PRIORITY

Sets the priority of the job to X (1 is low, 10 is high).

*PROD

Holds the name of the Production account (UCI, Volume Set).

PROGMODE

Returns Y = 1 if the user is in Programmer Mode.

RD

Displays the routine directory.

RESJOB

References the operating system routine for restoring a job.

RM

Sets the $I width to X characters. If X=0, then the line in set to no wrap.

RSEL

Returns the user's selection of routines as follows:

  ^UTILITY($J,"routine name")

RSUM

Passes a routine name in X, and it returns the checksum in Y. Used by CHECK^XTSUMBLD. The second line and comments are not included in the total.

RSUM1

Passes a routine name in X, and it returns the checksum in Y. Used by CHECK1^XTSUMBLD. The second line and comments are not included in the total.

SAVE

Saves the code in @(DIE_"XCN,0)") as routine X.

SIZE

Returns Y=size (in bytes) of the current routine.

SS

Displays the system status.

TEST

Returns $T = 1 if routine X exists.

TMK

Returns Y = 1 if a tape mark was detected on the last READ.

TRAP

To set the error trap:

  >S X="error routine",@^%ZOSF("TRAP")

TRMOFF

Resets terminators to normal.

TRMON

Turns on all controls as terminators.

TRMRD

Returns in Y what terminated the last READ.

TYPE-AHEAD

Allow TYPE-AHEAD for the device $I.

UCI

Returns Y with the current account (UCI, Volume Set).

UCICHECK

Returns Y'="" if X is a valid UCI name.

UPPERCASE

Converts lowercase to uppercase. Setting X="User Name" returns Y="USER NAME". Applications can gain efficiency by executing this node rather than performing checks within the application program.

*VOL

Contains the current Volume Set (CPU) name.

XY

Sets $X=DX and $Y=DY (may not work on all systems).

ZD

Given X in $H format, returns the printable form of X in Y.