AS/400 – Physical File in update mode

310 pts.
Tags:
AS/400 administration
CHAIN
Physical File
hi all, i have a physical file i need to update that file (not append) ,I opened that file in update mode eg F MYFILE UF E K DISK (i didn't mention 'A' because i dont need to append records) now after certain checks i update (any field) with syntex. UPDATE RECORD FORMAT but when i run this a dump occurs like '' update without prior I/O operation." Please tell me where i am wrong Thanks & regards Ambrish Srivastava

Answer Wiki

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

For updating one file . first of all we need to lock that particular record . For that better you can use chain operation to lock. i think it will work

Discuss This Question: 3  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
  • Gilly400
    Hi, Before updating a record you will need to read or chain that record to position the file pointer in the program to the correct record in your file. You can use READ, READE, READP, REDPE/READPE, or CHAIN. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • philpl1jb
    And it's one update per acquisition of the record The chain, read, reade, readp, readpe lock the record The update unlocks the record So if your code goes: Chain CheckFld1 Update CheckFld2 Update The second update would fail whenever the record was updated and unlocked in the first instance. Phil
    50,505 pointsBadges:
    report
  • CodeMonkey65708
    Question - are any of the fields you are updating part of the key?
    10 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