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



Not sure what the real need is on this but one way to allow you to control when a batch job "wakes up" is to use a data queue. Have the CL loop looking for a data queue entry and go to sleep again if there isn't one. When you want the job to run send something to the data queue

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, January 04, 2012 5:08 PM
To: Midrange Systems Technical Discussion
Subject: Re: Using the command DLYJOB in a CL program

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.

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.