!LISTU()

Top  Previous  Next

 

The !LISTU() subroutine returns the raw data used by the LISTU command.

 

 

Format

 

CALL !LISTU(dyn.array)

 

where

 

dyn.arrayis the dynamic array returned by the subroutine.

 

 

The !LISTU() subroutine allows a developer to construct their own variant of LISTU, perhaps as a screen within an application.

 

The data returned in dyn.array is a dynamic array where each field is multivalued with a value for each active QM process. The fields are:

1User number. This will be in ascending order.
2Operating system level process id. This can be negative on some Windows platforms.
3Process type (I = interactive, P = phantom, C = QMClient, N = QMNet).
4IP address for a direct network connection to QM. Entry from the operating system command prompt will not set this.
5Parent user id for a phantom process. This is zero if the process is not a phantom or if the parent process has logged out.
6User name
7Terminal device name (where relevant)
8Login time as date * 86400 + time in the local time zone of the user executing the subroutine.
9Account name

 

Further fields or process types may be added in future releases.

 

 

Example

 

CALL !LISTU(USERS)

NUM.USERS = DCOUNT(USERS<1>, @VM)

FOR I = 1 TO NUM.USERS

  IF USERS<3,I> = 'I' THEN

     DISPLAY FMT(USERS<1,I>, '3R') : '  ' : USERS<6,I>

  END

NEXT I

 

The above program fragment displays a list of the user numbers and user login names of all interactive processes.