I'm very, very new to COBOL, but am an experienced developer. I work primarily with print streams (PostScript and PCL).
I'm writing a COBOL (Fujitsu COBOL, PC) program to... well, skip the details. Suffice it to say I have an alphanumeric field containing something like:
11120B1314040415041617181919180104041117
I need to chop that up into hex-pair values:
11
12
0B
and so on. Then I need to use the DECIMAL equivalent as an index to a TABLE.
My question is then, how to take an ALPHANUMERIC field, containing say "11" and turn it into a NUMERIC field with a value of "17"? A string "FF" into 256?
"11" in hex = "B" in decimal = 17
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
I'm writing a COBOL (Fujitsu COBOL, PC) program to... well, skip the details. Suffice it to say I have an alphanumeric field containing something like:
11120B1314040415041617181919180104041117
I need to chop that up into hex-pair values:
11
12
0B
and so on. Then I need to use the DECIMAL equivalent as an index to a TABLE.
My question is then, how to take an ALPHANUMERIC field, containing say "11" and turn it into a NUMERIC field with a value of "17"? A string "FF" into 256?
"11" in hex = "B" in decimal = 17
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting