- I released the job with option '6' on the 'Work with Submitted Jobs' screen. Job did not stop to press F10 and enter STRDBG!!!
- I tried to do STRDBG right after the STRSRVJOB, I got error "Command is not allowed while serviced job is not active"
- I released the job, the job went on without stopping!!!
STRSRVJOB will not allow enter STRDBG or STRISDB while job is held, and it won't stop the job after it is released to enter a STRDBG or STRISDB command.
thanks for the reply.
I'm sure of the job number because the I copy and paste the job qualifier from the submit message while the job is held by the JOBD with Hold(*YES .).
I do the STRSRV and paste the 'Job 642482/user/jobname', it takes it w/o problem.
Job still on hold on jobq, I enter STRISDB PGM(pgmname) UPDPROD(*YES) INVPGM(*NO). The job is held on the jobq, I get these errors:
Error occurred setting the first breakpoint.
Command is not allowed while serviced job is not active.
Errors occurred on command.
.
If this is a CL add this line of code at the start of your program..
DLYJOB DLY(60).
This will give you 60 seconds after the job is submitted to start the service job and then start DEBUG. If you need more time, just increase the number of seconds you want the job to wait.
If this is an RPGLE program you can delay the job like so:
D CMD S 3000A VARYING
*********************************************************************
* PROTOTYPE FOR QCMDEXEC API (EXECUTE COMMAND)
*********************************************************************
D QCMDEXC PR ExtPgm('QCMDEXC')
D COMMAND 3000A const options(*varsize)
D Length 15P 5 const
/free
CMD = 'DLYJOB DLY(60)';
CALLP QCMDEXC(CMD : %LEN(CMD));
/end-free
Thanks for the help Charlie.
I got it working after I quit trying to do STRISDB and signed off then on then dis STRSRVJOB then STRDBG (not STRISDB). Of course I had to recompile all OPM programs with OPTION(*SRCDBG) after I couldn't see the code with STRDBG.
I like STRISDB for the OPM programs because of F13 availaibilty (Run to cursor) which I could not do with STRDBG.
Thanks again.
If you insist on doing things the hard way, try using SEPs through the green-screen -- Debugging RPG IV Programs -- The Green-Screen Way.
Maybe that will help you work out how to get the jobs to stop when you want them to.
Tom
Discuss This Question: 5  Replies