• 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
    ARCAD Software

    Embrace VS Code for IBM i Development

    The IBM i development landscape is evolving with modern tools that enhance efficiency and collaboration. Ready to make the move to VS Code for IBM i?

    Join us for this webinar where we’ll showcase how VS Code can serve as a powerful editor for native IBM i code and explore the essential extensions that make it possible.

    In this session, you’ll discover:

    • How ARCAD’s integration with VS Code provides deep metadata insights, allowing developers to assess the impact of their changes upfront.
    • The role of Git in enabling seamless collaboration between developers using tools like SEU, RDi, and VS Code.
    • Powerful extensions for code quality, security, impact analysis, smart build, and automated RPG conversion to Free Form.
    • How non-IBM i developers can now contribute to IBM i projects without prior knowledge of its specifics, while ensuring full control over their changes.

    The future of IBM i development is here. Let ARCAD be your guide!

    Watch Now

    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

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • 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

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