× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks .. I do have some CLs to remove lfs, triggers, constraints,
journals... but was wondering if there is a faster way with CLRLIB or
something like that.. sounds like I have to develop my own CLRLIB

On Tue, Sep 25, 2018 at 8:02 AM Jim Oberholtzer <midrangel@xxxxxxxxxxxxxxxxx>
wrote:

It takes time because you are making the system figure out how to remove
those objects when you could help it with a CL to remove
constraints/triggers, stop journaling, remove dependent files, then
physical
files in that order and stop making the system figure it out.

It's a database machine. IBM i is going out of its way not to clobber
something that it should not. Oh, at the same time you are updating quite
a
number of data management objects in QSYS2, and other libraries like that
intended to give you all the goodness of IBM i. So it will take some time
to clear a larger library.

Joe is right, get rid of the objects that need to be removed first then the
rest. Or if you don't wish to write the 30 line CLP, let the system do it
on its own in about 60 minutes.

Of course alternatively you could just restore the new objects over top of
the old, removing only the tables that have changed, and adding new ones.
You should still remove the triggers/constraints to the restore and re-add
them.

Take the time to understand what's really happening and then you can
streamline it.


--
Jim Oberholtzer
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Mohammad Tanveer
Sent: Tuesday, September 25, 2018 7:38 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Is there a faster way to clear a library

Yes it looks like CLRLIB is doing some of the task (triggers, constraints
etc)... but why it takes so much time ?

Its more like rebuilding a libary from a backup of another system.

1. System A --> library TSTDTALIB --> Developers can add/remove objects
in it during development/testing..

on a periodic basis... we have to reset the TSTDTALIB on SYSTEM A from a
backup of another system.

2. System B --> libary PRDDTALIB --> Need to restore on System A without
keeping anything on SYSTEM A in TSTDTALIB.





On Tue, Sep 25, 2018 at 7:32 AM Jim Oberholtzer
<midrangel@xxxxxxxxxxxxxxxxx>
wrote:

First question is why clear it when it would take quite some time to
rebuild?

Consider clearing physical files and leaving the objects behind since
you more than likely rebuild it anyway?

Are there constraints/triggers to delete first causing the system to
work really hard to get rid of objects? Do it with a CL instead.

Consider deleting all the dependent files before trying to delete the
physical files. Like:

For each physical in the library:


DSPDBR FILE(&PLIB/&PFILE) OUTPUT(*OUTFILE) +

OUTFILE(QTEMP/QADSPDBR) OUTMBR(*FIRST *replace)

MONMSG MSGID(CPF3012)

OVRDBF FILE(QADSPDBR) TOFILE(QTEMP/QADSPDBR)

READ: RCVF

MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(DLTPF))

DLTF FILE(&WHRELI/&WHREFI) /* Dependent files */

GOTO READ

DLTPF:

DLTF &PLIB/&PFILE


This code works really fast on most physical tables.


--
Jim Oberholtzer
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Mohammad Tanveer
Sent: Tuesday, September 25, 2018 7:21 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Is there a faster way to clear a library

It takes an hour or so to clear the library with around 900+ objects
mostly data files and LFs.. we are looking to do it quickly..

Regards
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
http://amzn.to/2dEadiD

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.