Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Conversion from EBCDIC to ASCII Post 302365183 by zaxxon on Monday 26th of October 2009 08:56:38 AM
Old 10-26-2009
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
 

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, reblock, translate, and copy a (tape) file SYNOPSIS
[optionvalue] ... DESCRIPTION
copies the specified input file to the specified output file with possible conversions. The standard input and output are used by default. Input and output block size can be specified to take advantage of raw physical I/O. Upon completion, reports the number of whole and par- tial input and output records. Options recognizes the following pairs: Input file name; default is standard input. Output file name; default is standard output. The output file is created using the same owner and group used by Input block size is n bytes; default is 512. Output block size is n bytes; default is 512. Set both input and output block size to the same size, superseding and This option is particularly efficient if no conversion is specified, because no in-core copy is necessary. Conversion buffer size is n bytes. Skip n input blocks before starting copy. Skip n input blocks before starting copy. (This is an alias for the option.) Skip n blocks from beginning of output file before copying. Skip n blocks from beginning of output file before copying. (This is an alias for the option.) Copy only n input blocks. Copy and concatenate n input files. This option should be used only when the input file is a magnetic tape device. Where values are comma-separated symbols from the following list. Convert EBCDIC to ASCII. Convert ASCII to EBCDIC. Convert ASCII to EBCDIC using an alternate conversion table. The and values are mutually exclusive. Convert each newline-terminated or end-of-file-terminated input record to a record with a fixed length specified by Any newline character is removed, and space characters are used to fill the block to size Lines that are longer than are truncated; the number of trun- cated lines (records) is reported (see below). The values are mutually exclusive. Convert fixed-length input records to variable-length records. For each input record, bytes are read, trailing space characters are deleted, and a newline charac- ter is appended. Map upper-case input characters to the corresponding lower-case characters. The values are mutually exclusive. Map lower-case input characters to the corresponding upper-case characters. Swap every pair of input bytes. Do not stop processing on an input error. If the conversion symbol is also specified, missing input is replaced with null bytes and processed normally; otherwise, the input block is omitted from the output. Do not truncate existing output file. Blocks in the output file not overwritten by this invocation of are preserved. Pad every input block to size If is also specified, pad with space characters; otherwise, pad with null bytes. Where sizes are required, n indicates a numerical value in bytes. Numbers can be specified using the forms: n for n bytes for n Kbytes (n x 1024), for n blocks (n x 512), or for n words (n x 2). To indicate a product, use to separate number pairs. The option is used when or conversion is specified. In case of cbs characters are placed into the conversion buffer, converted to ASCII, trailing blanks are trimmed, and a newline is added before sending the line to the output. In case of ASCII characters are read into the conversion buffer, converted to EBCDIC, and blanks are added to make up an output block of size cbs. EXTERNAL INFLUENCES
International Code Set Support Single- and multi-byte character code sets are supported. Environment Variables The following environment variables affect execution of determines the locale when and a corresponding variable (beginning with do not specify a locale. determines the locale used to override any values set by or any environment variables beginning with The variable determines the locale for the interpretation of sequences of bytes of text data as characters (single-byte/multi-byte charac- ters, upper-case/lower-case characters). The variable determines the language in which messages are written. RETURN VALUE
Exit values are: Successful completion. Error condition occurred. DIAGNOSTICS
Upon completion, reports the number of input and output records: Number of full and partial blocks read. Number of full and partial blocks written. When is specified and there is at least one truncated block, the number of truncated records is also reported: EXAMPLES
Read an EBCDIC tape blocked ten 80-byte EBCDIC card images per block into an ASCII file named Note the use of the raw magnetic tape device file. is especially suited to I/O on raw physical devices because it allows reading and writ- ing in arbitrary block sizes. WARNINGS
Some devices, such as 1/2-inch magnetic tapes, are incapable of seeking. Such devices may be positioned prior to running by using mt(1) or some other appropriate command. The options do work for such devices. However, skipping blocks using these options is slow on devices that cannot seek, since the blocks must actually be read to get to the desired position on the tape. ASCII and EBCDIC conversion tables are taken from the 256-character ACM standard, Nov, 1968. The conversion, while less widely accepted as a standard, corresponds better to certain IBM print train conventions. There is no universal solution. Newline characters are inserted only on conversion to ASCII; padding is done only on conversion to EBCDIC. These should be separate options. If or refers to a raw disk, should always be a multiple of the sector size of the disk. By default, is 512 bytes. If the sector size of the disk is different from 512 bytes, should be specified using a multiple of sector size. The character special (raw) device file should always be used for devices. It is entirely up to the user to insure there is enough room in the destination file, file system and/or device to contain the output since cannot pre-determine the required space after conversion. SEE ALSO
cp(1), mt(1), tr(1), disk(7), mt(7). STANDARDS CONFORMANCE
dd(1)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy