|
First thanks for your precious cooperation, all of you. Bruce what are you trying to tell is that in terms of perfomance a wait of 30 seconds its better than a DLYJOB(30) (or whatever in my case it is 1800 seconds) ? Isnt it ? TIA, Silvio. "R. Bruce Hoffman, Jr." <rbruceh@ibm.net> on 09/29/99 06:00:22 PM Please respond to RPG400-L@midrange.com To: RPG400-L@midrange.com cc: (bcc: Silvio Santos/VC/PT/BRAIN) Subject: Re: Whats the best way to run a CL every 30 min 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 +--- +--- | 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 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.