DateModifiedViewsCategory

This group of values are integer signed data type. They can be from 1 to 8 bytes with maximum range from -9223372036854775808 to 9223372036854775807. Signed integers are represented 0 in the leftmost bit for positive values and 1 for negative ones. The summary of signed BINARY data type can be found in COBOL Data Types article.

Storage Description

BINARY 1 (1 byte)

Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
SignBit valueBit valueBit valueBit valueBit valueBit valueBit value

BINARY 2 (2 bytes)

Bit 15Bit 14Bit 13...Bit 3Bit 2Bit 1Bit 0
SignBit valueBit value...Bit valueBit valueBit valueBit value

BINARY 4 (4 bytes)

Bit 31Bit 30Bit 29...Bit 3Bit 2Bit 1Bit 0
SignBit valueBit value...Bit valueBit valueBit valueBit value

BINARY 8 (8 bytes)

Bit 63Bit 62Bit 61...Bit 3Bit 2Bit 1Bit 0
SignBit valueBit value...Bit valueBit valueBit valueBit value

Sample 1

35,791 value

Byte 4Byte 3Byte 2Byte 1
0000 00000000 00001000 10111100 1111

Explanation

Bit 31...Bit 16Bit 15Bit 14Bit 13Bit 12Bit 11Bit 10Bit 9Bit 8Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0...0327680002048051225612864008421

35791 = 32768 + 2048 + 512 + 256 + 128 + 64 + 8 + 4 + 2 + 1

Sample 2

-35,791 value

Byte 4Byte 3Byte 2Byte 1
1111 11111111 11110111 01000011 0001

Explanation

Bit 31...Bit 15Bit 14Bit 13Bit 12Bit 11Bit 10Bit 9Bit 8Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
2147483648...0163848192409601024000032160001

-35791 = -([maximum of unsigned 4 byte integer: 4294967295] - [2147483648...16384+8192+4096+1024+32+16+1] + 1)

COBOL Representation Samples

01 VAR-BINARY PIC S9(5) USAGE COMP.
01 VAR-BINARY PIC S9(05) USAGE COMP.
01 VAR-BINARY PIC S9(5) COMP.
01 VAR-BINARY PIC S9(5) USAGE COMP.

Resources

  • ebcdic-parser tool for converting of mainframe EBCDIC data into Unicode ASCII delimited text

Comments

comments powered by Disqus