InetClose

Closes a specific server handle, or closes all open handles and frees up RexxInet resources.

Synopsis

error = InetClose(variableName)

Args

variableName is the name of some REXX variable that has been set to a server handle by functions such as InetOpenUrl, InetConnect, and other functions that return a handle. If passing the variable name directly, quote it.

If omitted, then all open handles are closed, the modem is hungup, and all RexxInet resources are freed. To reuse RexxInet, you would need to call InetOpen() again.

Returns

An empty string if successful, or an error message if a problem.

Notes

It is not considered an error to call InetClose on a variable that has not been set to a server handle.

Regardless of how you set the variable InetErr, InetClose never raises any condition. So, if you wish to check for an error, you must manually check the return value.

When your main script ends, RexxInet implicitly calls InetClose with no args. This is a convenience if the script aborts without doing such cleanup. Otherwise, it is best to call InetClose to free up use of RexxInet if you do not have any further need for it.