Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Conversion from EBCDIC to ASCII Post 302365226 by binlib on Monday 26th of October 2009 10:59:24 AM
Old 10-26-2009
If you have a file from mainframe in ebcdic with numbers in comp3 format (which will be screwed up with dd's conversion), the easiest way to look at the data is to load the data into an Oracle table with:

Code:
LOAD DATA
CHARACTERSET WE8EBCDIC500
INFILE 'infile' "FIX 23?"
TRUNCATE INTO TABLE T
(
 F1  POSITION(1) CHAR(??),
 AMT POSITION(*) DECIMAL(??),
 F2  POSITION(*) CHAR(??)
)

In your case, it doesn't seem to have any amount field.
Be careful with posting your company's financial data.

Last edited by Franklin52; 10-26-2009 at 12:05 PM.. Reason: Please use code tags, thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ascii to ebcdic conversion

Hello, I need a program for ascii to ebsdic conversion. If anybody can help, it'll be greatly appreciated. Thanks. (1 Reply)
Discussion started by: er_ashu
1 Replies

2. Solaris

EBCDIC to ASCII Binary conversion issue on Solaris i-series Unix

Hi All, I am facing EBCDIC to ASCII Binary conversion on Solaris i-series Unix system. However this is working fine on Solaris Sparc Unix system. Input file having EBCDIC format does not work on Solaris i-series Unix system. Could you please tell me, what will be the root cause for same? (14 Replies)
Discussion started by: amodkavi
14 Replies

3. Shell Programming and Scripting

EBCDIC Format to ASCII

Hi, we have source file with EBCDIC format(Main Frame files) where we receving from source system. I would like to convert the EBCDIC format file to unix systemformat(ex: .csv,txt ) I have wrote script like: dd if=<SRCPATH>yyy.xxx.RB065 of=<SRCPATH>/output.csv ibs=800 cbs=80... (8 Replies)
Discussion started by: koti_rama
8 Replies

4. UNIX for Advanced & Expert Users

Conversion of data - ebcdic to ascii

Hi, I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ? gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (0 Replies)
Discussion started by: tostay2003
0 Replies

5. Programming

Ebcdic to ascii

Hi, I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ? gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (19 Replies)
Discussion started by: tostay2003
19 Replies

6. UNIX for Dummies Questions & Answers

EBCDIC TO ASCII Conversion through UNIX Command

Hi All , I have a mainframe file which contains the data in EBCDIC unreadable format.I have downloaded this raw unreadable file from mainframe system to windows in text format then I pushed to Unix system.Now I want to convert this file to ASCII readable format file in unix.Can anyone advise me... (2 Replies)
Discussion started by: STCET22
2 Replies

7. UNIX for Advanced & Expert Users

Conversion from EBCDIC to Ascii OR unicode

I have a file in my Unix ( SOLARIS ) with EBCDIC format...I want this file to read in ASCII OR unicode...Is it possible with UNIX to convert this file on ASCII OR UNICODE format from EBCDIC format? I was searching through web and found only conversion table :( Request Rejected Below is... (16 Replies)
Discussion started by: joshilalit2004
16 Replies

8. Shell Programming and Scripting

Need help for EBCDIC TO ASCII conversion through UNIX

Hi All , We have a mainframe file which is in EBCDIC format.We dont have direct access to mainframe ,client has provided us the mainframe file in unix box.The mainframe file is containing pact data(COMP1 ,COMP2 etc) which are unreadble.Can anyone suggest me how to convert this kind of ebcdic... (7 Replies)
Discussion started by: STCET22
7 Replies

9. UNIX for Advanced & Expert Users

EBCDIC to ASCII conversion

Hi, I have a input file which is EBCIDIC and it has packed decimals. Can anyone help me to convert EBCIDIC file to ASCII(Need to convert even Packed decimal values also to normal format). Thanks swapna (12 Replies)
Discussion started by: swapna_1990
12 Replies

10. UNIX for Advanced & Expert Users

EBCDIC to ASCII conversion

Hi, We have a mainframe file which is in EBCDIC format.We dont have direct access to mainframe ,client has provided us the mainframe file.The mainframe file is containing pact data(COMP1 ,COMP2 etc) which are unreadble.Can anyone suggest me how to convert this kind of ebcdic file to ascii... (11 Replies)
Discussion started by: swapna_1990
11 Replies
DD(1)							      General Commands Manual							     DD(1)

NAME
dd - convert and copy a file SYNOPSIS
dd [ option value ] ... DESCRIPTION
Dd copies the specified input file to the specified output with possible conversions. The standard input and output are used by default. The input and output block size may be specified to take advantage of raw physical I/O. The options are -if f Open file f for input. -of f Open file f for output. -ibs n Set input block size to n bytes (default 512). -obs n Set output block size (default 512). -bs n Set both input and output block size, superseding ibs and obs. If no conversion is specified, preserve the input block size instead of packing short blocks into the output buffer. This is particularly efficient since no in-core copy need be done. -cbs n Set conversion buffer size. -skip n Skip n input records before copying. -iseek n Seek n records forward on input file before copying. -files n Catenate n input files (useful only for magnetic tape or similar input device). -oseek n Seek n records from beginning of output file before copying. -count n Copy only n input records. -conv ascii Convert EBCDIC to ASCII. ebcdic Convert ASCII to EBCDIC. ibm Like ebcdic but with a slightly different character map. block Convert variable length ASCII records to fixed length. unblock Convert fixed length ASCII records to variable length. lcase Map alphabetics to lower case. ucase Map alphabetics to upper case. swab Swap every pair of bytes. noerror Do not stop processing on an error. sync Pad every input record to ibs bytes. Where sizes are specified, a number of bytes is expected. A number may end with or to specify multiplication by 1024 or 512 respectively; a pair of numbers may be separated by to indicate a product. Multiple conversions may be specified in the style: is used only if or conversion is specified. In the first two cases, n characters are copied into the conversion buffer, any specified character mapping is done, trailing blanks are trimmed and new-line is added before sending the line to the output. In the latter three cases, characters are read into the conversion buffer and blanks are added to make up an output record of size n. If is unspecified or zero, the and options convert the character set without changing the block structure of the input file; the and options become a simple file copy. SOURCE
/sys/src/cmd/dd.c SEE ALSO
cp(1) DIAGNOSTICS
Dd reports the number of full + partial input and output blocks handled. DD(1)
All times are GMT -4. The time now is 09:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy