ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Shows Garbage value when copied to system folder

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

  • Shows Garbage value when copied to system folder

    Hi,

    I have converted PF data to CSV file with below command.

    SBMJOB CMD(CPYTOIMPF FROMFILE(TESTLIB1/FILETOCSV) TOSTMF('\TESTPATH\MYFOLDER\CSV1.csv') MBROPT(*REPLACE) STMFCCSID(*STMF) STMFCODPAG(*STMF) STMFAUT(*INDIR) RCDDLM(*CRLF) DTAFMT(*FIXED) STRDLM(*NONE) RMVBLANK(*TRAILING)
    FLDDLM(' ') NULLIND(*YES))

    when I see the data by WRKLNK command it is showing correct data.
    0003950558 N2012-05-23N
    0003950434 N2012-05-23N
    0003950440 N2012-05-23N8100566
    0002913749 N2011-08-24N595708
    0003950638 N2012-05-23N595839

    but when I copy that CSV file to my system its showing garbage

    ðððóùõðõõø@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@Õòðñò`ðõ`òóÕ@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@èñ ÷öÂ@@@@@@Õ@@@@@@@@@@Õ@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@Õ@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@Õ@@@@@@@@@@@@@@@@@@@@ ÕâÈÙÅÄ`Éã@äâÁ@É%

    could someone please give solution....

    thanks

  • #2
    Re: Shows Garbage value when copied to system folder

    Trythis: STMFCODPAG(*PCASCII)

    Comment


    • #3
      Re: Shows Garbage value when copied to system folder

      Hi Terry,

      I tried with this option, but got below error

      The copy did not complete for reason code 1.

      Job log
      Message . . . . : The copy did not complete for reason code 1.
      Cause . . . . . : The Copy From Import File (CPYFRMIMPF) command, or Copy To
      Import File (CPYTOIMPF) command could not be completed for reason 1. The
      reason codes are:
      1 - The CCSID or code page value is not valid.

      Comment


      • #4
        Re: Shows Garbage value when copied to system folder

        How is the data in the PF encoded? Is it some form of EBCDIC, ASCII or Unicode? If so, which one? Or is it binary data? You have to know these things -- don't expect the computer to know if you don't tell it.

        Next, how do you want the IFS file encoded? Same question, some form of EBCDIC, ASCII or Unicode? Which form? Or binary?

        Once you know that, specify it in the CCSID settings, and you'll be good.

        Comment

        Working...
        X