Optim - Test Data Management and Archiving

 View Only
  • 1.  updating columns

    Posted Fri January 14, 2022 06:15 AM
    Hi All, 

    Through Optim , How can I update columns in a table.
    I get the archive that I need , and I need to update some columns. What is the best practice for  running a query like this "update <table_name> set <Column_name> = 1234  where <Column2> = 999 "

    Best regards,

    ------------------------------
    GUNES INAL
    CEO | Chief Data Engineer
    TECHBROS
    +905309214847
    ------------------------------


  • 2.  RE: updating columns

    Posted Tue January 18, 2022 10:38 AM
    Hi Gunes - the best way to accomplish this is by defining an "Archive Action" within Optim. Archive Actions are used for any special processing you might need in addition to what Optim provides. Refer to the Optim Common Elements document and please search for "Archive Action" when browsing the document:
    IBM InfoSphere Optim for DB2 for z/OS V11.3 PDF documentation


    The Archive Action allows you to execute an SQL among other things after the archive. I hope that Archive Actions would work for you.

     Baha Majid / IBM

    ------------------------------
    Baha Majid
    Executive IT Sepcailist
    IBM
    Bethesda MD
    4433065039
    ------------------------------



  • 3.  RE: updating columns

    Posted 14 days ago
    Hi Baha ,

    I am trying run multiple update codes in one action ,example like below.
    How can we put a delimiter for other codes like ";" in sql clients. 
    BTW I already try that set a delimiter for that.


    update TABLE_ONE 
    set COLUMN_XX =99 ; 

    update TABLE_TWO 
    set COLUMN_YY  =99 ;

    update TABLE_TREE 
    set COLUMN_ZZ  =99 ;

    ------------------------------
    GUNES INAL
    CEO | Chief Data Engineer
    TECHBROS
    +905309214847
    ------------------------------



  • 4.  RE: updating columns

    Posted 12 days ago
    Hi Gunes - sorry for the delay due to traveling.
    Only a single SQL statement can be executed per action point per table. If your special processing requires more than one SQL statement, then you must create a stored procedure and CALL the stored procedure.

    Sent from my iPhone