Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

1.1 Characters



The most basic and indivisible unit of the COBOL language is the character. The IBM COBOL character set includes the letters of the alphabet, digits, and special characters. The complete set of characters that form the IBM COBOL character set is shown in Table 1.

The basic IBM COBOL language is restricted to the character set shown in Table 1, but the content of nonnumeric literals, comment lines, comment entries, and data can include any of the characters from the character set of the computer.


X In some cases, the basic character set is extended with the national
X character set. The national character set support includes the
X Double-Byte Character Set (DBCS) and, additionally for AIX, the Extended
X Unix** Code (EUC) code page.


X Double-byte characters, as the name implies, occupy two adjacent bytes to
X represent 1 character. A character string containing DBCS characters is
X called a DBCS character-string.


X >_AIX_> For AIX, characters from the EUC code page can be from one to four
X bytes long. <_AIX_<


X DBCS and EUC characters are valid characters in certain COBOL
X character-strings. For details, see "COBOL Words with Multi-Byte
X Characters" in topic 1.1.1.2 and "DBCS Literals" in topic 1.1.4.3.

Individual characters are joined to form character-strings, separators, and text words.

A character-string is a character or a sequence of contiguous characters that forms a COBOL word, a literal, a PICTURE character-string, or a comment-entry. A character-string is delimited by separators.

A separator is a string of one or two contiguous characters used to delimit character strings. Separators are described in detail under "Separators" in topic 1.1.5.

A text word is a character or a sequence of contiguous characters between character positions 8 and 72 inclusive on a line in a COBOL library, source program, or in pseudo-text. For more information on pseudo-text, see "Pseudo-Text" in topic 1.3.5.6.


 Table 1. Characters--Meanings                                             
 Character                Meaning                                          
                       
 +                      
 -                      
 *                      
 /                      
 =                      
 $                      
 ,                      
 ;                      
 .                      
 "                      
 (                      
 )                      
 >                      
 <                      
 :                      
RevisionX  '                      
 A-Z                    
 a-z                    
 0-9                    
 Space                                            
 Plus sign                                        
 Minus sign or Hyphen                             
 Asterisk                                         
 Slant, Solidus, Stroke, or Slash                 
 Equal sign                                       
 Currency sign                                    
 Comma                                            
 Semicolon                                        
 Decimal point or Period                          
 Quotation mark                                   
 Left parenthesis                                 
 Right parenthesis                                
 Greater than                                     
 Less than                                        
 Colon                                            
RevisionX  Apostrophe                                       
 Alphabet (uppercase)                             
 Alphabet (lowercase)                             
 Numeric characters                               

Subtopics:



Previous Topic Next Topic Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.