October 27th, 2008

LONG VARGRAPHIC(length) Data

Posted by admin in F. Data Types

In DB2 the LONG VARGRAPHIC data type can have 0 to 16,357 characters of 16-bit Double Byte Character Set data in variable length format for 32K pages, or 2,028 DBCS characters for 4K pages of storage. With DBCS, each 2 bytes of data represents a graphic character. This data type is also rarely used. Consult your RDBMS systems manual for further details.

Example:    COL1 LONG VARGRAPHIC(1000)

COL1 has up to 1000 bytes of up to 500 variable double-byte characters.

In COBOL:  05  COL1-GROUP.
               49 COL1-LENGTH   PIC S9(9) COMP.
               49 COL1          PIC G(1000) DISPLAY-1.

In COBOL, G(1000) means 2,000 bytes of 1,000 DBCS characters.

Leave a reply

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: