If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Issue after SFTPing export file to mainframe sytem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-07, 03:13
askdba123 askdba123 is offline
Registered User
 
Join Date: Jun 2007
Posts: 21
Issue after SFTPing export file to mainframe sytem

Hi,

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

db2 export - generates the file like

123
345
678

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

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

Thanks
Suraj
Reply With Quote
  #2 (permalink)  
Old 08-10-07, 05:35
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #3 (permalink)  
Old 08-11-07, 12:42
askdba123 askdba123 is offline
Registered User
 
Join Date: Jun 2007
Posts: 21
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]?

Thanks
suraj
Reply With Quote
  #4 (permalink)  
Old 08-12-07, 05:42
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
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
__http://www.abis.be/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On