Reading hex data from assembler


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reading hex data from assembler
# 1  
Old 03-26-2010
Reading hex data from assembler

Hi,

I have files that has got ebcdic character set and also, there are fields like binary and hex fields. is there a way to convert this to normal ascii data by taking care of comp & comp-3 fields?

Many Thanks!!
# 2  
Old 03-26-2010
Have you tried dd with conv=ascii ?
# 3  
Old 03-26-2010
Quote:
Originally Posted by vbe
Have you tried dd with conv=ascii ?
This method will not work if the file has comp and comp-3 fields.

There is a Perl Module that should be able to do it for you.

Convert::IBM390 - search.cpan.org
# 4  
Old 03-26-2010
yes, I have tried dd command and it doesnt work and I am not at all aware of perl. can I do that using ksh?

Last edited by ahmedwaseem2000; 03-26-2010 at 12:01 PM..
# 5  
Old 03-26-2010
Write a cobol program. http://opencobol.org
# 6  
Old 03-26-2010
sorry - I was looking for a KSH solution.
# 7  
Old 03-26-2010
Do you know the starting position and length of each binary and packed decimal field.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading in data that has spaces in it.

I have a csv file called template.csv which has the following data Name, Age, Height Jessica Jesse, 18, 150 Now what I want to do is use a shell script to read the name age and height which looks like this: #!bin/sh INPUT='template.csv while read Name Age Height do echo... (2 Replies)
Discussion started by: JSNY
2 Replies

2. Shell Programming and Scripting

how to get data from hex file using SED or AWK based on pattern sign

I have a binary (hex) file I need to parse to get some data which are encoded this way: .* b4 . . . 01 12 .* af .* 83 L1 x1 x2 xL 84 L2 y1 y2 yL By another words there is a stream of hexadecimal bytes (in my example separated by space for better readability). I need to get value stored in... (3 Replies)
Discussion started by: sameucho
3 Replies

3. Programming

What is the difference between ios::hex and std::hex?

Hi, Is there really a difference between these two, std::hex and ios::hex?? I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true? Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies

4. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies

5. Programming

Data formating using C programm with Hex deciamal 'x0d'

:b:Guys, Can some body throw some light on this please..... sprintf(req_line1, "%c%s%c", '\x0b',"TESTING1",'\x0d'); sprintf(req_line2, "%s%c", "TESTING2", '\x0d'); sprintf(req_line3, "%s%c", "Testing3", '\x0d'); sprintf(req_line4, "%s%c%c%c", "Testing4", '\x0d', '\x1c', '\x0d'); ... (6 Replies)
Discussion started by: sudharma
6 Replies

6. Programming

How to use assembler (as) in UNIX? [I got errors using assembler]

Hi, folks, I have a simple program main.c. The program is very simple, just for testing purpose. The program was proven correct by using "gcc". Now I would compile it step by step from main.c to main.o. Here is what I did: cpp main.c main.i <This step succeeded> cc main.i -o... (5 Replies)
Discussion started by: meili100
5 Replies

7. Programming

reading reading data from webpage

hi iam reading data from web page using request socket and curl socket. now my problem is some the web page containg data as a image so how can i read the data from a image. thank,inadvance. sree (3 Replies)
Discussion started by: phani_sree
3 Replies

8. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

9. UNIX for Advanced & Expert Users

hex data conversion

Dear friends, I have hexadecimal data like this. now i want to read each letter and convert to decimal format. for example.: from the below data first i have to read hex data 0 and convert to 4 bit decimal value ie 0000. similarly second letter 8 decimal value is 1000. like this.... (6 Replies)
Discussion started by: rajan_ka1
6 Replies

10. Shell Programming and Scripting

Column data reading

Experts I am new to UNIX shell programming ( or scripting). My problem is that I have an ASCII file in which column wise data is present, the columns are seperated by spaces. I want to read each columns data and store it in arrays, next I will be using the arrays to perform some numerical... (1 Reply)
Discussion started by: FarhanNaseer
1 Replies
Login or Register to Ask a Question