RATE THIS ANSWER
0
Click to Vote:
0
0
We recently got this suggestion from a reader:
"You could try explicitly specifying: RCDDLM(*CRLF)
in your CpyToImpF command. It works for me we're running OS/400 V5R2."
-- Michelle
=====================================================
If the field being transferred is a CHAR field, then trailing spaces is correct and they should not be truncated. If the field is VARCHAR, then the trailing spaces shouldn't exist to be truncated.
If the field is CHAR and you want to
convert it to VARCHAR, then you need to tell the system that that's what you want to do. One good way of doing that is with SQL DDL, since that's the language designed to communicate data formatting info to the database.
Create a VIEW that does the conversion and use the VIEW for input to CPYTOIMPF:
CREATE VIEW mylib/myview
(VCol1) AS
SELECT varchar(trim(CharCol1)) as VCol1
FROM mylib/mytable
That view converts column CharCol1 from the base table into VCol1 in the view. You can use iSeries Navigator or RUNSQLSTM to execute SQL if you don't have interactive SQL available.
Tom
Last Answered:
Nov 1 2009 9:19 AM GMT by TomLiotta 
8025 pts.