Program is expecting a file not used in this call

60 pts.
Tags:
CL Program
CPF4101
RPG Program
I have 2 different environments using 2 different library lists. A user takes an option from a menu and a CL program is called with overrides to a database file and then an interactive RPG program is called. The user then exits this program and then goes to the other environment (different libraries) and takes a menu option that calls a CL that does not use the overrides as the previous program and then calls the same RPG program. He then gets error message CPF4101. The program is looking for the other file used in the previous version but it doesn't (and shouldn't) exist in this environment. How do I get the program to get rid of those overrides or whatever is causing my problem? Thanks

Software/Hardware used:
IBM i, RPG and CL

Answer Wiki

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

In your CL program where you do the OVRDBF before your CALL, add DLTOVR commands after the call.

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
  • philpl1jb
    If the user signs off and signs on and runs the second logic without running the first, do they get this error? Phil
    50,425 pointsBadges:
    report
  • TomLiotta
    Is there an authority failure shown? The override shouldn't have anything to do with this unless it's overriding to a different file name (not just the library). If the override includes library name and it's still in effect in the second environment, it should either simply use the overriding file or show an authority failure.   By overriding to a different "name" while using *LIBL as the library, then the "name" possibly wouldn't be found under a different library list.   The total problem should be shown. For example, the OVRDBF command should be included here. If it sets the override to the current activation group, the CL program could be set for ACTGRP(*NEW) and the RPG program could be set for ACTGRP(*CALLER), the override could scope to the activation group. As soon as the CL program ended, the activation group would be reclaimed automatically and the override would disappear.   If we knew the whole problem, an appropriate solution might be found that requires no code changes.   Tom
    125,585 pointsBadges:
    report
  • Sofarsogood
    Phil,  to answer your question.  If the user signs on and runs the second program, he has no problems.  The override is not still hanging out there.  I have gone in to the CL's and changed the override to OVRSCOPE(*ACTGRPDFN) and the delete override to do the same DLTOVR     FILE(GLLCTU) LVL(*ACTGRPDFN).  This seems to have done the trick so thank you to all who took the time to look at my problem with me.
    60 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