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



Elvis:

Your question:

I am looking at possibly using some MI process instructions and it seems a
lot of them require "address of process control space system pointer" as an
input parameter.  I am trying to figure out how does one obtain this pointer
to "another" job (i.e. not my job issuing the MI request).

How does one get this address by having the job information only
(number/user/name)?

BTW, not sure if it matters, but I plan to use C's interface to MI to do
this work.

----------------------------------------------------------------------------
------------------

How to get a system pointer to another process than your own process is
obtained either by walking the WCBT tables, or (easier) by searching the
system index, per the information in Leif's book, chapter nine.  My machine
did not implement this machine table (QWCBT_JOB_INDEX, I think it is
called), so I had to walk the work control block tables "manually".  If I
remember the details right, if you have your system at security level 40 or
greater, you will not be able to get a pointer to processes other than to
your own.  But, probably there are ways around this via SST and similar
tricks.  I haven't gotten into that part of MI.

I have found calling MI instructions as "procedures" from RPG is fraught
with frustration.  Even when you prototype the instruction correctly, at run
time it doesn't always work (at least on the versions of OS I have worked
with.  I suspect calling directly from C would work better though.  You can
always code it directly in MI.

Rich Hart


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.