|
CPYF lib/DATAFILE lib/NEWLOG CRTFILE(*YES) TOMBR(some_unique_value)CHGPF lib/newlog MAXMBRS(some_value)
CPYF lib/OLDLOG lib/NEWLOG FROMMBR(*ALL) TOMBR(*FROMMBR) FMTOPT(*MAP)
RNMOBJ lib/OLDLOG *FILE SAVEME
RNMOBJ lib/NEWLOG *FILE OLDLOG
Where you went wrong was in changing the two files independently. The
system uses timestamp to generate the format level ID, and the
timestamps of
the two files cannot match. It doesn't matter that the format names,
field
names etc. are the same since those don't generate the format level ID.
To correct this, create a new log file and repopulate it. Then
eliminate
the old (save it first). Here's one way:
CPYF lib/DATAFILE lib/NEWLOG CRTFILE(*YES) TOMBR(some_unique_value)
CPYF lib/OLDLOG lib/NEWLOG FROMMBR(*ALL) TOMBR(*FROMMBR) FMTOPT(*MAP)
RNMOBJ lib/OLDLOG *FILE SAVEME
RNMOBJ lib/NEWLOG *FILE OLDLOG
Or thereabouts.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"The direct use of force is such a poor solution to any problem, it is
generally employed only by small children and large nations."
-- David Friedman
I started out with one data file and a log-file that was created as aneed
copy of same file (CRTDUPOBJ). The log file has then been changed to
allow multiple members.
Now when new fields had to be added to the data file we also had a
to keep the log file format in synch.indicated
I did a CHGPF of the log file with the SRCFILE parameter and
the source member that was used for the re-compile of the data file.field
As far as I can see both files have the same record size, fields,
types and field lengths.from
Despite this I get a level check when using the CPYF to copy data
one file to the other.
Where did I go wrong - OR is the only safe way to reformat files the
old trusted way of recompile and manual copying of the data?
As an Amazon Associate we earn from qualifying purchases.
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.