A name can be specified by either enclosing it in double quotation marks (") or not enclosing it.
However, except for a cursor name specified within a process or function, if you use the following names in a UAP, specify them without enclosing them in double quotation marks (").
Table 1-2 Characters in names and maximum numbers of characters
Type of name | Max number of bytes or chars | Single-byte characters | Double-byte chars | |||||
---|---|---|---|---|---|---|---|---|
UC, numeric | LC | Kana | Underscore (_) | Space | Hyphen (-) | |||
Index-type identifier | 30 bytes | Y | Y | Y#2 | Y | Y | Y | Y#2 |
Index identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Embedded variable name | 21 characters, 22 characters, 30 characters, 31 characters, 63 characters#1 | Y#4 | Y | Y#4 | Y | N | Y#4 | Y#4 |
Cursor name | 30 bytes | Y | Y | Y#2 | Y | N | Y | Y#2 |
External routine name | 255 bytes | Y | Y | Y#2 | Y | N | N | Y#2 |
Condition name | 30 bytes | Y | Y | Y#2 | Y | Y | Y | Y#2 |
Correlation name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Attribute name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Data type identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Query name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Trigger identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Authorization identifier | 8 bytes | Y | Y | N | N | N | N | N |
Password#3 | 30 bytes | Y | Y | N | N | N | N | N |
Table identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Indicator variable name | 30 characters, 31 characters, 63 characters#1 | Y#4 | Y | Y#4 | Y | N | Y#4 | Y#4 |
Statement label | 30 bytes | Y | Y | Y#2 | Y | Y | Y | Y#2 |
Loop variable name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Host identifier | 30 characters, 31 characters, 63 characters#1 | Y#4 | Y | Y#4 | Y | N | Y#4 | Y#4 |
List name | 30 bytes | Y | Y | Y#2 | Y | Y | Y | Y#2 |
Routine identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Column name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
RDAREA name | Y | Y | N | Y | Y | Y | Y#2 | |
SQL parameter name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
SQL statement identifier | Y | Y | Y#2 | Y | N | Y | Y#2 | |
SQL variable name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Constraint name | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
XQuery variable identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
Sequence generator identifier | Y | Y | Y#2 | Y | Y | Y | Y#2 | |
DBAREA name | Y | Y | N | Y | N | Y | N |
UC: Upper-case characters
LC: Lower-case characters
Y: Can be used.
N: Cannot be used.
#1: The lengths of embedded variable names, indicator variable names, and host identifiers are as follows:
Type of name | Host language | |||
---|---|---|---|---|
COBOL85 | COBOL2002 | C language | ||
Embedded variable name | BLOB type | 21 characters maximum | 22 characters maximum | 63 characters maximum |
Non-BLOB type | 30 characters maximum | 31 characters maximum | ||
Indicator variable name or host identifier |
For COBOL85 and COBOL2002, double-byte characters count as one character. For the C language, universal character names count as one character.
#2: Restricted by the type of character code used. Do not use if you specified utf-8 or chinese-gb18030 as the character code classification with the pdntenv command (pdsetup command in the UNIX edition).
The following text shows what to do when a specified name conflicts with an SQL reserved word. Hitachi recommends the method described in (a). Method (b) should be used when the SQL cannot be revised, including the situation in which an application cannot be modified.
Revise the SQL so that the name that is in conflict with a reserved word is enclosed in double quotation marks ("). Note that if a name containing alphabetic characters is enclosed in double quotation marks ("), the alphabetic characters will be case sensitive.
The SQL reserved word deletion facility provides a facility for deleting keywords registered as SQL reserved words from the list of reserved words. If the reserved word that is in conflict with a specified name can be deleted using the SQL reserved word deletion facility, by deleting it from the list of reserved words, you can use the specified name without enclosing it in double quotation marks ("). For a list of reserved words that can be deleted using the SQL reserved word deletion facility, see A.3 Reserved words that can be deleted using the SQL reserved word deletion facility. For reserved words that cannot be deleted by the SQL reserved word deletion facility, revise the SQL using method (a).
Although a deleted reserved word can be used as a name, it is no longer a keyword. Consequently, the SQL facility that uses the deleted reserved word may cease to function properly. For SQL facilities that lose their functionality in this manner, see A.3 Reserved words that can be deleted using the SQL reserved word deletion facility.