You don't understand how to monitor for errors with a CLRPFM command?
Seriously?
Well, it's not hard.
Use the MONMSG command in CL and then monitor for the specific, or even
generic (CPF0000) errors that the command can generate.
If it is in error, by using MONMSG you will keep your program from abending
and then you can control what happens to allow you to exit gracefully out of
that step.
If you look at the online CL programmer's guide on the IBM website (don't
have that link handy but Google it) then you will find a whole section in
that book on how to monitor for CL command errors.
HTH
Shannon O'Donnell
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Thursday, March 25, 2010 10:49 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: CPYF
I think I'd have monitored for file in use, file empty, etc... on that
CLRPFM if I was doing that.
Really? How does one monitor for file empty on a CLRPFM? Just curious.
Now that I understand the question, I tend also to use the MBROPT(*REPLACE)
variety since it's a tad clearer, and does the whole thing in one shot... so
one place to monitor, one point of failure, et cetera. But it's not an
absolute. For example, if there will be a series of cumulative *ADD, I will
clear first, as in:
CLRPFM MYFILE
CPYF A MYFILE MBROPT(*ADD)
CPYF B MYFILE MBROPT(*ADD)
Et cetera. This is so that the result is consistent and so that removal of
any of the CPYF will not cause disaster to the net effect.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"A true friend is the most precious of all possessions and the one we take
the least thought about acquiring."
-- La Rochefoucauld
As an Amazon Associate we earn from qualifying purchases.