cancel
Showing results for 
Search instead for 
Did you mean: 

How to read cobol binary file

Pkrishna9494
New Contributor

Input :

צנקננפקננשנעעס –Pƒ\ @ @@@@ | ננץ@@@@@@@@@@@@@@@@@@@@@@@@@@@2 <נננננ@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@0 yD\  @@@@סננסעע

 output:

" 00000000000000000000000000000000000607.","0047026315"," 00000000000000000000000000000000000001."," 0000000000000000000000071341.3800000000","0","0"," 0000000000000000000000000000.0000000000",""," 000.","","0","0"," 0000000000000000000000000000.0000000000"," 00000000000000000000000000000000000005.",""," 00000000000000000000000000000000032003."," 00000000000000000000000000000000000000."," 00000000000000000000000000000000000000.",""," 00000000000000000000000000000000000000.",""," 00000000000000000000000000000001240301."," 0000000000000000000000000653.2300000000"," 00000000000000000000000000000000000000."," 00000000000000000000000000000000000000.","","10","01","22",""

5 REPLIES 5

sshaik
New Contributor III

Hi Krishna

You have to setup a file in Cobol copybook parser , file name like dataformat.cfd

And the data inside file is like  below one

 

******************************************************************
* COBOL DECLARATION FOR THE DATA
******************************************************************
01 RECORD-1.
02 Field1 X(10).
02 Field2 X(3).
02 Field3 X(2).
02 Field4 X(1).
02 Field5_PIC X(2).
02 Field6_PIC X(2).
02 FILLER_PIC X(1).
******************************************************************
* THE NUMBER OF COLUMNS DESCRIBED HERE IS 8
******************************************************************

and here X()  should represents the width, you have to check with functional on this exact width.

01 --- is the entire record

 From 02-- are the column names