Test Data Manager

Expand all | Collapse all

How to mask substring from the given string in mainframe file

Jump to Best Answer
  • 1.  How to mask substring from the given string in mainframe file

    Posted 03-22-2018 09:30 AM
    I am trying to mask two free text Fields in a Mainframe File which can have value something like 'SSN 123456789 ' or ' SSN 123456987 ', etc.
    I want to mask only the rows which has the text 'SSN' in it as part of the Free text column and leave the other rows unmasked.

    I am trying to use the Where condition in the Transformation maps, but Unfortunately i am not getting proper results.

    Ideally main focus here is on the Substring search within a field.

    Could someone please let me know how to USe substring search in the transformation maps, A sample template would be much helpful.


  • 2.  Re: How to mask substring from the given string in mainframe file

    Posted 03-23-2018 04:48 AM

    What about just using a where clause like   fieldname like %SSN%.  If you are just wanting to change the numbers you could then use the Translate function to change them.



  • 3.  Re: How to mask substring from the given string in mainframe file

    Posted 03-29-2018 10:11 AM

    Hi Billy,

     

    where condition does not support like statement  in GTMSKF program..... could you please share the example, so that i can do from my side.



  • 4.  Re: How to mask substring from the given string in mainframe file

    Posted 03-31-2018 03:26 PM

    Hello there.  This is my fault.  I somehow thought you were masking tables in a database.  Apologies for the confusion.  I tried using the "like" in a where clause for a file and it didn't work for me either.  I will investigate a bit more because I thought I was able to do something like this for another customer.

    Again my apologies for any inconvenience my original response may have caused. 



  • 5.  Re: How to mask substring from the given string in mainframe file

    Posted 04-03-2018 08:55 AM

    Hi Billy,

    Thanks for detailed explanation. AND and OR condition working fine... but i want to use substring in where statement. Please let me know if any other alternate ways to implement substring function in flat file masking.

     

    Thanks

    Kamal



  • 6.  Re: How to mask substring from the given string in mainframe file
    Best Answer

    Posted 04-04-2018 04:54 PM

    Hello there.  I checked with a few others and currently about the only option you have (and this dependents on how generic the location of SSN 123451234 is) is to subdivide the definitions in the copybook.  If the ssn value can be anywhere in the field then this will not work either.  I am not sure what else is contained in this field but what about just masking all numeric characters regardless if SSN is there or not.  you can use the Translate function to do this.