Reserved words and characters: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
===Rules for reserved words and characters=== | ===Rules for reserved words and characters=== | ||
<p>A number of words and characters have special meaning to <var class="product">Model 204</var> and either cannot be used as part of field names or values or can only be used as part of a quoted string.</p> | <p> | ||
<p>The rules for <var class="product">Model 204</var> reserved words and characters are as follows: </p> | A number of words and characters have special meaning to <var class="product">Model 204</var> and either cannot be used as part of field names or values or can only be used as part of a quoted string.</p> | ||
<p> | |||
The rules for <var class="product">Model 204</var> reserved words and characters are as follows: </p> | |||
<ul> | <ul> | ||
<li>Any word or character, including the space character, can be used as part of a field name, except the following: | <li>Any word or character, including the space character, can be used as part of a field name, except the following: | ||
<table> | <table> | ||
<tr> | <tr> | ||
<td>??</td> | <td>??</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>?$</td> | <td>?$</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>?&</td> | <td>?&</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>@ (as delete character)</td> | <td>@ (as delete character)</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td># (as flush character)</td> | <td># (as flush character)</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>; </td> | <td>; </td> | ||
</tr> | </tr> | ||
</table> | </table></li> | ||
</ul> | </ul> | ||
<p class="note"><b>Note:</b> The delete (@) and flush (#) characters used at an installation are controlled by the ERASE and | <p class="note"><b>Note:</b> The delete (@) and flush (#) characters used at an installation are controlled by the <var>[[ERASE parameter|ERASE]]</var> and <var>[[FLUSH parameter|FLUSH]]</var> parameters. If different symbols are chosen, the restriction on using these characters in field names applies to the new symbols.</p> | ||
<ul> | <ul> | ||
<li>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. | <li>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. | ||
<table style="table-layout: fixed;"> | <table style="table-layout: fixed;"> | ||
Line 98: | Line 105: | ||
</li> | </li> | ||
<li>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: | <li>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: | ||
<table> | <table> | ||
Line 136: | Line 143: | ||
<p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0 | <p class="code">FIND ALL RECORDS FOR WHICH 'NOR SLS' > 0 | ||
</p> | </p> | ||
<p>The following DISPLAY command references a procedure called %SAVINGS:</p> | <p> | ||
The following <var>DISPLAY</var> command references a procedure called <code>%SAVINGS</code>:</p> | |||
<p class="code">DISPLAY PROCEDURE '%SAVINGS' | <p class="code">DISPLAY PROCEDURE '%SAVINGS' | ||
</p> | </p> | ||
[[Category:SOUL]] | [[Category:SOUL]] |
Revision as of 21:54, 14 April 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 #Rules for reserved words and characters and #Rules for reserved words and characters, 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'