Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

^$DEVICE

M[UMPS] by Example

Introduced in the 1995 ANSI M[UMPS] language standard.

This structured system variable provides information about the devices that are currently known to the M[UMPS] system. Such ‘knowledge’ may be limited to those devices that are currently OPEN for a M[UMPS] process (definition in the standard), but many implementations also are capable of providing information that is available from the host operating system.

Write !,"Currently known devices:"
Set D="" For  Set D=$Order(^$Device(D)) Quit:D=""  Do
. Write !,D
. Set C=$Get(^$Device(D,"CHARACTER"))
. If C'="" Write ?30,"character set is """,C,"""."
. Quit

Additions in a future M[UMPS] language standard.

Set MNEMO=^$Device(device,"MNEMONICSPACE")
Write !,"Current mnemonicspace is ",MNEMO

Set SP="MNEMONICSPEC"
Write !,"Device ",device," currently supports:"
Set M="" For  Set M=$Order(^$Device(device,SP,M)) Quit:LIST=""  Do
. Write !?5,"Mnemonicspace ",M
. Quit

Output time-out values are accessible through ^$Device.

Write !,"Device",?12,"Time Out",?25,"Currently Stalled"
Set D="" For  Set D=$Order(^$Device(D)) Quit:D=""  Do
. Set T=$Get(^$Device(D,"OUTTIMEOUT"))
. Set S=$Get(^$Device(D,"OUTSTALLED"))
. Write !,D,?12,$Justify(T,5),?25,$Select(S:"Yes",1:"No")
. Quit

Note: The nodes with subscripts "OUTTIMEOUT" and "OUTSTALLED" will only be defined if a process has established an output time-out value for the device in question.

The addition of a binding to TCP/IP socket devices includes a new deviceparameter.

The values of some of these parameters are accessible through ^$D[EVICE]:

^$D[EVICE](device,"ATTACH")=value
provides an implementation-specific value that identifies a specific socket that may currently be used.

^$D[EVICE](device,"CONNECT")=value
provides an implementation-specific value that contains information about the current connection.

^$D[EVICE](device,"DELIMITER")=value
provides the list of I/O delimiters that may occur.

^$D[EVICE](device,"DETACH")=value
provides an implementation-specific value that identifies a specific socket that is currently being disconnected.

^$D[EVICE](device,"IOERROR")=value
provides an identification of the I/O error trapping mode that is currently being used (currently, only "TRAP" and "NOTRAP" are standardized values; values beginning with "Z" may also occur).

^$D[EVICE](device,"LISTEN")=value
provides implementation-specific information about the protocol being used for the current connection.

^$D[EVICE](device,"SOCKET")=index
provides the index number of the socket that is currently being used.

^$D[EVICE](device,"SOCKET",index,"DELIMITER")=number
provides the number of I/O delimiters stored in ^$D[EVICE].

^$D[EVICE](device,"SOCKET",index,"DELIMITER",n)=delimiter
provides the nth I/O delimiter string.

^$D[EVICE](device,"SOCKET",index,"IOERROR")=value
provides the I/O error trapping mode.

^$D[EVICE](device,"SOCKET",index,"LOCALADDRESS")=value
provides the local network node address of the connection.

^$D[EVICE](device,"SOCKET",index,"PROTOCOL")=value
provides the network protocol that is being used for the connection.

^$D[EVICE](device,"SOCKET",index,"REMOTEADDRESS")=value
provides the remote network address of the connection.

^$D[EVICE](device,"SOCKET",index,"SOCKETHANDLE")=value
provides an implementation-specific string that identifies the socket that is accessed through the current index number.

For examples, see the Use command.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 08-Jan-2024, 12:13:34.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)