Sponsored Content
Full Discussion: EBCDIC to ASCII conversion
Top Forums UNIX for Advanced & Expert Users EBCDIC to ASCII conversion Post 303032644 by vgersh99 on Thursday 21st of March 2019 09:33:55 AM
Old 03-21-2019
Quote:
Originally Posted by swapna_1990
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
Maybe I'm missing something, but wouldn't iconv do the job?
or dd if=your-ebcdic-file conv=ascii
This User Gave Thanks to vgersh99 For This Post:
 

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. UNIX for Dummies Questions & Answers

Conversion from EBCDIC to ASCII

when i try to convert a mainframe EBCDIC file to ASCII ,i dont see correct file this is the source file ... (3 Replies)
Discussion started by: venkatvelpula
3 Replies

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

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 - copy and convert data

Syntax
       dd [option = value...]

Description
       The  command copies an input file to an output with any requested conversions.  The command is especially suited to I/O on the raw physical
       devices because it allows reading and writing in arbitrary record sizes.

       After completion, reports the number of whole and partial input and output blocks.

       This utility supports EOT handling which allows the use of multiple media.  The utility prompts for the next volume when it encounters  the
       end of the current volume.

Options
       Where  sizes (n) are given for an option, the number may end with k for kilobytes (1024 bytes), b for blocks (512 bytes), or w for words (2
       bytes).	Also, two numbers may be separated by the character x to indicate a product.

       if=name		   Input file name.  The standard input is the default.

       of=name		   Output file name.  The standard output is the default.

       ibs=n		   Input block size, n bytes. The default is 512 bytes.  Some devices do not support greater than 65,535 bytes.

       obs=n		   Output block size, n bytes.	The default is 512 bytes.  Some devices do not support greater than 65,535 bytes.

       bs=n		   Set both input and output block size to n bytes, superseding ibs and obs.  Also, if bs is specified, the copy  is  more
			   efficient, since no blocking conversion is necessary.

       cbs=n		   Conversion buffer size, n bytes.  Use only if ascii, unblock, ebcdic, ibm, or block conversion is specified.  For ascii
			   and unblock, n characters are placed into the conversion buffer, any specified  character  mapping  is  done,  trailing
			   blanks are trimmed and new line added before sending the line to the output.  For ebcdic, ibm, or block, characters are
			   read into the conversion buffer, and blanks added to make an output record of size n bytes.

       skip=n		   Skip n input records before starting to copy.

       files=n		   Copy n input files before terminating.  This option is useful only when the input is a magnetic tape or similar device.

       seek=n		   Seek n records from beginning of output file before copying.

       rbuf=n		   Use n buffers for reading from those raw devices that support n-buffered I/O.  (See Section 4 to check whether  a  spe-
			   cific  device  supports  n-buffered	I/O.)	All n reads are started and each read must complete before the data can be
			   used.  This allows an n-buffered read-ahead on supported raw devices.

			   A default of eight read buffers are used if the read device supports n-buffered I/O and the write device does not.

			   The rbuf option cannot be used with the wbuf option.

       wbuf=n		   Use n buffers for writing from those raw devices that support n-buffered I/O.  (See Section 4 to check whether  a  spe-
			   cific  device  supports  n-buffered	I/O.)  Each write is started but not known to be complete until all n buffers have
			   been used.  (This allows an n-buffered write-behind on supported raw devices).

			   A default of eight write buffers are used if the write device supports n-buffered I/O.

			   The wbuf option cannot be used with the rbuf option.

       count=n		   Copy only n input records.

       conv=ascii	   Convert EBCDIC to ASCII.

       conv=ebcdic	   Convert ASCII to EBCDIC.

       conv=ibm 	   Slightly different map of ASCII to EBCDIC (see RESTRICTIONS).

       conv=block	   Convert variable length records to fixed length.

       conv=unblock	   Convert fixed length records to variable length.

       conv=lcase	   Map alphabetics to lower case.

       conv=ucase	   Map alphabetics to upper case.

       conv=swab	   Swap every pair of bytes.

       conv=noerror	   Do not stop processing on an error.

       conv=sync	   Pad every input record to ibs.

       conv=nomulti	   Disable multiple tape volumes.

       conv=sparse	   Create a sparse output file.

       conv=... , ...	   Include several arguments for the conv option, separated by commas (see example below).

Examples
       The following example shows how to read an EBCDIC tape blocked ten 80-byte EBCDIC card images per record into the ASCII file x:
       dd if=/dev/rmt0h of=x ibs=800 cbs=80 conv=ascii,lcase

       Note the use of raw magtape.  As noted in the DESCRIPTION, the command is especially suited to I/O on the raw physical devices  because	it
       allows reading and writing in arbitrary record sizes.

Restrictions
       The ASCII/EBCDIC conversion tables are taken from the 256-character standard in the Communications of the ACM, (R)November, 1968.

       The ibm conversion corresponds to certain IBM print train conventions.

       One must specify ``conv=noerror,sync'' when copying raw disks with bad sectors to ensure that dd stays synchronized.
       On  SCSI  tape devices when reading a multi-volume tape set the command will exit normally upon hitting EOT on any volume rather than auto-
       matically unloading the volume and prompting for the next volume as is normal. The user should load the next volume and issue  the  command
       anew.

Diagnostics
       f+p records in(out): numbers of full and partial records read(written)

See Also
       cp(1), tr(1), nbuf(4)

																	     dd(1)
All times are GMT -4. The time now is 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy