×
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.
On 17 Dec 2012 16:13, Keith McCully wrote:
Actually, I tried CPYF *MAP first of all. Got a message complaining
that the number of fields didn't match between the files.
Does CPYF *MAP only work if ALL fields in the TO file get populated
from the FROM file? I believe it's okay to have additional fields in
FROM file that are not in the TO file but those could be removed
using the *DROP option.
The CPYF FMTOPT(*MAP) does indeed require that all fields in the
TOFILE exist in the FROMFILE. The CPYF FMTOPT(*NONE) does too, but also
requires the formats are effectively identical [see parameter help text
for the special value *NONE] such that no "mapping" is required between
the fields of the same name.
To effect both mapping *and* ignoring any /extra/ fields in the
FROMFILE [into which no field exists for the data to be mapped], include
the *DROP special value along with the *MAP special value on the Format
Option (FMTOPT) parameter [which allows multiple, compatible, element
specifications]; i.e. use:
CPYF FMTOPT(*MAP *DROP)
Unfortunately [in v5r3 anyhow] the CPF2965 does not allude to the
above combination of special values as an additional possibility for
recovery; i.e. suggesting only that recovery would be possible
specifying either "FMTOPT(*DROP) or FMTOPT(*NOCHK)" :-(
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.