CVTPCKFLD CONVERT PACKED FIELD TAADBII
The Convert Packed Field command converts a data base file containing
packed or binary fields to a data base with zoned decimal fields.
All character fields remain the same. The data from the original
file is then copied using CPYF FMTOPT(*MAP). The new file becomes a
permanent file on your system and can be used for converting from or
to packed fields. This can be helpful when dealing with PCs.
A typical command would be:
CVTPCKFLD FROMFILE(ABC) TOFILE(xxx/ABC2)
The To file must not exist. If the To file already exists from a
previous use of CVTPCKFLD, then you should use CPYF FMTOPT(*MAP)
The To file becomes a permanent file on your system which may be used
to convert either from packed/binary to zoned or from zoned to
packed/binary. Use CPYF with FMTOPT(*MAP) for each conversion.
It is not a requirement that the DDS source exist for the FROMFILE
file. The TAA Tool RTVPFSRC is used to simulate what the DDS source
for the FROMFILE is. The simulated source is copied to a temporary
source file in QTEMP. The temporary source is changed so any packed
or binary fields are changed to zoned decimal fields. The new
physical file is created from the temporary source and CPYF
FMTOPT(*MAP) is used to map to the new file.
If you want to retain the source for the new file, use CPYSRCF after
CVTPCKFLD. The DDS source is in TAATMPSRC in QTEMP and the member
name is the same name as the FROMFILE.
The named member must exist in the From file to use CVTPCKFLD. If
the member does not have any records, CVTPCKFLD creates the new file
and ends normally with a special completion message.
Command parameters *CMD
FROMFILE The qualified file name of the file to be copied
from. The library value defaults to *LIBL. *CURLIB
may also be used.
TOFILE The file to be created and copied to. The file must
not exist. If the file already exists from a
previous use of CVTPCKFLD, then you should use CPYF
A library must be specified for the file or the
special value *CURLIB.
FROMMBR The member to be copied from. The default is *FIRST
for the first member of the file.
Only a single member is supported. If you have a
multiple member file, you can copy additional
members or all members with CPYF FMTOPT(*MAP) after
The To file must not exist.
The RTVPFSRC tool used to simulate the source of the From file has
Only a single member can be copied with CVTPCKFLD.
The following TAA Tools must be on your system:
CHKOBJ2 Check object 2
EDTVAR Edit variable
RTVPFSRC Retrieve PF source
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
None, the tool is ready to use.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CVTPCKFLD *CMD TAADBII QATTCMD
TAADBIIC *PGM CLP TAADBIIC QATTCL
TAADBIIR *PGM RPG TAADBIIR QATTRPG
Added to TAA Productivity tools August 1, 1997