Page 1 of 1

Convert 1 byte (binary?) to char in Cobol

PostPosted: Thu Feb 20, 2014 2:44 pm
by LasseH
Don't know if the subject is correct, but...

Trying to display the content in 2 fields with this content

1---5----0----5
004441....
110000....


I want to be able to display byte 1-2 as 0101 and byte 6 as 10 (not 257 and 16)
These fields are now defined as A PIC XX and B PIC X

//Lasse

Re: Convert 1 byte (binary?) to char in Cobol

PostPosted: Thu Feb 20, 2014 3:27 pm
by NicC
You have been around long enough to know that you should have used the code tags to preserve the layout. I have coded it for you.

Re: Convert 1 byte (binary?) to char in Cobol

PostPosted: Thu Feb 20, 2014 5:41 pm
by BillyBoyo

Re: Convert 1 byte (binary?) to char in Cobol

PostPosted: Thu Feb 20, 2014 7:34 pm
by LasseH
Thnx NicC
Did the job BillyBoyo, thnx