Hi everyone
Before I forget, we are on V7r1
Does anyone know of a way/method/process/api etc, to determine if a program is being run
I thought of using this SQL statement (below) into a file and then interrogate that file
I got this from this web site
http://ibm.biz/DB2foriServices
under Work Management Services, but I need to know the job name involved, and who to say the program is running under a particular job name - or if that job name is in fact running that program
SELECT JOB_NAME, 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_NAME2 FROM TABLE (QSYS2.ACTIVE_JOB_INFO('NO','','','')) AS X
I then thought - well if the program is running, there has to be a lock on that program
So I thought of using WRKOBJLCK, an api, the following SQL, also from the same web page, but who is to say the lock is due to the program running
SELECT * FROM QSYS2.OBJECT_LOCK_INFO
I need this information so that I can see if the program needs to be ended
I don't have access to the source - so I cannot change it to set a data area
Any and all help would be MUCH appreciated
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
As an Amazon Associate we earn from qualifying purchases.