home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////////
- // Examples of how to utilize the following System Environment variables:
- //
- // CONN_NAME CONN_ID
- // CONN_ADDRESS CONNS_IN_USE
- // CONNS_MAX CONNS_PEAK
- // SERVER
- //
- // This task file will display a listing of all users logged in
- /////////////////////////////////////////////////////////////////////////
-
-
- // Define variable %0 as the first connection
-
- DEFINE %0 0001
-
-
- // Define variable %1 for prompting to continue (24=prompt)
-
- DEFINE %1 0000
-
-
- // Define variable %2 for header display (0=display header)
-
- DEFINE %2 0000
-
-
-
- // Display information on all active connections
-
- WHILE %0<=%CONNS_PEAK%
-
-
- // should we prompt to continue
-
- IF %1==0024
- PAUSE
-
- // reset the display counter
-
- DEFINE %1 0005
-
- // set the header variable
-
- DEFINE %2 0000
-
- ENDIF
-
-
- // display the header information
-
- IF %2==0000
- CLS
- ECHO User Listing for %SERVER%
- ECHO %CONNS_IN_USE% of %CONNS_MAX% connections in use.
- ECHO.
- ECHO Conn Net/Node Address User Name (Object ID)
- ECHO ---- --------------------- -----------------------------------------
-
-
- // reset header variables
-
- DEFINE %2 0001
-
- ENDIF
-
-
- // make sure the connection is in use
-
- IF NOT "%CONN_NAME_%0%"=="INACTIVE" AND NOT "%CONN_NAME_%0%"=="NOT-LOGGED-IN"
-
- // display the connection information
-
- ECHO %0 %CONN_ADDRESS_%0% %CONN_NAME_%0% (%CONN_ID_%0%)
-
- ENDIF
-
-
- // increment the counters
-
- DEFINE %0 %0+=1
- DEFINE %1 %1+=1
-
- LOOP
-