InfoSphere Optim

 View Only
  • 1.  National ID Depersonalisation failing.

    Posted Tue June 27, 2023 04:01 AM

    Dear Community,

    I am experiencing a weird bug on Optim that is for creating National Id's via Optim Policy or LUa Script, I am getting a result of numbers like:

    NATIONALREGISTRATIONNUMBER
    0.0e+00014252776
    0.0e+00019166783
    0.0e+00021575150.0e+
    0.0e+00023969477
    0.0e+00025298768
    0.0e+00026926544

    This started to happen after our company migrated from Optim 11.5 to 11.7. there is anyone that experienced this bug? if yes how you solve it?

    Kind Regards,

    Matheus Rocha



    ------------------------------
    Matheus Rocha
    ------------------------------


  • 2.  RE: National ID Depersonalisation failing.

    Posted Wed June 28, 2023 09:05 AM
    Matheus,

    Can you share the LUA script or column map function that is generating the result. 

    Tammy





  • 3.  RE: National ID Depersonalisation failing.

    Posted Thu June 29, 2023 03:01 AM

    Hello, Thammy!

    Yep, No problem!

    if (oldvalue ~= nil) then

       if (oldvalue > '0') then

        P9 = 10

        while (P9==10)

        do

        P1 = math.random(0,9)

        P2 = math.random(0,9)

        P3 = math.random(0,9)

        P4 = math.random(0,9)

        P5 = math.random(0,9)

        P6 = math.random(0,9)

        P7 = math.random(0,9)

        P8 = math.random(0,9)

         SOM = 9*P1+8*P2+7*P3+6*P4+5*P5+4*P6+3*P7+2*P8

         P9 = (SOM%11)

        end

        BSN = (P1..P2..P3..P4..P5..P6..P7..P8..P9)

     --   print("BSN : ",BSN)

        newvalue = BSN

       else

        newvalue = oldvalue

       end

      else

       newvalue = oldvalue

      end

     --  print ("newvalue : ", newvalue)

       optim.target.setcolumnvalue(newvalue)

      end



    ------------------------------
    Matheus Rocha
    ------------------------------



  • 4.  RE: National ID Depersonalisation failing.

    Posted Fri June 30, 2023 05:12 PM
    Matheus,

    There are a lot of things that could be causing this problem.  The most obvious would be the application client being used to display the data. You are going to have to get your hands dirty on this one and start eliminating possibilities.  Go through the data masking process one step at a time and try to find out where the data is being changed.

    Here are some questions and ideas to get you started.

    What application or client are you using that is showing you those results?
       Do you get the same results when using that client to look at the source (pre-masked) data?
    What is the data type of the column?
    Are you getting these results after you load the masked data into the data source or is Optim browse giving you these results?
    What happens if you load the unmasked data into the source, will it also change the values?
    It is possible that there is no problem with the data in the database, but rather that the client displaying the numeric data is putting it into scientific notation?

    If you can rule out that the program displaying the data is not changing anything, then look at the data types. Verify if the columns giving you that result are in fact a numeric type column.  Perhaps the data source is defining the scientific format for numeric display.

    If the columns are a character type column, then it may help to look at the specific area where the data is being modified.  The column map for example. 


    I hope this helps/

    --
    Tammy Ziegler
    Data Security and Privacy Specialist

    image001.png


    IBM Development Partner Data Masking 
    tziegler@abmartin.com
    www.abmartin.com
    Cell: (908) 209-8819









  • 5.  RE: National ID Depersonalisation failing.

    Posted Mon July 03, 2023 07:53 AM

    Hello, Tammy!

    Thank you for your answer!

    Here we go:

    My source database (DB2) does not have records with those weird characters when I search for them (I use DbVisualizer). I can see those odd numbers after the convert service (Optim convert file) and on the database after the Insert service.

    The Column type is a VARCHAR of 20 characters (Only using 11).

    I can see them during the Convert step, in the file, and in the database after the insert.

    If I insert them without masking, it inserts normally.

    It is not about the display type on the application, because when I run the Convert (Optim Manager), I coded to print the value and the result is the same as I can see in the database.



    ------------------------------
    Matheus Rocha
    ------------------------------



  • 6.  RE: National ID Depersonalisation failing.

    Posted Mon July 03, 2023 09:51 AM

    In your LUA script, try changing:

       optim.target.setcolumnvalue(newvalue)

    to

       optim.target.setcolumnvalue(tostring(newvalue))



    ------------------------------
    ----------------------------------------------
    Tammy Ziegler
    tziegler@abmartin.com
    ------------------------------



  • 7.  RE: National ID Depersonalisation failing.

    Posted Mon July 10, 2023 04:57 AM

    Hello, Tammy!

    Actually transforming this column to a string got the problem worse. It is appearing not only 0e characters but others like square or like "kanji" style.



    ------------------------------
    Matheus Rocha
    ------------------------------



  • 8.  RE: National ID Depersonalisation failing.

    Posted Thu June 29, 2023 11:54 AM
    Edited by Gregory Czaja Thu June 29, 2023 06:17 PM

    Which environment are we talking about?

    This from Optim for z/OS, using Lua 5.3 in release 11.7:

    Hello world, from  Lua 5.3 !
    BSN :  904939601            
    BSN :  529237222            
    BSN :  317789570            
    BSN :  442604208            
    BSN :  569966917            
    BSN :  883166409            
    BSN :  717502351            
    BSN :  086645821            
    BSN :  414088153            
    BSN :  081014697            

    and Lua 5.1 from release 11.3:

    Hello world, from  Lua 5.1 !
    BSN :  513591722            
    BSN :  410323950            
    BSN :  767781636            
    BSN :  395467986            
    BSN :  867533286            
    BSN :  449129743            
    BSN :  093049511            
    BSN :  524244844            
    BSN :  330156044            
    BSN :  723223804            

    ------------------------------
    Greg Czaja
    Optim for z/OS Developer
    ------------------------------



  • 9.  RE: National ID Depersonalisation failing.

    Posted Fri June 30, 2023 04:47 AM

    Hello, Greg!

    Infosphere Optim v11.7



    ------------------------------
    Matheus Rocha
    ------------------------------



  • 10.  RE: National ID Depersonalisation failing.

    Posted Fri June 30, 2023 11:53 AM

    From your comments from the other posts, it looks like you are working with the Distributed version of Optim, on Windows, Linux/Unix, etc.

    Unfortunately, not my area of expertise.



    ------------------------------
    Greg Czaja
    Optim for z/OS Developer
    ------------------------------