Difference between two OVRDBF approaches

1215 pts.
Tags:
AS/400
OPNQRYF
What is the difference between the below two approaches? 

OVRDBF FILE(FILE1) SHARE(*YES) SEQONLY(*YES) OPNQRYF (SOME CONDITION) CALL PGM1 DLTOVR FILE(FILE1) CLOF OPNID(FILE1) 

OVRDBF FILE(FILE1) SHARE(*YES) SEQONLY(*YES) OPNQRYF (SOME CONDITION) CALL PGM1 CLOF OPNID(FILE1) DLTOVR FILE(FILE1)

Answer Wiki

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

Discuss This Question: 7  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
  • TomLiotta
    The first example deletes the override before closing the file. The second does it after. It's not clear what the question is asking. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    I'm not aware of a preference between the order of these two commands.
    50,860 pointsBadges:
    report
  • TomLiotta
    The result might be unexpected under some circumstances, but there's no indication of what the point of the question is. It can be tested simply by running the code. -- Tom
    125,585 pointsBadges:
    report
  • rajeshece
    OVRDBF FILE(FILE1) SHARE(*YES) SEQONLY(*YES) OPNQRYF (SOME CONDITION) CALL PGM1 DLTOVR FILE(FILE1) CLOF OPNID(FILE1) – I have used this method and Coded the program. Error Message “CPF5149 will be occurred when the File is opened with Shared Access Path (*YES)” is logged in Error Message File after executing the program. what is the cause of this issue? the above method?
    1,215 pointsBadges:
    report
  • TomLiotta
    What is "Error Message File"? What is the message ID of any error message that is logged in your job? We need to know the message IDs before we can tell anything, or we need to have your complete programs and all file definitions. . Please explain more about your problem. . Tom
    125,585 pointsBadges:
    report
  • MDratwa
    Use "WRKMSGD MSGID(CPF5149) " and it will explain the problem. If your "PGM1" is reading the file by key, then you need to add a keyfld parm to the opnqryf.
    785 pointsBadges:
    report
  • TomLiotta
    Use “WRKMSGD MSGID(CPF5149) ” and it will explain the problem.
    .
    Maybe it will, but rajeshece didn't say that that message was sent. So far, all we know is that there was some indication that the message will be sent under some future condition. That doesn't make much sense, but that's what has been told to us so far. We don't know if it will be sent or not.
    .
    Tom
    125,585 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