|
Hello Roger, WRKOBJLCK only lets you display or print the result. It should still show the locked objects but processing the spooled file is awkward which is why I suggested the API. If I understand properly, your real problem is that CPYLIB runs to completion but sends messages stating that certain objects were not copied and you have to wait until the CPYLIB completes before you know about the objects in use. You are trying to reduce the time you have to wait i.e., don't do the copy if all objects cannot be copied successfully. You will need to check for them being in use _first_. The API can help with that if you know the names of the objects. You could also write your own CPYLIB routine using DSPOBJD to get a list of objects in an outfile and CRTDUPOBJ to copy them. You could allocate the objects exclusively (*EXCL) before duplicating them. However, it would seem to me that your best approach is to use SAV/RST and specify PRECHK(*YES) on the save command. The OS will ensure the objects are not in use before attempting the save. Diagnostic messages should tell you which objects could not be saved and you could process these in CL. You could also use save-while-active. Just save into a save-file and then restore. This will probably be slower than CPYLIB but you get more control. As an aside there is no difference in the contents of the job log when using LOG(4 00 *NOLIST) or LOG(4 00 *SECLVL). The 4 00 part is what determines the message detail. *SECLVL just ensures a joblog is printed _even_ if the job completed normally. You are getting errors which should exceed the job end-severity therefore a joblog will be generated even though *NOLIST is specified. I happen to think *SECLVL is to be preferred for operations management reasons. Regards, Simon Coulter. //-------------------------------------------------------------- // FlyByNight Software AS/400 Technical Specialists // Eclipse the competition - run your business on an IBM AS/400. // Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 // Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au // // Windoze should not be open at Warp speed. //--- forwarded letter ------------------------------------------------------- > X-Mailer: Internet Mail Service (5.5.1960.3) > Date: Fri, 15 Jan 99 10:10:38 -0800 > From: "Roger Boucher" <RBoucher@stanpac.com> > To: "'MIDRANGE-L@midrange.com'" <MIDRANGE-L@midrange.com> > Reply-To: MIDRANGE-L@midrange.com > Subject: RE: Object lock culprits > > I had already considered the MONMSG followed by WRKOBJLCK to be my only > resort. Unfortunately it does not (I don't believe nor does IBM) return > control back to the CL so that I may perform these tasks until after the > CPYLIB command completes. It takes over an hour for the CPYLIB to > complete. > I assume I would run into the same problem trying to use the API? > > Thanks for your help. > :-) +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.