Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %CHOPEN(channel)
One of the following values: (n)
1 = The specified channel is currently open.
0 = The specified channel is closed.
The number of the channel in question. (n)
%CHOPEN determines whether or not an I/O channel has been opened.
The following function builds a channel-in-use table for the first 10 channels.
function chn_tbl literal bits ,10i4, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 record flags chn ,i4 chn_tbl ,i4 proc clear chn_tbl for chn from 1 thru 10 if (%chopen(chn)) chn_tbl = (chn_tbl .bor. bits(chn)) freturn (chn_tbl) endfunction