hi Alan,
My question is only pertinent to the DLYJOB command itself - whether
or not the program is being debugged.
Interesting. I, too, thought you were probably doing this as a strange
way of starting the debugger on a batch job -- thanks for the clarification.
1. Is there any way of knowing the amount of elapsed time, and
therefore the amount of time left?
Interactively, you can use WRKACTJOB to display the job log, and
(assuming that your program and job are set to log CL commands) you'll
see the DLYJOB command in that job log. If you hit F1 on the DLYJOB
line of the job log, it'll tell you the date/time it started running.
You should be able to use that to calculate the time elapsed/remaining
easily enough.
2. Is there a way of changing this timespan while the program is
running?
No. (Or, at least, no documented way.)
You could, of course, create your own DLYJOB command and place it higher
in the *LIBL than the IBM one, and then in the code for your own
command, you could make it behave differently.
FWIW, the sleep() API can be interrupted by sending the SIGINT signal to
the process -- that's cause sleep() to abort. But, there's nothing like
that for DLYJOB to my knowledge.
You might consider doing something like this instead of DLYJOB:
CHGVAR VAR(&X) VALUE(0)
DOUNTIL COND(&X *EQ 30)
CHGVAR VAR(&X) VALUE(&X + 1)
DLYJOB DLY(1)
ENDDO
Then you could always change the value of &X in the debugger to make the
time longer/shorter.
So... there are all sorts of ways to work around the issue... but if
your goal is purely to change the IBM-supplied DLYJOB command while it's
running, then I'm afraid you're out of luck.
As an Amazon Associate we earn from qualifying purchases.