Search the Openlist for the device named in Devnam.
If not found, take no further action.
Otherwise, perform the following operations:
Remove the device specified in Devnam from the Openlist.
If Result contains any device parameters, find the device
named in Devnam in the Devicelist, and change those parameters
which appear in Result to their new values from Result.
Perform any termination procedures for the device named in
Devnam according to its device parameters in Devicelist.
If the named device is the current device ($IO),
execute an OPEN P USE P where P designates a predetermined
default device.