Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > Is the CPYTOIMPF command the best option?
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Is the CPYTOIMPF command the best option?

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 20 May 2005
I'm using the CPYTOIMPF command, taking a physical file from the iSeries and putting it to the IFS as a .csv (for FTPing). The problem I'm having is that some of the fields have varying length data, and I'm getting the .csv fields with spaces. Is there a parameter on the CPYTOIMPF command that will trim the fields prior to creating each comma delimited field, or something that I can do in the RPG program when creating the physical file? Or do I have to create the PF as a flat file, trimming out the spaces prior to using the CPYTOIMPF?

>
The CPYTOIMPF command is not particularly good! There is a better command, CRTCSVF (Create CSV file), which is freeware and available here. I use this command myself, and it does exactly what you want. If you have problems getting to the site or getting the source onto your machine, I can send you the sources as e-mail attachments.

Uzaemon's site has a number of extremely good iSeries utilities, and I am soon going to have collected the set for my own Utility Library -– he/she is a great programmer, if a little untidy, and has some truly useful utilities that I have not seen for free anywhere else.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Listing contents of multiple FTP directories on AS/400
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
iSeries application display subfiles with other program windows
Searching part of a name or address in AS/400
Passing parameters in an ILE RPG module
What's happening to my subfile?
What happening to my subfile?

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2010, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts