ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Moving Jobs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving Jobs

    Hi All,

    Is there a way to move some jobs from one queue to other queue based on the no of jobs in a Queue.

    For eg. Jobq A and B. If A is having more then 100 jobs then i would like to move some 20 jobs from A to B automatically.


    Please help me out...

    Thanks.
    Regards,
    Vinothkumar S.

  • #2
    Re: Moving Jobs
    1. WRKJOBQ A
    2. Type '2' for each job to move from job queue A to job queue B.
    3. On the line at the bottom of the screen type JOBQ(B)
    4. Hit Enter.
    5. You're done.
    Philippe

    Comment


    • #3
      Re: Moving Jobs

      Hi,

      Is there a way to do it automatically.
      Regards,
      Vinothkumar S.

      Comment


      • #4
        Re: Moving Jobs

        What do you mean automatically ?
        Pls clarify.
        Philippe

        Comment


        • #5
          Re: Moving Jobs

          Hi,

          There will be a CL program which monitors the Queue based on the no of jobs in a Queue it will change jobs from one queue to other queue.
          Regards,
          Vinothkumar S.

          Comment


          • #6
            Re: Moving Jobs

            I think he wants something to manage the job queue for him, so that if a particular job queue gets swamped, a set number of backed up jobs get moved to a different job queue. This would be constantly monitored for.

            The only way I could think of doing this would be to write a program. I'm sure there would be API's for listing the jobs on a given job queue. You could then pick which ones to re-assign and use the CHGJOB command to change job queue. This program could then be started with a delay wait and left running.
            Ben

            Comment


            • #7
              Re: Moving Jobs

              Could possibly use the following?

              List Job (QUSLJOB) API
              Ben

              Comment


              • #8
                Re: Moving Jobs

                i think I have a sample posted somewhere on this site..
                I will look around.

                jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: Moving Jobs

                  I'd use the Retrieve Job Queue Information (QSPRJOBQ) API since you can get the number and the list of jobs currently sitting in the JOBQ in various status.
                  Jamie posted actually an example many moons ago here.
                  Thanks Jamie
                  Philippe

                  Comment


                  • #10
                    Re: Moving Jobs

                    Thanks for that Philippe Im still looking for my glasses -- cause IM OLD!
                    All my answers were extracted from the "Big Dummy's Guide to the As400"
                    and I take no responsibility for any of them.

                    www.code400.com

                    Comment


                    • #11
                      Re: Moving Jobs

                      Old, you ? uhh what should I say ?!...
                      Philippe

                      Comment


                      • #12
                        Re: Moving Jobs

                        Antique, ancient, venerable one, "oh wizened one", etc..

                        any of those would do...

                        Comment

                        Working...
                        X