By default, the LITMASK value for the DQ Options List (DQSYSTBL / DQOPTLST) is x'7B' which is displayed as the # character (called hash, pound or number character) in the US codepage.
To determine the value of this character in your environment, please issue the following transaction from your CICS region:
The first character on the resultant screen is the character used for the LITMASK value, and this is what should be used in the CA Dataquery example above to replace the # character.
For example, in one Latin American system, though the value was x'7B' by default, the codepage translated it as an uppercase N with tilde (uppercase Enye, or Ñ). In this case, the WITH clause above would read
RELATIONSHIP.OBJ-OCC-NAME = '$DQ-Ñ'
Using the correct value of LITMASK will allow generic literal testing as expected.