|
Peter- I've duplicated your results and seen that a copy with REUSEDLT(*NO) causes *EXCLRD locks in the from file. I'm thinking it has to do with locks on the from object due to CRTFILE(*YES). Try the test over, but leave the file as REUSEDLT(*NO). Instead, change the file from default size to SIZE(*NOMAX). I found that this also prevented the *EXCLRD locks. Let me know if you get the same results. -Jim James P. Damato Manager - Technical Administration Dollar General Corporation <mailto:jdamato@dollargeneral.com> -----Original Message----- From: Peter.Sheehan@cbs.fiserv.com [mailto:Peter.Sheehan@cbs.fiserv.com] Sent: Wednesday, October 31, 2001 3:49 AM To: midrange-l@midrange.com Subject: CPYF giving locks Thanks Jim & Tom, I was almost giving up hope of getting a reply. Additional information as requested:- Try this:- CRTPF FILE(FILEA) RCDLEN(80) INZPFM FILE(FILEA) TOTRCDS(1) CL program:- START: CPYF FROMFILE(SHEEHP/FILEA) TOFILE(SHEEHP/FILEB) + MBROPT(*REPLACE) CRTFILE(*YES) GOTO START Work with member locks (F6 from WRKOBJLCK) :- Member Job User Type Lock Status FILEA QDFTJOBD SHEEHP MBR *SHRRD HELD DATA *SHRRD HELD DATA *EXCLRD HELD DATA *EXCLRD HELD This gives CPF4128 40 Not able to allocate objects needed for file for any program opening FILEA for update. Curiously, the two *EXCLRD lines do not appear after:- CHGPF FILE(FILEA) REUSEDLT(*YES) so the file can be opened for update. And curiouser still, the above does not have the described effect if FILEB exists as a result of CPYF from FILEA when REUSEDLT = *NO. i.e. to re-test with REUSEDLT = *NO, FILEB must be deleted first. In fact, vice versa, also. What's really strange is that the presence or otherwise of the EXCLRD locks on the input file depends on REUSEDLT on the output file! Simple enough? But what's the answer to the question Why?
As an Amazon Associate we earn from qualifying purchases.
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.