Hello Midrange iSeries community.

I am having a problem that is kind of silly.

We build a database file in a batch process every night and we use the
CPYTOIMPF to create a CSV file in the IFS.
after that we FTP the file to a remote system that requires the CSV format

The problem is that the CSV file created by the CPYTOIMPF file does not
remove
the trailing blanks.

I have researched the archives and came across the following.

http://archive.midrange.com/midrange-l/200005/msg00646.html

Somehow I am experiencing the same problem

I am currently at V5R1 and I wonder if anyone has been able to
figure how to achieve a CSV file that removes the trailing blanks

Additionally if you use the Client Express function to create a CSV
file you will see that there are not trailing blanks.

Pretty nice. !

Is there anyway to resolve this problem using the CPYTOIMPF command ?

Here is the example using the CPYTOIMPF command

CPYTOIMPF  FROMFILE(&ProdLib/&PhyFile) +
             TOSTMF('/TMP/EXPOR1.CSV') +
             MBROPT(*REPLACE) STMFCODPAG(*PCASCII)
             RCDDLM(*CRLF)

Field 1  Field 2
-------  --------------
ABC      Descriptor ABC
HD       Descriptor HD

The CSV file in the IFS looks something like this

"ABC","Descriptor ABC"
"HD ","Descriptor HD "

As you can see the trailing blanks remain !


Your advice and help will be greatly appreciated


Jorge Moreno
Systems Analyst
Overseas Military Car Sales
Woodbury, New York







This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.