× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rob - appreciated
THAT works

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Bucknum
Sent: Thursday, September 29, 2016 1:10 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: Need Help with QGYOLJOB API (Please)

The syntax is a little different in 7.1
SELECT SUBSTR(JOB_NAME,1,6) AS JOB_NUMBER,
SUBSTR(JOB_NAME,8,POSSTR(SUBSTR(JOB_NAME,8),'/')-1) AS JOB_USER,
SUBSTR(SUBSTR(JOB_NAME,8),POSSTR(SUBSTR(JOB_NAME,8),'/')+1) AS JOB_NAME FROM TABLE(QSYS2.ACTIVE_JOB_INFO(
'NO','QUSRWRK','','')) X




Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: Thursday, September 29, 2016 12:02 PM
To: Midrange Systems Technical Discussion
Subject: RE: Need Help with QGYOLJOB API (Please)

Hi Rob
All of this is piquing my interest
However - cutting and pasting the sql that you posted didn't work I receive Token => was not valid. Valid tokens: ) ,.
In strsql
And I am on V7r1

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Thursday, September 29, 2016 12:56 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Need Help with QGYOLJOB API (Please)

Like this?
SELECT SUBSTR(JOB_NAME,1,6) AS JOB_NUMBER,
SUBSTR(JOB_NAME,8,POSSTR(SUBSTR(JOB_NAME,8),'/')-1) AS JOB_USER,
SUBSTR(SUBSTR(JOB_NAME,8),POSSTR(SUBSTR(JOB_NAME,8),'/')+1) AS JOB_NAME FROM TABLE(QSYS2.ACTIVE_JOB_INFO(
SUBSYSTEM_LIST_FILTER => 'QUSRWRK')) X

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqudfa
ctivejobinfo.htm



Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: ARTHUR MARINO <amarino@xxxxxxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Date: 09/29/2016 12:44 PM
Subject: Need Help with QGYOLJOB API (Please)
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



End of my rope time, ladies and gentlemen.



I want to use this Open-List API (format: OLJB0200) to quickly retrieve the *ACTIVE jobs running in a SINGLE SUBSYSTEM. No matter what I do, it returns jobs from EVERY subsystem.



It seems like the code I'd need to post here would be to much for anyone to read (though I'll be happy to if anyone wants to see it). So I'm wondering if anyone has an example of how they formatted the Job Selection parameter and the requested Key that I understand enables it to do the test..



I thought you had to request the KEY of the value you're trying to do a Selection on, so I specified Qualified Subsystem Name (1906) even though the JobSelection d/s column is UNqualified. When I debug this, I'm seeing the right subsystem name in my JobSelect d/structure at the offset I pushed into JobSelect.Hdr.QGYASO (and JobSelect.Hdr.QGYASC = 1).
OpnLstJobs(RcvVar :%size(RcvVar) //
RcvVar

:'OLJB0200'
// FmtRcvVar

:RcvDef :%size(RcvDef) //
RcvDef

:QGYLJBLI
// LstInf

:20
// NbrRcds

:QGYLJBSI
// SortInfo

:JobSelect :%size(JobSelect) // Jobselect

:1
// NbrKeys

:KeyLst
// KeysToRtn (KeyLst contains '1906' Qual. Subsystem Name)

:ErrCde);
Thanks for any help with this!



Arthur Marino
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.