MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

Re: CPF4131



fixed

In your situation, I would:

Create a duplicate object of the current level of the file (plus any logicls
over that file that your process uses) in QTEMP

1. CPYF from the archived file using *MAP *DROP to the file you just
created
2. Make sure that in your library list QTEMP is ahead of the library
where the production version resides
3. When the job ends, QTEMP (and the files you created therein)
automagically dissapear.

This wil keep the level checks from happening in the first place. If your
logicals are named with the same pattern as the physical file, you can do
this before you call the RPG program:


1. CRTDUPOBJ OBJ(file*) FROMLIB(prod_lib) OBJTYPE(*FILE) TOLIB(QTEMP)
DATA(*NO)
2. CPYF FROMFILE(archive_lib/file)TOFILE(QTEMP/file) MBROPT(*REPLACE)
FMTOPT(*MAP *DROP)

assuming that the field names are the same.

On Thu, Jul 3, 2008 at 9:37 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>
wrote:

I'm using a program to generate monthly statistiques going back to 2006.
For each month I go back I restore the files I need from a tape.
As each month goes by, I end up with more files that have been modified
since, and so I have to change them. The trouble is, the job takes ages and
so I don't want to kill it if I can help it.

I could check all the files before running my program with DSPPGMREF but
I'd need to write another program to do that.

Come to think of it, has noone ever done such a utility program ? Check
that all files referenced by a program in a given library list have record
format identifiers that match those referenced in the program ?


-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] De la part de Francis Lapeyre
Envoyé : jeudi 3 juillet 2008 15:09
À : Midrange Systems Technical Discussion
Objet : Re: CPF4131

If the file that got the CPF4131 (level check) error is not a USROPN file,
then the program never did get past the *INIT stage, and most likely didn't
process anything. Kill the job and start over.

If it is a USROPN file, you'll have to look at the code and see what could
possibly have been updated before the file in question was opened.

On Thu, Jul 3, 2008 at 7:10 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>
wrote:

Hi

A program crashes with error CPF4131. After replying C to the message,
then R after having changed my file, I get the error that a program is
trying to open files that are already open.

Is there no way of getting the program to continue ?

Thanks
--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.




--
Francis Lapeyre

Nullum gratuitum prandium.
--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.









Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact