File read with RRN

25 pts.
Tags:
AS/400
Logical Files
RRN
I want to delete record from one logical file and delete from another logical file based on RRN. Both logical files are from same physical file. How to achieve this?


Software/Hardware used:
as400, db2
1

Answer Wiki

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

Logical files do not contain data. They only contain the access path information for the file. How are you getting the RRN number in question? How do you plan on deleting this record, DFU SQL or via a program ? If the PF is not keyed then you could delete by using DFU and the RRN. 

Discuss This Question: 4  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.
  • pdraebel
    RRN or relative record number is related to the Physical file. It could be that you read a logical file, encounter a record to be deleted. Now you can issue a delete directly to the logical, or determine via the File Information Data Structure (of the logical) the RRN of the physical record. Chain with RRN to Physical and delete via the Physical file.
    7,545 pointsBadges:
    report
  • prdevghare
    yes. you are right. there are two pfs with same structure and one logical against each. What I need to do is, delete record from one pf and then put same record into other pf, but rrn of both should remain same. This is my requirement that when i delete record from one file and transfer same record in other file, rrn in both files for that record must be same. How to achieve this using program? 
    25 pointsBadges:
    report
  • TheRealRaven
    "...and then put same record into other pf, but rrn of both should remain same."

    You won't be able to do that reliably nor is it a good idea to try to do it. There should be no reason that the RRN makes any difference in a relational database.
    35,620 pointsBadges:
    report
  • philpl1jb

    Are you trying to fix a one-time problem or design a new process?

    This just doesn't sound like a good design.

    54,090 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.

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

Following

Share this item with your network: