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



(out on Monday due to illness)

The QCMDEXC to CLRPFM is a good method.  The only problem with it is that 
it requires a higher level of security than either a RPG loop to delete 
records, or a blanket SQL DELETE does.  Most iseries shops are pretty lax 
about security though so it shouldn't be a problem for you.
It's one of the options that appear on EDTOBJAUT, then F11 for detail:
                         Object    ----------Object-----------
User        Group       Authority  Opr  Mgt  Exist  Alter  Ref
*PUBLIC                 *EXCLUDE 
SSA70                   *ALL        X    X     X      X     X 
For example, I don't believe a person with just *CHANGE can do CLRPFM.

The benefits of a CLRPFM over a RPG DELETE loop or a blanket SQL DELETE 
statement is that it also gets rid of deleted records.  From the bottom of 
DSPFD:
Total number of members  . . . . . . . . . :                 1
Total number of members not available  . . :                 0
Total records  . . . . . . . . . . . . . . :             33316
Total deleted records  . . . . . . . . . . :                44
Total of member sizes  . . . . . . . . . . :          35667968

Now, a RGZPFM after the RPG DELETE loop or the SQL DELETE will also get 
rid of deleted records.  But it too requires the same level of access that 
CLRPFM does.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Douglas W. Palme" <dpalme@xxxxxxxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/04/2005 12:43 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG Group" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Deleting all records in a PF






I know that I can use SQL to completely clear a physcial file, and in the 
end I might end up doing just that, but for educational purposes, what 
does 
everyone consider the easiest method of clearing all records using 
strictly 
RPGLE?

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



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.