Moving objects from the new library to the "normal" library will not cause MCH3402.
Deleting which is still in use will cause a MCH3402.
Paul
-----Original Message-----
From: Paul Nicolay <paul.nicolay@xxxxxxxxxx>
Sent: Thursday, June 25, 2020 11:30 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>
Subject: Re: MCH3402 Can it be avoided ?
HI Paul,
I know this technique but at a certain point you still need to move the objects from the new library to the "normal" library which can again cause a MCH3402 (unless you can do this in downtime). In addition, this only allows "one" replace per timeframe you clean the "new" library.
It looks like Mark's API QLIRNMO is the solution.
Kind regards,
Paul
________________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Steinmetz, Paul via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>
Sent: Thursday, June 25, 2020 17:20
To: RPG programming on IBM i
Cc: Steinmetz, Paul
Subject: RE: MCH3402 Can it be avoided ?
Create a New and an Old library.
The New library should be in front of the normal library in the library lists.
The Old library should not be in the library list.
Move the new object to the new library.
Move the current object to the old library.
Paul
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Paul Nicolay
Sent: Thursday, June 25, 2020 11:10 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: MCH3402 Can it be avoided ?
Hi,
When replacing an object with another version you can get users dumping with MCH3402... the famous "Tried to refer to all or part of an object that no longer exists."
The only method to avoid this seems to be recompiling the source with REPLACE(*YES) which causes the system to create a copy of the existing program in QRPLOBJ. A simple WRKOBJPDM option 3 or 11, which also requests to replace the object, doesn't seem to create such a copy.
Personally I don't like the idea of recompiling (for various reasons), neither do auditors which often state that compilers and sources don't belong on a production system.
So how can this be avoided, how are you installing new programs/emergency fixes in environments with close to zero downtime ?
Kind regards,
Paul
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.