× 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.



Jeff,

LR = Last Record; it is automatically set on for the last record when a
primary file is defined.

Joep Beckeringh


rpg400-l-bounces@xxxxxxxxxxxx wrote on 10-07-2008 15:31:30:

[image removed]

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

Jeff Young

to:

RPG programming on the AS400/iSeries

10-07-2008 15:38

Sent by:

rpg400-l-bounces@xxxxxxxxxxxx

Please respond to RPG programming on the AS400 / iSeries

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

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.