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



Hi David

I'm not sure what truncate does but on the AS400 you can do the following:

CLRPFM <library/filename> - This will clear the data in the file & relative
record number should start from zero.

If it doesn't a good tidy up that should happen periodically is 

RGZPFM = Reorganise physical file - this clears a file of any records
flagged as deleted.

Good luck 
S

-----Original Message-----
From: David Morris [mailto:David.Morris@xxxxxxxxxxxxx] 
Sent: 04 November 2003 17:04
To: java400-l@xxxxxxxxxxxx
Subject: Re: Truncating a table

Delete should not be too big of a concern but you can minimize deleted
records by setting the table to reuse deleted records:

chgpf file(yourtable) reusedlt(*yes)

>>> GiriGopal@xxxxxxxxxx 11/4/2003 8:25:39 AM >>>
 Hello:

I am using sql to insert records to an AS/400 table. But before I
insert I
want to truncate the table. I get error message stating that I cannot
truncate a table. So I am using Delete. This works but this does a
soft
delete only. The relative record number does not start with zero after
the
delete. Is there
any option in DB2 SQL  similar to truncate in Oracle.


Thanks
GG

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


---------------------------------------------------------------------------------------------
Registered Office:
Siemens Financial Services Limited (Tel: 020-8422 7101)
160 Northolt Rd, Harrow, Middlesex (Fax: 020-8422 4402)
HA2 0PG 
Registered No: 646166, England
Web:www.siemensfinancialservices.co.uk
---------------------------------------------------------------------------------------------

***************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
***************************************************


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.