• 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
    Midrange Dynamics North America

    Git up to speed with MDChange!

    Git can be lightning-fast when dealing with just a few hundred items in a repository. But when dealing with tens of thousands of items, transaction wait times can take minutes.

    MDChange offers an elegant solution that enables you to work efficiently any size Git repository while making your Git experience seamless and highly responsive.

    Learn more.

    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

  • 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
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

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