![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| bash: "undefined variable" and pipe | nagaidhlig | Shell Programming and Scripting | 6 | 02-18-2008 10:47 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| By angle-brackets/"pipe" button doesn't work? | riwa | Linux | 1 | 04-02-2006 06:43 PM |
| Unix "at" / "Cron" Command New Problem...Need help | Mohanraj | UNIX for Dummies Questions & Answers | 3 | 01-26-2006 08:08 PM |
| Commands on Digital Unix equivalent to for "top" and "sar" on other Unix flavour | sameerdes | UNIX for Advanced & Expert Users | 1 | 08-28-2002 08:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Encoding Problem while using "|" (PIPE) as delimiter from Mainframe to Unix
We are facing a problem with PIPE (|) as a delimiter in one of our FTP flat files.
Earlier we used comma (,) as the delimiter and never faced such an issue. Now we have changed it to PIPE and are in this situation. Is there anything to do specifically with PIPE when transferring files between Mainframe & UNIX? Is there any work around for this without changing the delimiter symbol from PIPE to some another? |
|
||||
|
Probably the reason for this is some ASCII-EBCDIC conversion problem: Unix machines, including AIX machines, encode files in ASCII (American Standard Code for Information Interchange) character sets. Not so the IBM-hosts, as they traditionally use a different character set called EBCDIC (Extended Binary Coded Decimal Interchange Code).
Usually there is some sort of conversion table, which tells the conversion program what character number x is to be replaced with in the other character set. Probably this conversion table is faulty at the place of the pipe character. I would bet on "M-3" not being a 3-character string like its representation here in this text but in fact some single-char non-printable character. You can either correct this conversion process or run sed (or tr) over the file to correct the characters: Code:
tr '<bad-char>' '|' <sourcefile> > <corrected_file> sed 's/<bad-char>/|/g' <sourcefile> > <corrected_file> bakunin |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|