'Comparing 2 values stored in the symbolic parameters in jcl

I need to compare the values stored in 2 symbolic parameters.

For example

Set1 set day1=&odd
Set2 set day2=&cdd

What I need to do is if the values of day1 and day2 are equal, then execute a specific action else execute different set of codes.

Thanks in advance



Solution 1:[1]

One way to accomplish your goal is to write each symbolic parameter to a temporary file with your SORT product, as shown in this answer. Now that you have two files, you can compare them with IEBCOMPR and if they are equal then the parameters were equal. You can use a JCL IF statement to test the return code from IEBCOMPR.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cschneid