ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CPYTOIMPF (The numeric fields are not left padding with zeroes)

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

  • CPYTOIMPF (The numeric fields are not left padding with zeroes)

    I tried to convert a DDS file to a plain file using the CPYTOIMPF command, but the numeric fields are not paded with zeros even though I am using the parameter NUMFLDPAD(*ZERO):
    Example:
    CPYTOIMPF FROMFILE(MYLIB/MYFROMFILE) TOFILE(MYLIB/MYTOFILE)
    MBROPT(*REPLACE) STRDLM(*NONE) RMVBLANK(*NONE) FLDDLM('|')
    NUMFLDPAD(*ZERO)

    And the result is:
    Display Report
    Report width . . . . . : 32000
    Position to line . . . . . Shift to column . . . . . .
    Line 29....+...30....+...31....+...32....+...33....+... 34....+...35....+...36

    000001
    000002 |212|29/07/1971|28/12/2007|15633.96 |.00 |A|214.0
    000003 |212|30/11/1988|18/07/2007|2720.22 |.00 |A|214.0
    000004 |212|27/06/1991|09/11/2007|5593.13 |.00 |A|214.0
    000005 |212|17/07/1995|26/10/2007|5982.00 |.00 |A|214.0
    000006 |212|21/09/2000|23/11/2007|13454.10 |.00 |A|214.0
    000007 |212|18/06/2001|12/12/2007|13730.29 |.00 |A|214.0
    000008 |213|18/10/1991|20/11/2007|1824.05 |.00 |A|214.0
    000009 |213|20/01/1997|04/07/2007|386.13 |.00 |A|214.0

  • #2
    F1 - Help

    Numeric field pad (NUMFLDPAD) - Help

    Specifies the padding applied for numeric fields. This parameter is ignored when the DTAFMT parameter is not *FIXED.

    Jim

    Comment

    Working...
    X