MM280

 34 Replies
 1 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Page 2 of 2 << < 12
Author
Messages
Greg Moeller
Veteran Member
Posts: 1498
Veteran Member
    ric9: I've done this in my test environment.. you have to modify a table in GEN (If memory serves) via a script and then run MM280. Let me look for my sample.
    SP
    Veteran Member
    Posts: 122
    Veteran Member
      I do this kind of thing by running a shell script to determine the correct
      parameters (i.e. Period), then update a jobdump output file with the
      correct parameters and run jobload. I handle everything within the script,
      including the submitting the updated job.

      It's really quite easy. Use jobdump to create a template file. Put
      placeholders in the jobdump template file. Use sed in the script to
      replace the placeholder values with the correct values, writing the output
      to a new file, then run jobload using the new output file, jqsubmit, and
      voila you're done.

      Let me know if you want more help. I would be glad to send you some
      examples. I've actually done this for MM280, IC130, GL190, ...add naseum...

      It's very easy and straight forward.

      On Thu, Feb 23, 2012 at 2:13 PM, wrote:

      > [image: LawsonGuru.com Logo] <https://www.lawsonguru.com/> Lawson
      > Business Intelligence/Reporting/Crystal Forum Notification A message was
      > posted to a thread you are tracking. *RE: MM280* Posted by: *
      > ric9dantes*
      > 02/23/2012 02:06 PM Ruma/chris/John/Everybody, Okay guys I need more
      > Help.
      > I was able to schedule the report to run (in LBI). The challenge is to run
      > MM280 in Core Lawson automatically, with the correct period.
      > Is there a way to automate the running of MM280? with varying Period? Or
      > Im stuck running MM280 manually?
      > Please help. Thanks!
      > ------------------------------
      >
      > To view the complete thread and reply via your browser, please visit:
      > https://www.lawsonguru.co...rums/pm/lbi/mm280/2/
      >
      > You were sent this email because you opted to receive email notifications
      > when someone posted and/or responded to a message on this forum.
      > To unsubscribe to this thread please visit your user profile page and
      > change your subscription options.
      >
      > Thank you,
      > LawsonGuru.com
      >

      Greg Moeller
      Veteran Member
      Posts: 1498
      Veteran Member
        This is what I came up with to run one off our custom jobs.. not specifically MM280, so it probably won't work for your job.... This will get you started though.

        Basically, run the job manually first... dump the JOBSTEP table. Find the location of the Parameter you want to change and modify the script accordingly.

        I'd be very careful, though modifying GEN tables because you could get yourself (and all your users) in big trouble. Make sure you have a good backup first!!
        Attachments
        ric9d
        Veteran Member
        Posts: 76
        Veteran Member
          SP, If you could send me those examples. Thanks!

          Gregg, Thanks! I will try it and let everybody know.
          SP
          Veteran Member
          Posts: 122
          Veteran Member
            Here is a very simple example of job (custom program) that I update every day with today's date as the POSTDATE parameter.

            There are three files involved:
            1) The shell script that does the heavy lifting
            2) A template file created via jobdump and modified to have a place holder "POSTDATE" that gets updated with a CCYYMMDD value. PLEASE NOTE: WHEN MODIFYING JOB PARAMETERS IN A JOBDUMP OUTPUT FILE, YOU MUST REPLACE THE EXACT NUMBER OF CHARACTERS. For example, there are exactly 8 characters in my place holder POSTDATE, and there are eight characters in "20120222"
            3) An output file to be loaded back in with the new job parameters.

            This example was created on a Windows system, so you may have to make some minor tweaks, but you should be able to get through it. Just make sure you comment out the jqsubmit command until you are certain the job parameters are getting updated as expected.

            You can create the template file by running the following command with the appropriate user name and jobname for your system:

            jobdump -d -o JOB -v UserName MYWINDOWSDOMAIN\myusername -v JobName myjobname > myjobname.jobdum.sav

            I generally drop the ksh file in GENDIR/bin. Then create a user token in tokendef that calls "ksh.exe myscript.ksh"

            Create a job to call you token, and your done.

            Let me know if you have any questions.
            Attachments
            ric9d
            Veteran Member
            Posts: 76
            Veteran Member
              SP, Im looking for something fully automated. No manual running, just like an LBI Report Schedule.
              Greg Moeller
              Veteran Member
              Posts: 1498
              Veteran Member
                Let me upload a different script for you. It may make more sense. We've been doing LBI & BackOffice reports for a while now ... the key is scheduling the job waiting for it to finish, and then setting the report schedule for the longest amount of time that the Lawson job ever takes.

                Then throw in the routine that I posted before, or one of these other fine peoples solutions, and you should be set.

                Cheers,
                -Greg

                P.S. On the script attached, you need to have a job called LBISALAU defined in Lawson for the Lawson user fsuser
                Feel free to modify or change this script as much as you need. I only would ask that you leave me in the comments section as original author.
                Attachments
                SP
                Veteran Member
                Posts: 122
                Veteran Member
                  I guess I'm confused, what is manual about a scheduled job that updates the
                  job parameters of another job then submits the updated job?

                  On Fri, Feb 24, 2012 at 8:54 AM, wrote:

                  > [image: LawsonGuru.com Logo] <https://www.lawsonguru.com/> Lawson
                  > Business Intelligence/Reporting/Crystal Forum Notification A message was
                  > posted to a thread you are tracking. *RE: MM280* Posted by: *
                  > ric9dantes*
                  > 02/24/2012 08:52 AM SP, Im looking for something fully automated. No
                  > manual running, just like an LBI Report Schedule.
                  > ------------------------------
                  >
                  > To view the complete thread and reply via your browser, please visit:
                  > https://www.lawsonguru.co...rums/pm/lbi/mm280/2/
                  >
                  > You were sent this email because you opted to receive email notifications
                  > when someone posted and/or responded to a message on this forum.
                  > To unsubscribe to this thread please visit your user profile page and
                  > change your subscription options.
                  >
                  > Thank you,
                  > LawsonGuru.com
                  >

                  ric9d
                  Veteran Member
                  Posts: 76
                  Veteran Member
                    SP - the first line of your response-- you update it everyday?

                    Here is a very simple example of job (custom program) that I update every day with today's date as the POSTDATE parameter.
                    SP
                    Veteran Member
                    Posts: 122
                    Veteran Member
                      [quote]
                      Posted By ric9dantes on 02/24/2012 11:01 AM
                      SP - the first line of your response-- you update it everyday?

                      Here is a very simple example of job (custom program) that I update every day with today's date as the POSTDATE parameter.

                      [/quote]


                      Mea Culpa!! I guess it should have read "is updated every day..." ;-)
                      Page 2 of 2 << < 12