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



Here is what I do from RPGLE and SBMJOB does have SCDTIME

I might have missed some of the code but this should be a start

D SchDate S D
D SchTime S T

I stop it at 210000 and start it up the next day and do it every 20 minutes

If JobTime > %Time(210000: *HMS) or Day# = 0 or Day# = 6 ;
SchDate = JobDate + %Days(1) ;
SchTime = %Time(060530: *HMS) ;
Else ;
SchDate = JobDate ;
SchTime = JobTime + %Hours(0) + %Minutes(20) ;
EndIF ;

I adjust it depending on when it is in the hour, I forget why.

Minutes# = %subdt(JobTime:*MINUTES );
Select ;
When Minutes# >= 00 and Minutes# <= 04 ;
SchTime = SchTime + %Minutes(04) ;
When Minutes# >= 14 and Minutes# <= 17 ;
SchTime = SchTime + %Minutes(04) ;
When Minutes# >= 28 and Minutes# <= 32 ;
SchTime = SchTime + %Minutes(05) ;
When Minutes# >= 56 and Minutes# <= 60 ;
SchTime = SchTime + %Minutes(09) ;
EndSl ;

cmdString = 'SBMJOB CMD(CALL PGM(SCSCANDLY)) JOBQ(QS36EVOKE)' +
' MSGQ(*NONE) JOB(SCSCANDLY) ' +
' SCDDATE('+ %EditC(%Dec(%Char(SchDate:*mdy0):6:0): 'X') + ')' +
' SCDTIME('+ %EditC(%Dec(%Char(SchTime:*hms0):6:0): 'X') + ')' ;
ExecCmd(%trim(cmdString):%len(%trim(cmdString)));



You could also use SLEP in the called RPGLE program
D sleep pr 10i 0 ExtProc( 'sleep' )
D seconds 10u 0 Value

CallP sleep(300);



On 11/12/2014 3:37 PM, Steinmetz, Paul wrote:
I’ve run into multiple case where I’m doing a SBMJOB, with either a cmd or pgm.
But, for this process to be successful (job I’m submitting from needs to end to rid record locks), I need to have a 5 second delay.

SBMJOB does not have a built in delay option.

Any thoughts from the group?

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator

Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071

610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home

psteinmetz@xxxxxxxxxx<mailto:psteinmetz@xxxxxxxxxx>
http://www.pencor.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.