EQ - Equal
Enhanced Definition
`EQ` is a symbolic comparison operator used in IBM z/OS environments, primarily within JCL, utility control statements, and programming languages, to test if two values are equivalent. It evaluates to a true or false condition, dictating subsequent processing or data selection based on the outcome of the equality check. In mainframe computing, `EQ` (Equal) is a fundamental comparison operator used to test if two values are identical. It is widely employed across z/OS components, JCL, programming languages like COBOL and REXX, and database systems to control program flow, filter data, and manage job execution based on conditional logic.
Key Characteristics
-
- Boolean Outcome: The comparison
A EQ Byields a Boolean result (true or false), which is then used to control program flow or data processing. - Context-Dependent Syntax: While universally representing equality, its exact syntax and implementation vary across different z/OS components, such as
IF/THEN/ELSEin JCL,CONDparameters in utilities like DFSORT, or specific instructions in assembler. - Comparison of Data: Can be used to compare numeric values (e.g., return codes, field values) or alphanumeric strings, depending on the context and underlying implementation.
- Fundamental for Conditional Logic: Serves as a cornerstone for implementing conditional execution, data filtering, and decision-making within batch jobs and system utilities.
- Paired with Other Operators: Frequently used in conjunction with other comparison operators (
NE- Not Equal,GT- Greater Than,LT- Less Than, etc.) to construct complex logical expressions.
- Boolean Outcome: The comparison
Use Cases
-
- JCL
IF/THEN/ELSEStatements: Controlling job step execution based on the return code (RC) of a
- JCL