Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading character and binary data

Status
Not open for further replies.

pthboss

IS-IT--Management
Jan 15, 2003
8
0
0
US
I am trying to read a file into my COBOL program running on AIX that contains character and binary data. When I access the file with "Access is sequential" I can access the binary data but the character data gets hosed. When I access the file as "line sequential" the character data is readable but the binary data is garbage. The AIX manuals say not to used "line sequential" access for data that contains non printable characters. I have tried COMP and COMP-5 on the binary data field.

 
Was the binary data created on the AIX machine, or on a PC for instance? You could be looking at big-endian versus little-endian issues.

Regards.

Glenn
 
Glenn:

The file was created on an AIX machine.
 
Hi,

Perhaps this is a Carriage-Return+Line-feed situation versus an only carriage-return situation or even a binary record situation.

You can fix the file using the RCOPY utility from CA-REALIA. It is on their FTP site. Look for it using the search-engine from alltheweb + FTP.

Regards,

Crox

 
Can you show use what it looks like in both modes? Also, do you have a file view available to you?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top