Reserved words and characters: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 123: | Line 123: | ||
<td>)</td> | <td>)</td> | ||
<td>*</td> | <td>*</td> | ||
<td></td> <!-- char | <td>^</td> <!-- char was undecipherable, missing/incorrect for years --> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 133: | Line 133: | ||
<td>...</td> | <td>...</td> | ||
<td>:</td> | <td>:</td> | ||
<td>% | <td>% </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 140: | Line 140: | ||
====How to refer to a field name containing reserved words or characters==== | ====How to refer to a field name containing reserved words or characters==== | ||
<p>As in | <p> | ||
As in the "Reserved words and operators" and "Reserved characters" tables above, if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following <var>FIND</var> statement references a field named <code>NOR SLS</code>:</p> | |||
<p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0 | <p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0 | ||
</p> | </p> |
Latest revision as of 15:57, 18 August 2014
Rules for reserved words and characters
A number of words and characters have special meaning to Model 204 and either cannot be used as part of field names or values or can only be used as part of a quoted string.
The rules for Model 204 reserved words and characters are as follows:
- Any word or character, including the space character, can be used as part of a field name, except the following:
?? ?$ ?& @ (as delete character) # (as flush character) ;
Note: The delete (@) and flush (#) characters used at an installation are controlled by the ERASE and FLUSH parameters. If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.
- The following list of reserved words or operators can be part of a string-without-quotes as long as they are not surrounded by spaces (ANDIRON is acceptable while AND IRON is not). They can be part of a quoted string as long as they do not stand alone ('A OR B' is acceptable while 'OR' is not). Although field names and values can contain reserved words, requests which reference those fields might not compile, or might produce unexpected results.
Reserved words and operators AFTER EACH NOT TAB EQ ALL EDIT OCC THEN GE AND END OCCURRENCE TO GT ANDIF FROM ON VALUE LE AT IN OR VALUES LT BEFORE IS ORIF WHERE NE BY LIKE RECORD WITH COUNT NOR RECORDS - If any of the following reserved characters is embedded in a field name, the character must be part of a quoted string. When creating field names, Rocket Software recommends avoiding the following characters:
Reserved characters $ > + ( < - (minus sign/hyphen) ) * ^ = / , ... : %
How to refer to a field name containing reserved words or characters
As in the "Reserved words and operators" and "Reserved characters" tables above, if a field name does contain a reserved word or character, you must enclose it in single quotes when referencing it in a request. For example, the following FIND statement references a field named NOR SLS
:
FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0
The following DISPLAY command references a procedure called %SAVINGS
:
DISPLAY PROCEDURE '%SAVINGS'