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.2 Figurative Constants



Figurative constants are reserved words that name and refer to specific constant values. The reserved words for figurative constants and their meanings are:

ZERO/ZEROS/ZEROES
Represents the numeric value zero (0), or one or more occurrences of the nonnumeric character zero (0), depending on context.

When the context cannot be determined, a nonnumeric zero is used.

SPACE/SPACES
Represents one or more blanks or spaces. SPACE is treated as a nonnumeric literal.

HIGH-VALUE/HIGH-VALUES
Represents one or more occurrences of the character that has the highest ordinal position in the collating sequence used. For the EBCDIC collating sequence, the character is X'FF'; for other collating sequences, the actual character used depends on the collating sequence indicated by the locale. For more information on locale, see Appendix F, "Locale Considerations (Workstation Only)" in topic APPENDIX1.6. HIGH-VALUE is treated as a nonnumeric literal.

LOW-VALUE/LOW-VALUES
Represents one or more occurrences of the character that has the lowest ordinal position in the collating sequence used. For the EBCDIC collating sequence, the character is X'00'; for other collating sequences, the actual character used depends on the collating sequence. LOW-VALUE is treated as a nonnumeric literal.

QUOTE/QUOTES
Represents one or more occurrences of:

  • X The quotation mark character ("), if the QUOTE compiler option is
    X in effect

    X or
  • X The apostrophe character ('), if the APOST compiler option is in
    X effect
    
    

X QUOTE or QUOTES cannot be used in place of a quotation mark or an
X apostrophe to enclose a nonnumeric literal.

ALL literal
Represents one or more occurrences of the string of characters composing the literal. The literal must be either a nonnumeric literal or a figurative constant other than the ALL literal. When a figurative constant, other than the ALL literal is used, the word ALL is redundant and is used for readability only. The figurative
X constant ALL literal must not be used with the CALL, INSPECT, INVOKE, STOP, or STRING statements.

symbolic-character
Represents one or more of the characters specified as a value of the symbolic-character in the SYMBOLIC CHARACTERS clause of the SPECIAL-NAMES paragraph.


X >_Workstation_> Under AIX, OS/2, and Windows, you cannot specify the
X SYMBOLIC CHARACTER clause if a DBCS or EUC code page is indicated by
X the locale setting. For more information on locale, see Appendix F,
X "Locale Considerations (Workstation Only)" in topic APPENDIX1.6.
X <_Workstation_<


X NULL/NULLS

X Represents a value used to indicate that data items defined with USAGE
X IS POINTER, USAGE IS PROCEDURE-POINTER, USAGE IS OBJECT REFERENCE, or
X the ADDRESS OF special register do not contain a valid address. NULL
X can be used only where explicitly allowed in the syntax format. NULL
X has the value of zero.

The singular and plural forms of ZERO, SPACE, HIGH-VALUE, LOW-VALUE, and QUOTE can be used interchangeably. For example, if data-name-1 is a 5-character data item, each of the following statements will fill data-name-1 with five spaces:


         MOVE SPACE       TO  DATA-NAME-1
         MOVE SPACES      TO  DATA-NAME-1
         MOVE ALL SPACES  TO  DATA-NAME-1

You can use a figurative constant wherever "literal" appears in a syntax diagram, except where explicitly prohibited. When a numeric literal appears in a syntax diagram, only the figurative constant ZERO (ZEROS, ZEROES) can be used. Figurative constants are not allowed as function arguments except in an arithmetic expression, where they are arguments to a function.

The length of a figurative constant depends on the context of the program. The following rules apply:



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.