AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  Using a input parameter value in a substitution variable

    Posted Jan 04, 2018 06:20 PM
    Hello,
    I'm creating a process flow consisting of an SQL job and 2 Banner jobs. The process flow should prompt the user for a term (ex. 201810) and based on what the user enters, insert a different value as a parameter for one of the Banner jobs. For example in the Banner job there is a prompt for TPC_ID and I'm using the subvar #ar_tpc_id. What I'm trying to do is have the value of #ar_tpc_id change based on what the user enters for parameter #1. Any help would be greatly appreciated.

    Thanks,

    Russell


  • 2.  Using a input parameter value in a substitution variable

    Posted Jan 05, 2018 10:43 AM
    Russell,

         I have done this a couple of different ways depending upon how many different values I'm looking at:

         1) Using a set of BEFORE conditions to compare the value of #1 to a set of values, one value per condition,
              and then using the SET SUBVAR Action to set the appropriate value of #ar_tpc_id.  Example:

              IF #1 = {#todays_year-yyyy}15 THEN SET SUBVAR #text-term-identifier = "SPRING"
              IF #1 = {#todays_year-yyyy}25 THEN SET SUBVAR #text-term-identifier = "SUMMER"
              IF #1 = {#todays_year-yyyy}35 THEN SET SUBVAR #text-term-identifier = "FALL"

              Then use #text-term-identifier as the parm value for the appropriate parm of the Banner Job.

         2) Using the SQL DECODE function to set the appropriate subvar value based on the different possible
              values of #1.  This does require you to use a condition to store the value of #1 in a subvar that is then
              used in the SQL DECODE function subvar.  Example:

              IF ALWAYS TRUE THEN SET SUBVAR #ONE-for_whatever_process_flow = #1

              #text-term-identifier: select decode({#ONE-for_whatever_process_flow},
                                                                        '{#todays_year-yyyy}15', 'SPRING',
                                                                        '{#todays_year-yyyy}25', 'SUMMER',
                                                                        '{#todays_year-yyyy}35', 'FALL') from dual

              Then use #text-term-identifier as the parm value for the appropriate parm of the Banner Job.

           If you have any questions, please let me know.

           Ed.


  • 3.  Using a input parameter value in a substitution variable

    Posted Jan 05, 2018 01:25 PM
    Edward,
    Thanks for the response! I'd been playing around with using the always true --> set subvar condition. But I just can't seem to use the value from prompt #1 into the condition. Example, I'm using the following syntax for the set subvar command:  #affiliated_term={#1}

    When I run the job, I enter 201810 for prompt 1, but the value of #affiliated_term just keeps being set to literal #1. I think/hope it's just a syntax problem - I'm not able to properly get the handle for prompt 1 and use it in the #affiliated_term subvar. Eventually, once I'm able to get that value, I'll use decode almost the same as you have in your example.

    Thanks again for your response,

    Russell   


  • 4.  Using a input parameter value in a substitution variable

    Posted Jan 05, 2018 02:37 PM
    Russell,       I want to confirm that you are running the Process Flow and not just the Job?  That sounds like       the behavior if you were just running the Job as the subvar #number (ie: #1) is undefined outside       of a Process Flow.       Ed. Ed Knowles                                                                                                         Email: eknowle@siue.edu<mailto> Assistant Director, IT                                                                                      Phone: 618-650-3813 Production Control & Enterprise Reporting ITS - Southern Illinois University Edwardsville From: Russell Brown [mailto:automicsoftware+d11381-s5019921@email.vanillaforums.com] Sent: Friday, January 5, 2018 12:25 PM To: Knowles, Edward <eknowle> Subject: Re: [Automic Community] Using a input parameter value in a substitution variable [Automic Community]<https></https> ________________________________ Russell Brown commented on Using a input parameter value in a substitution variable Edward, Thanks for the response! I'd been playing around with using the always true --> set subvar condition. But I just can't seem to use the value from prompt #1 into the condition. Example, I'm using the following syntax for the set subvar command:  #affiliated_term={#1} When I run the job, I enter 201810 for prompt 1, but the value of #affiliated_term just keeps being set to literal #1. I think/hope it's just a syntax problem - I'm not able to properly get the handle for prompt 1 and use it in the #affiliated_term subvar. Eventually, once I'm able to get that value, I'll use decode almost the same as you have in your example. Thanks again for your response, Russell</eknowle></mailto>


  • 5.  Using a input parameter value in a substitution variable

    Posted Jan 05, 2018 04:21 PM
    Ed,
    Outstanding! That was the problem... along my search for a solution I created a separate job to test the condition outside the Process Flow. I'm not very well versed in AMV9 and was banging my head on this for a couple days. 

    Russell


  • 6.  Using a input parameter value in a substitution variable

    Posted Jan 05, 2018 04:37 PM
    Glad that I was able to help!!   We have been using AM since 2006 when we went live with Banner Student.
    Back then it was called AppWorx from AppWorx Inc., which ended up merging with UC4 to become Automic, which has now been bought be CA.  It is funny how small the world.  Prior to Banner, we ran SIS IDMS and
    HRS IDMS on our mainframe for years, and IDMS was owned by CA.

    Have a great weekend!!

    Ed.