PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02/14/2018 4:14 PM by  rohitsurana
Batch access to "Waiting" job queue
 17 Replies
Sort:
You are not authorized to post a reply.
Author Messages
en09714
Basic Member
(10 points)
Basic Member
Posts:4


Send Message:

--
02/11/2008 2:20 PM
    Do you know if there is any way that I can access the information in the "Waiting" job queue? I want to set up a batch program or script that can then notify individual users via e-mail that their jobs have gone into the "Waiting Recovery" status. I would appreciate any information that you have available. I have searched the Lawson Knowledge Base and spent time searching the net. Thank you.
    John Henley
    Private
    Private
    Senior Member
    (9650 points)
    Senior Member
    Posts:3234


    Send Message:

    --
    02/11/2008 3:18 PM

    My recommendation would be to use ProcessFlow. You can perform a DME query against the GEN/QUEUEDJOBS table to retrieve jobs in recovery, and send an email to appropriate people.  Put it in the ProcessFlow Scheduler.  Here's a screenshot: https://www.lawsonguru.com/Portals/0/docs/pflow/PFIntegrator-MUG-JobsInRecovery.pdf

    Thanks for using the LawsonGuru.com forums!
    John
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/11/2008 3:24 PM
    Depending of if you are Unix or Windows.. we have a Unix script developed that does just that. I'd be willing to share.
    en09714
    Basic Member
    (10 points)
    Basic Member
    Posts:4


    Send Message:

    --
    02/11/2008 3:38 PM
    Greg, I would very much appreciate yuour sharing of the script for reporting the jobs in recovery. It would save ....you know... re-inventing et. Thank you very much.
    John Henley
    Private
    Private
    Senior Member
    (9650 points)
    Senior Member
    Posts:3234


    Send Message:

    --
    02/11/2008 3:39 PM

    Greg,

    Feel free to reply and attach here as a .zip file...

    Thanks for using the LawsonGuru.com forums!
    John
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/11/2008 4:05 PM
    You will have to modify the script just a little bit, as $LAWDIR isn't always used and some of your programs may be in different locations, your PL is probably different that ours, environment name is probably different, etc.  but here is the script that we have developed
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/11/2008 5:06 PM

    You'll have to modify the script as I described above..  but here you go.

    -Greg

     

    Attachments
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/11/2008 5:09 PM
    We've been using this script for a couple of years already, and it works really well. We have it scheduled from cron every 15 minutes.
    en09714
    Basic Member
    (10 points)
    Basic Member
    Posts:4


    Send Message:

    --
    02/12/2008 10:42 AM
    I appreciate all you have done to help. It appears that the script is setup Lawson 9.0 and we are still 8.1. However im looking at the script I did not the "grep" command which I had not thouught of before. No if I can figure out where to look for the jobs "Waiting Recovery" I should be able to move forward. Again, thanks for your efforts.
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/13/2008 9:29 AM
    I'll see if I still have the previous one that worked with our pre-LSF9 system.
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/13/2008 9:38 AM

    Here is the pre-LSF9 version of the script... it pulls email addresses for recipients from their RD30 records... and if it cannot find an email address there, it simply sends it out to the admins... moellerg@genesishealth.com etc.

     

    Attachments
    en09714
    Basic Member
    (10 points)
    Basic Member
    Posts:4


    Send Message:

    --
    02/13/2008 10:27 AM
    Greg,
    Can you tell me the path to find "jqstatus". From the two scripts you have sent, I now know what I need to do however I cant seem to find "jqstatus". Again,I really appreciate the help to date. Thanks.
    Greg Moeller
    Private
    Private
    Veteran Member
    (3921 points)
    Veteran Member
    Posts:1393


    Send Message:

    --
    02/13/2008 10:38 AM
    Wendell: jqstatus should be in ${GENDIR}/bin and if you've set your Lawson environment variables at the top of the script by replacing either lawprod or lsf9prod (depending on which script you are using) with your environment name (found in /etc/lawson.env) you shouldn't have to put the path in the script as long as you include ${GENDIR}/bin in the /etc/lawson.env files PATH variable.
    mondrar
    Private
    Private
    Advanced Member
    (85 points)
    Advanced Member
    Posts:35


    Send Message:

    --
    02/17/2008 10:45 PM

    I highly recommend the Lawson S3 Environment Monitor (LEM) for this purpose developed by David Schronce. I had several dozen scripts montoring every part of our environment, and LEM streamlined monitoring several enviroments and got rid of quite a few custom scripts. You can take a look at the program here: http://www.schronce.net/lawson/

    ./Richard

    mondrar
    Private
    Private
    Advanced Member
    (85 points)
    Advanced Member
    Posts:35


    Send Message:

    --
    02/18/2008 2:53 PM

    if you don't want to use LEM, here is a much easier script for this purpose:

    TEMPDIR="/usr/local/bin/scripts";        export TEMPDIR
    TEMPLOG="temp.log";                          export TEMPLOG

    echo "***********************************************" > $TEMPDIR/$TEMPLOG

    su - lawson -c "/lawson/gen/bin/rngdbdump -n GEN queuedjob -f jobname username -v status=34" >> $TEMPDIR/$
    TEMPLOG
    FLAG=`/usr/bin/cat $TEMPDIR/$TEMPLOG | /usr/bin/egrep -v 'YOU|uid'|wc -l`
    if [[ ${FLAG} -gt 1 ]]
    then
       mailx -s "Jobs In Recovery" email@address.com < $TEMPDIR/$TEMPLOG
    else
       exit 0
    fi
    exit 0

    rohitsurana
    Lawson Consultant
    Private
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    02/14/2018 9:02 AM

    Hi John,

     

    I am not able to open this PDF. Can you please share it and if you have more details on it that would be great.

     

    Thank You

     

    John Henley
    Private
    Private
    Senior Member
    (9650 points)
    Senior Member
    Posts:3234


    Send Message:

    --
    02/14/2018 3:04 PM
    https://www.lawsonguru.com/Portals/0/docs/pflow/PFIntegrator-MUG-JobsInRecovery.pdf
    Thanks for using the LawsonGuru.com forums!
    John
    rohitsurana
    Lawson Consultant
    Private
    Basic Member
    (16 points)
    Basic Member
    Posts:6


    Send Message:

    --
    02/14/2018 4:14 PM

    Thank you John

     

    Can you please let me know i can follow the same for landmark too?

     

    Thank you

    You are not authorized to post a reply.