But doing an allocate of the DISP=OLD will succeed if the job has not even started yet. Perhaps the final step should allocate a DISP=(NEW,CATLG,CATLG) and run with a COND=EVEN of a unique data set name. The REXX script could generate one by using the DATE() and TIME() functions to create something like: &SYSUID..D&DATE..T&TIME..FIN The REXX program would do a "poll loop" to see if the DSN has been allocated and then continue once the DSN exists. Oh, and the REXX program would then delete the DSN, of course. Must not leave junk around lest the Storage Administrator smite thee.
On Tue, Apr 30, 2013 at 11:44 AM, R.S. <[email protected]>wrote: > W dniu 2013-04-30 18:33, Anthony Rudd pisze: > > I am sorry that I was too imprecise. >> I need a programmed solution, prefererably called from REXX (IRXJCL). >> >> The situation: >> I have submitted as batch job (possibly long running). >> In a separate batch job, I need to wait until the first job has completed. >> > > That's why jobs can have multiple steps. Simply create one job by > concatenation of steps from your 2 jobs. > > > Another option: > Last step in JOB1 starts JOB2. I can be done by TSO SUBMIT or IEBGENER > copy to INTRDR. > > Another option: use your batch scheduler facilities. Of course that mean > you have any scheduler like CA-ESP, ControlM, TWS, BETA42, etc. > > Another option: JOB1 allocates some dataset with DISP=OLD, the JOB2 also > has DISP=OLD for the same dataset. Assuming JOB1 is submitted first, JOB2 > will wait for JOB1 completion. > > Another option - IMHO the "less wise"(*): JOB2 in first step constantly > checks whether JOB1 is still running. It can be done by using TSO command, > MVS command, or by use LISTDSI over some "signal" dataset. > > > *(*) is it good euphemism for "plain stupid"? ;-) > > -- > Radoslaw Skorupka > Lodz, Poland > > > > > > > -- > Treść tej wiadomości może zawierać informacje prawnie chronione Banku > przeznaczone wyłącznie do użytku służbowego adresata. Odbiorcą może być > jedynie jej adresat z wyłączeniem dostępu osób trzecich. Jeżeli nie jesteś > adresatem niniejszej wiadomości lub pracownikiem upoważnionym do jej > przekazania adresatowi, informujemy, że jej rozpowszechnianie, kopiowanie, > rozprowadzanie lub inne działanie o podobnym charakterze jest prawnie > zabronione i może być karalne. Jeżeli otrzymałeś tę wiadomość omyłkowo, > prosimy niezwłocznie zawiadomić nadawcę wysyłając odpowiedź oraz trwale > usunąć tę wiadomość włączając w to wszelkie jej kopie wydrukowane lub > zapisane na dysku. > > This e-mail may contain legally privileged information of the Bank and is > intended solely for business use of the addressee. This e-mail may only be > received by the addressee and may not be disclosed to any third parties. If > you are not the intended addressee of this e-mail or the employee > authorised to forward it to the addressee, be advised that any > dissemination, copying, distribution or any other similar activity is > legally prohibited and may be punishable. If you received this e-mail by > mistake please advise the sender immediately by using the reply facility in > your e-mail software and delete permanently this e-mail including any > copies of it either printed or saved to hard drive. > BRE Bank SA, 00-950 Warszawa, ul. Senatorska 18, tel. +48 (22) 829 00 00, > fax +48 (22) 829 00 33, www.brebank.pl, e-mail: [email protected] > Sąd Rejonowy dla m. st. Warszawy XII Wydział Gospodarczy Krajowego > Rejestru Sądowego, nr rejestru przedsiębiorców KRS 0000025237, NIP: > 526-021-50-88. Według stanu na dzień 01.01.2013 r. kapitał zakładowy BRE > Banku SA (w całości wpłacony) wynosi 168.555.904 złotych. > > > > ------------------------------**------------------------------**---------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
