Getting the number of deleted records from Physical file

770 pts.
Tags:
AS/400
AS400 physical file
DSPFD
Physical File
My requiremnt is to get the number of deleted records from a physical file. This will clear more.When we give DSPFD File name, at bottom we can see the number of records deleted from the so how to pull that field which consist of the value of number of deleted records

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use the DSPFD command with TYPE(*MBRLIST) OUTPUT(*OUTFILE)
Then you can use SQL, Query, or a program to get the information

Discuss This Question: 10  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ankit2002
    @Charlie:Please explain more abt the SQ query.. Thanks andk Regards
    770 pointsBadges:
    report
  • philpl1jb
    Charlie Brown suggested using the DSPFD command to create an outfile. Then use whatever tool you are conforatable with to view / report on the file tht you created. One of the fields will have the text 'Deleted Records' Phil
    50,505 pointsBadges:
    report
  • CharlieBrowne
    As Philp explained with what I suggested, you have a new file that contains the deleted record counts. You can use the file in what ever way you desire. If you still need assistance, you will have to give us more information as to what you are trying to do.
    41,380 pointsBadges:
    report
  • TomLiotta
    For a specific file, simplest might simply be to use the RTVMBRD command in a CL module:
    RTVMBRD FILE(MYLIB/MYFILE)   +
            NBRDLTRCD(&NBRDLTRCD)
    Declare the receiver variable as *DEC (10 0). If it's for many files, such as all files in a library, simplest is probably CharlieBrowne's suggestion. As for explaining queries, first you should describe your programming background and also give some context on the need for handling the number of deleted records. There can be risks in giving programming advice without knowing how it will be used. If there isn't enough background knowledge, programming can mess up a system fast. Tom
    125,585 pointsBadges:
    report
  • ankit2002
    Thanks to all .... this info is really helpful... u guys are simply genius in AS400...
    770 pointsBadges:
    report
  • TomLiotta
    Be aware that if this programming is intended to automate RGZPFM to reorganize files with deleted records, it may be very risky. It's possible that such a program should not be run. Without being familiar with the system and with each file, there is no way to know. Tom
    125,585 pointsBadges:
    report
  • Yorkshireman
    In the 'use with caution' category you may wish to read about 'Re-use deleted records' as a file attribute.
    5,580 pointsBadges:
    report
  • Kaisersosa
    You could use the qusrmbrd api to retrieve this information. Format xxxx0200 I believe. John
    275 pointsBadges:
    report
  • ankit2002
    [...] 3. Join the discussion on getting the number of deleted records from a physical file. [...]
    0 pointsBadges:
    report
  • Vkumarmoorthy
    Via Query definition i am creating a PFand the using the PF i am deleting some records after that if i use DSPFD or RTVMBRD  , the Total no of Deleted records as '0' , but in the log i can see some records are deleted, I dont know why it is not showing the no of deleted records ?
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following