List out only lckw jobs from the active job list

105 pts.
Tags:
AS/400
AS/400 jobs
CL
Hello, Does anyone have any ideas on how I can list out only the active jobs that have a status of lckw. It would be great if I could get that list sent to a physical file. Any suggestions are welcome. Thanks all.

Answer Wiki

Thanks. We'll let you know when a new response is added.
I stumbled on this later. It is pretty much the solution. 

https://itknowledgeexchange.techtarget.com/itanswers/check-for-active-jobs-in-cl/

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    For a down a dirty solution you could try this.
    Run the program and then query the file ACTJOBLCK


    PGM                                                        
    CRTPF      FILE(QTEMP/ACTJOB) RCDLEN(132)                  
    MONMSG     MSGID(CPF0000)                                  
    CRTPF      FILE(QTEMP/ACTJOBLCK) RCDLEN(132)               
    MONMSG     MSGID(CPF0000)                                  
    WRKACTJOB  OUTPUT(*PRINT)                                  
    CPYSPLF    FILE(QPDSPAJB) TOFILE(QTEMP/ACTJOB) +           
                 SPLNBR(*LAST)                                 
    CPYF       FROMFILE(QTEMP/ACTJOB) +                        
                 TOFILE(QTEMP/ACTJOBLCK) MBROPT(*REPLACE) +    
                 INCCHAR(ACTJOB 106 *CT 'LCKW') FMTOPT(*NOCHK) 
    ENDPGM                                                     
    110,075 pointsBadges:
    report
  • TheRealRaven
    Practically all jobs will have LCKW status at different times during their lives. It wouldn't make much sense just listing jobs that randomly had that status during the fractions of a second when the info was collected.

    Are you wanting jobs in that status? Or are you actually wanting jobs that have stayed in that status for, say, ten minutes or more? Those can return two very different lists.
    27,110 pointsBadges:
    report
  • bp01442
    I've only been on AS/400 system for a year so not an expert so don't quote me on my thinking haha. The purpose/reason behind this was that Jobs do have a lckw status at different times throughout the day however these generally go away after a small window of time. When a user gets stuck on a screen though because of a lckw status the windows is generally a lot longer so I wanted a screen that allows Me and our IT department to check on jobs without having to know a lot about library navigation in as400. Which we now have that works great :p haha.
    105 pointsBadges:
    report
  • bp01442
    Thanks for both responses guys. I was able to use this on several different areas to help us monitor all the important things our IT Dept need to know about. Basically run the whole place from 1 screen haha.
    105 pointsBadges:
    report
  • pdraebel
    When you know a job that is waiting on a lock for a long time, WRKACTJOB, F20, Type the job name in the field for JOB.
    Display the Job, use option 12 and F6 to see what object the job is waiting. From there you can also see which jobs are holding the Lock. Go on from there.
    7,545 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: