SetChannelStatus function

Syntax

SetChannelStatus(ChannelName, Status)

Description

Use the SetChannelStatus to set the status of the specified channel. You could use this function to restart a channel that had been paused, or pause a running channel.

Note:

This function has been desupported and remains for backward compatibility only. Use the IntBroker class SetQueueStatus method instead.

Parameters

Parameter Description

ChannelName

Specify the channel name.

Status

Specify the status you want to set the channel to. The values are:

  • 1 for Run

  • 2 for Pause

Returns

A Boolean value: True if the channel status was changed successfully. False otherwise.

Example

/* User has clicked on a channel to change its status */ 
If CHNL_STATUS = "1" Then 
   rem running, so pause; 
   &status = 2; 
Else 
   rem paused. So run; 
   &status = 1; 
End-If; 
If SetChannelStatus(AMM_CHNL_SECVW.CHNLNAME, &status) Then 
   CHNL_STATUS = String(&status); 
Else 
   MessageBox(0, MsgGetText(117, 1, ""), 117, 22, ""); 
End-If;