• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Adding A Job Queue To A Batch Subsystem

    May 15, 2013 Hey, Joe

    I want to add another batch job queue to my QBATCH subsystem for submitting reporting jobs that take a long time to process. I want to put them in their own job queue so they can just chug away in QBATCH without interfering with my other batch work. How do I add another job queue that I can submit these jobs to?

    –Bob

    Adding batch job queues to QBATCH is easy. All you have to do is perform the following steps and you’ll be able to create another QBATCH job queue in no time.

    1. Check to see how many jobs your QBATCH subsystem can run at one time and adjust that number, if necessary.
    2. Create the new job queue.
    3. Attach the new job queue to the QBATCH subsystem.

    Here’s the drill for performing each step.

    Step #1: Check to see how many jobs your QBATCH subsystem can run at one time and adjust that number, if necessary.

    Check whether your QBATCH subsystem is constrained regarding the maximum number of jobs it can process at the same time (its “maximum jobs parameter” or MAXJOBS). If QBATCH is configured to run a maximum of four jobs at the same time from four different job queues and you want to change it to accept work (jobs) from a fifth job queue, for example, you will need to change its MAXJOBS value to five.

    You can check your maximum jobs value for QBATCH by running the following Display Subsystem Description (DSPSBSD) command:

    DSPSBSD SBSD(QBATCH)
    

    Take option 1=Operational Attributes off the Display Subsystem Description menu that appears and you’ll a screen that looks like this.

    Figure 1

    (Click graphic to enlarge.)

    Check the maximum jobs in subsystem value. This tells you how many batch jobs can run in QBATCH at one time. If this value is equal to*NOMAX, you won’t have to worry about increasing it to run more jobs in your subsystem, because the QBATCH subsystem will immediately run all jobs that are submitted to it from any of its attached job queues (no maximum number of simultaneous jobs). If your maximum jobs in subsystem value is less than the number of jobs you want to simultaneously run in your subsystem, you can change it to your target number of jobs by executing one of these Change Subsystem Description (CHGSBSD) commands.

    CHGSBSD SBSD(QBATCH) MAXJOBS(*NOMAX)
    

    Or . . .

    CHGSBSD SBSD(QBATCH) MAXJOBS(number)
    

    Where *NOMAX again, allows the subsystem to simultaneously run any number of jobs submitted to it (no maximum). If you specify a specific number of jobs, that number will be the new maximum number of jobs to simultaneously run in your subsystem.

    After making the change, use the DSPSBSD command to double-check that your changed value is the new number.

    Step #2: Create the new job queue

    Creating a new job queue for your QBATCH subsystem is easy. If you want to create a new job queue called REPORTS for example, you would use this Create Job Queue (CRTJOBQ) command.

    CRTJOBQ JOBQ(QUSRSYS/REPORTS) 
    TEXT('QBATCH job queue for report processing')
    

    Step #3: Attach the job queue to the QBATCH subsystem

    Job queues are attached to a subsystem through job queue entries in the subsystem description. To see the job queue entries associated with your QBATCH subsystem, run the Display Subsystem (DSPSBSD) command again and select option 6, job queue entries, from the Display Subsystem Description menu. You’ll see a screen that looks something like this.

    Figure 1

    (Click graphic to enlarge.)

    To add your REPORTS job queue to your subsystem right between the FINJOBQ and FINANCE job queues, for example, you can run the following Add Job Queue Entry (ADDJOBQE) command.

    ADDJOBQE SBSD(QBATCH) JOBQ(QUSRSYS/REPORTS) SEQNBR(15)
    

    This will change your job queue entries screen to look like the following:

    Figure 1

    (Click graphic to enlarge.)

    And now you can submit jobs to the REPORTS job queue and they will run in QBATCH. If two or more job queues have jobs waiting to run at the same time, jobs are accepted into QBATCH from the job queues with the lowest job queue entries first. Since the REPORTS job queue is sequence number 15, jobs submitted to the FASTQ, QBATCH, and FINJOBQ job queues will be started before jobs submitted to REPORTS. This won’t be a problem if your MAXJOBS vale is equal to *NOMAX because QBATCH will run all jobs submitted to its attached job queues. But if you set up your subsystem’s MAXJOBS value to be less than four, QBATCH would have to be running less than three jobs from the three job queues in front of REPORTS for jobs from the REPORTS job queue to be submitted to QBATCH. That’s why it’s important to check and correctly set your subsystem’s MAXJOBS parameter in step 1.

    And that’s all there is to adding another job queue to the QBATCH subsystem.

    HTH

    –Joe

    Follow Me On My Blog, On Twitter, And On LinkedIn

    Check out my blog at joehertvik.com, where I focus on computer administration and news (especially IBM i); vendor, marketing, and tech writing news and materials; and whatever else I come across.

    You can also follow me on Twitter @JoeHertvik and on LinkedIn.

    Joe Hertvik is the owner of Hertvik Business Services, a service company that provides written marketing content and presentation services for the computer industry, including white papers, case studies, and other marketing material. Email Joe for a free quote for any upcoming projects. He also runs a data center for two companies outside Chicago. Joe is a contributing editor for IT Jungle and has written the Admin Alert column since 2002.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Computer Keyes

    Fax Directly from your IBM i

    KeyesFax is a full function automated IBM i fax system. Spooled files are burst by fax number and auto transmitted with overlays.  It combines both a send and receive facsimile processing system with a complete image package.

    The fax software will edit, send, receive, display, print, and track fax documents or images using any standard IBM i without additional expensive hardware, software or subscriptions.

    Computer Keyes has been developing Software Solutions since 1978!

    www.computerkeyes.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    United Computer Group, Inc.:  Vault400 for secure online backup and disaster recovery solutions.
    Bytware:  Your IFS Files Aren't Safe. Download the free IFS Security Bundle.
    ProData Computer Services:  Let 'em run WILD . . . with SQL! Download today!

    More IT Jungle Resources:

    System i PTF Guide: Weekly PTF Updates
    IBM i Events Calendar: National Conferences, Local Events, and Webinars
    Breaking News: News Hot Off The Press
    TPM @ The Reg: More News From ITJ EIC Timothy Prickett Morgan

    The Sweet 16 Of Mobile App Dev Tools for IBM i Making Hadoop Elephants Drink From Silverlake

    Leave a Reply Cancel reply

Volume 13, Number 10 -- May 15, 2013
THIS ISSUE SPONSORED BY:

WorksRight Software
ProData Computer Services
American Top Tools

Table of Contents

  • Search SQL Source Using System Catalogs
  • Bind By Slash-Copy
  • Adding A Job Queue To A Batch Subsystem

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • SEU’s Fate, An IBM i V8, And The Odds Of A Power13
  • Tandberg Bankruptcy Leaves A Hole In IBM Power Storage
  • RPG Code Generation And The Agentic Future Of IBM i
  • A Bunch Of IBM i-Power Systems Things To Be Aware Of
  • IBM i PTF Guide, Volume 27, Numbers 21 And 22
  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle