CHGBIT CHANGE BIT TAACLTN |
The Change Bit command allows one or more bits to be changed in a
byte to either *ON ('1') or *OFF ('0'). The bits are numbered 1 - 8
with 1 being the high order bit. A variable must be specified for
the &RTNBYTE parameter and all BITn parameters cannot be specified as
*SAME.
A typical series of commands would be:
DCL &RTNBYTE *CHAR LEN(1)
.
CHGBIT BYTE(&BYTE) RTNBYTE(&RTNBYTE) BIT3(*ON)
The &BYTE value would be moved to the &RTNBYTE value and Bit 3 would
be set on.
CHGBIT escape messages you can monitor for
------------------------------------------
None. Escape messages from based on functions will be re-sent.
CHGBIT Command parameters *CMD
-------------------------
BYTE A required *CHAR LEN(1) value for the byte to be
changed. A variable may be used. When command
prompting is used, you can expand the length of the
input field by entering & and pressing Enter.
RTNBYTE A required *CHAR LEN(1) value for the modified byte
to be returned. A variable may be used. When
command prompting is used, you can expand the length
of the input field by entering & and pressing Enter.
BIT1 The value to be changed for Bit 1 (high order).
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT2 The value to be changed for Bit 2.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT3 The value to be changed for Bit 3.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT4 The value to be changed for Bit 4.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT5 The value to be changed for Bit 5.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT6 The value to be changed for Bit 6.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT7 The value to be changed for Bit 7.
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
BIT8 The value to be changed for Bit 8 (low order).
*SAME is the default meaning no change occurs.
*ON may be specified to set the bit to '1'.
*OFF may be specified to set the bit to '0'.
Restrictions
------------
Because CHGBIT returns a variable, the command may only be used in a
CL program.
Prerequisites
-------------
The following TAA Tools must be on your system:
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CHGBIT *CMD TAACLTN QATTCMD
TAACLTNC *PGM CLP TAACLTNC QATTCL
TAACLTNR *PGM RPG TAACLTNR QATTRPG
|
Added to TAA Productivity tools January 15, 2011