Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

CPYTOIMPF csv file formatting

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

  • CPYTOIMPF csv file formatting

    Hi

    I've created an extract program to create a CSV file like I usually do:

    CPYTOIMPF FROMFILE(QTEMP/GDP206CSV) TOSTMF(&IFSPTH) +
    MBROPT(*ADD) STMFCCSID(*PCASCII) +
    RCDDLM(*LF) STRDLM(*NONE) RMVBLANK(*BOTH) +
    FLDDLM(';') DECPNT(*COMMA)

    However, in this case the user community aren't happy as they feel the CSV file should be formated for them:

    For example:


    DB2 data
    FieldA FieldB
    01G1U 000000948
    01BWU 000000626
    01CZF 000000638
    01D9U 000000350
    01DYU 000000658
    01DYU 000000659
    01E30 000000696
    01E53 000000274
    01013 000000219
    01FCU 000000541
    01FCU 000000542
    01FCU 000000543

    FieldA declared as 5A
    FieldB declared as 9A

    However on the CSV file the users get:

    01G1U 948
    01BWU 626
    01CZF 638
    01D9U 350
    01DYU 658
    01DYU 659
    1,00E+30 696
    1,00E+53 274
    01ES0 219
    01FCU 541
    01FCU 542
    01FCU 543

    Is there a way I can format this data for then or is it down to them?

  • #2
    Hi

    Have you tried to set the STRDLM to something else than *NONE - ie. *DBLQUOTE?

    Jørn

    Comment


    • #3
      I've had a similar problem with Excel altering serial numbers think it is scientific notation. I've fudged it by putting a single quote at the start of the field and Excel will then pull it in as text, but with weird quote mark on the front...

      Comment

      Working...
      X