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



I want to thank everyone for all the ideas.
The simplest one was starring me in the face.
SBMJOB HLDJOBJS to the same single threaded jobq that the job is running in.
No delay needed.
Da, had a real senior moment on this one.

Paul


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of midrange
Sent: Wednesday, November 12, 2014 9:33 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: SMBJOB - with delay

There have been lots of answers, and I'll give a couple, some are variations on previous posts.
I'm not a fan of guessing that a 5 second delay solves the issue, but then I use it sometimes...
Variation 2 is simplest with no pgm changes If original job = CALL ABC
If submitting = CALL XYZ

Var 1. if XYZ is a clp just add DLYJOB DLY(5) as 1st step
If XYZ not a clp, or you cannot modify XYZ then create CLLE XYZ1 with same parms as XYZ
PGM
DLYJOB DLY(5)
CALL XYZ
ENDPGM

Var 2. since you said this is thru AJS (I think someone said that)
Make XYZ it's own job and perhaps a different jobq, and make dependent upon ABC finishing. If you have parms this could be an issue that could be resolved with various places to store (data queue, data area, file, ) but that is pgm changes

Var 3. I do this something like this (if needed). Allocate *EXCL a dtaara in 1st pgm for 2nd pgm to check.
Program ABC
RTVOBJD OBJ(*LIBL/ABC) OBJTYPE(*PGM) RTNLIB(&RTNLIB)
CHKOBJ OBJ(&RTNLIB/ABC) OBJTYPE(*DTAARA)
MONMSG MSGID(CPF9800) EXEC(CRTDTAARA +
DTAARA(&RTNLIB/ABC) TYPE(*CHAR) LEN(1) +
TEXT('alcobj if in use'))
ALCOBJ OBJ((&RTNLIB/ABC *DTAARA *EXCL))
/* whatever ABC does */
SBMJOB CMD(CALL PGM(XYZ)) JOB(XYZ)
ENDPGM

Program XYZ (or XYZ1)
$ALC: ALCOBJ OBJ((&RTNLIB/ABC *DTAARA *EXCL))
MONMSG MSGID(CPF1000) EXEC(DO)
DLYJOB DLY(2)
GOTO $ALC:
ENDDO
DLYJOB DLY(2) / just because dataarea not locked not mean all are freed */
/* whatever XYZ does */

Jim Franz

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Wednesday, November 12, 2014 3:37 PM
To: 'Midrange Systems Technical Discussion'
Subject: SMBJOB - with delay

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/


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.