WebSphere Studio COBOL for Windows - Language Reference

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--

Cover Design - WebSphere Studio COBOL for Windows - Language Reference

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From WebSphere Studio COBOL for Windows - Language Reference
     Copyright © IBM

Chapter 1. Characters

The most basic and indivisible unit of the COBOL language is the character. The basic character set includes the letters of the Latin alphabet, digits, and special characters. In the COBOL language, individual characters are joined to form character-strings and separators. Character-strings and separators, then, are used to form the words, literals, phrases, clauses, statements, and sentences that form the language.

The default character set used in forming character-strings and separators is shown in COBOL for Windows basic character set (Table 1 on page 4).

For certain language elements, the basic character set is extended with the IBM ASCII Double-Byte Character Set (DBCS).

DBCS characters occupy 2 adjacent bytes to represent one character. DBCS characters are also called multibyte characters. A character-string that contains DBCS characters in source code is a multibyte character-string.

Multibyte characters can be used in forming user-defined words. The content of alphanumeric literals, comment lines, and comment entries can include any of the characters from the character set used for the source code, including multibyte characters.

Run-time data can include any characters from the run-time character set of the computer. The run-time character set of the computer can include alphanumeric characters, DBCS characters, and national characters. National characters are represented in UTF-16, a 16-bit encoding form of Unicode.

When the NSYMBOL (NATIONAL) compiler option is in effect, literals identified by the opening delimiter N" or Ní are national literals and can contain any single-byte or double-byte characters, or both, that are valid for the compile-time code page. Characters contained in national literals are represented as national characters at run time.