CHN Variable - BBj
For this topic's original documentation, see the CHN Variable - Get Open Channels.
By default, BBj channel numbers can be any integer from 1 through Integer.MAX_VALUE (2147483647), but values above 32767 have the potential to confuse legacy applications that depend on accurate 16-bit integers in the CHN variable. In BBj 14 and higher, the LEGACY_CHN_LIMIT !COMPAT setting can be set to TRUE to limit OPEN and SELECT channel numbers to values of 32767 or less. This eliminates any possibility of inadvertently using channel numbers that cannot be accurately reported in the CHN variable. For example:
!ERROR=41 (Channel number can't be > 32767)