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

4.1.4 ALPHABET Clause



ALPHABET alphabet-name-1 IS
Provides a means of relating an alphabet-name to a specified character code set or collating sequence.

It specifies a collating sequence when used in either:

  • The PROGRAM COLLATING SEQUENCE clause of the OBJECT-COMPUTER paragraph
  • The COLLATING SEQUENCE phrase of the SORT or MERGE statement
    
    
It specifies a character code set when specified in either:

  • The FD entry CODE-SET clause
  • The SYMBOLIC CHARACTERS clause
    
    

X >_Workstation_> Under AIX, OS/2, and Windows, you cannot specify the
X ALPHABET clause if the code page in effect is a DBCS or EUC code page.
X For details, see the IBM COBOL Programming Guide for your platform.
X <_Workstation_<

STANDARD-1
>_Host_> Under OS/390 and VM, specifies the ASCII character set. <_Host_<

>_Workstation_> Under AIX, OS/2, and Windows, specifies that the collating sequence is based on the binary code values of the characters, ignoring the locale setting. <_Workstation_<

STANDARD-2
>_Host_> Under OS/390 and VM, specifies the International Reference Version of the ISO 7-bit code defined in International Standard 646, 7-bit Coded Character Set for Information Processing Interchange. <_Host_<

>_Workstation_> Under AIX, OS/2, and Windows, specifies that the collating sequence is based on the binary code values of the characters, ignoring the locale setting. <_Workstation_<

NATIVE
Specifies the native character code set. If the alphabet-name clause is omitted:

>_Host_> Under OS/390 and VM, EBCDIC is assumed. <_Host_<

>_Workstation_> Under AIX, OS/2, and Windows, the alphabet-name is
X associated with the character set (ASCII or EUC) indicated by the locale in effect. <_Workstation_<

EBCDIC
Specifies the EBCDIC character set.

literal-1
literal-2
literal-3
Specifies that the collating sequence is to be determined by the program, according to the following rules:

  • The order in which literals appear specifies the ordinal number, in ascending sequence, of the character(s) in this collating sequence.
    
    
  • Each numeric literal specified must be an unsigned integer.
    
    
  • Each numeric literal must have a value that corresponds to a valid ordinal position within the collating sequence in effect.
    
    
    Appendix B, "EBCDIC and ASCII Collating Sequences" in topic APPENDIX1.2, lists the ordinal number for characters in the EBCDIC and ASCII collating sequences.
    
    
  • Each character in a nonnumeric literal represents that actual character in the character set. (If the nonnumeric literal contains more than one character, each character, starting with the leftmost, is assigned a successively ascending position within this collating sequence.)
    
    
  • Any characters that are not explicitly specified assume positions in this collating sequence higher than any of the explicitly specified characters. The relative order within the set of these unspecified characters within the character set remains unchanged.
    
    
  • Within one alphabet-name clause, a given character must not be specified more than once.
    
    
  • Each nonnumeric literal associated with a THROUGH or ALSO phrase must be 1 character in length.
    
    
  • When the THROUGH phrase is specified, the contiguous characters in the native character set beginning with the character specified by literal-1 and ending with the character specified by literal-2 are assigned successively ascending positions in this collating sequence. This sequence can be either ascending or descending within the original native character set. That is, if "Z" THROUGH "A" is specified, the ascending values, left-to-right, for the uppercase letters are:
    
    
    
                     ZYXWVUTSRQPONMLKJIHGFEDCBA
    

  • When the ALSO phrase is specified, the characters specified as literal-1, literal-3, etc., are assigned to the same position in this collating sequence. For example, if you specify:
    
    
    
                     "D" ALSO "N" ALSO "%"
    

    the characters D, N, and % are all considered to be in the same position in the collating sequence.
    
    
  • When the ALSO phrase is specified and alphabet-name-1 is referenced in a SYMBOLIC CHARACTERS clause, only literal-1 is used to represent the character in the character set.
    
    
  • The character having the highest ordinal position in this collating sequence is associated with the figurative constant HIGH-VALUE. If more than one character has the highest position, because of specification of the ALSO phrase, the last character specified (or defaulted to when any characters are not explicitly specified) is considered to be the HIGH-VALUE character for procedural statements such as DISPLAY, or as the sending field in a MOVE statement. (If all characters and the ALSO phrase example given above were specified as the high-order characters of this collating sequence, the HIGH-VALUE character would be %.)
    
    
  • The character having the lowest ordinal position in this collating sequence is associated with the figurative constant LOW-VALUE. If more than one character has the lowest position, because of specification of the ALSO phrase, the first character specified is the LOW-VALUE character. (If the ALSO phrase example given above were specified as the low-order characters of the collating sequence, the LOW-VALUE character would be D.)
    
    

When literal-1, literal-2, or literal-3 is specified, the alphabet-name must not be referred to in a CODE-SET clause (see "CODE-SET Clause" in topic 5.2.11).

Literal-1, literal-2, and literal-3 must not specify a symbolic-character figurative constant.


X Floating-point literals cannot be used in a user-specified
X collating sequence.


X DBCS literals cannot be used in a user-specified collating
X sequence.


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.