Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RMVM and logical files [newbie]

857 views
Skip to first unread message

Tony Green

unread,
Jan 2, 2003, 5:17:16 PM1/2/03
to
Newbie question...

I want to RGZPFM a physical file with five logicals. Many people
advise that the best way to do this is by using RMVM first to remove
the logicals, then running RGZPFM on the physical file, and finally
adding back the logicals with ADDLFM. I think I understand this except
for one thing. RMVM requires a member name (or *ALL), but my logicals
don't seem to have members. Is that normal?

Here's what I would like to run: RMVM FILE(CRPCOMM/F98301LA) MBR(???)
but when I go STRPDM, then Work with Members for that logical, I get
"File type is invalid for the member list."

There's a lot I don't understand, so I'm sure the answer will be
straightforward. I just can't see it. Thanks in advance for helping
explain this to me!

Tony Green

peter

unread,
Jan 2, 2003, 5:28:19 PM1/2/03
to

"Tony Green" <tony...@mindspring.com> schreef in bericht
news:7200e955.03010...@posting.google.com...

Is it not possible to RGZPFM a physical file with logicals attached. I think
OS/400 will take care of rebuilding the logicals after reorganization.

Peter

BigNeonGlitter

unread,
Jan 2, 2003, 6:26:30 PM1/2/03
to
I'm pretty sure you can reorganize a file with logicals attached. As long as
there are no locks on the PF's or LF's, you should be able to reorg the PF.

"peter" <pry...@spamprym.nl> wrote in message
news:av2eck$mif$1...@ncc1701.cistron.net...

Martin Brieger

unread,
Jan 2, 2003, 7:45:21 PM1/2/03
to
Bull,

there isn't anything like that.

Only chance you have is to delete and re-create the logicals.
A RMVM removes the member that contains data from a physical file.
Just read the help!

Do your RGZPFM and fire your colleagues.

"Tony Green" <tony...@mindspring.com> wrote in message
news:7200e955.03010...@posting.google.com...

Tony Green

unread,
Jan 3, 2003, 9:21:21 AM1/3/03
to
Thanks everyone for your replies. It's becoming clearer, but I think
I'm asking the wrong question. :-) I know I can run RGZPFM without
doing anything to the logicals, but supposedly it will reorganize more
quickly. I can just run RGZPFM and all will be fine, I'm sure. The
file is merely big, but not gigantic. But I'm still curious about
logical file "members."

Quoting from the help:

The Remove Member (RMVM) command removes one or more members from the
specified physical or logical file... Removing a logical file member
deletes its access path to the associated data stored in a physical
file member.

...

Required Parameters...

MBR Specifies the name of the physical or logical file member being
removed. A specific or generic member name, or *ALL, can be requested.

(end quote)

So it sounds like I should be able "delete the access path" of a
logical file with RMVM, but I don't know what to enter for the MBR
parameter.

Thanks,
Tony Green

Steven Hinrichs

unread,
Jan 3, 2003, 9:30:19 AM1/3/03
to
Tony,

You don't need to RMVM to do a RGZPFM. The OS/400 will handle logicals for
you. The only reason to remove the members if for speed/performance issues.
If the PF is large with a large number of logicals then sometimes it is
faster to RMVM, then RGZPFM, then ADDLFM the members back in. To find
memeber names on a LF use DSPFD, not PDM.

Steve


"Tony Green" <tony...@mindspring.com> wrote in message
news:7200e955.03010...@posting.google.com...

Charles Wilt

unread,
Jan 3, 2003, 9:52:17 AM1/3/03
to
Tony,

First in answer to your question. The problem is that WRKMBRPDM doesn't
work with logical files. You'll need to use DSPFD to get a list of the
logical file members, or just RMVM FILE(F98301LA) MBR(*ALL).

Secondly, the recommendation for removing the LF members was when dealing
with lots of logicals and/or when there were lots of records. Assuming
you have a relatively new box I would guess that you wouldn't need to be
concerned about it with only 5 logicals unless you have a huge file.

Note: I don't see the recommendation to remove LF members in the current
v5r2 docs.

HTH,
Charles


In article <7200e955.03010...@posting.google.com>,
tony...@mindspring.com says...

Terrence Enger

unread,
Jan 3, 2003, 11:43:25 AM1/3/03
to
Charles Wilt wrote:

> Tony,
>
> First in answer to your question. The problem is that WRKMBRPDM doesn't
> work with logical files. You'll need to use DSPFD to get a list of the
> logical file members, or just RMVM FILE(F98301LA) MBR(*ALL).
>
> Secondly, the recommendation for removing the LF members was when dealing
> with lots of logicals and/or when there were lots of records. Assuming
> you have a relatively new box I would guess that you wouldn't need to be
> concerned about it with only 5 logicals unless you have a huge file.


It is a long time since I did this, but how about CHGLF MAINT(*DLY)
before the reorg (or other big update) and CHGLF MAINT(*IMMED) after. I
think this should give the same performance benefit along with more
meaningful error message if a program tries to use the lf during the reorg.

Any thoughts?

QMAGIC

unread,
Jan 3, 2003, 1:39:31 PM1/3/03
to
> > I want to RGZPFM a physical file with five logicals.

Just to be 100% sure I just tested RGZPFM with logical files attached.
No problem as long as the file and/or logical files are not in use.

As I recall the RGZPFM will run faster it you detach the logical files
run RGZPFM and then put them back. I would say in your case I would
not worry about it unless the RGZPFM command takes way to long.

If you had a good working knowledge of logical files then maybe it
would be worth it. Without that knowledge you're more likely to screw
something up. So let RGZPFM run a little longer and let the system
take care of the logical files.

Dan

Tony Green

unread,
Jan 3, 2003, 4:53:02 PM1/3/03
to
That answers my question. Thanks! Sure enough, the logical has one
member, named the same as the file. Cool. I copied the file I want to
reorg to my library (I had to use FROMRCD(1) and COMPRESS(*NO) to
*preserve* the deleted records so I'd have something to test with) and
submitted a job to reorg it over the weekend. As you point out, it's
probably not worth removing the logicals first. I'll just see how long
it takes. The file is about 350 meg with 1,092,998 deleted records.

Tony Green


Charles Wilt <cw...@nospam.miamiluken.com> wrote in message news:<MPG.187f6da74...@news.easynews.com>...

Sam L.

unread,
Jan 3, 2003, 8:24:51 PM1/3/03
to

"Terrence Enger" <ten...@idirect.com> wrote in message
news:3E15BDAD...@idirect.com...

> It is a long time since I did this, but how about CHGLF
MAINT(*DLY)
> before the reorg (or other big update) and CHGLF MAINT(*IMMED)
after. I
> think this should give the same performance benefit along with
more
> meaningful error message if a program tries to use the lf
during the reorg.
>
> Any thoughts?

I believe this works fine, by as I recall, you get control back
right after the CHGLF MAINT(*IMMED) and the logical are rebuilt
by a system task. This might cause problems with other jobs that
immediately try to use the logical.

Sam

0 new messages