Solved

files with deleted records - flag ?

Posted on 2007-03-20
4
495 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

Suggested Solutions

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

736 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