1.1.7 Specification of names

A name can be specified by either enclosing it in quotation marks (") or not enclosing it.

Reference note
For specifying a name, Hitachi recommends enclosing it in quotation marks ("). If a name containing alphabetic characters is enclosed in quotation marks ("), the alphabetic characters will be case sensitive.
Reasons
A name must be distinct from any of the reserved words. However, a name enclosed in quotation marks (") can be identical to a reserved word. Because, as the SQL is expanded, additional reserved words may be registered in the system, the potential problem of conflict with newly added reserved words can be avoided by enclosing names in quotation marks (").

If any of the following names is used in a UAP, other than a cursor name specified in a procedure or a function, it should be specified without enclosing it in quotation marks ("), even if it is identical to an SQL reserved word:

Organization of this subsection
(1) Common rules
(2) What to do if a name conflicts with an SQL reserved word

(1) Common rules

UC: Uppercase characters

LC: Lowercase characters

Y: Can be used.

N: Cannot be used.

1 Specification of these names is subject to restrictions by the host language.

COBOL 85 and COBOL 2002 permit a mix of double-byte characters and single-byte characters in embedded variable names, indicator variable names, host identifiers, and external routine names. The allowable length of an embedded variable, external routine name, or indicator variable, regardless of whether it is in single- or double-byte characters, is 30 characters for COBOL 85 and 31 characters for COBOL 2002.

2 Restricted by the type of character code used. This character code should not be used when the character code type utf-8 is specified in the pdsetup command (pdntenv in Windows).

3 The following rules apply to passwords:
  • A password must begin with an alphabetic character.
  • A password cannot consist of numeric characters only.
  • It is possible to require that a password not consist of only upper-case letters or only lower-case letters.

(2) What to do if a name conflicts with an SQL reserved word

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.

(a) Revising the SQL

Revise the SQL so that the name that is in conflict with a reserved word is enclosed in quotation marks ("). Note that if a name containing alphabetic characters is enclosed in quotation marks ("), the alphabetic characters will be case sensitive.

(b) Using the SQL reserved word deletion facility

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 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.

Usage method
SQL reserved word deletion files for which the reserved words to be deleted using the SQL reserved word deletion facility must be specified in advance in the system common definition pd_delete_reserved_word_file operand. For the system common definition pd_delete_reserved_word_file operand, see the manual HiRDB Version 8 System Definition.
When using the SQL reserved word deletion facility, you need to specify the SQL reserved word definition file to be used, by means of the client environment variable PDDELRSVWDFILE. For the client environment variable PDDELRSVWDFILE, see the HiRDB Version 8 UAP Development Guide.
Notes
  1. When executing an SQL that recreates an SQL object, in the client environment variable PDDELRSVWDFILE, specify the reserved word deletion file that was specified at the time of the definition of the object.
  2. When importing or exporting a table using the dictionary import/export utility (pdexp), in the client environment variable PDDELRSVWDFILE, specify the reserved word deletion file that was specified at the time of the definition of the table. Also, ensure that the following items match between the export source and import destination directories:
    [Figure]All files under %PDDIR%\conf\pdrsvwd
    [Figure] Values specified in the system common definition pd_delete_reserved_word_file operand