PowerExchange for CDC and Mainframe 
			
			- PowerExchange for CDC and Mainframe 10.5.1
- All Products
 
           
      	
            
	
      result=SetBitN(field,offset[,on_value][,off_value])
|  Parameter 
					  |  Description 
					  |  Datatype 
					  | 
|---|---|---|
| result | Returns one of the following values to indicate the on or off setting of the specified bit: 
					  
 | NUM8 
					  | 
| field | The field to be checked. 
					  | Any 
					  | 
| offset | The position of the bit within the field. 
					  Offsets begin at 0 and end at the last bit of a field. For example, if you have a 4-byte CHAR field, the last offset is 30. 
					  | -
					  | 
| on_value | Optional. Overrides the value returned if the bit value is set to on. For example, if you set the on value to 3 and the bit value is set to on, SetBitN returns 3. 
					  Default is 1. 
					  | NUM8 
					  | 
| off_value | Optional. Overrides the value returned if the bit value is set to off. For example, if you set the off value to 2 and the bit value is set to off, SetBitN returns 2. 
					  Default is 0. 
					  | NUM8 
					  |