× 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.



Ken, 

I read this in digest so you've probably already received some responses
about using CPYTOIMPF.  If it would help (and if you are V5R1+) I have a
CPYFTOCSV command utility in my free library.  It gives you several
options for creating .csv files and does trim each of the fields so you
don't get the extra blanks.  Check out the doc here:

http://www.rpgnext.com/docs/additional.php#CPYFTOCSV

Visit the download center at my website http://www.rpgnext.com to
download the library.

HTH,

Joel
http://www.rpgnext.com


On Wed, 2003-08-13 at 19:11, midrange-l-request@xxxxxxxxxxxx wrote:
> message: 8
> date: Wed, 13 Aug 2003 16:10:38 -0700
> from: Ken.Slaugh@xxxxxxxxxx
> subject: CPYTOIMPF and CSV Format
> 
> 
> Anyone know how to get the CPYTOIMPF command to output CSV? Here's the
> command I ran...
> 
>  ===> CPYTOIMPF FROMFILE(DSPERS SQPERS) TOSTMF('/home/cmi/tulare/SQPERS')
> STMFCODPAG(*STDASCII) RCDDLM(*CRLF)
> 
> This is the first record in the file.
> 
> " ",8832       ,"BAN               ","TERRA       ","INC         ","   ",0
> ,0       ,"          ","           ","         ","               ","
> ","               ","               ","               ","
> ","                    ","                  ","  ","          ",0    ,0
> ,"   "," "," "," "," ","  ",0   ,0    ,0    ,"   ","   ",0          ,"
> ","                              ",0    ,0        ,.00      ,"  ","  ","
> ","               ","  ",0   ,0   ," ","     "," ","            ",.00
> ,"  ",0   ,0   ,0   ,0   ,0    ,"CLW       ","          ",19  ,980508  ,"
> "," "," "," ","                              ","                    ","
> ","                  ","  ",0
> 
> As you can see the record contains LOTS OF SPACES. Can they be eliminated
> somehow to results in:
> 
> "",8832,"BAN","TERRA","INC","",0,0,"","","","","","","","","","","","","",0,0,"","","","","","",0,0,0,"","",0,"","",0,0,.00,"","","","","",0,0,"","","","",.00,"",0,0,0,0,0,"CLW","",19,980508,"","","","","","","","","",0
> 
> I have tried STMFCODPAG(*PCASCII) and STMFCODPAG(1252)  as well without
> success.
> 
> TIA,
> 
> Ken Slaugh (707) 795-1512 x118
> Chouinard & Myhre, Inc.
> CA/400 Certified Specialist
> iSeries Network/MSE Administrator
> http://www.cm-inc.com/
> 



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.