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

Retaining trailing blanks of a record

I am using the CPYTOIMPF command to create a file in our IFS on our iSeries V5R2. Everything appears to go well EXCEPT that the trailing blanks of a record are truncated. Our end user needs this file to be a fixed format and fixed length, so those trailing blanks are needed. The following is how I?m currently using the command:

CPYTOIMPF FROMFILE(ORDTEST) TOSTMF('/testdir/ordtest.txt') STMFCODPAG(*STDASCII) RCDDLM(*CRLF) DTAFMT(*FIXED) STRDLM(*NONE) FLDDLM('').

The FLDDLM value is two apostrophes with no blank in between. The result is that the CRLF chars are right up against the last non-blank character of the data. Any ideas on how I can retain the trailing blanks?


You should not have a field delimiter when attempting to copy to a fixed length field.

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

The Best Web Links: tips, tutorials and more.

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

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


This was last published in December 2003

Dig Deeper on RPG iSeries programming

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