Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

Winsock Gateway

 

Control:          DISCONNECT

 

Syntax:           result-string = CONTROL(lun,"DISCONNECT")

 

Description:    The DISCONNECT control terminates the connection with a peer. The lun may then be used in connecting to a new server process.

 

Attempts to read or write on the lun following a DISCONNECT result in an EXCP 35.

 

                        This control is synonymous with the CLOSE control.

 

Return Values:

 

                        If no error occurs, DISCONNECT returns +OK. Otherwise, it returns –ERR followed by detailed information on the nature of the error. These values are returned in the result-string.

 

Exceptions:     EXCP 45   A syntax error was detected parsing the DISCONNECT command string.

 

Example:        OPEN (1) "G03"

            A$ = CONTROL(1,"OPEN hostname.com 12345")

            INPUT (1) Result$

            IF SUB(Result$,1,1) NE "+" GOTO ErrorHandler

            .

            .

            .

            A$ = CONTROL(1,"DISCONNECT")

            INPUT(1) Result$

            IF SUB(Result$,1,1) NE "+" GOTO ErrorHandler