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



Jon

There is several ways to do waits ...

If I have a online process that has to process order lines I will always
lock the header
record while doing it and the unlock it afterwards - it works *IMMED with
out any other
delays then time the underlying process but it prevent others to process
the records.

Poll does creates overhead or unnessecary waits.

If I have to wait for at submittet job in a online job - I have 3 simple
general CL programs.

1. In create a DATQ for the job in the online environment (CL1)
2. I submit the job with the DTAQ name as an parameter
3. I do a read of the DTAQ with a wait (CL2)

4. The batchjob makes a entry in the DTAQ when finished (CL3)

If the batchjob runs in 0.1 sec the wait will be 0.1 sec, if the batchjob
runs in 10 sec
the wait will be 10 sec.

Most important - there will be no overhead in the waiting time.

Simple


On Fri, Jul 12, 2013 at 5:08 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

Retry a record lock wait.

Poll for the arrival of files in an IFS directory.

Poll anything that needs to be monitored at a regular interval

And on ...


On 2013-07-12, at 10:58 AM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:

I would ask myself why I wanted a delay - what will the job be waiting
for ?

I use DTAQ in online programs that has to wait for a submitted batch
process
to finish otherwise I would use a sleep() even though I hardly can't see
the reason.


On Fri, Jul 12, 2013 at 4:50 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:

Sorry Ken - I still don't understand. What am I missing here?

Isn't any poor sucker who has to maintain this code in the future going
to
waste a lot of time wondering what the heck this DQ is being used for
and
why?

Surely invoking a function that directly says what it is doing (e.g.
sleep() ) has to be more obvious. I just can't see any advantage to
this
approach and several disadvantages.


On 2013-07-12, at 9:33 AM, Ken Sims <mdrg8066@xxxxxxxxxxx> wrote:

On Fri, 12 Jul 2013 07:49:49 -0500, Justin Taylor
<JUSTIN@xxxxxxxxxxxxx> wrote:

"For "never ending" jobs that do a delay, I personally prefer to NOT
see CMD-DLYJOB.

I use a wait on a data queue entry against a data queue created in
QTEMP.

Ken"


O_o Mind explaining your reasoning?

I want to see the natural PGM-xxxxxxxx function. Also, I happen to
think that DEQW looks "nicer" than DLYW for the status.

And the DLY function information that is displayed isn't going to be
helpful because my "never ending" jobs only delay for 15 seconds at a
time, then check for a controlled shutdown request.

How often they do any actual processing depends on the specific job.
Some count a particular number of 15-second delays. Others look for
specific clock items. For example, a job may do processing every ten
minutes on the ten minutes.

Ken
Opinions expressed are my own and do not necessarily represent the
views
of my employer or anyone in their right mind.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com




--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com




--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.