Using "Where" function in Mainframe version 6.0.03
search cancel

Using "Where" function in Mainframe version 6.0.03


Article ID: 243792


Updated On:


CA Test Data Manager (Data Finder / Grid Tools)


I have been asked if the "Where" clause can be used in mainframe. 
In the documentation you sent us it reference 4.9 but is that for the open system side only? 
We currently are using version 6.00.3 on Mainframe side.  Is the "WHERE" function available on the mainframe side version 6.00.3? 
It sounds like it might only be available when doing in-place (against the database table itself ) versus flat-file obfuscation. 
Can you explicitly tell us exactly where the "WHERE" function is available and honored?  


TDM Mainframe masking 6.0.03



Mask Flat Files Using WHERE Clauses (


The DB2 versions of masking use an SQL ‘WHERE’ clause, which allows them to use the full logical constructs one might expect – IF, AND, OR etc.

When it comes to file masking – flat files or VSAM – it is not possible to use the DB2/SQL engine, so something intended to be similar was written from scratch by GRIDTOOLS.

At best, it is minimalist in terms of the functionality.
Although it is possible to string a WHERE with multiple AND statements to create a Boolean construct, adding an OR to the string will make it fail.

Similarly, stringing a WHERE followed by multiple ORs is OK, but the inclusion of an AND breaks it.

To make either scenario work, we would need the ability to surround sub-clauses with brackets (parenthesis for those of you on the left-hand side of the Atlantic).

That facility does not exist, although the documentation DOES show something similar when related to arrays.
(Also doesn’t work properly).

There’s a second level of WHERE that allows an ‘IN’ clause and this comes in two flavors.

These look similar but are not. One type specifies a series of comma-separated literal values which are tested one at a time to see if the target field is represented by any of them. 

The other specifies a field name (it’s called Bundle ID) defined within a VSAM references file and creates a quite different type of file lookup, ending with the same result – that the target field either does or does not exist within it.

All the above forms ‘supposedly’ can be concatenated on the MAPCSV record, however, chaos will ensue if they are.
It is strongly suggested that the use of the file WHERE clause facilities, be kept very very very simplistic.

The documentation might be a little misleading.