PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11/25/2015 2:35 AM by  Vijay S
Scheduling job automatically with dynamic date range
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Vijay S
Lawson Developer
Independent consultant
Veteran Member
(389 points)
Veteran Member
Posts:167


Send Message:

--
11/20/2015 9:32 AM

    Is there a way to schedule a job automatically in "recdef" and passing job parameters automaticcaly like To & From date range. They have to be from the past 7 days . Like for today's run , From-date=today, to-date=today-7 days....... 

     

     

    Thanks,

     

    Vijay

    jaherb
    Private
    Private
    Veteran Member
    (471 points)
    Veteran Member
    Posts:163


    Send Message:

    --
    11/20/2015 10:01 AM
    recdef has no way of updating job submission parameters, but there are a couple of other options. In the case you described, I would opt for additional code in the program to get the current system run date, use that as the "TO DATE" and then calculate the "FR DATE" using the 900-INCREMENT-DATE API. This job could then be scheduled on the frequency you desired and would take care of the date logic.

    The second way would be to write a new program where you can actually modify the date parameters. You would need to make use of the 900-LOAD-JOB to manipulate the parameters. You could also have this new program on the schedule and after manipulating the dates, do a 900-SUBMIT-JOB.

    You would probably find the first way the easiest.
    mikeP
    Private
    Private
    Veteran Member
    (407 points)
    Veteran Member
    Posts:151


    Send Message:

    --
    11/20/2015 10:11 AM
    Another option is to use a scheduled process flow to modify the jobdef parameters, and optionally, submit the job rather than scheduling through recdef. I prefer to have similar things all accessible in the same place e.g. scheduled jobs, but we work with the tools we have.
    Vijay S
    Lawson Developer
    Independent consultant
    Veteran Member
    (389 points)
    Veteran Member
    Posts:167


    Send Message:

    --
    11/25/2015 2:35 AM
    Thanks Mike & Jim for your help ! .....
    You are not authorized to post a reply.