× 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.



Sorry, I forgot a step in there.

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

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Some see the problem in every opportunity, some see the opportunity in
every problem."
-- Kevin Cowling


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 a
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
need
to keep the log file format in synch.



I did a CHGPF of the log file with the SRCFILE parameter and
indicated
the source member that was used for the re-compile of the data file.



As far as I can see both files have the same record size, fields,
field
types and field lengths.



Despite this I get a level check when using the CPYF to copy data
from
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 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.