Check if file is EBCDIC or ASCII format

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Check if file is EBCDIC or ASCII format
# 8  
Old 02-01-2018
True. EBCDIC or ASCII only describe the hex code used to represent a character, like the letter B is x'42' (ASCII) or x'c2' (EBCDIC). It wouldn't apply to packed decimal, binary, or floating point. Negative 12345 in binary would be x'cfc7' regardless of how other alphanumeric fields are coded in the record where it resides.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert EBCDIC(.DAT) FILE into ASCII FILE

Hi Team, I am having 100 EBCDIC files (i.e. DAT extension) and need to convert them into ASCII File by unix shell script. I tried with DD Command but its not providing output as expected. Sample Text: ------------------ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Expected Output:... (2 Replies)
Discussion started by: JSM
2 Replies

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

3. Red Hat

Unable to convert EBCDIC file to ASCII file

Hello all, To give you all a little bit of background. We recently migrated from HP-UX to Redhat Linux and one of the command I used to run on HP-UX to convert an EBCDIC file to ASCII file isn't working on Linux. The code is as follow: cat workout2.dat | dd cbs=250 conv=block conv=ascii... (3 Replies)
Discussion started by: sethmj
3 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 Dummies Questions & Answers

Help! EBCDIC format to ASCII

Hi everyone, I have a 70MB EBCDIC file, with record length 102, block size 32742 and IBM standard label. I commanded dd if=input file of=outputfie ibs=32742 cbs=102 conv=ascii but I still don't get a viewable file under ASCII. Can anyone told me what's the problem? Do I need... (12 Replies)
Discussion started by: hrchl86
12 Replies

6. Shell Programming and Scripting

How to check if the file has EBCDIC or ascii characters

Hi, is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

7. UNIX for Dummies Questions & Answers

How to convert ebcdic file to ascii file?

How to convert ebcdic file to ascii file? (1 Reply)
Discussion started by: superuser123
1 Replies

8. Shell Programming and Scripting

How to convert ebcdic file to ascii file?

How to convert ebcdic file to ascii file? (1 Reply)
Discussion started by: superuser123
1 Replies

9. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like ..ݡ.ݡ ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

10. Shell Programming and Scripting

Check whether a given file is in ASCII format and data is tab-delimited

Hi All, Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format. If the... (9 Replies)
Discussion started by: Mandab
9 Replies
Login or Register to Ask a Question
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)