|
//---forwarded letter ----------------------------------------------/ >Hello to all. Can anyone help? I need to: >a) allocate a file exclusively ALCOBJ *EXCL... >b) if file is locked, see who has it? (workstation, job, user?) >c) blow that job away bye-bye >d) try allocation again, repeat for 5 minutes.... give up... > >Thanks in advance; >Kathie Heeter Hello Kathie, I'm not sure how you sent your request but it certainly confuses my mail program. Lot's of attachments. However, this one's easy. Allocate the object in the usual way with ALCOBJ Monitor for the exception message CPF1002 (Note that CPF1040 means you are hosed and should close down; CPF1058 usually means that the object does not exist -- If you are particular you can retrieve the previous *DIAG message and if it is CPF0939 then the object does not exist) Call the List Object Locks API (QWCLOBJL) to return a list of all jobs locking the object. Iterate over the list performing an ENDJOB for each job you find. You will need to use the user space APIs to create a space for the object list, and to retrieve the list contents. Note that with pointer support in RPG and COBOL you can get a pointer to the space and iterate over the list directly rather than retrieving the space contents. Regards, Simon Coulter. //---------------------------------------------------------- // FlyByNight Software AS/400 Technical Specialists // Phone: +61 3 9419 0175 Mobile: +61 3 0411 091 400 // Fax: +61 3 9419 0175 E-mail: shc@flybynight.com.au // // Windoze should not be open at Warp speed.
X-Mailer: AOL 3.0 16-bit for Windows sub 58 Date: Thu, 05 Feb 98 01:12:25 -0500 From: Kmh0421@aol.com To: MIDRANGE-l@midrange.com Reply-To: MIDRANGE-L@midrange.com Subject: Fwd: locked? by who? cancel job... wait.. locked?
I resent due to sending between cancelling digest and subscribing list.... hope it goes through.... if both do, sorry for the repeat...
- Subject: locked? by who? cancel job... wait.. locked?
- From: Kmh0421@xxxxxxx
- Date: Wed, 4 Feb 1998 23:33:04 EST
- Organization: AOL (http://www.aol.com)
Hello to all. Can anyone help? I need to: a) allocate a file exclusively ALCOBJ *EXCL... b) if file is locked, see who has it? (workstation, job, user?) c) blow that job away bye-bye d) try allocation again, repeat for 5 minutes.... give up... Thanks in advance; Kathie Heeter
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.