Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007

    Unanswered: Issue after SFTPing export file to mainframe sytem


    We are having some issue while sftping the db2 udb exported file [del ascii].

    db2 export - generates the file like


    but after sftping the file to mainframe system, the layout looks like this

    It seems mainframe only support EBCDIC code. how do we take care of this? has anyone face same issue? any pointer and help will be appreciated.

    source serve: aix
    target: sfpt file put file to aix server and mainframe pulls the file from sftp server.
    We are using DB2 UDB 8.2


  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    EBCDIC is not the problem or you wouldn't see such numbers but rather completely garbled characters. I think that your "sftp" client or the "sftp" server looses end-of-line characters.

    Is it an option to directly import the file from AIX into the DB2 z database?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Jun 2007
    Thanks a lot or quick response..

    not, looks like mainframe frolks are copying file from sftp/unix server to mainframe using mvs/jcl program. I don't think there is an option to directly to mainframe system?

    Does db2 udb export have any additional features to specify ebcdic [newer version of db2]?


  4. #4
    Join Date
    Sep 2004
    Quote Originally Posted by askdba123
    Does db2 udb export have any additional features to specify ebcdic?
    I don't think so.
    I suppose sftp is taking the complete (ASCII) file as a single "record", i.e. with embedded newlines, and converting that to EBCDIC.
    So on mainframe you will most likely receive something like "123 456 789", where the "blanks" are not EBCDIC blanks but "non-displayable characters" representing the ASCII LF character in EBCDIC.

    I'm not familiar with sftp on mainframe, but maybe it has an option to generate multiple records instead of a single one with embedded line-feeds. I guess this option is the "AS TEXT" option, as opposed to "BINARY". (With FTP one would use the "TYPE ASCII" command, not the "TYPE BINARY".)

    Also, make sure that the dataset into which sftp is writing has the correct record attributes, especially make sure the record type is "F" or "V", not "U".
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts