Dave:

Try this:

!
** Log off another line for UniData
** (C) Copyright 1985-2004, Advantos Systems, Inc.  All Rights Reserved.
!
** Last Modified: 16 Mar 2006, wph
** First Created: 16 Mar 2006, wph
** Program Type-: Utility
!
** Notes:
**
** This process is designed to log off another UniData process (or
** port).  It is necessary to logoff the user number as specified in 
** the "LISTUSER" command.  The syntax is:
**
** LISTUSER {USRNBR}
**
** If the user number isn't specified then the "LISTUSER" command is
** executed and one has the choice of entering the user number.
**
**-------------------------------------------------------------------**
**                                                                   **
**                    I N I T I A L I Z A T I O N                    **
**                                                                   **
**-------------------------------------------------------------------**
*
** Initialize local variables
NULL$  = ''
AM     = @AM
VM     = @VM
SP1    = ' '
BadNos = NULL$

** parse tcl sentence to get BASIC commands
TclLine = @SENTENCE

** remove the command from the line and check if we need help
TclLine = OCONV(TRIM(TclLine), 'G1 999')
IF TclLine = '?' THEN GOTO DISPLAY.HELP

** convert spaces to VMs
UserNos = CONVERT(SP1, VM, TclLine)
*
**-------------------------------------------------------------------**
**                                                                   **
**                 S T A R T   P R O G R A M   R U N                 **
**                                                                   **
**-------------------------------------------------------------------**
*
** test if we need to enter the user numbers
IF UserNos = NULL$ THEN
   EXECUTE \LISTUSER\
   CRT
   CRT "Enter numbers from the USRNBR column separated by spaces:"
   INPUT UserNos ; UserNos = OCONV(TRIM(UserNos), 'MCU')
   IF UserNos[1,1] = 'E' THEN GOTO END.OF.PROGRAM
   IF UserNos[1,1] = 'X' THEN GOTO END.OF.PROGRAM
   IF UserNos[1,1] = 'Q' THEN GOTO END.OF.PROGRAM
   UserNos = CONVERT(SP1, VM, UserNos)
END

** log off the selected user numbers
xHigh = DCOUNT(UserNos, VM)
FOR X = 1 TO xHigh
   UserNo = UserNos<1,X>
   PCPERFORM \stopudt \ : UserNo
   IF @SYSTEM.RETURN.CODE THEN BadNos := UserNo : SP1
NEXT X
*
GOTO END.OF.PROGRAM
*
**----------------------------------------------------------------**
**                                                                **
**                     S U B R O U T I N E S                      **
**                                                                **
**----------------------------------------------------------------**
*
** Help display
***************
DISPLAY.HELP:
***************
*
CRT
CRT "Utility to log off UniData processes.  This command is similar to"
CRT "the PICK command 'LOGOFF {PortNo}'.  If the User# isn't supplied"
CRT "then the 'LISTUSER' command is executed and the user has the option"
CRT "of selecting a listed USRNBR."
CRT
CRT "Syntax:"
CRT "  LOGOFF {UserNbr UserNbr ...}"
CRT
CRT "Example:"
CRT "  LOGOFF 3275"
CRT
CRT "The user# 3275 is logged off."
CRT
STOP
*
**----------------------------------------------------------------**
**                                                                **
**                  E N D   O F   P R O G R A M                   **
**                                                                **
**----------------------------------------------------------------**
*
***************
END.OF.PROGRAM:
***************
*
IF BadNos NE NULL$ THEN
   CRT
   CRT "The following items were not logged off:"
   CRT TRIM(BadNos)
END
END

Bill Haskett
Advantos Systems, Inc.
www.advantos.net 
(760)944-5570 (CA)
(360)923-4838 (WA)
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Taylor
> Sent: Wednesday, April 05, 2006 6:13 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2][UD] Logout/Logoff/? Udtno/Pid
> 
> UD Ver 7.1.0 PE on Win 2000 Server:
> 
> I have been unable to find a way to logoff/logout/otherwise 
> disconnect a
> process running on another Udtno/Pid, including both 
> foreground and background
> (phantom) processes.
> 
> Any suggestions will be much appreciated.
> 
> Thanks,
> 
> Dave
> 
> Dave Taylor
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to