A character string is a string of any EBCDIC characters (alphanumeric and special) that are used as a value.
These EBCDIC values can include date and hexadecimal values. A character string can have two forms: quoted string or unquoted string. Either form of character string can contain as many as 5000 characters.
A quoted character string is a string of alphanumeric and special characters that are enclosed in apostrophes. For example, 'Credit limit has been exceeded' is a quoted character string. The quoted string is used for character data that is not valid in an unquoted character string. For example, user-specified text can be entered in several commands to describe the functions of the commands. Those descriptions must be enclosed in apostrophes if they contain more than one word because blanks are not allowed in an unquoted string.
An unquoted character string is a string consisting of only alphanumeric characters and the special characters that are shown in the Unquoted String column in the table below table. The table summarizes the main EBCDIC characters that are valid in unquoted and quoted character string values. An X in the last column indicates that the character on the left is valid; refer to the specific notes following the figure that indicate why the character is valid as described. The special characters allow the following to be unquoted character string values:
Any of these unquoted strings can be specified for parameters defined to accept character strings. In addition, some parameters are defined to accept predefined values, names, or decimal values either singly or in combinations.
Name of Character | Character | Unquoted String | Quoted String |
---|---|---|---|
Ampersand | & | See Note 5 | X |
Apostrophe | ' | See Note 7 | - |
Asterisk (*) | * | See Notes 5, 6 | X |
At sign | @ | X | X |
Blank | X | ||
Colon | : | X | |
Comma | , | See Note 1 | X |
Digits | 0-9 | See Note 1 | X |
Dollar sign | $ | X | X |
Equal | = | See Notes 5, 8 | X |
Greater than | > | See Notes 5, 8 | X |
Left parenthesis | ( | See Note 4 | X |
Less than | < | See Notes 5, 8 | X |
Letters (lowercase) | a-z | See Note 2 | X |
Letters (uppercase) | A-Z | X | X |
Minus | - | See Notes 1, 5 | X |
Not | |
See Notes 5, 8 | X |
Number sign | # | X | X |
Percent | % | X | |
Period | . | See Notes 1, 11 | X |
Plus | + | See Notes 1, 5 | X |
Question mark | ? | X | |
Quotation marks | " " | See Note 10 | X |
Right parenthesis | ) | See Note 4 | X |
Semicolon | ; | X | |
Slash | / | See Notes 3, 5 | X |
Underscore | _ | See Note 9 | X |
Vertical bar | | | See Notes 5, 8 | X |
The following are examples of quoted string constants:
Constant | Value |
---|---|
'1,2,' | 1,2, |
'DON''T' | DON'T |
'24 12 20' | 24 12 20 |
The following are examples of unquoted string constants:
Constant | Meaning |
---|---|
CHICAGO | CHICAGO |
FILE1 | FILE1 |
*LIBL | Library list |
LIBX/PGMA | Program PGMA in library LIBX |
1.2 | 1.2 |