How to copy file with CCSID 13488 to text file on PC

Tags:
AS/400 File Sharing
AS/400 file specification
AS/400 File Transfer
AS400 iSeries IFS UTF-8 CCSID CPYFRMIMPF
CCSID
I have a requirement to create an xml file on the iSeries with mixed English & Simplified Chinese. I have defined the file with 1 long text field defined as graphical with CCSID = 13488 *NOCONVERT. The file displays on the iSeries correctly but however I try to copy the file to my PC it comes down as Garbage. Does anyone know how this can be done?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Is the file on the I-Series in the IFS or defined as a DB2 file. How are you trying to transfer it to a pc? Are you using client access transfer or another method?
    129,355 pointsBadges:
    report
  • HumphreyCushion
    Hi, Its defined as a DB2 file, I've tried using client access file transfer & also COPYTOIMPF with various permutations.


    25 pointsBadges:
    report
  • ToddN2000
    When using the Client access transfer, what file type are you trying to use ? Are you using any translation ?  
    Cant test it but try this
    transfer as ASCII TEXT, 
    translate system data to OTHER
    and set the Coded Charatcter Set ID to 13488

    129,355 pointsBadges:
    report
  • HumphreyCushion
    I did try that already but still got garbage.

    25 pointsBadges:
    report
  • Tom Curtin
    Answer courtesy of ToddN2000:

    "Tried as is and using the CODE option as well, same results.

    Might be a long shot but depending on the size of the file, have you tried pulling it over using SQL. Write a small app or use SQL Server, make the connection and run the statement. Maybe something like this

    "Public Function GetXML(ByVal intWebTicketNumber) As String
            Dim IBMconn As New clsIBM_D2
            Dim strSQL As String
            Dim XML As String = ""

            Dim strConnection As String
                   
                strConnection = "DataSource=10.10.10.10;userid=MYID;password=MYPWD;DefaultCollection=MYLIB;Pooling=False;"


            strSQL = "SELECT * FROM MYFILE"

            Dim myConnection As New iDB2Connection(strConnection)
            Dim myCommand As New iDB2Command(strSQL, myConnection)
            myCommand.Connection.Open()
            Dim myReader As iDB2DataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

            If myReader.HasRows Then

                While myReader.Read()
                    XML = myReader("MYFIELD").ToString
                End While

            End If

            Return XML
        End Function"

    630 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: