Automic Workload Automation

Expand all | Collapse all

Is there any way to automatic change data selection in JDE job?

  • 1.  Is there any way to automatic change data selection in JDE job?

    Posted 01-08-2019 09:33 PM

    Want to check that is it possible to auto change the dates in the data selection every month when schedule running? E.G. ERW schedule to run every 1st day of month, for this month, the "Receipt Date (F43121)" in data selection will pass value "01/01/19" (dd/mm/yy), in next month it will pass value "01/02/19". "Gregorian Date (F58GINV4)" date range will between 20180801 to end of day of last month. So in this month, date will pass "20180801 - 20181231", next month date will pass "20180801-20180131"

     

    In this case, if Automic able to handle? If can, how Automic handle? Please advise. Thank you.



  • 2.  Re: Is there any way to automatic change data selection in JDE job?

    Posted 01-10-2019 04:33 PM

    Yes,  we do this pretty frequently.

     

    in teh pre-process tab compute the date you pant to plug in. 

    in my example its the last day of the previous period.

    :set &today = sys_ldate()
    :set &topodate# = sub_days(&today,0,CALE.RALCORP,LAST_DAY_OF_PERIOD)
    :set &topodate# = conv_date(&topodate#,'MM/DD/YYYY')

     

    you then plug the variable name (&topodate# in my example) in the right operand of the data selection or processing option override.

     

    I recommend you set generate at run time on the attributes tab if you do this.