04-02-2008
if your inputfile contains ONLY EBCDIC characters, dd in=inputfile out=outputfile conv=ascii will do the job.
If you're not getting what you expect, your data is either totally or partially NOT EBCDIC!!!
Can you verify it?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Could anybody please help me in writing a script in unix for converting a decimal number to binary number. (3 Replies)
Discussion started by: softy
3 Replies
2. UNIX for Advanced & Expert Users
Dear All,
Business Users are transfering ( FTP ) a CSV file into the IBM AIX box with transfer mode as ASCII. But I want to convert the CSV file from ASCII mode into binary mode, as my script expects file in binary mode.
Is it possible to do through Unix commands?
Thanks in Advance,
RK (1 Reply)
Discussion started by: srajeshmca
1 Replies
3. Shell Programming and Scripting
Hi gurus,
I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies
4. UNIX for Dummies Questions & Answers
Anybody please help me...
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary Coded Decimal) representation. Also, draw its Flow Chart.
This is a unix qn...
plz post algorithm for that :confused: (1 Reply)
Discussion started by: caramba
1 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Design an algorithm that accepts an input a decimal number and converts it into BCD (Binary... (2 Replies)
Discussion started by: caramba
2 Replies
6. Shell Programming and Scripting
I am writing a bash script to do some parsing on a log and I am running into a problem when it comes to converting only certain sections of the file from hex to ascii or hex to decimal.
Data Example:
The hex values after Hardware and SW Version I need to convert from Hex to ASCII and the... (16 Replies)
Discussion started by: Shiftkey
16 Replies
7. Shell Programming and Scripting
Hello All,
I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B.
Note that my data has some other columns(not shown here) too (around 100) after col2.
Tool,Data
A,1
A,3
A,5
....
so on
B,2
B,4
.... ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
8. Shell Programming and Scripting
Hi All,
I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables.
Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies
9. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
LEARN ABOUT DEBIAN
language::intercal::charset::ebcdic
INTERCAL::Charset::EBCDIC(3pm) User Contributed Perl Documentation INTERCAL::Charset::EBCDIC(3pm)
NAME
Charset::EBCDIC - allows to use EBCDIC string constants in ASCII programs (and v.v.)
SYNOPSIS
use Charset::EBCDIC 'ascii2abcdic';
my $a = ebcdic2ascii "(EBCDIC text)";
DESCRIPTION
Charset::EBCDIC defines functions to convert between a subset of ASCII and a subset of nonstandard EBCDIC (since there isn't such a thing
as a standard EBCDIC we defined our own variant which is guaranteed to be incompatible with all versions of EBCDIC used by IBM hardware -
however, when we have chosen a code for a character, we have made sure that at least one - but certainly not all - IBM models used that
same code, so the choice cannot be criticised). If you really want to know, several variants of EBCDIC are listed in RFC 1345, which is
available from the usual sources.
Two functions, ebcdic2ascii and ascii2ebcdic are exportable but not exported by default. They do the obvious thing to their first argument
and return the transformed string.
EBCDIC CHARACTER TABLE
The following are the characters recognised. The ones shown as 2 letter abbreviations cannot be translated to ASCII (except for the control
characters, which do have an ASCII equivalent).
+ 0 1 2 3 4 5 6 7 8 9 a b c d e f Notes
00 OV TA LF CR OV=overstrike
10 TA=tab
20 LF=linefeed
30 CR=carr-return
40 SP CT . < ( + ! SP=space
50 & ] $ * ) ; NO CT=cents
60 - / XO | , % _ > ? NO=not-sign
70 : # @ ' = " XO=XOR(1)
80 a b c d e f g h i
90 j k l m n o p q r { [
a0 ~ s t u v w x y z RE RE=registered
b0 ^ PO CO PO=pound
c0 A B C D E F G H I CO=copyright
d0 J K L M N O P Q R }
e0 S T U V W X Y Z
f0 0 1 2 3 4 5 6 7 8 9 DE DE=delete(1) The symbol for the INTECAL XOR operator, "V overstrike -".
COPYRIGHT
This module is part of CLC-INTERCAL.
Copyright (C) 1999, 2000, 2002, 2006, 2007 Claudio Calvelli, all rights reserved
See the files README and COPYING in the distribution for information.
SEE ALSO
A qualified psychiatrist.
perl v5.8.8 2008-03-29 INTERCAL::Charset::EBCDIC(3pm)