9.51 DISCONNECT_SERVER

Note: Built-In Function Rules     Usage Options

Disconnects the current function from a previously connected server.

A request to disconnect a server that is already disconnected will be ignored. No error will result.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

SSN of a defined server

1

10



Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return Code.

OK - Disconnection Completed.

ER - Error during Disconnection

2

2



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.