MTD totals within a job

Comments

5 comments

  • Avatar
    Daniel Winters

    #7(X1) will use the reference job to set the Run number.  The cycle number will come from the current job.  It sounds like you might want to use Variable Cycle Processing in your history item to go back -30, but stop at the job referenced as your VC job. This is a stopping point so you will get all histories, up to 30, unless you hit the last run of that VC reference job.

  • Avatar
    Mary Tinnes (HCSC)

    Robert: how do you currently get your MTD?  Do you have a daily job that pulls data from a file and stores it to history and then a monthly that pulls it? Like this?  

    January: Monthly runs on 1-31-2019 as 20190131

    February Dailies

    February Monthly runs on 02-28-2019:  go back and get all the histories I have since the last monthly  (goes back -01 representing one month that could be any number of days depending on the month).

    Or do you want it set up where it's just 1 job that always has the running total? 

  • Avatar
    Robert Bratton

    @Mary

     

    So this has drug on far longer than I had hoped, but I have a far better understanding of how this was all setup and works.

     

    We have a job setup called MTHLYBAL that runs monthly and sets the last cycle date of the month. (20190531)  

    We are using this job as the variable cycle reference job with a -001 relative cycle

    So, as I understand it:  If I run a job with cycle date or 20190611 I should pick up all the histories greater than 20190531, correct?  As long as the history item itself is setup with a relative cycle of -30 so it will go up to 30 days back,

     

    Does that make more sense?  

     

    Attached files

    Unitech Question.jpg

     

  • Avatar
    Robert Bratton

    Bump for my updates  =)

  • Avatar
    Jodeen Guisti

    Robert,

    Think of the variable cycle job as a stopping point in the history database.  

    It sounds like you are using variable cycle along with Cycle Accumulation.  So in this instance, I'll assume Monthly Job has a history item looking at a Daily Job.  This history item has the Monthly Job set up as its variable cycle job with a -001 relative cycle and uses cycle accumulation to accumulate any history items through -30.

    Let's say you ran things in this order:

    Daily Job - 20190529

    Daily Job - 20190530

    Monthly Job - 20190531

    Daily Job - 20190601

    Daily Job - 20190602

    Daily Job - 20190603

    Monthly Job 20190630

    When the June 30 Monthly Job runs, it will accumulate Daily jobs up until it hits it's stopping point of Monthly Job -001...which in this case would be the 20190531 job. You don't have to worry about any histories prior to 20190531 being added because your variable cycle job is serving as the stopping point.  Remember that variable cycle and most recent cycle indicators go hand in hand so just make sure you test all scenarios.  

    Hope I didn't confuse things more.  

    Good luck!

Please sign in to leave a comment.



Powered by Zendesk