Automic Workload Automation

  • 1.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 02:28 AM
    For our V11.2 Upgrade (from V9) I have to identify all Objects that contain a GET_VAR with a Scrit Variable as content.

    example: in VARA VARA.RUN I have any KEY and Val1 can be &DATE# or &Yesterday# or &TOMORROW#

    Now I have to search for all jobs that get the Script Variable name out of these VARA objects.

    My attempt would be identifying all VARA objects with search pattern *&*#* (Key and Values) and then perform a search for use on the LIST of VARAs.
    Which is quite a lot of work.....

    Any better Idea how to get really ALL occurrences ?

    THX a lot


    Wolfgang


  • 2.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 04:06 PM
    Hi FrankMuffke
    So you're looking for jobs that is using GET_VAR(&XXXX#, ...) ..?
    Have you tried the OT table..
    where ot_content like '%GET_VAR%(%#%)' 


  • 3.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 04:44 PM
    I think this is the query that you seek?

    select oh_client, oh_name
    from oh where
    oh_idnr in
    (select ovw_oh_idnr from ovw
    where
    ovw_value1 like
    '%&%'
    or OVW_Value2
    like '%&%'
    or ovw_value3
    like '%&%'
    or ovw_value4
    like '%&%'
    or ovw_value5
    like '%&%'
    and oh_deleteFlag = 0
    order by OH_Client, oh_Name


    I pulled it right out of the 11.2.2 administration guide.  There is a table of known incompatibilities between V9 and V11.  (This one was important to us too.)



  • 4.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 04:49 PM
    Hi Christine

    THX for your answer - its more complicated..

    our jobs can consist of

    ... get_var(&VARA_NAME#,&KEY#)
    or
    ...get_var(VARA_NAME, &KEY#)

    and the VALUE of the VARA object maybe consist of a script Variable (as mentioned &DATE# or &Yesterday# or &TOMORROW#

    so querying the OH table (or searching via UI) is not useful, as i can not make a connection between VARA name and its key or possible value of a script variable.

    So our (only) attemt is searching all VARA objects with search pattern *&*#* and then do a search for use on the VARAs that are the result of the first search.
    here we have to check every object for get-var and the KEY

    we thought about any other possibilities but did not find one.

    cheers Wolfgang


  • 5.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 04:52 PM
    Our workaround for this was to run a script at midnight that populates the variable (that previously contained dynamic values) with static values.  This avoided the need to modify the individual solutions that used the dynamic variable.


  • 6.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 05:00 PM
    Hi Pete

    Thanks for your answer - I am afraid I did not get your attempt.

    If i change the value of my static VARA from e.g. &YESTERDAY# to a static VALUE "Yesterday" I have to change all my objects using this..
    approx x0 ... x00

    background:
    we store much logic in static VARAs as Run-switch and source of Parameters - so one VARA contains some parameters for Runs - eg. run with values from today, yesterday, or the day before yesterday - if some patterns or conditions within the VARA match.

    cheers Wolfgang


  • 7.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 10, 2017 05:11 PM
    Our solution may not fit your scenario.  I hope the database query helps you identify the affected variables?


  • 8.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 11, 2017 09:13 AM
    unfortunately it does not help completely.

    I already identified all VARAs that contains a Script variable per GUI search for *&*#* within all VARA objects and their Keys and values.

    Thanks Pete for your help!

    So we know there is no other simple solution for that than checking all Objects manually. Thats also a solution :-)

    Thank @all others for your help too!



  • 9.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 14, 2017 12:55 AM
    Hi FrankMuffke,

    Christine_Chavez_6412 was referring to OT, not OH and the query returns exactly what you're looking for.

    I.e.:

    select oh_name,oh_client,ot_content  from oh,ot where ot_content like '%GET_VAR%(%#%)' and oh_idnr=ot_oh_idnr and oh_client<>0

    Result:

    SCRI.WOLFGANG     200     :SET &VARA1#=GET_VAR(&VARA2#,&VARA3#,&VARA4#)

    If that's not what you're looking for then please disregard this post  :)

    Cheers,
    Alexander



  • 10.  Identify specific Jobs that use get_var and Script Variables

    Posted Feb 14, 2017 03:05 AM
    [disregarded]

    THX anyway!