• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Where Did I Come From?

    March 23, 2005 Hey, Ted

    How can I tell which job queue an active batch job was submitted to?

    –Tim

    Do you mean how a human can see that information or how a program can determine it? I’ll show you both ways.

    A human can use the Work with Job (WRKJOB) command to determine which job queue a batch job came from. Take Option 2, Display Job Definition Attributes.

    Here’s a second method that you probably won’t need. The job queue name is also in a message in the job log. Display the job log and look for a message that says “Job 123456/SOMEUSER/SOMEJOB submitted” near the top of the job log. Position the cursor to that message and press F1 and you’ll find the job queue name in the help text.

    If a program needs to determine which job queue its current invocation came from, use the Retrieve Job Information API, QUSRJOBI. The following CL source code is some I have used.

    dcl   &RcvVar     *char      512 
    dcl   &RcvVarLen  *char        4 
    dcl   &Format     *char        8 
    dcl   &JobName    *char       16 
    dcl   &JobID      *char       16 
    dcl   &JobQ       *char       10 
    dcl   &JobQLib    *char       10
    
    
    chgvar   %bin(&RcvVarLen)    512                           
    chgvar   &Format             'JOBI0300'                    
    chgvar   &JobName            '*'                           
    chgvar   &JobID              ' '                           
    call     qusrjobi (&RcvVar &RcvVarLen &Format &JobName &JobID) 
    chgvar   &JobQ         %sst(&RcvVar 63 10)                 
    chgvar   &JobQLib      %sst(&RcvVar 73 10)
    

    –Ted


    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Rocket Software

    Unlock the full potential of your data with Rocket Software. Our scalable solutions deliver AI-driven insights, seamless integration, and advanced compliance tools to transform your business. Discover how you can simplify data management, boost efficiency, and drive informed decisions.

    Learn more today.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    BCD Ships WebSmart 5.1 as IBM Eases Off on WebSphere Q4bis Streamlines BPCS Reporting for U-Bix Konica Minolta

    Leave a Reply Cancel reply

Volume 5, Number 12 -- March 23, 2005
THIS ISSUE
SPONSORED BY:

T.L. Ashford
Advanced Systems Concepts
WorksRight Software

Table of Contents

  • Existence Tests and Left Exception Joins
  • Where Did I Come From?
  • Wanted: Native RPG and COBOL Support for Browsers

Content archive

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

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

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