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.