When running a CA Dataquery query that uses a literal mask, you could have unexpected results (or no results).
For example, consider the following query:
FIND RELATIONSHIP RELATED BY SUBJ-OCC-NAME VIA ENTITY-NAME TO PERSON
WITH PERSON.ENTITY-VER = RELATIONSHIP.SUBJ-VRS-NUM AND
PERSON.STATUS NOT = 'H' AND
RELATIONSHIP.ENTITY-NAME = 'PER-ATZ-AUTH' AND
RELATIONSHIP.OBJ-OCC-NAME = '$DQ-#'
SORT RELATIONSHIP SUBJ-OCC-NAME OBJ-OCC-NAME
PRINT FROM RELATIONSHIP SUBJ-OCC-NAME 'USER NAME'
If this query runs in some environments and not others, the highlighted WITH clause could be the problem, due to the literal mask.
If there is a suspected problem due to the literal mask, there could be two possibilities:
1. The literal mask character used in the query is incorrect for your site because it was configured differently at installation;
2. The character displayed is different because of the codepage used in the emulator software.
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.
As the offset for the Options List entries can change with releases, the best way to see this value in version 15.0 and above is by running the DBCGSPR utility to extract the values from your load modules. Please review the Tech Tip published by Pat O'Brien for more information about this utility. The title of the Tech Tip is "Tech Tip: CA Datacom DBCGSPR CUSLIB source macro generation utility."
As always, please contact CA Technologies support for CA Datacom if you have further questions.