Home > AS/400 Tips > iSeries administrator tips > Get rid of deleted records and improve performance - Part 2
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

Get rid of deleted records and improve performance - Part 2


John Kohan
10.24.2000
Rating: -4.02- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


After reviewing the responses I received from my last tip Get rid of deleted records and improve performance) I thought it would be helpful to share these comments with you.

The biggest point people brought up was that some programs access files via RRN (Relative Record Number), and reorganizing one of these files will cause these programs to retrieve the wrong data. This should be evaluated before you remove deleted records. If your programs do, in fact, access the data via RRN, then you will need to evaluate what the impact on those programs would be to see if there are alternatives.

An alternative idea to RGZPFM is to copy (CPYF) the data to a holding file and then back to the original file. When you copy a file (CPYF), deleted records are not copied, thus removing them.

CPYF will remove deleted records, and by writing a simple CL program you can achieve the same results. Many AS400 shops use this method and achieve the desired results.

One other issue someone brought up was that when dealing with files that have more then one member, RGZPFM will reorganize the first member by default. If you are dealing with such a file, you will need to enter the member name in the command.

Another option to reclaim deleted records is to set the physical file attribute to use deleted records. You can set this attribute on live data by entering CHGPF (MYLIB/MYFILE) REUSEDLT(*YES). By doing this, when new records are added to the file, they will replace deleted records. If you use this method, arrival order becomes meaningless for a file that reuses deleted record space. Records might not be added at the end of the file.

As with any tip, recommendation or suggestion you receive, always take the time to understand the impact it will have and how it will affect the environment you are in. No one solution will ever work for everyone, but many people -- like me -- enjoy the opportunity to share their experiences with others.

One of the traits I admire the most about AS/400 programmers and administrators is the conviction they have with this machine. They know what works in their shops, and they know what does not. They always speak their minds openly and honestly. I welcome all the responses I receive and look forward to many more.

One last thing: Remember to delete the FILE you created with the DSPFD command. Once you are done, it just takes up DASD.

---------------------------------------

Kohan is a senior programmer analyst for a software development company. He has worked with the AS/400 since 1990 and has learned how to use the platform to solve business problems. He is also an adjunct instructor, teaching AS/400 classes at his local state college.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Performance
Will overloaded discs impact iSeries performance?
Extend storage capacity on an IBM i without negatively effecting system performance
Database drivers on the i: MySQL vs. IBM Toolbox
Performance tuning for IBM i: The basics and beyond
IBM releases new Power products for the midrange
Top System i admin tips for 2006
Catholic Charities keeps track of homeless with iSeries
i5 error messages: What you need to know
IBM races for clock speed
System shutting down after cleanup

iSeries administrator tips
Analyze the health of your IBM i server with iScore
Researching high availability for your System i shop
Translating Linux for IBM i admins: Using GUI to make it easy
Translating Linux for IBM i admins: Working with jobs and networking
OpenOffice: What to know before making the transition from Microsoft Office
OpenOffice: An enterprise open source solution
Database performance comparisons on IBM i
Translating Linux for IBM i admins: User profile commands
Modern System i reports using Client Access
Tips for installing Lotus Domino server on a System i partition

iSeries system performance and monitoring
Analyze the health of your IBM i server with iScore
Translating Linux for IBM i admins: Working with jobs and networking
Database performance comparisons on IBM i
How to: Monitoring job activity on the AS/400
Performance tuning for IBM i: The basics and beyond
How to: Reduce the percentage of ASP used on the AS/400
Detecting system changes made by outside IP address
AS/400 system values quiz
Checking on System i disk space requires creating a new command: XRTVSYSSTS
Drive space management commands

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
CIW  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts