Newsletters   Subscriptions  Forums  Store   Career  Media Kit  About Us  Contact  Search   Home 
fhg
Volume 5, Number 12 -- March 23, 2005

Where Did I Come From?


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


Sponsored By
ADVANCED SYSTEMS CONCEPTS

SEQUEL can be used for virtually ALL data access functions on the iSeries.

A Windows-based user interface makes it easy to design queries and reports.

SEQUEL offers executive dashboards, drill-down data analysis, and run-time prompts to deliver important iSeries data to managers and other non-technical users.

E-mail and FTP delivery let you deliver information to remote users and servers.

www.asc-iseries.com


Technical Editors: Howard Arner, Joe Hertvik, Ted Holt,
Shannon O'Donnell, Kevin Vandever
Managing Editor: Shannon Pastore
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.


THIS ISSUE
SPONSORED BY:

T.L. Ashford
Advanced Systems Concepts
WorksRight Software


BACK ISSUES

TABLE OF
CONTENTS
Existence Tests and Left Exception Joins

Where Did I Come From?

Wanted: Native RPG and COBOL Support for Browsers


The Four Hundred
iSeries Top Brass Commit to the Platform and Growth

Soltis and Friends Give Their Vision for the iSeries

iSeries Users Sound Off, Sometimes with Praise, at COMMON

IBM Buys Other Half of Informix with Ascential Acquisition

Four Hundred Stuff
Award Ceremony Another Haines Jewel

LXI Launches Virtual Tape Library, Acquires TD Systems

RJS Unveils New Workflow Product, Cross-Platform Strategy

BCD Ships WebSmart 5.1 as IBM Eases Off on WebSphere

Four Hundred Monitor


Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc. (formerly Midrange Server), 50 Park Terrace East, Suite 8F, New York, NY 10034
Privacy Statement