[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnubol: IBM data format conversion routines
Folks,
I don't know if this is helpful or not, but I've attached a tar file
with a small library of conversion routines:
cnvAtoE - Convert buffer from ASCII to EBCDIC
cnvEtoA - Convert buffer from EBCDIC to ASCII
cnvPDtoCH - Convert IBM Packed Decimal to character string (1 to 16
bytes, 1 to 31 digits)
cnvSPtoD - Convert IBM Single Precision Floating to C Double (4 bytes)
cnvDPtoD - Convert IBM Double Precision Floating to C Double (8 bytes)
cnvXPtoLD - COnvert IBM Extended Precision Floating to C Long Double (16
bytes)
If you have any problems or extensions, please let me know and based on
available time I'll be glad to fix them.
I'll set up a place on my home page in the future to make it easier to
get this stuff so I don't have to attach it.
I have not done extensive testing on cnvDPtoD or cnvXPtoLD, I did not
have enough test data. I'll try to get some in the next day to double
check accuracy. As for the cnvAtoE, I could not find an EBCDIC
equivalent for the grave (`), so it currently translates to an
appostrophe ('). The rest of it looks good.
The file (translate.tar.gz) is a gzip compressed tar file. Source was
done on Linux, so line delimiters are not exactly what MS-DOS wants.
There is no main(), just the routines, so the makefile is intended just
as documentation. My mainline was for the purpose of testing only.
I have some variable block I/O routines, but they are not complete yet.
Good Luck - Ted Seward
translate.tar.gz