|
Below is the method that we use. The program simply tries to allocate the subsystem description. As long as the subsystem is active it is locked. When it ends the program is able to allocate it. ENDSBS SBS(QINTER) OPTION(*IMMED) MONMSG MSGID(CPF1054) EXEC(GOTO CMDLBL(NOTACTIVE)) /* WAIT FOR SUBSYSTEM TO END (UP TO 15 MINUTES) */ ALCOBJ OBJ((QINTER *SBSD *EXCL)) WAIT(900) MONMSG MSGID(CPF1002) EXEC(GO TO CMDLBL(ERROR) DLCOBJ OBJ((QINTER *SBSD *EXCL)) MONMSG MSGID(CPF0000) >---------- >From: Kempter, Eric[SMTP:EKempter@smsocs.com] >Sent: Tuesday, January 13, 1998 3:16 PM >To: 'midrange-l@midrange.com' >Subject: RE: More automated backup > > >You could also skip the check. > >1. Execute your next command (SAVSYS??) >2. Monitor for an abend (Subsystem xxx is still active). >3. DLYJOB 5 minutes if abend occurs >4. Retry the command >etc ... > > >Happy New Year. > >Eric Kempter >Senior Programmer/Analyst >E-Mail: EKempter@Smsocs.com > > -----Original Message----- >From: midrange-l-owner [SMTP:midrange.com!midrange-l-owner@mcs.com] >Sent: Tuesday, January 13, 1998 8:17 AM >To: MIDRANGE-L >Subject: Re: More automated backup > >>1. After ENDSBS QINTER OPTION(*IMMED), I am issuing a DLYJOB 600 to >>wait for 10 minutes. How do I know if and when QINTER ends? > >Monitoring for the 'Subsystem xxxx ended' message in >QSYSOPR is one option. Another is to perform the >WRKSBSJOB SBS(XX) OUTPUT(*PRINT). If the >subsystem is not active WRKSBSJOB will issue >CPF1003. > >Or you could use the Work Management API QWCLASBS >(which lists active subsystems) or QWDRSBSD) which >returns specific information about a subsystem and I >believe includes number of active jobs and the status >of the subsystem. > >I have used the WRKSBSJOB approach for years. I wish >I had time to work with the API's on legacy programs :-) > >Michael Crump >Technical Project Leader >Ball-Foster Glass Container Corp. > > >+--- >| This is the Midrange System Mailing List! >| To submit a new message, send your mail to "MIDRANGE-L@midrange.com". >| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. >| Questions should be directed to the list owner/operator: david@midrange.com >+--- > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-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-2025 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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.