pjs.bitChange()
This API provides the ability to change the bits in a field.
Parameters
Resulting field
String of bit positions to change (between 0-7).
Resulting bit (numeric 1 or 0)
Example
pjs.define("FieldA", { type: 'char', length: 1, initValue: String.fromEbcdicHex('4F') });
pjs.define("result", { type: 'char', length: 5 });
pjs.bitChange(FieldA, '046', 0);
if (FieldA.rtrim() === String.fromEbcdicHex('45').rtrim()) {
result = 'yes';
}
RPG EquivalentÂ
BITOFF, BITON