Bit Operations in Cobol

Article ID: 10196

Bit manipulation in Cobol can be a chore, but here are two free resources to help you twiddle bits:

a. Bit manipulation routines in the AS400 Network Cobol Community
Contains Cobol routines to perform OR, AND, and exclusive OR operations on a character or string of characters. http://www.as400network.com/resources/code/misccode/cobolcode/bitflogging.zip

b. BITPK routines
Provides bit manipulations of up to 32 bits and lets you get, set, clear, test, and pack bits. http://www.etk.com/download/etkpak/etkpak.htm#BITPK

ProVIP Sponsors

ProVIP Sponsors