Solved

files with deleted records - flag ?

Posted on 2007-03-20
4
497 Views
Last Modified: 2007-12-19
Exists there a flag (or somthing else) to  identify files with  deleted records ?
DSPRFD with (*MBR) is little bit too expensive . . .
0
Comment
Question by:asdf13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Assisted Solution

by:daveslater
daveslater earned 60 total points
ID: 18755467
Hi
you can use the RTVMBRD with the NBRDLTRCD parm

Dave
0
 
LVL 27

Accepted Solution

by:
tliotta earned 65 total points
ID: 18758627
asdf13:

I'm not sure why DSPFD *MBR to an *OUTFILE would be too expensive, but the various file APIs are the general alternative.

1. Create a list of the files you want to check.
2. For each file:
3. Call QUSLMBR to list the files members in a user space.
4.    For each member:
5.     Call QUSRMBRD with format MBRD0200
6.     Check number of deleted records in positions 145-148 for a zero/non-zero 32-bit binary number.

If you only want to check a single file, you don't need to create a list of files. And if the file only has a single member, you don't have to create a list of members.

In fact, if it's a single file with a single member, you can retrieve the value directly with QUSRMBRD. The API essentially does just the same as the RTVMBRD command that Dave suggested.

The QUSLOBJ API can be used to create a list of *FILE objects. If the list cannot be filtered to a small enough number to fit in a user space, the QGYOLOBJ API can supply the list dynamically.

Please elaborate on why DSPFD *MBR is too expensive. There might be ways to use it that can help.

Tom
0
 

Author Comment

by:asdf13
ID: 18765439
Hello,
thanks for recommendation.
My intention was,  to save systemresources (performance).
Big libraries, with many files   and up to 32.000 members, takes a lot of processing time with DSPFD or RTVMBRD.  ("too expensive . . . ")
Now i  got the information, that  in former releases (<V5), a "inofficial" API  delivered the flag "contains deleted records". But this API doesn't exits yet.
 
0
 
LVL 27

Expert Comment

by:tliotta
ID: 18766223
asdf13:

Ouch.

So many members... some ERP or similar app creating them?

Unusual elements get involved when member counts start to grow. One example is that authorities get stored with _each_ member. This is because members are actually objects themselves although we don't program for that -- we program as if the *FILE is the object. You can see this in action when you do something like CHGOBJAUT for a *FILE with many members; it can take a long time for the command to complete as each member gets touched behind the scenes.

That kind of overhead can drain a system (as you probably experience at times). Elimination of excess members can really pay off.

Good luck.

Tom
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Learn why we support net neutrality and why the topic is important to all internet users.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question