Automic Workload Automation

Expand all | Collapse all

Which promptsets?

  • 1.  Which promptsets?

    Posted 01-11-2018 09:29 PM
    Hi,
    Is there anyway to determine via the pre-process/process tab which promptsets are being used/attached to a job?
    I want to add logic depending on what promptsets are used.

    Thanks 
    Ben


  • 2.  Which promptsets?

    Posted 01-12-2018 02:22 AM
    Hmmm I would not know any method...

    A (strange) workaround could be using a seperate textfiled (locked) with the Promtset's name in it and pass it to the job. Not nice...

    chedrs, Wolfgang


  • 3.  Which promptsets?

    Posted 01-12-2018 08:13 AM
    Hi BenSumner612127 The only way i could imagine is to use SQL. Use an SQLI variable with that select:

    select oh.oh_name, opu.opu_name from opu, oh
    where OPU.OPU_oh_idnr = oh.oh_idnr and oh_name = '&NAME#'
    and oh_deleteflag = 0 and oh_client = &$CLIENT#;

    And in a job you use:

    :SET &NAME# = SYS_ACT_ME_NAME()
    :SET &HND#=PREP_PROCESS_VAR(VARA.SQLI.NEW.2)
    :PROCESS &HND#
    :  SET &VK# = GET_PROCESS_LINE(&HND#, 3)
    :  PRINT "&VK#"
    :ENDPROCESS
    :CLOSE_PROCESS &HND#

    With SYS_ACT_ME_NAME you write the name of the job to the variable &NAME#. And this name is then searched for in the SQLI variable. The predefined variable &$CLIENT# is used to give the client the job runs in.
    The print then shows the Prompt-Sets the job has.

    Maybe that can help you.


  • 4.  Which promptsets?

    Posted 01-14-2018 02:41 PM
    Thanks Claus Jambrich

    Worked Perfectly!!


  • 5.  Which promptsets?

    Posted 01-16-2018 09:04 PM
    Hi ClausJambrich602320
    I'm also trying to determine what INCLUDEs are used in a job.

    Do you have any SQL similar to above that looks for INCLUDEs?

    Or what table I need to look in?


  • 6.  Which promptsets?

    Posted 01-17-2018 02:37 AM
    BenSumner612127: The script lines of objects are stored in the OT table. Here’s something to get you started.
    select OH_IDnr, OH_Name, OH_Title,
    case OT_Type
      when 0 then 'Process'
      when 1 then 'Pre-process'
      when 2 then 'Post-process'
      when 3 then 'Child post-process'
      else 'Unknown'
    end as "Script_Type",
    OT_Lnr, OT_Content
    from OH left join OT on OH.OH_IDnr = OT_OH_Idnr
    where OH_IDnr > 100000
    and OH_DeleteFlag = 0
    -- Oracle SQL (uses a regular expression to return more specific results):
    and RegExp_Like(OT_Content, '^: *(INC|INCLUDE) .*')
    -- Ordinary SQL (works almost everywhere, but can return more false positives):
    -- and OT_Content like ':%INC%'
    order by OH_Idnr, OT_Type, OT_Lnr


  • 7.  Which promptsets?

    Posted 01-17-2018 05:17 PM
    Thanks Michael_Lowry
    Was able to modify your query to get what I needed.