Dealing with Packed Numbers
Posted on 2003-03-06
I have a file that was extracted from IBM mainframe using COBOL program. The file contains Packed Numbers.
The packed numbers are numbers stored by COBOL in a kind of compressed format to save space. For an example if we have the below row format in COBOL:
03 std-name X(10).
03 std-age 9(8) COMP-3.
This means that, if we have a record with std-name = “Robert Lee” and std-age=6 the row will appear in the extracted file as
My problem is that, I need to read this file using VB code and convert all the numbers into normal numbers so I can store them in SQL server.
Thanks in advance