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



Ok, thank I will give all of them a try.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Friday, March 31, 2006 7:16 AM
To: Midrange Systems Technical Discussion
Subject: Re: Clearing a physical file

Dwayne,

There are a few ways to do this.

Most efficient:  Use QCMDEXC to execute CLRPFM.  See the archives for
code 
samples involving QCMDEXC
Pro's:  efficient.  Will actually removed deleted records from the file 
freeing up that space.
Con's:  May need an exclusive lock on the file.  Users will need a
higher 
level of authority to the file to do member type commands.  I know they
do 
for ADDPFM or RMVM.  I think they do for CLRPFM.

Alternative 1:  Use an RPG loop to delete every record.
Pro's:  No file lock or additional level of security (provided they 
already have delete authority.
Con's:  Not as fast as CLRPFM.  Will not remove deleted records.

Alternative 2:  Use embedded sql: delete from myfile
Pro's con's:  See alternative 1

YMMV if you have "reuse deleted records" set to yes on the file.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.