× 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 understand that a user could spoof it if he had command-line access to the SBMJOB command and knew what the program was using to make the determination. But I understood (or misunderstood) that the job would be submitted under controlled conditions like a menu selection. If that were the case, the job name would be specified by the programmer and would definitively identify the job as a batch job without the need for any external calls. Also, most shops have naming conventions for their device descriptions to match workstation entries in the subsystem description and it's unlikely that QDFTJOBD would be the name of an interactive device. It just seemed simpler to do it this way if the proper conditions were already in place. If not, the API is certainly the way to go.

Scott Klement wrote:
Hi Wayne,

Or get the job name from the program status data structure. If it's an interactive job, the job name will be the name of the workstation. If it's batch, it will be the name of the job description it's running under.


You can submit a batch job with any name that you like:

        SBMJOB CMD(CALL MYRPGPGM) JOB(DSP01)

Even if you go by the standard that "if it's a display name, it must be interactive" you still have a problem. If the name is "FOO" how do you know if that's the name of a workstation? You can name a workstation anything you like as well.

Many people have already suggested the correct technique of retrieving the job information. It's not difficult to do.



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.