9.50 DISCONNECT_FILE

Note: Built-In Function Rules     Usage Options

Disconnects a file previously connected to a server.

Warning:

  • Using this Built-In Function during pending I/O operations to the file (e.g. in the middle of a SELECT loop) will cause unpredictable results.

  • A request to disconnect a file that is not currently connected will be ignored. No error will result.


Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Physical File\Table Name

The name may be specified as a generic name. The * symbol is used as the generic delimiter.

1

10



2

A

Req

SSN of defined server.

1

10



Return Values

No return values.

Technical Notes

A Note on Error Handling

It is very strongly recommended that you avoid building complex error handling schemes into your applications. Use a very simple trap like this at all levels of your application.

     if (#retcode *ne OK)
    abort msgtxt('Failed to .............................')
endif

Let the standard error handling Built-In Function to every generated application take care of the problem. Situations have arisen where user defined error handling logic has become so complex as to consume 40 - 50% of all RDML code (with no obvious benefit to the application). Do not fall into this trap.