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


  • Subject: Re: Whats the best way to run a CL every 30 min
  • From: "R. Bruce Hoffman, Jr." <rbruceh@xxxxxxx>
  • Date: Wed, 29 Sep 1999 15:26:26 -0400

OOPS! Did I just wait 30 seconds? Sorry. 30 minutes would be a wait time
of 1800. Also note, that unless you want to alter the function of the
program on the fly or end the job gracefully under all circumstances,
this is overkill. The delay job will work much the same or better.

"R. Bruce Hoffman, Jr." wrote:
> 
> Nick.England@catalyst-solutions.com wrote:
> >
> > I guess this is for a polling job or a data feed..
> >
> > Could you not send data to a data Q to trigger a job waiting on data to
> > arrive in the queue...this will take up no processing time until data
> > arrives..
> >
> 
> Close. Just create a data queue. Call the QRCVDTAQ command with a 30
> second wait period. At the end of 30 seconds, the receive program will
> return to your CL program. Do what you need and then loop back to the
> QRCVDTAQ call.
> 
> PGM
> DCL &data *char 1
> DCL &datalen *dec (5 0)
> DCL &wait *dec (5 0) value(30)
> 
> @LOOP:  call qrcvdtaq('dqname' 'dqlibrary' &datalen &data &wait)
>         .
>         .
>         goto @loop
> ENDPGM
> 
> Why loop? It prevents having to start and stop the job every 30 seconds.
> Saves resource, performs better.
> 
> Note that the variable &datalen will always return 0 (zero) as there is
> no data actually received. This could be used as a way to terminate the
> program. Send data to the data queue and leave the loop if the length is
> greater than 0.
> 
> >
> > Hi!
> > Whats the best way in tems of efficiency and CPU perfomance to run a CL PGM
> > every 30 min (for instance) or other interval.
> > If you can give code examples it would be great.
> >
> > TIA
> > Silvio.
> 
> --
> ===========================================================
> R. Bruce Hoffman, Jr.
>  -- IBM Certified AS/400 Professional System Administrator
>  -- IBM Certified AS/400 Professional Network Administrator
> 
> "The sum of all human knowledge is a fixed constant.
>     It's the population that keeps growing!"
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

-- 
===========================================================
R. Bruce Hoffman, Jr.
 -- IBM Certified AS/400 Professional System Administrator
 -- IBM Certified AS/400 Professional Network Administrator

"The sum of all human knowledge is a fixed constant.
    It's the population that keeps growing!"
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.