You can use the Change Physical File (CHGPF) command to change
the coded character set identifier (CCSID) of a physical file. However, the
physical file cannot be changed under certain conditions.
A physical file cannot be changed if one or more of the following
conditions exist when working with a logical file defined over a physical
file:
- The logical file has a sort sequence table associated with the CCSID of
the physical file and the CCSID you want to change to is incompatible. That
is, conversion between the original CCSID and the CCSID you want to change
to is not allowed because all the characters of the original CCSID are not
in the new CCSID.
- The logical file has a sort sequence table associated with the CCSID of
the physical file and the CCSID you want to change to is incompatible. Additionally,
the logical file has fields defined with CCSIDs that are not compatible to
the new CCSID you want to change the physical file to. Again, conversion between
the original CCSID and the CCSID you want to change to is not allowed because
all the characters of the original CCSID of the logical file or the fields
with specific CCSIDs are not in the new CCSID.
- A select/omit or join logical file, or both that performs select/omits
or joins between physical file fields that have different CCSIDs.
- A join logical file with a sort sequence table such that the CCSID of
the logical file's secondary access path is different than the CCSID to which
the physical file is being changed.