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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binary data handling

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi !

I have a seqential file that has a few fields that contain data in binary format(they were defined in the program as PIC S9(9) COMP).Which means i cannot see them and read them meaningfully when i browse the data.My client wants this file to be converted so that she can read the binary data also meaning fully.So my task now is to convert the binary data into numric format so that she can read it while browsing and could undestand.

Do we have any cobol functions
(a)that convert binary data into ordinary numeric data
(b)that convert packed data into ordinary numeric data

or do we need to resort to REXX or CLIST ?


So that i will rewrite the file with the numeric data in place of binary one.

I will appreciate any one who has solution for this.

Regards,
Akondeti

[sig][/sig]
 
COBOL doesn't need a special function to convert data from one format to another. All you have to do is MOVE the COMP or COMP-3 data field to a DISPLAY field and COBOL converts it.

Betty Scherber
Brainbench MVP for COBOL II
[sig][/sig]
 
Hi Betty !

Actually i did the same MOVE today as a trail and it worked.

Thanks,
Akondeti [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top