× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Is this to do with the scope of the object lock remaining in play even though the program closes the file? You could try using a DLCOBJ immediately before the CLRPFM and seeing if that helps. The command help says you shouldn't do a DLCOBJ if the object wasn't explicitly allocated with ALCOBJ as it may remove internal locks allowing data to be deleted (which sounds like what you want to do).

Alternatively you could try using an SQL DELETE statement to remove the records - I've had to resort to that occasionally when another program has locked a file and CLRPFM wouldn't work.

All the best

Jonathan



Mark Walter wrote:
But, shouldn't the RPG cycle close the file if it's Input/Primary? Are the RPGs modules bound to the CLLE Program, or is the CLLE calling RPG program objects? Are all of the objects running in the same activation group?

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Thursday, July 10, 2008 9:32 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Why is an Input/Primary file in an RPGLE program in a CLLE program locking a file?

Booth,
Your problem is that to clear a file, you need an Exclusive lock on both the file and member.
When you open the file for read only (input primary) and do not set LR on at the end of the program, the file remains open and has a Shared for Read lock on the file and member.
Since you are in a named activation group, the RCLRSC command has no effect on the open file.
You must either set LR on in your program, use ACTGRP(*NEW) for your RPGLE program or change from ILE to OPM to get the results you desire.

Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3 IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3







----- Original Message ----
From: Booth Martin <booth@xxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, July 9, 2008 8:09:27 PM
Subject: Why is an Input/Primary file in an RPGLE program in a CLLE program locking a file?

Why is an Input/Primary file in an RPGLE program in a CLLE program locking a file?

There is a series of steps, including calls to three RPGLE programs.
These steps all run fine when one after another from the command line.

Now, I have put the steps into a CLLE program. When I run the CLLE I
get a halt saying a file I am trying to clear is locked. The only
thing I see, so far, is that the second program has the locked file as Input/Primary, so there is *INLR set on in the program. Could that be my problem? If not, any ideas? If so, what fixes the problem?

--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.4.7/1544 - Release Date: 7/10/2008 7:37 AM



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.