Announcement

Collapse
No announcement yet.

Cpytoimpf

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cpytoimpf

    Remove Blanks w/ CPYTOIMPF RMVBLANK(*BOTH). The blanks remain after the last " . How else could I remove the blanks ?

    CPYTOIMPF FROMFILE(LEANDNA/&TOFILE) +
    TOFILE(QTEMP/&FRMFILE) MBROPT(*ADD) +
    STRDLM(*DBLQUOTE) RMVBLANK(*BOTH) +
    FLDDLM(',')

  • #2
    Your TOFILE likely has fixed-length records, and therefore must always be filled up with blanks at the end of the record.

    Consider outputting to a stream file (IFS file) instead of a TOFILE (physical file) so that you don't have this limitation.

    Comment


    • #3
      Instead of copying to a data base file (TOFILE(QTEMP/&FRMFILE)), you could try copying to a stream file (TOSTMF('/dir/dir/name.txt')).

      Comment

      Working...
      X