Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using the CPYTOIMPF command to create a output file

When FTP'ing a file from the iSeries to a Solaris box, the recipient wants the file in tab delimited format rather than fixed width. Do you know of a way to change this? I am using standard FTP command with OVRDBF FILE (INPUT) TOFILE(library/QCLSRC) MBR(filename1) .


Using the CPYTOIMPF command, you can create your output file with a variety of delimiters. I have generally found it easier to work with a concrete delimiter such as a comma rather than tab delimited because my experience has been that the phrase "tab delimited" is sometimes open for interpretation, especially when iSeries and UNIX people are communicating with each other.

   
Ex: 
CPYTOIMPF FROMFILE(FTPFILE) TOFILE(MYLIB/TEST) MBROPT(*REPLACE) STRDLM(*NO
NE) FLDDLM(',')       
Or you can specify a delimiter by it's hexadecimal value like this:
CPYTOIMPF FROMFILE(FTPFILE) TOFILE(MYLIB/TEST) MBROPT(*REPLACE) STRDLM(*NON
E) FLDDLM(X'A0')      

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

The Best Web Links: tips, tutorials and more.

Ask your OS/400 questions--or help out your peers by answering them--in our live OS/400 discussion forums.


This was last published in November 2001

Dig Deeper on Upgrading

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close