C$LogicalAnd

Performs a bitwise logical AND operation on two or more non-numeric or numeric operands.

When calling this routine, ensure you are using the 1024 calling convention.

Syntax:

CALL "C$LogicalAnd"
[GIVING result]
USING operand1 {operand2} ...

Parameters:

result

PIC 9(n)

operand1

A non-numeric or numeric operand

operand2, 3, etc

A non-numeric or numeric operand that must be of the same data type as
operand1

Note: If any non-numeric
operand2 is shorter than
operand1, it is assumed to be padded on the right with binary zeroes.

On Entry:

operand1, 2, 3, etc

Non-numeric or numeric operands, which must be of the same data type as
operand1.

On Exit:

result

The result of the operation or
operand1.

Comments:

For non-numeric USING operands, the bitwise logical AND of all the operands replaces the value of
operand1. The value of
result is set to a non-zero value if any character of
operand1 is non-zero after the operation completes and zero otherwise.

For numeric USING operands, each operand is converted, if necessary, to a 32-bit binary integer. These 32-bit binary values are logically ANDed together. If the GIVING phrase is specified, the result of this operation is stored in
result and the value of
operand1 is not modified. If the GIVING phrase is not specified, the result of this operation is stored in
operand1.