× 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.



I've not been following this thread, but have just spotted it ...
If you do the SBMJOB in a CL program, retrieving the completion message
issued from the SBMJOB command (a CPC1221) which contains the full job-id of
the submitted job.

RCVMSG MSGTYPE(*COMP) MSGDTA(&workfield)

%SST(&workfield 1 10) is Job name
%sst(&workfield 11 10) is job user
%sst(&workfield 21 6) is job number

Jeff Bull

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Monnier, Gary
Sent: 06 October 2014 17:05
To: Midrange Systems Technical Discussion
Subject: RE: How to programmatically submit a job and know its job number

If the system is journaling job information all you need to do is retrieve
the last T-JS entry for the current job. It will have all the information
you are looking for.

Choose your flavor to get the journal receiver: RCVJRNE command or the
Retrieve Journal Entries (QjoRetrieveJournalEntries) API (which is found in
service program QJOURNAL).


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John
Yeung
Sent: Saturday, October 04, 2014 9:10 PM
To: Midrange Systems Technical Discussion
Subject: How to programmatically submit a job and know its job number

I am wondering how (if there is a way at all) to programmatically submit a
job in such a way that the submitting program knows the submitted job
number. The purpose of knowing the job number would be to save it for
later, in case the submitted job (scheduled to run potentially far in the
future) needs to be ended/canceled, again programmatically.

The reason I'm hoping to know the number is that it would be convenient to
submit jobs with the same job name, but distinguish them by number. If
there isn't a (sufficiently convenient) way to do this, then I can come up
with a scheme to submit jobs with unique job names.
But before going that route, I thought I'd check with the experts.
This sounds like something other folks would have had occasion to do.

John Y.
--
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.

--
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.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.