search cancel

TDM Mainframe MAPCSV with multiple WHERE clauses

book

Article ID: 258005

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are wondering if we can use two where clauses in the same CSV for two different columns on the mainframe side.

So essentially something like the following:

Where col1 ......

Obfuscate col1 in some way

<end of 1st where>

Where col2.....

Obfuscate col2 in some way

<end of 2nd where>

Possibly some other obfuscations.....

Environment

Release : TDM Mainframe 5.4 and 6.0

Resolution

Yes, it is possible to use multiple WHERE clauses to break-up the masking. It's really just a matter of repeating a WHERE, and its masking function, but editing the repeated lines to be what you need.

Below is an example MAPCSV that contains two WHERE clauses:


"Table","Column","Function","Parm1","Parm2","Parm3","Parm4","KeepNulls","Dateformat","Cross Reference","Override_Lookup","Unique_Columns","XPath Element","Substr start","Substr length","Notes","Preformat","Parm5","Parm6","Parm7","Parm8","Parm9","Parm10"
CUSTOMER_RECORD,CUST_LNAME,FIXED,FIRSTNAME,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_LNAME,FIXED,LASTNAME,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_ZIP_CODE,FIXED,ZIP,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,,WHERE," CUST_STATE = 'TX'",,,,,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_LNAME,FIXED,TX,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_LNAME,FIXED,TX,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,,WHERE," CUST_STATE = 'NY'",,,,,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_LNAME,FIXED,NY,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_LNAME,FIXED,NY,,,,N,,,,,,,,,,,,,,,
CUSTOMER_RECORD,CUST_STATE,FIXED,XX,,,,N,,,,,,,,,,,,,,,
 
Note: Placement of the "where clause" is very important.  It doesn't just affect the next line.  The "where clause" is actioned till it hits another "where clause" or end of file.  Therefore, if you want to mask fields not related to any "where clause", then they must be first.