The "dms" files are for the COBOL modules. PSNTSRV is a C++ module. The SQL I'm trying to modify is show below. Only takes about 2 seconds but is perform everytime the Scheduler wakes up (does full table scans on these two tables). With a "hint" I could make it less then a second.
SELECT Q.PRCSINSTANCE
,Q.JOBINSTANCE
,Q.SESSIONIDNUM
,Q.OPRID
,Q.OUTDESTTYPE
,Q.GENPRCSTYPE
,P.PRCSOUTPUTDIR
FROM PSPRCSQUE Q
,PSPRCSPARMS P
WHERE Q.RUNSTATUS = :1
AND Q.SERVERNAMERUN = :2
AND Q.RUNLOCATION = '2'
AND Q.PRCSINSTANCE = P.PRCSINSTANCE